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.
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.
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.