Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

PXI6602: Setting up for simple data capture

$
0
0

I am attempting to setup a simple input capture with a PXI 6602 card in LabWindows. I have 8 signals which I would like to read back at a rate of 100Hz into an array.

 

When I attempt to set the sample clock DAQmx throws error -200077, with the following description:

 

"Function DAQmxCfgSampTiming:

Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.

Property: DAQmx_SampTimingType

Requested Value: DAQmx_Val_SampClk

You Can Select: DAQmx_Val_OnDemand"

 

I am using this card for another task which does on demand reads of the current state. Am I missing a step to reconfigure the card for clock sampled input? My current code sans error checking is this:

 

    DAQmxStopTask(TIO_read); //On demand task
    
    DAQmxCreateTask("Sample Clock",&TIO_clock);
    
    DAQmxCreateCOPulseChanFreq(TIO_clock,"TimingIO0/ctr0","100Hz_clk",DAQmx_Val_Hz,DAQmx_Val_Low,0,100,0.5);
    DAQmxStartTask(TIO_clock);
    
    DAQmxConnectTerms("/TimingIO0/ctr0InternalOutput","/TimingIO0/PFI36",DAQmx_Val_DoNotInvertPolarity);
    
    DAQmxCreateTask("Startup Timing",&TIO_samp);
    DAQmxCreateDIChan(TIO_samp,TI_PORT"/line7:0","",DAQmx_Val_ChanPerLine);   
    
    DAQmxCfgSampClkTiming(TIO_samp,"/TimingIO0/PFI36",100,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000);
    DAQmxStartTask(TIO_samp);

 

Any ideas?


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>