LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

visa real-time

Hi,

I am using the "advanced visa write and read.vi" example on LV 8.

I would like to read my data in real-time through the serial port.

The problems are :

1) the timeout error keep occuring. I would like the VI to be ready to receive any command at any time through the serial port.

2) I don't want to specify a number of "bytes to read". Can't it work like hyperTerminal and just display every byte it receives ?

My application displays the state of many sensors. I would like to notify any changes in the received byte as soon as they appear. Is there an "interrupt Visa read" or something like that ?


thanks.

BR

0 Kudos
Message 1 of 3
(3,126 Views)
Instead of having a constant for the number of bytes to read, use the VISA Bytes at Serial Port and wire the output to the byte count of VISA Read. You can put the VISA Bytes at Serial Port in a loop and whenever the bytes are greater than 0, do the read. You can also setup a VISA event (VISA I/O>VISA>VISA Advanced>Event Handling) for a serial character event and a VISA Wait On Event. When the event happens, again use the VISA Bytes at Serial Port to determine how many bytes to read.

Hyperterminal is an application program and you will have to do a little LabVIWE programming to get the same functionality.
Message 2 of 3
(3,123 Views)
Thanks Dennis ! for the very fast answer !
 
I used visa handeling event and it is working the way I want it.
 
 
BR
 
0 Kudos
Message 3 of 3
(3,114 Views)