Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone familiar with the HP Laser System 5501A?

Trying to communicate through a GPIB interface using both VISA and/or GPIB but have not being successful. Get timeout errors every time. Perhaps I am not setting the right config of the GPIB. I am new to LabVIEW but I had some training recently. Thanks in advance for your help...
Otman
0 Kudos
Message 1 of 22
(5,287 Views)
Hello, Otman.

Are you able to "Scan for Instruments" in Measurement and Automation Explorer (MAX) and find the instrument? (http://www.ni.com/support/gpib/max/scan.htm) Does the timeout occur when you read or when you write? It sounds like you get the instrument found in MAX but that the GPIB Communicator gives you a timeout when you try to read.

If this is the case, remember that in order to do a read from a device, the device must have something that it is trying to send. It may not have something to send because:

-You have not sent a proper query command to the device
-The query command was not properly terminated according the instrument's expectations (does it expect a \r or a \n or something else?)

If you can do a Scan for Instruments and pi
ck the instrument up, try to send it the following string: *IDN? with verious termination characters such as \r, \n, \r\n, etc. After each attempt, do a read of 100 bytes or so from the instrument. One or more of the reads should eventually return the make and model of the instrument, and then you know that communication is working properly.

Further, you should check your instrument's programmer's manual for more information on what termination character it requires.

Hope this helps, let me know if I can be of more assistance.

Scott B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 22
(5,286 Views)
Hello !
I have exactly the same problem as Otman with an Hp 5508A but your advices doesn't work. when i send *IDN? no response except error message but it was precised before that " the device not responding *IDN? query

I have only two days to achieve my training period

Thanks for helping me
0 Kudos
Message 3 of 22
(5,287 Views)
ScottieB,

Thanks for your reply. I am making progress, but not as quickly as I would like to. I am able to acquire data, but not consistently and at a much slower rate than I expect for my application. I greatly appreciate any light you can shed on the matter. The main issue now is timeouts on the VISA read function and the inconsistency of the data acquisition. Thanks again for your response. See the attached file for more information.

Otman
0 Kudos
Message 4 of 22
(5,286 Views)
Emeric,

I found that for these type of hardware (5501A, 5508A, ectc) you have to work down to the most fundamental level of communication you can established. VISA is a good start, as is GPIB, or even using the Interactive Control application that ships with LabVIEW. Then spend some time playing with various configarations until you discovered one that fits your needs. Hope this helps. By the way, what's the 5508A? Is that also a laser interferometer system?

Otman
0 Kudos
Message 5 of 22
(5,286 Views)
Otman,
The 5508A is an Hp measurement system, probably the same than the 5501A, that's why your work on the subject interest me ! I will soon have direct advices from our NI contact who knows very well the 5508A device. But if you get the solution before don't hesitate to tell me ( mail : m-ric.s@laposte.net)

Thank you very much
Emeric
(PS : I will try to copy your laser program and test it on my 5508A)
0 Kudos
Message 6 of 22
(5,286 Views)
Otman,

A VISA Read will stop running when one of the following things happens:

-It reads the requested number of bytes (in your case, 200)
-It receives a termination character or EOI (a GPIB end-of-transmission) signal
-The VISA timeout expires.

Most instruments will assert the EOI line on the GPIB with the last byte of transmission, telling the GPIB transceiver and also VISA there there are no more bytes in this transmission. If your instrument isn't doing this, you might see the behavior where you get data back from the VISA read but it takes about 2 seconds (or whatever the current timeout setting is) for it to return it. Is this what you're seeing?

If so, your GPIB device must use some sort of indication that its transmission
is finished, such as a special character for termination. If you can find out what this character is, then you can tell VISA to stop reading when it sees that character and not wait for the timeout. Use a VISA Property Node (on the VISA Palette) to set "Termination Character Enable" to true and "Termination Character" to the appropriate value for that character. These settings are under "message based settings" in the property node.

Hope this helps. If you have more questions, post them here.

Scott B.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 22
(5,286 Views)
Scott,

Does all you discussed in your last response apply to an HP-IB IEEE 488-1975 standard?

How can I get a quicker response to my support questions? We recently bought several LabVIEW licenses including a professional and two full development licenses.

Thanks in advance for your reply.

Otman Estrada
Sr. Mechanical Engineer
Raytheon Company
0 Kudos
Message 8 of 22
(5,286 Views)
Scott,

Does this code looks Okay to you? I'm still getting timeout errors. Not sure what's going on now. I appreciate your help. I'm attaching a Spy file also for more info on what I've done so far. Thanks.

Otman
Download All
0 Kudos
Message 9 of 22
(5,286 Views)
Otman,

Your code looks okay, but I coded something up myself and tested it here. I'm using LabVIEW 7.1 with VISA 3.1 and a National Instruments PCI-GPIB board with 488.2 v2.1. Try to run this code, but you first have to change the VISA resource name to your instrument and change the write buffer to the appropriate command that needs to be written to your device. I have coded it to terminate your VISA read whenever it sees the character "0x0A" which is "\n", newline, or decimal 10. My program is attached below.

I need to know:
-Your version of VISA, LabVIEW, and 488.2
-What sort of GPIB card you have
-Does your VISA read execute and take a long period of time before returning your data and a timeout error? Is t
his the problem that you are seeing and that we are trying to solve?

To discuss your support options with your sales representative, call (888) 280-7645.

Scott B.
Applications Engineer
National Instruments
0 Kudos
Message 10 of 22
(5,286 Views)