LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial reading/writing posibility

hi everyone,
 
I am using labview to send command and received respond from a linear stage through serial port.  Since  I need to get the positional reading while the stage is in motion, I have to keep asking the stage to send back the reading.  The question I have is that if i keep  one serial reading runing, is that possible to keep using  srial write function to send command as the same time? If that is possible, is there anything particular that I need to pay attention to ?

thanks
0 Kudos
Message 1 of 6
(2,965 Views)
No, the Write/Reads will have to be done serially. You will have to interupt your position loop briefly in order to send something else.
0 Kudos
Message 2 of 6
(2,950 Views)
All right, I get it.  One more question,
 
 when the serial read  function reads a terminate character( so the serial read function stop reading),  is it possible to stop a while loop at the same time? If possible, how? can anyone help me ?

thanks



Message Edited by zhao.lin on 05-17-2008 07:14 PM
0 Kudos
Message 3 of 6
(2,944 Views)
Hi zhao.lin,
yes it is possible. Search in the received string for you termination character, if you found it, then you can stop the loop. See the attached picture, it shows one solution.

Mike

Message Edited by MikeS81 on 05-18-2008 08:07 AM
0 Kudos
Message 4 of 6
(2,932 Views)
Thanks mikes. One more quesiton, I am not sure what specific function that you are using in your picture. Can you tell me that function is that?

thanks

0 Kudos
Message 5 of 6
(2,903 Views)
Hi zhao.lin,
it is "search and replace string".

Mike
0 Kudos
Message 6 of 6
(2,895 Views)