Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

'Ins&Automation' related problem: its utility.."scan for instrument" doesn't work while "communication with the instrument" works but erroniously as on shut down, the equipment does not come to local mode but hangs up.

Actually, I got the problem while using 'ibdev(),fucn, as I got a random No: instead of finding '0', as when I put '0' on subseqeunt functions like "send" or other so they work but dont on if I put ibdev's return value.
So I rechecked the drivers, and then started the "ins&automn" explorer, but when I'd scan the inst..it couldn't, and when I exit the explorer, the interfaced device gets hanged and I've to restart the equipment. To tell U, it successfully passes the getting started sequentionally tests
0 Kudos
Message 1 of 4
(3,823 Views)
The return value from ibdev is a handle. This handle is to be used in subsequent device-level calls. These device-levels calls are detailed in the online help, but include calls such as ibwrt and ibrd.

The Send and Receive calls are IEEE 488.2-style calls that do not take a handle. Instead, these calls take a board index to communicate through.

When writing your application, you should standardize on one type of call. Either use ibdev and the associated device-level calls (this is what I recommend) or use the Send/Receive and use the IEEE 488.2-style calls. (Note that if you use the device-level calls, you can still use the non-I/O 488.2 calls such as FindLstn to search for listeners.)

I am not sure what is occurring with the Scan for Instruments, bu
t it could be that your instrument does not accept the *IDN? query that the algorithm uses. Normally and instrument will ignore an invalid query, but your instrument could have a poorly written parser. I would not worry about it and instead work with the Instrument Communicator, ibic, or your own application.
0 Kudos
Message 2 of 4
(3,823 Views)
Dear Guru
Thanks for ur reply.
I've just tested the commands like ibonl(),but I'm with set aback that these commands dont have responce on my machine, so these are the device based cammands like but the multiboard commands (e.g: EnableRemote does work instead of ibonl board/device based command),
but sometime one of them works. As the ibdev() works, so what about using the ibdev() alongwith the EnableRemote(). Another thing how can we initialize the boardIndx and "unit descriptor" that ibdev() returns. Hope u'll tell something.

Abbas
0 Kudos
Message 3 of 4
(3,823 Views)
I am not 100% sure what you are referring to. Some commands should not cause your device to reponse. The ibonl call takes the device handle online or offline, it does not affect the device. A normal routine to communicate to a device would be:

DeviceHandle = ibdev (...);
ibwrt (DeviceHandle, "xyz", sizeof("xyz"));
ibrd (DeviceHandle, buffer, 100); // count could be increased.

An alternative is to use the 488.2-style calls:
Send (0, ...); // ...includes the address of the device
Receive (0, ...);

You should only use one of these systems for data I/O at the same time.
0 Kudos
Message 4 of 4
(3,823 Views)