LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 - problem

Hi,

I´m trying to devellop a application, that sends a commandstring to a
RS232-device and then displays the the answer. A Typical case would be, hat
I send the command "S3 (CR+LF)". This orders the device to start measuring
an send the data once every second for each sensor. This means that I do not
know of how many bytes the data consists (could be 1 or 10... sensors). So
what I would need is the following. When I click on Start the Programm opens
COM1 an sends the Command "S3 (CR+LF)". After that the Programm will display
everything that arrives on COM1 until I click "Stop" - then the programm
will send "X (CR+LF)" to stop the measuring.

Does anybody have an example that approximately will do what I need? The
Labview - Standard Example all work eithe
r whith a fixed number of bytes to
recieve or a timeout.

thx András
0 Kudos
Message 1 of 5
(3,295 Views)
Use either VISA Bytes at Serial Port (Instrument I/O>Serail palette), or Bytes at Serial Port (Instrument I/O>I/O Compatability>Serial palette) depending on which serial functions you are using. Wire the output of the function to your read function.
0 Kudos
Message 2 of 5
(3,295 Views)
Hi,
Dennis is right, you must use VISA vis to determine how many bytes are in your port.

I decided to send you an example of reading data from Tektronix TDS1012 oscilloscope which works through RS232. May be it will be useful for you to know how it have to be.

Good luck.

Oleg Chutko
0 Kudos
Message 3 of 5
(3,295 Views)
Except you don't use VISA Bytes at Serial Port which is actually just a VISA property node.
0 Kudos
Message 4 of 5
(3,295 Views)
Yes,
here is just an example of data reading from real instruments via RS232
0 Kudos
Message 5 of 5
(3,295 Views)