Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Occurrences (DAQ 3) and scan rate

Good Afternoon,
 
I'm running labview 7.0 with a PCI6036E card and attempting to generate an occurrence every time an analog input crosses a threshold. The goal is to retreive a monitor VSync pulse to synchronize display updates. I've attached a test VI that works fine as long as I keep the scan rate (set with AIStart) at 1000/s. By working fine, I mean that occurrences are detected and the time between them agrees with the pulse sequence supplied to the analog input (even down to pulse separations of 2-3ms). Surprisingly, altering the scan rate even slightly (say 1001 scans/s, but also fails at the 10k rate desired) results in incomprehensible output- there is no obvious relationship between the input signal and the time that the occurrences are generated (~15-20 ms input pulse separtion). The input singal is generated by stand alone hardware and pulses are wide enough to be sampled many times.Running my VI at 1000 scans/s is too slow for my needs. Does anyone have an idea of what I might be doing wrong?
 
Thanks in advance for any insight,
 
Ed Soucy 
0 Kudos
Message 1 of 2
(2,747 Views)

Ed,

After looking at your code one thing came to mind. Due to the dataflow nature of LabVIEW, the sequence structure in your code will not execute until all the wires going into it are available. So, this means that your first sequence (with the Wait on Occurrence functions) will not execute until the AI Read has completed. This is because you have the output of the AI Read wired to the sequence structure. If you wire everything to the left of the sequence structure this becomes easier to see. Also, you could try the Highlight Execution feature to see in what order LabVIEW executes the code.

--
Michael P
National Instruments
0 Kudos
Message 2 of 2
(2,727 Views)