Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about continue sent GPIB comand!

    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??

 

0 Kudos
Message 1 of 3
(3,430 Views)

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.

0 Kudos
Message 2 of 3
(3,408 Views)

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.

greetings from the Netherlands
0 Kudos
Message 3 of 3
(3,401 Views)