Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

HP33120A RS232

Dear Sir/Madam?

I am using LabView 6.1 generic Advanced Serial Write and Read.vi and Basic Serial Write and Read.vi to communicate with a HP33120A. I am writing a simple SCPI command *IDN? to the equipment and I do not think this command is getting to the HP33120A for it to read back my request to me. The read function always reads zero at the RS232 port and timeout after awhile. I am using a null modem cable as it said that I should do in the HP User�s Guide. I have all the latest software (i.e. compliance package 2.1, NI-VISA 3.0 and hp33120a_LV61.msi) from NI installed. I can use hyper-terminal to talk to the equipment OK. Therefore, I really think that the problem lies with the LabView code. What could I be missing?
0 Kudos
Message 1 of 4
(3,313 Views)
I'm not sure which two VIs you are referring to. Are you using VISA, or the "builtin" serial VIs? The "builtin" VIs have problems with hardware flow control, so that might be the cause.

You might want to just build a VI containing VISA Configure Serial Port (to set baud rate, parity, flow control, etc.), followed by a VISA Write and a VISA Read and see what happens.

I'd also suggest that you try the native LabVIEW instrument driver from http://ni.com/idnet if the IVI driver is not working for you. This driver supports GPIB, Serial, USB and TCP/IP on the 33xx0A line of function generators.

Brian
0 Kudos
Message 2 of 4
(3,313 Views)
Well, I am really trying three VIs. I download two from NI website and I am using one of the serial examples that comes with LabView. The basic code of each of these VIs first uses VISA SERIAL to set the baud rate, parity, flow control, etc. Then there is VISA WRITE and VISA READ and VISA CLOSE. In the example, that comes with LabView, when I turn on the bulb and run LabView the VISA Bytes at Serail Port shows zero bytes. I have also download the hp33120A drivers from NI and try running the hp33120A Getting Started.vi but it will not allow me to input the resource name. I will try the native Labview instrument. I have spent a week on a problem that should not be any trouble. This should be easy. Thanks
0 Kudos
Message 3 of 4
(3,313 Views)
I just tried the IVI driver with my 33120A. I configured the instrument to use serial, 9600 baud, 8 bits, no parity. I used LabVIEW 6.1.

I loaded the Getting Started VI, and had to right click on the "resource name" and select "Allow Undefined Names". Then I could enter "COM1" (or "ASRL1::INSTR") and the VI ran.

I did run into a problem where the default amplitude (of 0.1 volts) is out of range, but if I change that to 1 volt, the VI runs with no errors.

If you are trying the serial examples, remember that most instruments require that you terminate your commands with a carriage return or linefeed (or both). Otherwise, your instrument will just ignore you. So, hit "enter" after you type "*IDN?" into your string. (You can turn on
"\ code display" by right clicking on the string if you want to enter or see \r and \n.)

I hope this helps.

Brian
0 Kudos
Message 4 of 4
(3,313 Views)