AnsweredAssumed Answered

Query regarding VMC SCPI code - :SENS:MIX:CALC INPUT

Question asked by CraigEwens on Dec 19, 2006
Latest reply on Dec 19, 2006 by CraigEwens
Hi,

I have the following section of code which doesn't behave as I'd expect.
Command$=""
Command$=Command$&":DISP:WIND"&VAL$(Window)&":TABL OFF;"
Command$=Command$&":SENS"&VAL$(Channel)&":MIX:OUTP:FREQ:STAR "&VAL$(Config_start(1))&"MHZ;"
Command$=Command$&":SENS"&VAL$(Channel)&":MIX:OUTP:FREQ:STOP "&VAL$(Config_stop(1))&"MHZ;"
Command$=Command$&":SENS"&VAL$(Channel)&":SWE:POIN "&VAL$(Config_points(1))&";"
Command$=Command$&":SOUR"&VAL$(Channel)&":POW:LEV "&VAL$(Config_power(1))&";"
Command$=Command$&":SENS"&VAL$(Channel)&":MIX:CALC INPUT;"
Network(Na_no,Command$)
The code is written in TransEra HTBasic *shudders* and all values are correct. The Network(Na_no,Command$) line simply pushes the SCPI code to the PNA where it gets executed without reporting any errors.

The problem is that the line setting the new power level isn't successful at the end of the code; the power level is the same as before this section of code was executed.

If i swap around two lines
Command$=""
Command$=Command$&":DISP:WIND"&VAL$(Window)&":TABL OFF;"
Command$=Command$&":SENS"&VAL$(Channel)&":MIX:OUTP:FREQ:STAR "&VAL$(Config_start(1))&"MHZ;"
Command$=Command$&":SENS"&VAL$(Channel)&":MIX:OUTP:FREQ:STOP "&VAL$(Config_stop(1))&"MHZ;"
Command$=Command$&":SENS"&VAL$(Channel)&":SWE:POIN "&VAL$(Config_points(1))&";"
Command$=Command$&":SENS"&VAL$(Channel)&":MIX:CALC INPUT;"
Command$=Command$&":SOUR"&VAL$(Channel)&":POW:LEV "&VAL$(Config_power(1))&";"
Network(Na_no,Command$)
Then all lines of code work as expected including my new power level.

I presumed the CALC INPUT line was simply recalculating just frequencies and cannot understand why it should effect my POW:LEV line.

Any comments/suggestions?

Thanks
Craig.  

Outcomes