LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port not working in Vista

I have an instrument that I can log into Hyperterminal, type "IDN?", and the instrument responds.

 

I'm trying the same thing in LabVIEW using the following VIs strung together:

 

1. Visa Configure Serial Port (same settings that work in Hyperterminal, default everything else)

2. Visa Write ("IDN?")

3. Time Delay (0.2 seconds, I also tried much longer)

4. Property Node >> Serial Settings >> Number of Bytes at Serial Port

5. Visa Read (number of bytes from property node)

 

I select the correct port using the VISA pull down menu, and the VI runs without error, but zero bytes are returned. How do I make this behave like Hyperterminal?

 

I'm running this as an executable on a Vista machine with no LabVIEW, but I build it using LabVIEW 8.2.1 and the latest NI VISA, 4.6. I had to install NI VISA on the Vista machine for my COM ports to show up.

 

I've attached the VI; it's really simple.

0 Kudos
Message 1 of 7
(3,252 Views)
You are not sending any termination characters after the *IDN?. Did you look at any of the shipping examples or search the forums for serial/rs232 posts? You don't even have '\' Codes Display turned on for the write buffer control. Did you try to find an existing driver for the instrument? What is the instrument?
0 Kudos
Message 2 of 7
(3,249 Views)
You're right, it was the termination character thing. I switched from automatically adding one to including it in the serial write string, and it now works.
0 Kudos
Message 3 of 7
(3,235 Views)
Oh, and it is an Agilent 34410A DMM.
0 Kudos
Message 4 of 7
(3,234 Views)

bmihura wrote:
Oh, and it is an Agilent 34410A DMM.

Drivers are available in the Instrument Driver Network.

0 Kudos
Message 5 of 7
(3,227 Views)

No, your code had no termination characters at all - automatic or not. The enable termination character for the VISA Configure Serial Port is only for reads. Just like the help explains.

 

And while you should check the download page for updates, LabVIEW comes with the 34401 driver.

Message Edited by Dennis Knutson on 12-19-2009 05:49 PM
0 Kudos
Message 6 of 7
(3,224 Views)

Dennis Knutson wrote: 

And while you should check the download page for updates, LabVIEW comes with the 34401 driver.


You know, I thought that's what the user might have meant, but Agilent makes a 34410A as well. Not sure if there's a big difference between the two, though.

0 Kudos
Message 7 of 7
(3,208 Views)