Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB Fast PC instrument doesnt work

Im trying to work with a GPIB controlled attenuator.
 
Im having problems with the instrument being too slow to accept the commands when sent by a fast PC.
An older slower PC and everything appears to work better.
 
Im assuming the instrument is not up to the job of processing the commands.
 
How do I send charecters down to the device more slowly ?
Is there any way of telling the card/bus to work slower ?
How can I send a charecters at a time instead of sending ibwrt to send the complete command.
 
thanks
 
0 Kudos
Message 1 of 3
(3,031 Views)
>>How do I send charecters down to the device more slowly ?
You can slow down the bus timing. This is a setting accessible in MAX through the properties of the GPIB card. The slowest setting is 2us (2000ns). I think the default is faster than that.

>>Is there any way of telling the card/bus to work slower ?
>>How can I send a charecters at a time instead of sending ibwrt to send the complete command.
You can make a new function (or vi) that your application will call and the new function (or vi) calls ibwrt with one character at a time. Here is some psuedo-code. Consider the termination the instrument requires. If you are currently using EOI you will need to make another modification to only assert EOI with the last byte. The code below should also work for GPIB commands sent using ibcmd.

main()
{
    ibwrt_one("hello world\n",12);
}

ibwrt_one(char * s, int length)
{
    for i = 0 to length-1
       ibwrt(s[i], 1);
}
Message 2 of 3
(3,028 Views)
Many thanks for that, that appears to work, for writing to the instrument, but I cant make a read from it !
 
I'll just disable reading in this instance as its not critical to read back anything in this particular case, i'll fix that later.
 
I'll have to leave it running for a few days and see if it sorts out the lock outs I was having !
 
for anyone else who's interested, had to change the EOI status using
ibconfig(device, IbcEOT, 0)
to disable before writing any charecters
then
ibconfig(device, IbcEOT, 1)
to enable before the last charecter.
 
thanks again !
0 Kudos
Message 3 of 3
(3,018 Views)