LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaenous digital out and analog in

Hi. I am running into an issue with the simultaneous AI (analog in) and DO (digital out) with Athena (www.diamondsystems.com) and LabVIEW (see the supplied files): The original program example supplied by somebody (the attached 060126 file) runs fine with these two simultaneous operations.

However, for my specific requirements, I would have to put a frame (flat sequence) around the DO part (the attached 060131 file), followed by another flat sequence frame that changes another DO state. The reason that I must do this is that I have 2 valves which change states as the AI operation continuous to run.

I have noticed though, once I put those flat sequence frames around it, the DO pauses and doesn't perform the operation until the AI loop is stopped. I have tried to create various local variables but the issue persists. Would there be a workaround for this? Thanks.

Download All
0 Kudos
Message 1 of 2
(2,608 Views)

I have taken a look at your code. Based upon your description, and the fact that I do not have the driver for your device, I am not exactly sure where the program is pausing.  I can give you some suggestions to resolve your problem.  When you use a flat sequence structure, every piece of code in a frame has to finish execution before the next frame will start execution.  If you have code in parallel (i.e. digital output and analog input) in one frame and the same in a second frame the digital output and analog output in the second frame will not start until all the code in the first frame has finished execution.  In your case it you have a while loops for digital input and output in the first frame.  When both of these loops finish execution, you should see the second frame start shortly after. 

From your description what I believe is happening is that the digital output in the first frame is finishing and waiting for the analog input to finish.  After the analog input loop finishes the second frame can start.  If you want the second frame's digital output to start before the loop finishes execution you will need to take that code out of the frame.

Regards,

Jesse O
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 2 of 2
(2,585 Views)