LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

communication through serial

hi everyone,

My name is Zhi and I have another problem with on my senior project. Right now, we are trying to make labview communicate with an old stage. Its model is Neat_310M ( I have its manual uploaded). I have beening trying to make an simple communiation like wake up x-axis stage and ask it to move relative 10000 steps. However, I can only sucessfully do these two actions in hyper-terminal. When I used the VI i have set up, the stage  does not responding at all. 

my concern is that I did not open the serial port properly because while I continuely run the VI, I can still open and run  the hyperterminal together. (i believe two programs cannot share the port at the same time).

my other concer is that  since the stage controller echo back whatever command i type , for example,  I want to ask stage to move relatives  10000 steps, when I type the command, "mr",  then the controller will echo back "move relative". After it is echo, I enter the number and the stage moves.  I obeserved this kind of respond in hyperterminal.  I am wanderin if this kind of responds will cause the problem that i have.

thanks



Message Edited by zhao.lin on 05-12-2008 07:14 PM
Download All
0 Kudos
Message 1 of 5
(3,644 Views)

You are right, you cannot communicate using the serial port if Hyperterminal is already using it.

Also whatever you "see" using Hyperterminal, you will also see when running Labview to communicate with the serial port.

RayR

0 Kudos
Message 2 of 5
(3,640 Views)
hi, ray, do you mean that when I send the command over, such as using "mr",  i have to use serial read function to read its echo, " Move Realtives" and then type in the steps later? thanks.
0 Kudos
Message 3 of 5
(3,636 Views)

Hi zhoa.lin,

Yes, after you use Serial Write to send a command, you have to use Serial Read to read anything that is being returned.  You should use "Bytes At Serial Port" to find out how many bytes to read.  And use a string indicator to show what was read.

Remember to close (or hang up) Hyperterminal before running LabVIEW's serial communication.

RayR

0 Kudos
Message 4 of 5
(3,628 Views)

Communicating through serial, courtesy of LV

0 Kudos
Message 5 of 5
(3,271 Views)