Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

turn equipment into complete remote mode by GPIB

Hello,
 
I've wrote some delphi program to control equipments through GPIB. I used the units gpib.pas and dpib32.pas to send and receive messages. My problem is, although I used gpib_Init to initialize GPIB and used *RST, *CLS to clear/reset equipments, the equipments look like not in a complete remote mode. For example, once I start to communicate with agilent 34401A multimeter by NI Measurement & Automation Explorer, the measurement will not be updated unless you initiate a new trigger, which is the correct way of remote control. But if using delphi, the measurement is still continuously updated, which is the way of local front-panel operation. Similar problems occured also for FSQ, FSP, SME for some operation that needs syncronization through remote control. Once I open the NI Measurement & Automation Explorer's 'NI-488.2 Communicator' first then run delphi, everything works fine because the communicator turns equipment into a kind of 'complete remote' mode.
 
Does anybody have the same experience? Do you know what's the problem? Thank you very much!
 
Sincerely,
CZ
0 Kudos
Message 1 of 5
(4,590 Views)
Probably you just didn't configure the devices trigger mode right. If I remember correctly, the 34401 has the :TRIG:SOUR command to choose whether a measurement is triggered continously by an internal trigger or by the gpib bus. The other instruments have probably similar configuration options.
0 Kudos
Message 2 of 5
(4,583 Views)
The 34401A default trigger mode is IMM, which is immediate internal trigger. The same command get different result using NI -488.2 communicator and using delphi gpib.pas routines. I have found out the problem is because in gpib.pas, the gpib_Init routine uses SendIFC(0) to turn gpib to control-in-charge mode, but it causes equipments not in 'complete remote' mode, I still don't know why ...
0 Kudos
Message 3 of 5
(4,564 Views)

Hello changzhi,

If you are noticing differences in behavior between your program and the communicator or MAX, then you should use NI-Spy to capture the GPIB calls.  Set NI-Spy to capture and then immediately open communicator or perform your communication action in MAX (if you open MAX while NI-Spy is set to capture, you will get a large amount of VISA calls).  You will be able to see the exact calls NI-488 functions that were used to communicate to the instrument.  Simply model your code after the NI-Spy captures and you should have a program that communicates to your instrument the same way as the communicator.exe.

I hope this helps.

Steven T.

0 Kudos
Message 4 of 5
(4,529 Views)
> But if using delphi, the measurement is still continuously updated, which is the way of local front-panel operation.
 
I believe this is remote/local issue.  There are a couple reasons thinkable:
 
1) GPIB's REM might be kept FALSE --- "Remote-Disabled"
In this case, the instrument never goes to remote state.  Look for a Remote-Enable function for the GPIB, and try it after initialize call.
 
2) Repeat-Addressing might be disabled:
Depending on NI GPIB's system setting, repeat-addressing feature may be disabled.  If it is so, the 1st call of "device write" function sends MLA (listener) command to the instrument.  If you have once touched the LOCAL key on the front panel, subsequent device write calls do not change the instrument to remote again, because they skip MLA command.  If this is the case, try to call  a GPIB function, which enforce to enable the GPIB driver's "repeat addressing" feature, after the initialize call.
 
Other solution for 34401A to enforce remote state, try "SYSTem:REMote" command.  It will have the same effect as the IEEE488's remote function.  But likely this SCPI command may only be accepted when using serial interface.
 
 

このメッセージは 08-09-2007 05:48 PMに Makoto が編集しています。

0 Kudos
Message 5 of 5
(4,520 Views)