Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong ASCII conversion of data in GPIB Read

Hi,
 
I'm trying to communicate with several of my measuring devices, for example a temperature controller and a lock-in amplifier. When I send the command to read the output of the device, instead of getting an exponential string such as:
 
7.75E-03
 
I get the following string:
 
3*31A)03
 
Note that in ASCII code, all the characters in the string I get (other than the last two characters) are 4 places down the ASCII table, e.g. * is 42 while it should be . which is 46.
 
Does anyone have any idea why this happens and how I can solve this?
 
Thanks,
 
Amit.
0 Kudos
Message 1 of 4
(3,704 Views)
In article <1125393251274-260471@exchange.ni.com>, Finkler <x@no.email>
wrote:
> I'm trying to communicate with several of my measuring devices, for example a
> temperature controller and a lock-in amplifier. When I send the command to
> read the output of the device, instead of getting an exponential string such
> as:
> 7.75E-03
> I get the following string:
> 3*31A)03
>
> Note that in ASCII code, all the characters in the string I get (other than
> the last two characters) are 4 places down the ASCII table, e.g. * is 42
> while it should be . which is 46.
>
> Does anyone have any idea why this happens and how I can solve this?

Yeah, you have a bad GPIB line. It is the data bit #2 (logical 4).
This line is either bad on the controller and not reading it correctly
or bad on your instrument.

If you see it on multiple instruments it is either the card in the Mac,
the cable or connectors. First look at the connectors for bent pins,
paint etc on the gold plated fingers. if they are all good, then try
swapping GPIB cards.

If you see it on only one instrument then check that instrument
connector or get it repaired.

-Scott
PS (the same holds for PeeCee or any host computer!)

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 2 of 4
(3,691 Views)
If this is the case, you may want to disconnect all instruments and test one at a time if possible. Since equipment is connected all together at one point, a defective instrument could be pulling down that data bit on all instruments.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 4
(3,688 Views)

Thanks! It was the GPIB card.

I bought a new one.

 

Amit.

0 Kudos
Message 4 of 4
(3,685 Views)