AnsweredAssumed Answered

NEED HELP WITH VARDEF, ACTDEF

Question asked by capngene on Mar 28, 2011
Latest reply on Mar 28, 2011 by capngene
RF: HP 8594E, Prologix USB-GPIB, RealBasic.
I am trying to capture the marker amplitude (MKA?) whenever the marker amplitude changes by a preset value, say 1 dB.
I am able to communicate with the analyzer using Realbasic to send various commands, eg: IP, CF, SP, ST, MKPK HI, MKA?,KEYDEF, KEYEXC, DISPOSE,  etc. and all of the commands interact properly with my computer.

I set the analyzer to
"CF 300mz; SP 0; ST 20us; MKPK HI;"
(The result is the same with or without the quotes)
Then one at a time MKA?; repeatedly while varying the marker amplitude by using the  300 Mhz calibrator signal through a manual attenuator to the analyzer input.
So far, all works.

The next step is to take two consecutive sweep VARDEF values, subtract them and if the absolute value is greater than a preset value read the second VARDEF to the computer.


To do this, I'm trying to set three VARDEF variables, M_P1, M_P2, and M_DELTA using VARDEF, then use ACTDEF to make an infinite loop to gather the data. I'll use the KEYDEF and KEYEXC to stop the loop. So, all seems good and logical. However, Everything I try for VARDEF displays "INVALID VARFEF: M_P1" on the analyzer screen.

This is the only code I'm sending after the setup stuff that works is code to see if VARDEF works:
"VARDEF M_P1,MKA;"


I have tried in place of MKA many different functions including 2, MKA?, MKPK. All give INVALID VARDEF message. So, I can't even get the first variable set.

What am I doing wrong?  

Outcomes