LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hyperterminal serial com

Hi everyone,
 
I am controlling and monitoring my application via CLI interface using RS232/COM1/Hyperterminal. I have a few parameters that I would like to monitor with LabView and record the data collected.
 
I have seen a few suggestions how to write and read on serial communication line. However, I am not sure how to send a command and read the result through serial communication line.
 
Any help will be greatly appreciated.
 
Thanks in advance,
 
Melih
- Relatively new user! - LV 7
0 Kudos
Message 1 of 6
(3,258 Views)
When you start Labview, there is an Open button with an arrow next to it.  Click the arrow, and select Examples.  In the examples window, click the Search tab, enter the word serial in the search for box, and click Search button.  On the right you will see a list of serial port example vi's.  Double click the one that is titled Basic Serial Write and Read.vi.  This should help you get started.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(3,257 Views)

tbob,

Thanks for suggestion. I saw this example before. My question is that when you send (write) a command, how can you read the result of the command execution. I am writing a command at the CLI prompt and enter on the hyperterminal (For example: I type show voltage). In return I am getting a voltage value. I am trying to read the value.

Thanks,

Melih

0 Kudos
Message 3 of 6
(3,251 Views)
Look at the example again. There is a toggle switch called read. If that is true (the "up" position), the VI will perform a VISA Read after the VISA Write sends your command.
0 Kudos
Message 4 of 6
(3,246 Views)
I am able to send a command using the example. However, when I read it, I only ready the command line that I have sent. I would like to read the result of the command that sent. For example, when I send "show voltage", I should be reading some voltage values in return. What I am reading is only the command that I sent (show voltage), no voltage values.
 
Melih
0 Kudos
Message 5 of 6
(3,219 Views)
If the exact same command works in Hyperterminal, I would verify that you're sending the correct termination character. In the shipping example called Basic Serial Write and Read, the default text is *IDN\r\n. The \r\n is the control codes Carriage Return and Linefeed. When you tried to communicate, did you leave these characters? Check your instrument manual to verify that these are correct. What's the make and model of the instrument? Have you looked to see if there's already an instrument driver for it?
0 Kudos
Message 6 of 6
(3,210 Views)