Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM measurements using the 6071E

Hi,
 
I am trying to measure both frequency and duty cycle of a signal using one of the PCI 6071E counters. I am using the semiperiod measurements and I already got an array of values but cannot determine which of those is the hi values and which is the low. I read I can set the DAQmx_CI_SemiPeriod_StartingEdge property to DAQmx_Val_Rising, but is not working. I am getting the following message "DAQmx_CI_SemiPeriod_StartingEdge is not supported on your device". However, in the Register Programming Manual for the 6071E is clearly stated that is possible to select the polarity of the channel.
 
This is my code:
 
 DAQmxErrChk (DAQmxCreateTask("", TaskHandlePtr));
 DAQmxErrChk (DAQmxCreateCISemiPeriodChan(*TaskHandlePtr, Channel, "", MinVal, MaxVal, DAQmx_Val_Seconds, ""));
 DAQmxErrChk (DAQmxCfgImplicitTiming(*TaskHandlePtr,DAQmx_Val_ContSamps,2));
 DAQmxErrChk (DAQmxSetChanAttribute(*TaskHandlePtr,"",DAQmx_CI_SemiPeriod_StartingEdge,DAQmx_Val_Rising));
 
Any ideas ?
0 Kudos
Message 1 of 3
(7,320 Views)
Hello Pacsoft,

Unfortunately, that Starting Edge property is not supported on E-Series devices on DAQmx.  It is only supported on M Series and TIO based devices, hence the error message you were receiving.  There is a Traditional NI-DAQ example program that should work for your device.

DAQ-STC: Count the Semi-Periods (HIGH Duration and LOW Duration, Separately) of Each Pulse in a Digi...

I hope this helps,

Travis G.
Applications Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 3
(7,303 Views)

I actually verified that my code works on a M series board and everything went ok.

Thanks.

0 Kudos
Message 3 of 3
(7,298 Views)