Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

wait loop function

hi everyone,
       I try to etablish an communication with an old stage through serial port.  I am using labview 8.2. since the stage controller echo back whatever command i type and send back an asterisk after it finish an command.  Since this stage is an old model, there is an huge time delay in commucating through serial port.

In order to wait for the stage finish an command, i want to make a wait loop function to wait for the device to send back the "asterisk" and  then move on the next step. Can anyone help me with this loop fuction. I have an idea of using for loop to do it. But i do not exactly know how to do it. can anyone show me an example?

thanks


0 Kudos
Message 1 of 3
(3,566 Views)
zhao.lin,

On the VISA Configure Serial Port.vi, you will want to make the termination character "asterisk", which if my ascii memory serves me is 0x2A. Once the Read VI is reading characters, it will stop reading once it receives your termination character and move on to the next step. Note, you will need to make the timeout longer than it takes for the stage to return the data and the bytes to read longer than the data you are expecting.

Under this setup, you will need no loops and only one read VI.
-Marshall R
0 Kudos
Message 2 of 3
(3,551 Views)
thanks, I will give it a try tomorrow.  and expecting more question coming up.
0 Kudos
Message 3 of 3
(3,534 Views)