11-16-2008 07:29 AM
I have a old instrument( made in about 1990).It have 2 GPIB device address, one for sending a command byte,another for sending a parameter byte. When I sent the command and parameter separately , that instrument running well.
Code :
CommandDev.write( Command_code ); //press the windows bottun
ParameterDev.write( Parameter_code ); //press the windows bottun
However when I continue send GPIB command, the instrument not work.
Code:
CommandDev.write( Command_code1 );
ParameterDev.write( Parameter_code 1);
ParameterDev.write( Parameter_code 2);
ParameterDev.write( Parameter_code 2);
ParameterDev.write( Parameter_code 3);
ParameterDev.write( Parameter_code3 );
.
.
.
. //press the windows bottun
I have used NI spy.The capute data of those 2 case is same .
How to resolve this problem??
11-17-2008 08:48 AM
The problem have been partly resolved, when I set 100ms delay time between the two command.
But I found I must running the NIspy first, then Instrument running well. If not , the instrument not work.
11-17-2008 01:56 PM
Another option is also to slow down the hardware handshake of the gpib interface.
For old instruments the best you can do is make it 2 microseconds, I don't have a gpib interface at home so I don't know the exact naming.
It allows for 3 or 4 settings with the slowest 2 microseconds. (use Measurement and Automation explorer/ devices and interfaces/ GPIB interface to see the setup)
And do remember that NI-spy also adds a minor delay to the send/receive process, so you are correct when adding delays.