Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Byte Swap through ENET/100?

Hello,

I got a quite strange problem. I download 16 bit data words into an arbitrary signal generator - it is an Agilent ESG-D signal generator with option UND. I use the (old) Agilent ESG_ARB.EXE program which seems to be written in VB.

Everything works fine when I use a HP82341C ISA GPIB card, and the data is downloaded correctly. With the same program and the NI ENET/100 as GPIB interface it seems to work the same way but the downloaded data in the generator has the two bytes of each 16 bit value swapped.

Any idea? Who must update, Agilent its software or NI its driver?

Best Regards

Wolf-Henning Rech
Pforzheim University of Applied Sciences
0 Kudos
Message 1 of 4
(3,892 Views)
Hi Mr. Rech,

I am not sure exactly how your setup works, but to fix this, it should be pretty easy to code a byte swap routine. There is also a LabVIEW vi that will do byteswapping for you (if you are using labview). Are you using VISA to communicate?

Hope this helps out!

Best Regards,
Aaron K.
Application Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,892 Views)
Hi Aaron,

thank you for your comment.

Sure can I swap the bytes in my data source (this is what I actually do), but it is just a work-around, not a solution to the problem. I would expect my data to arrive correctly and independently of the transmission path, using a $1500 box.

It is like I had to swap your phone number if I dial on a green phone instead of a blue one...

I am using the download tool from Agilent which claims to be compatible with both Agilent and NI GPIB cards but may have never been tested with the special ENET/100.

(UND Dual Arb Download and File Translation Utility Ea_win.exe, see http://we.home.agilent.com/cgi-bin/bvpub/agilent/editorial/cp_MiscEditorial.jsp?OID=536913930&NAV_ID=-12042.536880924.03&LANGUAGE_CODE=eng&COUNTRY_C
ODE=ZZ)

I also sent an e-mail to Agilent and already received a phone call from their support engineer. He tried to explain me that it must be a NI problem because my setup works perfectly with the Agilent GPIB card. I am sure you like to tell me it must be an Agilent problem because a program from Agilent is sending the data 🙂

I think the truth may be that the data is swapped during the call of the NI Windows IO library from the Agilent program, either because the documentation of the library is incorrect, or because Agilent did a faulty implementation. I cannot decide easily.

Another idea: the data is swapped during LAN transfer between the PC and the ENET/100 interface - this sounds reasonable as the PC is a 'Little Endian' system, while the PPC based ENET/100 box is 'Big Endian'. The swap seems to occur only under special cirumstannces (16 bit transfers?) as I succesfully did a complete firmware update to the ESG generator through the ENET/100 without problems.

Your
comment?

Best Regards

Wolf-Henning Rech
Pforzheim University of Applied Sciences
0 Kudos
Message 3 of 4
(3,892 Views)
Hi Aaron,

today I checked the situation with a PC with a NI GPIB card. The system worked without byte swap.

Ergo: both Agilent and NI GPIB cards don't swap bytes. The ENET/100 interface does. From this it is quite clear to me that the NI ENET/100 driver has a bug.

Best Regards

Wolf-Henning Rech
Pforzheim University of Applied Sciences
0 Kudos
Message 4 of 4
(3,892 Views)