From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Buffered AI Data

Hi,
I'm still pretty new to labview 8.2 and I'm having some trouble with reading buffered data.  Basically, I have a program that I want to read and plot data from an analog input at the instant a pulse is sent out.  The pulse will be used to trigger other external devices. 
At the same time, I would also like for the program to plot the buffered data right before the pulse.  So far this is what I have.  I feel like I need to somehow us the triggering functions but I have not been able to get them to work.

Any help is appreciated.

Thanks,
Yin
0 Kudos
Message 1 of 4
(2,240 Views)
BTW-  my hardware is PCIe-6259 with BNC-2110 and BNC-2111
0 Kudos
Message 2 of 4
(2,234 Views)
Okay, so I've scoured through the examples and this is the best I've come up with but there seems to be some sort of program heiarchy issue.  If I run the program with the light bulb on so that I can see the actual paths, then the square wave will trigger the analog In read.  If I run the program with the light bulb off (so at normal speed) then the square wave does not trigger the Analog In read.  Those wait for tasks are attempts to make the program run at normal speed, but they don't seem to work.

Does anyone have any suggestions?
0 Kudos
Message 3 of 4
(2,221 Views)
Delete the DAQmx Wait vi that is after the Reference Trigger vi.  I don't have your device so I can't test it out.  But I think that the Wait is the problem.  The Wait that is in the Pulse Generation thread is OK.  Also, you may want to move the error wire going from the top Start vi to the error input of the bottom start vi.  That way, both pulse generation and read can start at the same time, although the read should not take place until the pulse trigger is received.  Make sure your trigger source is properly defined.
- tbob

Inventor of the WORM Global
Message 4 of 4
(2,210 Views)