LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

raw GPIB and VISA commands

Hi,

i have a software, written by an external company in labview 6, to
control several devices. But I dont have the block diagrams. This
software use VISA calls to communicate with a profile 800 mainframe.
Now I want to set an parameter of the mainframe via GPIB raw command.
I can integrate my own VIs in our software.

So I have written my VIs to send and read an GPIB-string (with GPIB
write and GPIB read) and within Labview all is running fine.
But if I use this VIs within our software, I get an GPIB-error 6. At
this time there is no other communication in background with this
device. But if I start Labview and communicate with my VIs once, then
my VIs work in our software too.

Do I have a problem with initialization?

What can I do to solve
my problem?

Regards,
Uwe Roessner
0 Kudos
Message 1 of 2
(3,528 Views)
Hi Uwe,
It seems like it could be an initialization issue. Perhaps your VI does an initialization that the software doesn't do, but is necessary for your VI to run. I would definitely consider that. According to GPIB Error Codes document:
EABO (6)
Error Condition: I/O operation aborted.
Description: EABO indicates that an I/O operation has been cancelled for some reason.
Possible Cause: The EABO error is usually the result of a timeout during a read or a write operation, but it can also be caused by calling the ibstop function, the ibclr function, or similar functions while an I/O operation is in progress. You may receive a timeout during write operations with a PCI-GPIB board, if the PCI bus mastering (an option in the BIOS of your computer) is not enabled. You may receive a timeout during read operations, if the instrument you are reading from did not understand the previous command, so it has nothing to write to you. There are a few reasons why the instrument may not have anything to say:

The message to the instrument may have been misspelled. For example, "*IDN?" is a common identification query for IEEE 488.2 compliant instruments. It is easy to misspell this message as "*IND?", which the instrument will not understand, so it will not generate a message string for you to read from the instrument.

The message to the instrument may contain a command that the instrument does not understand. For example, the "*IDN?" message from the previous example is only understood by IEEE 488.2 compliant instruments. If your instrument is an older, non-IEEE 488.2 compliant device, then it will not understand "*IDN?", so it will not generate a message string for you to read from the instrument.

The instrument may use a particular EOS (end of string) character as its termination method, but you may forget to append this termination character to your message. For example, if your instrument expects a linefeed as the EOS character, then "ID?" will not work, but "ID?\n" (where \n represents a linefeed in IBIC) will.

You may expect to see EOI (end or identify, one of the five bus management lines) as the termination method, but if the instrument does not set the EOI line when it finishes sending its message, any read operation that you perform will time out.

Solutions:
Make sure that your messages consist of commands that the instrument understands. Check your device's user manual for a list of possible commands.

Verify that you are using the correct termination method for your instrument. Byte count (where you expect to receive a certain number of bytes in a message) is always used, but some instruments use EOS and byte count, some use EOI and byte count, and some use only byte count. Check your device's user manual for the possible termination methods to use with your instrument.

If EOS is the termination method, then be sure to append the termination character to the end of your message. You can specify the termination character in the GPIB Configuration Utility, but the NI-488.2 driver will not automatically append it for you!

Lengthen the timeout period for I/O operations using the ibtmo command.

If you receive all of the data and get an EABO error, then look for a particular end of string character (e.g., linefeed or carriage return) and configure the GPIB board to terminate the read on that character using the ibeos function.


Hope this helps.

Anu Saha
Applications Engineer
National Instruments
Anu Saha
Academic Product Marketing Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,528 Views)