Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Agpsa for PSA 4443A (always resets on INIT)

Solved!
Go to solution

problem : your library for the PSA E4443A seems to 'send' a reset to the PSA box regardless the options being used

 

err = agpsa_InitWithOptions ("GPIB0::18::INSTR", VI_FALSE, VI_FALSE,
                             "Simulate=0,RangeCheck=1,QueryInstrStatus=1,Cache=1",
                             handle);

 

NOTES

   1.- I am using TCP (rather than GPIB)

   2.- I downloaded the latest you have on the WEB and have the same problem

   3.- for sanity check , I tryed your agesa (for the Agilent ESA series) ... and this works OK

 

 err = agesa_InitWithOptions ("myftp address", VI_FALSE, VI_FALSE,
                             "Simulate=0,RangeCheck=1,QueryInstrStatus=1,Cache=1",
                             handle);

Since the 'agesa.fp' works OK, I am assuming 'my' system (box + labwindows program) is OK

and the problem is on 'agpsa.fp'

 

Question : Is there a plan to upgarde or fix this problem ? 

 

regards

Jose

Jose Olvera
0 Kudos
Message 1 of 5
(4,187 Views)
Can you take a NI Spy Capture?
0 Kudos
Message 2 of 5
(4,162 Views)

Hello Jose,

       Even if the instrument is not reset, the instrument driver will run agpsa_DefaultInstrSetup(), which includes the following commands:

 

  viCheckErr( viPrintf (io, "*CLS;*ESE 1;*SRE 32"));   /* Enable all correction switch */
  viCheckErr (viPrintf (io, ":CORR:CSET:ALL ON"));/* Set Retain All Parameters to false */
  viCheckErr (viPrintf (io, ":RAD:STAN:RPAR OFF")); /* Set Limit Line Mode to Fixed */
  viCheckErr (viPrintf (io, ":CALC:LLIN:CMOD FIX"));/* Enable Auto Couple */
  viCheckErr (viPrintf (io, ":COUP ALL"));/* Set Marker Trace Auto to false */
  viCheckErr (viPrintf (io, ":CALC:MARK1:TRAC:AUTO OFF"));
  viCheckErr (viPrintf (io, ":CALC:MARK2:TRAC:AUTO OFF"));
  viCheckErr (viPrintf (io, ":CALC:MARK3:TRAC:AUTO OFF"));
  viCheckErr (viPrintf (io, ":CALC:MARK4:TRAC:AUTO OFF"));
  viCheckErr (viPrintf (io, ":CALC:MARK1:STAT OFF"));
  viCheckErr (viPrintf (io, ":CALC:MARK2:STAT OFF"));
  viCheckErr (viPrintf (io, ":CALC:MARK3:STAT OFF"));
  viCheckErr (viPrintf (io, ":CALC:MARK4:STAT OFF"));

 

If you choose to reset the device, the agpsa_reset() function will be called, which sends the *RST command, which resets the instrument.

 

You should not rely on any pre-existing instrument settings in your test application.  You should explicitly configure all of the settings that your test application will use.

 

Cheers,

 

NathanT

0 Kudos
Message 3 of 5
(4,154 Views)
41.  Formatted viWrite (TCPIP::192.168.202.13::IN...(0x0564F120), ":FREQ:STOP 6.700000e+09", 23, 23)
Process ID: 0x00001578         Thread ID: 0x000004B4
Start Time: 08:42:06.802       Call Duration 00:00:00.016
Status: 0 (VI_SUCCESS)

 

 

By using the SPY ...it seems the gpsa.fp library  sends a command to change the STOP frequency !!!! (see above )

 

NOTE: I cannot follow your suggeestion ("....do no assume the PSA is at 'x' state.... etc,etc) since My application

suppose to 'fetch' the PSA box state ....inmediately after the 'IVI_INI'

 

Jose 
Jose Olvera
0 Kudos
Message 4 of 5
(4,134 Views)
Solution

If you are combining your program with an initial setup that is done manually, then I would recomend you modify the driver. You mention that you are using LabWindows and the source code is available. Personally, I believe a driver should initialize an instrument to a known state and don't think there is anything that needs fixing.

 

If indeed you are using a manual setup, you could also pause the program after the init is done and let the user play around as much as he or she wants.
Message 5 of 5
(4,130 Views)