01-25-2019 02:34 PM
Hello,
I have a system with Windows 10 and PXI-6229. I am trying to make a pulse measurement. A very simple one. My signal goes up to 5 V for 300-600 ms and drops to 0. I was getting a time out in my code so I set up a task in data neighborhood. When I run my task it returns a value, I can see it in the upper section of the screen but still times out and pops up a message box with an error. My acquisition sample is set up to "1 sample".
Thanks
J.
01-28-2019 12:21 PM
Hi Cimteker,
Whats the error you are receiving?
Check the M series Manual for more information about counter funtions.
01-28-2019 01:08 PM
I can't see enough about the MAX config to say much with confidence. I do notice a mismatch between your Max/Min values and units -- there's no such thing as fractional "Ticks" for counting. The count value you get is almost 1 million, so it *does* appear to be measuring in Ticks units. But those million ticks would still (likely) represent only about 12 msec, not 300-600. (Odds are the board uses its max timebase of 80 MHz for the measurement. A million cycles takes 1/80th sec.)
Try a shipping example for pulse width measurement and see if you get better results. Or post your original code (if necessary, "save for previous version" to LV 2016 or earlier please) and I can try to make sense of the timeout problem.
-Kevin P
01-28-2019 01:24 PM
This is the error I am receiving:
Error -200474 occurred at DAQ Assistant
Possible Reason(s):
Specified operation did not complete, because the specified timeout expired.
01-28-2019 01:28 PM
I must have played with units. Originally it was set to seconds.
Another screen attached. This time it reads what it looks like 400 ms and still generates an error.
01-28-2019 01:30 PM
This is my code. It's in Python.
try:
taskHandle = OnStart.hNiDaq.CreateTask("myTask")
channel = "PXI_6229/ctr0"
minVal = 0.01
maxVal = 2.0
startEdge = OnStart.hNiDaq.CONST.DAQmx_Val_Rising
OnStart.hNiDaq.CreateCIPulseWidthChan(taskHandle, channel, "",
minVal, maxVal, OnStart.hNiDaq.CONST.DAQmx_Val_Seconds, startEdge, "")
OnStart.hNiDaq.SetCIPulseWidthTerm(taskHandle, channel, "PFI0")
OnStart.hNiDaq.StartTask(taskHandle)
time.sleep( 0.25 )
IO.setOutput("Nest1/LIInput")
pwidth = OnStart.hNiDaq.ReadCounterScalarF64(taskHandle,5.0)
my.testResult.value = pwidth
except Exception, e:
RDX.printError( e.message)
finally:
if(taskHandle != None):
OnStart.hNiDaq.StopTask(taskHandle)
OnStart.hNiDaq.ClearTask(taskHandle)