ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ENET/100 confusing addresses?

I am using an ENET/100 to control 2 DLSs and 2 HP switches. My code is in perl running on linux. Everything works fine through 7 iterations of the test, and then on the 8th, when doing a *RST and *IDN? on one of the DLSs, I get a response back that indicated it is talking to one of the switches instead. It is almost like the drivers have confused which device has which address. Any ideas? It is always 7 that work fine and then addresses get munged.
0 Kudos
Message 1 of 5
(3,723 Views)
Hi Max,

I looked through our databases and couldn't find anything like this. What addresses are the devices on?. What do you do in each iteration?. Do youquery the ID of every device or just one?.

If you can give me a simple description of the operation of your code I could test it out.

DiegoF.
National Instruments.
0 Kudos
Message 2 of 5
(3,723 Views)
Adding an NI Spy capture would also help, just to see what may be happening in the driver.
0 Kudos
Message 3 of 5
(3,723 Views)
Hi Diego,

I have 2 Line Simulators on addresses 14 and 15, and the switches on addresses 8 and 9. I have a separate module that manages the switches and one that manages the Line Simulators. I put some debug prints in the perl ni.pm module and what happens is that I pass
0 14 11 0 1 0 to the ibdev function where 0 is the gpib index and 14 is the address. When I print out the address when the module is finished, the address is 8, not 14. Hence my code craters as it expects to be talking to a Line Simulator, not a switch.
0 Kudos
Message 4 of 5
(3,723 Views)
Hi Max,

I have been testing different thing to see if the ENET driver would confused the devices, but I couldn't find any problems. I'm attaching a test program that performs 20 queries to two devices. It is a C program, since I'm not familiar with Perl. The function calls shouuld be the same.

You can compile the program with:

gcc test_enet.c -otest -lgpibenet

The program assumes two device on addresses 2 and 5 and that the GPIB-ENET/100 is GPIB1.

run the program with:
./test

DiegoF
National Instruments
0 Kudos
Message 5 of 5
(3,723 Views)