Wrong ASCII Characters Returned When Querying GPIB Instrument

Updated Feb 21, 2023

Reported In

Hardware

  • GPIB-USB
  • GPIB-USB-HS+
  • GPIB-USB-HS

Software

  • Measurement & Automation Explorer (MAX)
  • LabVIEW

Driver

  • NI-VISA
  • NI-488.2

Issue Details

I am trying to communicate with my Keysight instrument in NI-MAX (or LabVIEW) using a GPIB-USB-HS+ interface. When I send an *IDN? Query to the instrument, I expect to receive a string with the model number and other details of the device; however, the response, as shown below, appears corrupted, as some of the ASCII characters returned are incorrect.
 

"Ogywighv\sVgghnonogigw.76667A.OY77706860.A.06.16/06.60/06.16/00.69/07/01\0E"

Solution

GPIB uses eight parallel digital lines for bi-directional data transfer. The behavior observed is caused by one or several of these data lines being defective.

You can confirm which data lines are defective by comparing characters between the expected response and the actual response in binary representation, as shown in the table below.

 
Expected ASCIIKeysight
Binary Value0100101101100101011110010111001101101001011001110110100001110100
Received ASCIIOgywighv
Binary Value0100111101100111011110010111011101101001011001110110100001110110

 

In this case, data lines #1 and #2 present an unexpected behavior and must be checked for bent pins, physical damage, or alterations in the GPIB interfaces, connectors, and cables.

You can also try using a different GIPB interface, cable, or instrument to solve the issue or pinpoint its location. If the behavior is specific to an instrument or GPIB interface, consider having it inspected and repaired if necessary.