LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two while loops at same time: one RS-232 serial one GPIB communication. possible?

hello,

 

The lab i'm working in uses labview to perform spectroscopy measurement. 

would this be possible: one while Loop "A" that receives data through GPIB at a desired interval of time, and one while loop "B" that receives data from another GPIB instrument and then output a byte of word through serial comunication. Loop A works perfectly on its own..but if i try to run both loops together, would there be conflicts? if no, then loop A i'd like to run at user defined interval of time ,and loop B as fast as possible. would that be possible? 

 

 

thank you very much for your help!

 

***The following is supplemental information on the loop as it is not necessary unless interested in knowing***

 

we have a GPIB instrument that reads voltage of our sample and a simple mathematical equation converts that to a temperature, and we 'd like to read that temperature constantly and as it changes, we change the output of our PIEZO box (a thing that can output from 0 to 10 volts of current). piezo box uses the standard serial communication. so in a way a simple/fake PID loop to keep the temperature stable. the output of piezo is connected to a thermocouple which heats up our sample.

the same time, we also have a "camera" that is communicating through GPIB, that records the spectrum of the sample and display it on a XY graph. we'd like that camera being continuously running as well. so it will keep taking picture one after another interval of 1 second at the same time as the first loop keeping the temperature stable.

0 Kudos
Message 1 of 2
(2,502 Views)

You can have two While Loops running in parallel.  You can even code it so that they use a particular CPU code.

 

However, the GPIB bus does not support parallel communication.  It can be near "parallel" especially if coded in such a way to synchronize the commands, but they may get to the instruments a few ms apart.  That is a restriction on the GPIB bus, not within Labview or the While Loops.

 

Message 2 of 2
(2,487 Views)