LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a seriell port with VISA correctly?

Hello
I have the following system: A Nanovoltmeter from Agilent, modell 34420A, LabVIEW 7.1 and XP as operative system on the computer. The voltmeter reads 1024 readings and store them in the internal memory. By using a command I can collect the readings via the GPIB or seriell port. I use the seriell port. Therefore I use the VISA routines in LabVIEW. I configure the seriell port, read the number of bytes at the port and finally read the data from the voltmeter. Everything works, except that I found out it doesn't collect all the readings. I tried using Waits between sending the command and reading the data. It doesn't help much. I tried then the VISA session in the NI-Measurement & Automation program. I couldn't collect all the data by just one Read command. I had to use at least two or three Read commands to collect all the data. I wonder, if I use the routine to get the number of bytes at the seriell port of the instrument shouldn't I get the whole number of readings stored in the instrument? I tried using a high fixed number, reading more data than available. I got more data but still not all 1024 readings.
Normally I use GPIB communication but I start wondering if there might be a similar problem.
Regards
0 Kudos
Message 1 of 2
(2,556 Views)
Hi Maddin,

You can place your read vi into a while loop that monitors (after a brief delay) if there is still data in the serial buffer. The loop would be wired to the vi which checks for serial data. Unfortunately, I do not have LV installed on this machine, so I cannot tell you the names of the vi's to use. But I'm sure you get the picture.

- JLV-

😄
Message 2 of 2
(2,549 Views)