! Instrument Driver for the HP 547x0 series Modular Digitizing Oscilloscopes ! Rev. A.00.06 ! Copyright (C) Hewlett-Packard Co. 1992 - 1995. All rights reserved. ! REVISION 2.00; INITIALIZE RESET; ERROR COMPONENT stat_err; STORE COMPONENT STORE_STATE; RECALL COMPONENT RECALL_STATE; update component auto_update; eol 10; component bogus nogen noerrcheck; type integer; initial invalid; set actions; if livemode then; output string "*CLS;*SRE 32;*ESE 1"; flush; output string "*OPC?;*OPC"; flush; wait spoll bit 5; enter stack format K; drop ; end if; invalidate bogus; end actions; end component; COMPONENT Plug_in1 ; TYPE DISCRETE; VALUES EMPTY,HP54711A,HP54712A,HP54713A,HP54721A,HP54722A; INITIAL EMPTY; SET ACTIONS; END ACTIONS; GET ACTIONS Get_plug_in1; END COMPONENT; COMPONENT Plug_in2 ; TYPE DISCRETE; VALUES EMPTY,HP54711A,HP54712A,HP54713A,HP54721A,dum22; INITIAL EMPTY; SET ACTIONS; END ACTIONS; GET ACTIONS Get_plug_in2; END COMPONENT; COMPONENT Plug_in3 ; TYPE DISCRETE; VALUES EMPTY,HP54711A,HP54712A,HP54713A,HP54721A,dum22; INITIAL EMPTY; SET ACTIONS; END ACTIONS; GET ACTIONS get_plug_in3; END COMPONENT; COMPONENT Plug_in4 ; TYPE DISCRETE; VALUES EMPTY,HP54711A,HP54712A,HP54713A,HP54721A,dum22; INITIAL EMPTY; SET ACTIONS; END ACTIONS; GET ACTIONS Get_plug_in4; END COMPONENT; COMPONENT Mainframe ; TYPE DISCRETE; VALUES HP54710A,HP54720A; INITIAL HP54720A; GET ACTIONS Get_mainframe; END COMPONENT; COMPONENT First_Plug_In ; TYPE INTEGER ; VALUES RANGE 0,4,1 ; INITIAL 0 ; GET ACTIONS Get_First_Plug_In ; END COMPONENT ; COMPONENT SLOT_11A ; TYPE INTEGER ; VALUES RANGE 0,4,1 ; INITIAL 0 ; END COMPONENT ; COMPONENT SLOT_12A ; TYPE INTEGER ; VALUES RANGE 0,4,1 ; INITIAL 0 ; END COMPONENT ; COMPONENT SLOT_13A ; TYPE INTEGER ; VALUES RANGE 0,4,1 ; INITIAL 0 ; END COMPONENT ; COMPONENT SLOT_21A ; TYPE INTEGER ; VALUES RANGE 0,4,1 ; INITIAL 0 ; END COMPONENT ; COMPONENT SLOT_22A ; ! new hp54722A plug-in is a 4-wide plugin and takes slot 1 only TYPE INTEGER ; VALUES RANGE 0,1,1 ; INITIAL 0 ; END COMPONENT ; COMPONENT RESET NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; CLEAR; output string "*CLS"; flush; OUTPUT STRING "*RST;*SRE 0;*ESE 0;:RUN;"; OUTPUT STRING ":SYSTEM:HEADER OFF;LONGFORM OFF;"; OUTPUT STRING ":MEAS:SEND OFF" ; ! disables state code on error OUTPUT STRING ":TRIG:SWE AUTO;"; FLUSH; POKEINITIAL; ! invalidates 'acquired' values -- waveforms, msmts, ... GOSUB Check_version ; if stop_flag then ; gosub flash_warning ; else ; gosub set_model ; gosub set_init ; end if ; END ACTIONS; END COMPONENT; COMPONENT SUBSYSTEM NOGEN NOERRCHECK; TYPE DISCRETE; VALUES MAIN,TIMEBASE,CHANNEL,TRIGGER,TRIGGER_N,Wfm_math,MEASURE,MEASDEF,LIMIT,MARKERS, ACQUISITION,WAVEFORM,FFT,DISPLAY,WMEMORY,misc,STATUS,ABOUT; INITIAL MAIN; PANEL SET ACTIONS; HIDE Flash_warning ; HIDE STANDARD; HIDE TIMEBASE_SUBSYSTEM; HIDE CHANNEL_SUBSYSTEM; HIDE TRIGGER_SUBSYSTEM; HIDE TRIGGER_N_SUBSYSTEM ; HIDE MARKER_SUBSYSTEM; HIDE Math_subsystem; HIDE MEASURE_SUBSYSTEM; HIDE MEASDEF_SUBSYSTEM ; HIDE LIMIT_SUBSYSTEM ; HIDE ACQUISITION_SUBSYSTEM ; HIDE WAVEFORM_SUBSYSTEM; HIDE FFT_SUBSYSTEM ; HIDE DISPLAY_SUBSYSTEM; HIDE WMEMORY_SUBSYSTEM ; HIDE misc; HIDE STATUS_PANEL; HIDE ABOUT_PANEL; SELECT SUBSYSTEM; CASE MAIN; SHOW STANDARD; CASE TIMEBASE; SHOW TIMEBASE_SUBSYSTEM; output string ":MENU TIM"; CASE CHANNEL; IF First_Plug_In THEN ; SHOW CHANNEL_SUBSYSTEM; SET Channel; OUTPUT STRING ":MENU CHAN"; OUTPUT Channel FORMAT K ; END IF ; CASE TRIGGER; SHOW TRIGGER_SUBSYSTEM; output string ":MENU TRIG"; CASE TRIGGER_N ; SHOW TRIGGER_N_SUBSYSTEM ; output string ":MENU TRIG" ; CASE MARKERS; SHOW MARKER_SUBSYSTEM; output string ":MENU MARK"; CASE Wfm_math; SHOW MATH_SUBSYSTEM; OUTPUT STRING ":MENU MATH"; CASE MEASURE; SHOW MEASURE_SUBSYSTEM; output string ":MENU MEAS"; CASE MEASDEF; SHOW MEASDEF_SUBSYSTEM; CASE LIMIT ; SHOW LIMIT_SUBSYSTEM ; output string ":MENU LTES" ; CASE ACQUISITION ; SHOW ACQUISITION_SUBSYSTEM; output string ":MENU ACQ"; CASE WAVEFORM; SHOW WAVEFORM_SUBSYSTEM ; output string ":MENU ACQ"; CASE WMEMORY; SHOW WMEMORY_SUBSYSTEM ; output string ":MENU WAV"; CASE FFT; SHOW FFT_SUBSYSTEM ; output string ":MENU FFT" ; CASE DISPLAY; SHOW DISPLAY_SUBSYSTEM; output string ":MENU DISP"; CASE misc; SHOW misc; output string ":MENU UTIL"; CASE 'STATUS'; SHOW STATUS_PANEL; output string ":MENU UTIL"; CASE 'ABOUT'; SHOW ABOUT_PANEL; END SELECT; END ACTIONS; END COMPONENT; COMPONENT CHARSTRING NOTSAVED NOGEN NOERRCHECK; TYPE STRING 255; INITIAL INVALID; GET ACTIONS ; END ACTIONS ; END COMPONENT; COMPONENT NUM_BUFFER NOTSAVED NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; END ACTIONS ; END COMPONENT; COMPONENT Temp NOTSAVED NOGEN NOERRCHECK; TYPE INTEGER; END COMPONENT; COMPONENT Temp_string CLONE CHARSTRING; component disp_temp notsaved nogen noerrcheck; type integer; end component; !======================= ! LEARN STRING SUPPORT !======================= COMPONENT LEARN_STRING; TYPE IARRAY 6144; INITIAL INVALID; END COMPONENT; COMPONENT Ls_length NOGEN NOERRCHECK; TYPE CONTINUOUS; END COMPONENT; COMPONENT Ls_bytes NOGEN NOERRCHECK; TYPE INTEGER; END COMPONENT; COMPONENT STORE_STATE NOTSAVED NOERRCHECK NOGEN ; TYPE INTEGER; SET ACTIONS; ! get learn string from instrument ... OUTPUT STRING ":SYST:SET?"; ENTER CHARSTRING FORMAT '#,A'; ! consume # ENTER Ls_bytes FORMAT '#,D'; fetch Ls_bytes; gosub Get_num_bytes; store NUM_BUFFER ; FETCH NUM_BUFFER ; FETCH 2 ; idiv ;store Ls_length ; ENTER Learn_string FORMAT INT16 0 Ls_length; IF LIVEMODE THEN; ELSE; MATSCALE 0,0 Learn_string; END IF; fetch NUM_BUFFER ; FETCH 2 ; MOD ; IF STACK THEN ; ENTER Extra_byte FORMAT '#,B' ; ! even LF FETCH 1; ELSE; FETCH 0; END IF ; STORE Odd_Even; ENTER Temp_string FORMAT '#,A'; ! consume LF END ACTIONS; END COMPONENT; COMPONENT Odd_Even NOGEN NOERRCHECK; TYPE INTEGER ; INITIAL 0 ; ! 0- Even, 1 - Odd END COMPONENT ; COMPONENT Extra_byte NOGEN NOERRCHECK; TYPE INTEGER ; END COMPONENT ; COMPONENT Length NOTSAVED nogen noerrcheck; TYPE INTEGER ; INITIAL invalid ; END COMPONENT ; ACTIONS Get_num_bytes; ! ! array i/o format = #nxxxb1b2b3b4... ! where # = literal, ! n = len(xxx) ! len = number of bytes to follow. if livemode then; STORE Length ; FETCH 0; STORE NUM_BUFFER ; fetch ""; LOOP ; ENTER CHARSTRING FORMAT '#,A'; fetch CHARSTRING ; trimstr; CATSTR; fetch NUM_BUFFER; fetch 1; add; dup; store NUM_BUFFER ; fetch Length ; eq; exit if stack; END LOOP ; VAL; ! keep result in stack end if; END ACTIONS ; COMPONENT RECALL_STATE NOTSAVED NOERRCHECK NOGEN ; TYPE INTEGER; SET ACTIONS; IF LIVEMODE THEN; ! Search for at least 1 non-zero element in the state FETCH 1; LOOP; DUP; FETCH Ls_length; GT; EXIT IF STACK; DUP; FETCH LEARN_STRING; EXIT IF STACK; FETCH 1; ADD; END LOOP; FETCH Ls_length; LE; ELSE; FETCH 1; END IF; IF STACK THEN; ! download learn string to instrument ! OUTPUT STRING ":SYST:SET #" ; OUTPUT Ls_bytes FORMAT 'D'; FETCH Ls_length; fetch 2; mul; FETCH Odd_Even; ADD; VALSTR; TRIMSTR; DUP; STORE CHARSTRING; LENGTH; GOSUB PAD_ZEROS ; OUTPUT CHARSTRING FORMAT 'K'; OUTPUT Learn_string INT16 Ls_length; IF Odd_Even THEN; output extra_byte FORMAT 'B'; END IF ; output string ""; FLUSH ; output string "*CLS;*SRE 32;*ESE 1"; flush; output string "*OPC?;*OPC"; flush; wait spoll bit 5; enter stack format K; drop ; GET TIME_INCR; VALIDATE ALL; ! triggers 'UPDATE ACTIONS' to react ... GET EDGE_TRIGGER_UPDATE; GET STATE_TRIGGER_UPDATE; GET GLITCH_TRIGGER_UPDATE; GET DEVENT_ARM_UPDATE; GET DEVENT_EVENT_UPDATE; GET DEVENT_TRIGGER_UPDATE; GET DTIME_ARM_UPDATE; GET DTIME_TRIGGER_UPDATE; GET TIME_INCR ; ELSE; IF LIVEMODE THEN; NOTIFY "Invalid Recall State not sent to instrument"; NOTIFY "Invalid State possibly caused by program being written in NOT LIVE mode"; END IF; END IF; END ACTIONS; PANEL SET ACTIONS ; GOSUB UPDATE_TRACE_DATA; GOSUB Enable_Limit_Source ; GOSUB Recall_Screens ; SET SUBSYSTEM ; END ACTIONS ; END COMPONENT; ACTIONS PAD_ZEROS ; FETCH Ls_bytes ; SWAP ; SUB ; STORE NUM_BUFFER ; select NUM_BUFFER; case range 1,250; LOOP ; FETCH "0" ;FETCH CHARSTRING ; CATSTR ; STORE CHARSTRING ; FETCH NUM_BUFFER ; FETCH 1 ; SUB ; DUP ; STORE NUM_BUFFER ; IF STACK THEN ; ELSE ; FETCH 1 ; EXIT IF STACK ; END IF ; END LOOP ; CASE ELSE; END SELECT; END ACTIONS ; COMPONENT More NOTSAVED NOGEN NOERRCHECK ; TYPE INTEGER ; PANEL SET ACTIONS ; SELECT SUBSYSTEM ; CASE CHANNEL ; SELECT CHANNEL ; CASE 1 ; HIDE CH1_SCR1 ; SHOW CH1_SCR2 ; CASE 2 ; HIDE CH2_SCR1 ; SHOW CH2_SCR2 ; CASE 3 ; HIDE CH3_SCR1 ; SHOW CH3_SCR2 ; CASE 4 ; HIDE CH4_SCR1 ; SHOW CH4_SCR2 ; CASE ELSE ; END SELECT ; CASE TRIGGER ; HIDE TRIGGER_SUBSYSTEM,TRIGGER_SCR1 ; SHOW TRIGGER_SUBSYSTEM,TRIGGER_SCR2 ; SELECT TRIGGER_MODE ; CASE 4 ; ! Delay event SHOW DEVENT_MODE,DEVENT_SCR1 ; CASE ELSE ; END SELECT ; CASE Wfm_math ; SELECT FUNCTION ; CASE 0 ; HIDE Function1_scr1 ; SHOW Function1_scr2 ; CASE 1 ; HIDE Function2_scr1 ; SHOW Function2_scr2 ; END SELECT ; CASE FFT ; HIDE FFT_SCR1 ; SHOW FFT_SCR2 ; CASE WMEMORY ; HIDE WMEMORY_SCR1 ; SHOW WMEMORY_SCR2 ; CASE ELSE ; END SELECT ; END ACTIONS ; END COMPONENT ; COMPONENT More1 NOTSAVED NOGEN NOERRCHECK ; TYPE INTEGER ; PANEL SET ACTIONS ; HIDE DEVENT_MODE,DEVENT_SCR1 ; SHOW DEVENT_MODE,DEVENT_SCR2 ; END ACTIONS ; END COMPONENT ; COMPONENT Return NOTSAVED NOGEN NOERRCHECK ; TYPE INTEGER ; PANEL SET ACTIONS ; SELECT SUBSYSTEM ; CASE CHANNEL ; SELECT CHANNEL ; CASE 1 ; SHOW CH1_SCR1 ; HIDE CH1_SCR2 ; CASE 2 ; SHOW CH2_SCR1 ; HIDE CH2_SCR2 ; CASE 3 ; SHOW CH3_SCR1 ; HIDE CH3_SCR2 ; CASE 4 ; SHOW CH4_SCR1 ; HIDE CH4_SCR2 ; CASE ELSE ; END SELECT ; CASE TRIGGER ; HIDE TRIGGER_SUBSYSTEM,TRIGGER_SCR2 ; SHOW TRIGGER_SUBSYSTEM,TRIGGER_SCR1 ; HIDE DEVENT_MODE,DEVENT_SCR2 ; CASE Wfm_math ; SELECT FUNCTION ; CASE 0 ; HIDE Function1_scr2 ; SHOW Function1_scr1 ; CASE 1 ; HIDE Function2_scr2 ; SHOW Function2_scr1 ; END SELECT ; CASE FFT ; HIDE FFT_SCR2 ; SHOW FFT_SCR1 ; CASE WMEMORY ; SHOW WMEMORY_SCR1 ; HIDE WMEMORY_SCR2 ; CASE ELSE ; END SELECT ; END ACTIONS ; END COMPONENT ; ! ========================= ! SYSTEM UTILITIES ! ========================= COMPONENT RUN NOTSAVED; TYPE INTEGER; INITIAL 0; SET ACTIONS; OUTPUT STRING ":RUN"; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT SINGLE NOTSAVED; TYPE INTEGER; INITIAL 0; SET ACTIONS; OUTPUT STRING ":SING"; END ACTIONS; END COMPONENT; COMPONENT STOP NOTSAVED; TYPE INTEGER; INITIAL 0; SET ACTIONS; OUTPUT STRING ":STOP"; END ACTIONS; END COMPONENT; ACTIONS FLUSH_ERR_QUEUE; loop; OUTPUT STRING ":SYST:ERR? STR"; ENTER stat_err FORMAT "#,K"; enter stat_err_str format 'K'; fetch stat_err; fetch 0; eq; exit if stack; end loop; END ACTIONS; !******************** STATUS COMPONENTS ****************************** ! error component component stat_err_str notsaved; type string 80; initial "No Error"; end component ; component stat_err notsaved noerrcheck; type integer; initial 0,invalid; get actions; output string ":SYST:ERR? STR"; enter stat_err format '#,K'; enter stat_err_str format 'K'; select stat_err; CASE 0; ! no error ... CASE ELSE; ! GOSUB FLUSH_ERR_QUEUE; end select; end actions; end component; ! status panel components component stat_cls notsaved; type integer; initial dontcare; set actions; output string "*CLS"; end actions; end component; component stat_evnt_evr notsaved; type integer; initial 0,invalid; get actions; output string "*ESR?"; enter stat_evnt_evr format 'K'; end actions; end component; component stat_evnt_enr notsaved; type integer; values range 0,255,1; initial 0; set actions; output stat_evnt_enr format '"*ESE ",K'; end actions; get actions; output string "*ESE?"; enter stat_evnt_enr format 'K'; end actions; end component; component stat_stb notsaved; type integer; initial 0,invalid; ! Note that the use of 'SPOLL' will clear the SRQ line -- using ! the '*STB?' query will also get the status byte but will NOT clear ! the SRQ line in the process. GET ACTIONS; SPOLL; ! Leaves status byte on stack ... STORE stat_stb; END ACTIONS; end component; component stat_sre notsaved; type integer; values range 0,255,1; initial 0; set actions; output stat_sre format '"*SRE ",K'; end actions; get actions; output string "*SRE?"; enter stat_sre format 'K'; end actions; end component; component stat_opc notsaved; type integer; set actions; output string "*OPC"; end actions; end component; component stat_opcv notsaved; type integer; initial 0,invalid; get actions; output string "*OPC?"; enter stat_opcv format 'K'; end actions; end component; component stat_wai notsaved; type integer; set actions; output string "*WAI"; end actions; end component; component stat_self_test notsaved; type string 6; initial invalid; get actions; output string "*TST?"; if livemode then; wait spoll bit 4; end if; enter stat_self_test format 'K'; end actions; end component; COMPONENT SERIAL_NUM NOTSAVED; TYPE STRING 12; INITIAL INVALID; SET ACTIONS; ! Unusable unless RAM is NOT write-protected OUTPUT STRING ':SERIAL "'; OUTPUT SERIAL_NUM FORMAT K; OUTPUT STRING '"'; END ACTIONS; GET ACTIONS; OUTPUT STRING "*IDN?"; ENTER CHARSTRING FORMAT "#,23A"; ENTER SERIAL_NUM FORMAT "#,10A"; ENTER CHARSTRING FORMAT K; END ACTIONS; END COMPONENT; !================================= ! WAVEFORM SUBSYSTEM !================================= COMPONENT WF_TYPE; TYPE DISCRETE; VALUES NORMAL,RAW,INT,AVER,VERS; ! NORMAL,AVERAGE - eqvt time INITIAL INVALID; ! RAW,INT - real time GET ACTIONS; IF LIVEMODE THEN ; OUTPUT STRING ":WAV:TYPE?"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NORM"; FETCH (WF_TYPE)NORMAL; CASE "RAW"; FETCH (WF_TYPE)RAW; CASE "INT"; FETCH (WF_TYPE)INT; CASE "AVER"; FETCH (WF_TYPE)AVER; CASE "VERS"; FETCH (WF_TYPE)VERS ; CASE ELSE; IF LIVEMODE THEN; NOTIFY "Bad Case in Select Comp:WF_TYPE" ; END IF; FETCH WF_TYPE; END SELECT; STORE WF_TYPE; ELSE ; !FETCH (WF_TYPE)AVER ; STORE WF_TYPE ; END IF ; END ACTIONS; END COMPONENT; COMPONENT View_source ; TYPE DISCRETE ; VALUES CH1,CH2,CH3,CH4,F1,F2,FFT,WM1,WM2,WM3,WM4 ; INITIAL CH1 ; ! check it out SET ACTIONS ; OUTPUT STRING ":WAV:SOUR " ; OUTPUT View_source TABLE "CHAN1","CHAN2","CHAN3","CHAN4","FUNC1","FUNC2","FFT", "WMEM1","WMEM2","WMEM3","WMEM4"; END ACTIONS ; PANEL SET ACTIONS ; !Depending on WF_TYPE GET WF_TYPE ; GET HIT_COUNT ; GET TIME_BUCKT ; GET WAV_POINTS ; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":WAV:SOUR?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "CHAN1" ; FETCH ( View_source ) CH1 ; CASE "CHAN2" ; FETCH ( View_source ) CH2 ; CASE "CHAN3" ; FETCH ( View_source ) CH3 ; CASE "CHAN4" ; FETCH ( View_source ) CH4 ; CASE "FUNC1" ; FETCH ( View_source ) F1 ; CASE "FUNC2" ; FETCH ( View_source ) F2 ; CASE "FFT" ; FETCH ( View_source ) FFT ; CASE "WMEM1" ; FETCH ( View_source ) WM1 ; CASE "WMEM2" ; FETCH ( View_source ) WM2 ; CASE "WMEM3" ; FETCH ( View_source ) WM3 ; CASE "WMEM4" ; FETCH ( View_source ) WM4 ; CASE ELSE ; FETCH View_source ; IF LIVEMODE THEN; NOTIFY "Bad CASE in SELECT Comp View_source"; END IF; END SELECT ; STORE View_source ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT HIT_COUNT; ! I have changed this - check it out - can also add :WAV:COMP TYPE INTEGER; INITIAL INVALID ; GET ACTIONS; OUTPUT STRING ":WAV:COUNT?"; ENTER HIT_COUNT FORMAT K; END ACTIONS; END COMPONENT; COMPONENT TIME_BUCKT; ! I have changed this - check it out - can also add :WAV:COMP TYPE INTEGER; INITIAL INVALID ; GET ACTIONS; OUTPUT STRING ":WAV:COMP?"; ENTER TIME_BUCKT FORMAT K; END ACTIONS; END COMPONENT; COMPONENT WAV_POINTS ; TYPE INTEGER ; INITIAL INVALID ; GET ACTIONS; OUTPUT STRING ":WAV:POIN?"; ENTER WAV_POINTS FORMAT K; END ACTIONS; END COMPONENT ; !! COMPONENT for WAVE:BAND? query can be added !================================= ! WAVEFORM MEMORY SUBSYSTEM !================================= COMPONENT SOURCE_WM1; TYPE DISCRETE; VALUES UNKNOWN,CHAN1,CHAN2,CHAN3,CHAN4,FUNC1,FUNC2,FFT; INITIAL UNKNOWN; GET ACTIONS; END ACTIONS; END COMPONENT; COMPONENT SOURCE_WM2; TYPE DISCRETE; VALUES UNKNOWN,CHAN1,CHAN2,CHAN3,CHAN4,FUNC1,FUNC2,FFT; INITIAL UNKNOWN; GET ACTIONS; END ACTIONS; END COMPONENT; COMPONENT SOURCE_WM3; TYPE DISCRETE; VALUES UNKNOWN,CHAN1,CHAN2,CHAN3,CHAN4,FUNC1,FUNC2,FFT; INITIAL UNKNOWN; GET ACTIONS; END ACTIONS; END COMPONENT; COMPONENT SOURCE_WM4; TYPE DISCRETE; VALUES UNKNOWN,CHAN1,CHAN2,CHAN3,CHAN4,FUNC1,FUNC2,FFT; INITIAL UNKNOWN; GET ACTIONS; END ACTIONS; END COMPONENT; COMPONENT UNITS_WM1_DISP ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN,DB ; INITIAL VOLT ; END COMPONENT ; COMPONENT UNITS_WM2_DISP ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN,DB ; INITIAL VOLT ; END COMPONENT ; COMPONENT UNITS_WM3_DISP ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN,DB ; INITIAL VOLT ; END COMPONENT ; COMPONENT UNITS_WM4_DISP ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN,DB ; INITIAL VOLT ; END COMPONENT ; COMPONENT WAVEMEM ; TYPE DISCRETE ; VALUES WM1,WM2,WM3,WM4 ; INITIAL WM1 ; END COMPONENT ; COMPONENT WM1_OK ; TYPE INTEGER ; VALUES RANGE 0,1 ; INITIAL 0 ; END COMPONENT ; COMPONENT WM2_OK CLONE WM1_OK ; COMPONENT WM3_OK CLONE WM1_OK ; COMPONENT WM4_OK CLONE WM1_OK ; COMPONENT WM1_TIME_SENS ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM1_TIME_SENS ; SET ACTIONS ; FETCH WM1_TIME_SENS; FETCH 10; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":WMEM1:XRAN ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM1:XRAN?"; ENTER STACK FORMAT K; FETCH 10; DIV; ! range is 10x sensitivity ...; STORE WM1_TIME_SENS; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM1_TIME_DELAY ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM1_TIME_DELAY ; SET ACTIONS ; OUTPUT WM1_TIME_DELAY FORMAT '":WMEM1:XOFF ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM1:XOFF?"; ENTER WM1_TIME_DELAY FORMAT K; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM1_TIME_REF; TYPE DISCRETE; VALUES LEFT,CENTER,RIGHT; INITIAL CENTER; END COMPONENT ; COMPONENT WM1_SENS ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM1_SENS,VMIN_WM1,VMAX_WM1,VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2; SET ACTIONS ; FETCH WM1_SENS; FETCH 8; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":WMEM1:YRAN ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM1:YRAN?"; ENTER STACK FORMAT K; FETCH 8; DIV; ! range is 10x sensitivity ...; STORE WM1_SENS; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM1_OFFSET ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM1_OFFSET,VMIN_WM1,VMAX_WM1,VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2 ; SET ACTIONS ; OUTPUT WM1_OFFSET FORMAT '":WMEM1:YOFF ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM1:YOFF?"; ENTER WM1_OFFSET FORMAT K; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM2_TIME_SENS ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM2_TIME_SENS ; SET ACTIONS ; FETCH WM2_TIME_SENS; FETCH 10; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":WMEM2:XRAN ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM2:XRAN?"; ENTER STACK FORMAT K; FETCH 10; DIV; ! range is 10x sensitivity ...; STORE WM2_TIME_SENS; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM2_TIME_DELAY ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM2_TIME_DELAY ; SET ACTIONS ; OUTPUT WM2_TIME_DELAY FORMAT '":WMEM2:XOFF ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM2:XOFF?"; ENTER WM2_TIME_DELAY FORMAT K; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM2_TIME_REF; TYPE DISCRETE; VALUES LEFT,CENTER,RIGHT; INITIAL CENTER; END COMPONENT ; COMPONENT WM2_SENS ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM2_SENS,VMIN_WM2,VMAX_WM2,VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2 ; SET ACTIONS ; FETCH WM2_SENS; FETCH 8; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":WMEM2:YRAN ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM2:YRAN?"; ENTER STACK FORMAT K; FETCH 8; DIV; ! range is 10x sensitivity ...; STORE WM2_SENS; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM2_OFFSET ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM2_OFFSET,VMIN_WM2,VMAX_WM2,VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2 ; SET ACTIONS ; OUTPUT WM2_OFFSET FORMAT '":WMEM2:YOFF ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM2:YOFF?"; ENTER WM2_OFFSET FORMAT K; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM3_TIME_SENS ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM3_TIME_SENS ; SET ACTIONS ; FETCH WM3_TIME_SENS; FETCH 10; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":WMEM3:XRAN ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM3:XRAN?"; ENTER STACK FORMAT K; FETCH 10; DIV; ! range is 10x sensitivity ...; STORE WM3_TIME_SENS; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM3_TIME_DELAY ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM3_TIME_DELAY ; SET ACTIONS ; OUTPUT WM3_TIME_DELAY FORMAT '":WMEM3:XOFF ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM3:XOFF?"; ENTER WM3_TIME_DELAY FORMAT K; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM3_TIME_REF; TYPE DISCRETE; VALUES LEFT,CENTER,RIGHT; INITIAL CENTER; END COMPONENT ; COMPONENT WM3_SENS ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM3_SENS,VMIN_WM3,VMAX_WM3,VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2 ; SET ACTIONS ; FETCH WM3_SENS; FETCH 8; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":WMEM3:YRAN ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM3:YRAN?"; ENTER STACK FORMAT K; FETCH 8; DIV; ! range is 10x sensitivity ...; STORE WM3_SENS; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM3_OFFSET ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM3_OFFSET,VMIN_WM3,VMAX_WM3,VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2 ; SET ACTIONS ; OUTPUT WM3_OFFSET FORMAT '":WMEM3:YOFF ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM3:YOFF?"; ENTER WM3_OFFSET FORMAT K; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM4_TIME_SENS ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM4_TIME_SENS ; SET ACTIONS ; FETCH WM4_TIME_SENS; FETCH 10; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":WMEM4:XRAN ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM4:XRAN?"; ENTER STACK FORMAT K; FETCH 10; DIV; ! range is 10x sensitivity ...; STORE WM4_TIME_SENS; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM4_TIME_DELAY ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM4_TIME_DELAY ; SET ACTIONS ; OUTPUT WM4_TIME_DELAY FORMAT '":WMEM4:XOFF ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM4:XOFF?"; ENTER WM4_TIME_DELAY FORMAT K; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM4_TIME_REF; TYPE DISCRETE; VALUES LEFT,CENTER,RIGHT; INITIAL CENTER; END COMPONENT ; COMPONENT WM4_SENS ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM4_SENS,VMIN_WM4,VMAX_WM4,VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2 ; SET ACTIONS ; FETCH WM4_SENS; FETCH 8; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":WMEM4:YRAN ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM4:YRAN?"; ENTER STACK FORMAT K; FETCH 8; DIV; ! range is 10x sensitivity ...; STORE WM4_SENS; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT WM4_OFFSET ; TYPE CONTINUOUS ; INITIAL INVALID ; !VALUES RANGE ; COUPLED WM4_OFFSET,VMIN_WM4,VMAX_WM4,VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2 ; SET ACTIONS ; OUTPUT WM4_OFFSET FORMAT '":WMEM4:YOFF ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":WMEM4:YOFF?"; ENTER WM4_OFFSET FORMAT K; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; !================================= ! FFT SUBSYSTEM !================================= COMPONENT FFT_Display ; TYPE DISCRETE; VALUES OFF,ON ; INITIAL OFF; !COUPLED FFT_SENS , FFT_OFFSET ; ! The most curious occurance ! works in direct i/o ! but not thro driver after an autoscale !COUPLED FFT_MSpan, FFT_Center_freq, FFT_Span, FFT_Resolution, FFT_SENS, FFT_OFFSET ; SET Actions; OUTPUT FFT_Display TABLE ":FFT:DISP OFF;", ":FFT:DISP ON;"; !OUTPUT STRING "*OPC?" ; ENTER STACK FORMAT K ; DROP ; GET FFT_MSpan ; GET FFT_Center_freq ; GET FFT_Span ; GET FFT_Resolution ; GET FFT_SENS ; GET FFT_OFFSET ; SELECT FFT_display ; CASE On ; GET VMIN_FFT; GET VMAX_FFT; CASE Off ; END SELECT ; END ACTIONS; PANEL SET ACTIONS; IF FFT_DISPLAY THEN; GET WF_FFT ; END IF; END ACTIONS; GET Actions; OUTPUT STRING ":FFT:DISP?"; ENTER FFT_Display FORMAT K; END ACTIONS; END COMPONENT ; COMPONENT FFT_Source ; TYPE DISCRETE ; VALUES CH1,CH2,CH3,CH4,F1,F2,WM1,WM2,WM3,WM4,CONS ; INITIAL CH1 ; ! check it out COUPLED FFT_SENS , FFT_OFFSET, VMIN_FFT, VMAX_FFT ; SET ACTIONS ; OUTPUT STRING ":FFT:SOUR " ; OUTPUT FFT_Source TABLE "CHAN1","CHAN2","CHAN3","CHAN4","FUNC1","FUNC2", "WMEM1","WMEM2","WMEM3","WMEM4","CONS"; FETCH 0 ; STORE FFT_Display ; SET FFT_Display ; END ACTIONS ; PANEL SET ACTIONS ; GOSUB Get_FFT_Ranges ; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":FFT:SOUR?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "CHAN1" ; FETCH ( FFT_Source ) CH1 ; CASE "CHAN2" ; FETCH ( FFT_Source ) CH2 ; CASE "CHAN3" ; FETCH ( FFT_Source ) CH3 ; CASE "CHAN4" ; FETCH ( FFT_Source ) CH4 ; CASE "FUNC1" ; FETCH ( FFT_Source ) F1 ; CASE "FUNC2" ; FETCH ( FFT_Source ) F2 ; CASE "WMEM1" ; FETCH ( FFT_Source ) WM1 ; CASE "WMEM2" ; FETCH ( FFT_Source ) WM2 ; CASE "WMEM3" ; FETCH ( FFT_Source ) WM3 ; CASE "WMEM4" ; FETCH ( FFT_Source ) WM4 ; CASE "CONS" ; FETCH ( FFT_Source ) CONS ; CASE ELSE ; FETCH FFT_Source ; IF LIVEMODE THEN; NOTIFY "Bad CASE in SELECT Comp FFT_Source" ; END IF; END SELECT ; STORE FFT_Source ; END IF ; END ACTIONS ; END COMPONENT ; ACTIONS Fix_FFT_Source ; GET FFT_Source ; GOSUB Get_FFT_Ranges ; GET FFT_MSpan ; GET FFT_Center_freq ; GET FFT_Span ; GET FFT_Resolution ; GET FFT1_MSpan ; GET FFT1_Center_freq ; GET FFT1_Span ; GET FFT1_Resolution ; GET FFT2_MSpan ; GET FFT2_Center_freq ; GET FFT2_Span ; GET FFT2_Resolution ; END ACTIONS ; COMPONENT FFT_Window; TYPE DISCRETE; VALUES Rect, Hanning, Flattop; INITIAL Hanning; SET Actions; OUTPUT STRING ":FFT:WIND "; OUTPUT FFT_Window TABLE "RECT" "HANN" "FLAT"; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET Actions; OUTPUT STRING ":FFT:WIND?"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "RECT"; FETCH (FFT_Window)Rect; CASE "HANN"; FETCH (FFT_Window)Hanning; CASE "FLAT"; FETCH (FFT_Window)Flattop; CASE ELSE; FETCH FFT_Window; END SELECT; STORE FFT_Window; END ACTIONS; END COMPONENT; COMPONENT FFT_Magnify; TYPE DISCRETE; VALUES OFF ON; INITIAL OFF; SET ACTIONS; OUTPUT FFT_Magnify TABLE ":FFT:MAGN OFF" ":FFT:MAGN ON"; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FFT:MAGN?"; ENTER FFT_Magnify format K; END ACTIONS; END COMPONENT; COMPONENT FFT_MSpan; TYPE CONTINUOUS; !VALUES RANGE ???????; INITIAL INVALID; COUPLED FFT_MSpan,FFT_Center_freq,FFT_Span,FFT_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; ! check it out OUTPUT FFT_Span FORMAT '":FFT:MSPAN ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FFT:MSPAN?"; ENTER FFT_MSpan FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT_Center_freq; TYPE CONTINUOUS; !VALUES RANGE 0 FFT1_Max_cf; INITIAL INVALID; COUPLED FFT_MSpan,FFT_Center_freq,FFT_Span,FFT_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT_Center_freq FORMAT '":FFT:FREQ ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FFT:FREQ?"; ENTER FFT_Center_freq FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT_Span; TYPE CONTINUOUS; !VALUES RANGE 5,500E6; VALUES RANGE 50,Max_FFT_Span ; INITIAL INVALID; COUPLED FFT_MSpan,FFT_Center_freq,FFT_Span,FFT_Resolution,TIME_SENS,TIME_WIND_SENS ; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT_Span FORMAT '":FFT:SPAN ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FFT:SPAN?"; ENTER FFT_Span FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT_Resolution; TYPE CONTINUOUS; !VALUES RANGE 5,500E6; INITIAL INVALID; COUPLED FFT_MSpan,FFT_Center_freq,FFT_Span,FFT_Resolution,TIME_SENS,TIME_WIND_SENS ; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT_Resolution FORMAT '":FFT:RES ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FFT:RES?"; ENTER FFT_Resolution FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT_SENS ; TYPE CONTINUOUS; VALUES RANGE 100E-18,10E+15 ; ! LOG 3,1; INITIAL 10; COUPLED FFT_SENS,FFT_OFFSET,VMIN_FFT,VMAX_FFT; SET ACTIONS; FETCH FFT_SENS; FETCH 8; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":FFT:RANG ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FFT:RANG? "; ENTER STACK FORMAT K; FETCH 8; DIV; ! range is 10x sensitivity ...; STORE FFT_SENS; !get Min_risetime; get Max_risetime; END ACTIONS; END COMPONENT; COMPONENT FFT_OFFSET; TYPE CONTINUOUS; !VALUES RANGE ???????? ; INITIAL -15; COUPLED FFT_OFFSET,FFT_SENS ,VMIN_FFT,VMAX_FFT; SET ACTIONS; OUTPUT FFT_OFFSET FORMAT '":FFT:OFFS ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FFT:OFFS? "; ENTER FFT_OFFSET FORMAT K; END ACTIONS; END COMPONENT; ACTIONS Get_FFT_Ranges ; ! Plug_in values EMPTY,HP54711A,HP54712A,HP54713A,HP54721A; ! VALUES Channel1, Channel2, Channel3, Channel4,WM1,WM2,WM3,WM4,CONST; SELECT FFT_Source ; CASE CH1 ; FETCH Plug_in1 ; GOSUB FFT_Plug_In ; CASE CH2 ; FETCH Plug_in2 ; GOSUB FFT_Plug_In ; CASE CH3 ; FETCH Plug_in3 ; GOSUB FFT_Plug_In ; CASE CH4 ; FETCH Plug_in4 ; GOSUB FFT_Plug_In ; CASE ELSE ; END SELECT ; END ACTIONS ; ACTIONS FFT_Plug_In ; ! Plug_in values EMPTY,HP54711A,HP54712A,HP54713A,HP54721A; SELECT STACK ; CASE 0 ; CASE 1 ; GOSUB Get_FFT_Range_11A ; CASE 2 ; GOSUB Get_FFT_Range_12A ; CASE 3 ; GOSUB Get_FFT_Range_13A ; CASE 4 ; GOSUB Get_FFT_Range_21A ; CASE 5 ; GOSUB Get_FFT_Range_22A ; CASE ELSE ; END SELECT ; END ACTIONS ; ACTIONS Get_FFT_Range_11A ; FETCH 1E+9 ; STORE Max_FFT_Span ; END ACTIONS ; ACTIONS Get_FFT_Range_12A ; FETCH 1E+9 ; STORE Max_FFT_Span ; END ACTIONS ; ACTIONS Get_FFT_Range_13A ; FETCH 1E+9 ; STORE Max_FFT_Span ; END ACTIONS ; ACTIONS Get_FFT_Range_21A ; FETCH 2E+9 ; STORE Max_FFT_Span ; END ACTIONS ; ACTIONS Get_FFT_Range_22A ; FETCH 4E+9 ; STORE Max_FFT_Span ; END ACTIONS ; COMPONENT Max_FFT_Span ; TYPE CONTINUOUS ; END COMPONENT ; COMPONENT VMIN_FFT NOERRCHECK; TYPE CONTINUOUS; GET ACTIONS; ! offset-range/2 ... FETCH FFT_offset; FETCH FFT_sens; FETCH 4; MUL; SUB; STORE VMIN_FFT ; END ACTIONS; END COMPONENT; COMPONENT VMAX_FFT NOERRCHECK; TYPE CONTINUOUS; GET ACTIONS; ! offset+range/2 ... FETCH FFT_offset; FETCH FFT_sens; FETCH 4 ; MUL; ADD ; STORE VMAX_FFT; END ACTIONS; END COMPONENT; COMPONENT FFT_store_wm1 notsaved; TYPE integer; set actions; if FFT_display then; ! otherwise instrument does not save - what peculiarities !! !output string ":STORE:WAV FUNC1,WMEM1"; ! GOK what purpose this serves !! OUTPUT STRING ":WMEM1:SAVE FFT" ; FETCH 1 ; STORE WM1_OK ; get X_INC; fetch X_INC; store XINC_WM1; ! obviously these do not work get X_MIN; fetch X_MIN; store XMIN_WM1; FETCH VMIN_FFT; STORE VMIN_WM1; FETCH VMAX_FFT; STORE VMAX_WM1; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; FETCH (SOURCE_WM1)FFT; STORE SOURCE_WM1; FETCH (UNITS_WM1_DISP)DB ; STORE UNITS_WM1_DISP ; FETCH 1 ; STORE WM1_X_Axis_Units ; FETCH TIME_REF ; STORE WM1_TIME_REF ; GET WM1_TIME_SENS ; GET WM1_TIME_DELAY ; FETCH FFT_SENS ; STORE WM1_SENS ; FETCH FFT_offset ; STORE WM1_OFFSET ; else; if panelmode then; notify "Must turn ON the FFT Display"; end if; end if; end actions; PANEL SET ACTIONS; IF VIEW_WF_WM1 THEN ; GET WF_WM1; END IF ; END ACTIONS; END COMPONENT; COMPONENT FFT_store_wm2 notsaved; TYPE integer; set actions; if FFT_display then; ! otherwise instrument does not save - what peculiarities !! !output string ":STORE:WAV FUNC1,WMEM1"; ! GOK what purpose this serves !! OUTPUT STRING ":WMEM2:SAVE FFT" ; FETCH 1 ; STORE WM2_OK ; get X_INC; fetch X_INC; store XINC_WM1; get X_MIN; fetch X_MIN; store XMIN_WM1; FETCH VMIN_FFT; STORE VMIN_WM2; FETCH VMAX_FFT; STORE VMAX_WM2; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; FETCH (SOURCE_WM2)FFT; STORE SOURCE_WM2; FETCH (UNITS_WM2_DISP)DB ; STORE UNITS_WM2_DISP ; FETCH 1 ; STORE WM2_X_Axis_Units ; FETCH TIME_REF ; STORE WM2_TIME_REF ; GET WM2_TIME_SENS ; GET WM2_TIME_DELAY ; FETCH FFT_SENS ; STORE WM2_SENS ; FETCH FFT_offset ; STORE WM2_OFFSET ; else; if panelmode then; notify "Must turn ON the FFT Display"; end if; end if; end actions; PANEL SET ACTIONS; IF VIEW_WF_WM2 THEN ; GET WF_WM2; END IF ; END ACTIONS; END COMPONENT; COMPONENT FFT_store_wm3 notsaved; TYPE integer; set actions; if FFT_display then; ! otherwise instrument does not save - what peculiarities !! !output string ":STORE:WAV FUNC1,WMEM1"; ! GOK what purpose this serves !! OUTPUT STRING ":WMEM3:SAVE FFT" ; FETCH 1 ; STORE WM3_OK ; get X_INC; fetch X_INC; store XINC_WM1; get X_MIN; fetch X_MIN; store XMIN_WM1; FETCH VMIN_FFT; STORE VMIN_WM3; FETCH VMAX_FFT; STORE VMAX_WM3; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; FETCH (SOURCE_WM3)FFT; STORE SOURCE_WM3; FETCH (UNITS_WM3_DISP)DB ; STORE UNITS_WM3_DISP ; FETCH 1 ; STORE WM3_X_Axis_Units ; FETCH TIME_REF ; STORE WM3_TIME_REF ; GET WM3_TIME_SENS ; GET WM3_TIME_DELAY ; FETCH FFT_SENS ; STORE WM3_SENS ; FETCH FFT_offset ; STORE WM3_OFFSET ; else; if panelmode then; notify "Must turn ON the FFT Display"; end if; end if; end actions; PANEL SET ACTIONS; IF VIEW_WF_WM3 THEN ; GET WF_WM3; END IF ; END ACTIONS; END COMPONENT; COMPONENT FFT_store_wm4 notsaved; TYPE integer; set actions; if FFT_display then; ! otherwise instrument does not save - what peculiarities !! !output string ":STORE:WAV FUNC1,WMEM1"; ! GOK what purpose this serves !! OUTPUT STRING ":WMEM4:SAVE FFT" ; FETCH 1 ; STORE WM4_OK ; get X_INC; fetch X_INC; store XINC_WM1; get X_MIN; fetch X_MIN; store XMIN_WM1; FETCH VMIN_FFT; STORE VMIN_WM4; FETCH VMAX_FFT; STORE VMAX_WM4; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; FETCH (SOURCE_WM4)FFT; STORE SOURCE_WM4; FETCH (UNITS_WM4_DISP)DB ; STORE UNITS_WM4_DISP ; FETCH 1 ; STORE WM4_X_Axis_Units ; FETCH TIME_REF ; STORE WM4_TIME_REF ; GET WM4_TIME_SENS ; GET WM4_TIME_DELAY ; FETCH FFT_SENS ; STORE WM4_SENS ; FETCH FFT_offset ; STORE WM4_OFFSET ; else; if panelmode then; notify "Must turn ON the FFT Display"; end if; end if; end actions; PANEL SET ACTIONS; IF VIEW_WF_WM4 THEN ; GET WF_WM4; END IF ; END ACTIONS; END COMPONENT; !================================= ! DISPLAY SUBSYSTEM !================================= COMPONENT PERSIST; TYPE DISCRETE; VALUES MINIMUM,INFINITE,VARIABLE; INITIAL MINIMUM; SET ACTIONS; SELECT PERSIST ; CASE VARIABLE ; SET PERSIST_VALUE ; CASE ELSE ; OUTPUT PERSIST TABLE ":DISP:PERS MIN","DISP:PERS INF"; VALIDATE PERSIST ; DONTCARE PERSIST_VALUE; END SELECT ; END ACTIONS; GET ACTIONS; OUTPUT STRING ":DISP:PERS?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "INF"; FETCH (PERSIST)INFINITE; STORE PERSIST ; DONTCARE PERSIST_VALUE; CASE ELSE; FETCH CHARSTRING; TRIMSTR; VAL; STORE PERSIST_VALUE; IF PERSIST_VALUE THEN ; VALIDATE PERSIST_VALUE; FETCH ( PERSIST ) VARIABLE ; STORE PERSIST ; ELSE ; DONTCARE PERSIST_VALUE ; FETCH (PERSIST)MINIMUM ; STORE PERSIST ; VALIDATE PERSIST ; END IF ; END SELECT; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT PERSIST_VALUE; TYPE CONTINUOUS; VALUES RANGE 0,40.00,100E-3; INITIAL 0,DONTCARE ; SET ACTIONS; OUTPUT PERSIST_VALUE FORMAT '":DISP:PERS ",K'; VALIDATE PERSIST_VALUE; FETCH ( PERSIST ) VARIABLE ; STORE PERSIST ; END ACTIONS; GET ACTIONS; GET PERSIST ; END ACTIONS; END COMPONENT; COMPONENT NUM_SCREENS; TYPE DISCRETE; VALUES ONE,TWO; INITIAL ONE; SET ACTIONS; OUTPUT STRING ":DISP:FORMAT "; OUTPUT NUM_SCREENS TABLE '1','2'; END ACTIONS; GET ACTIONS; OUTPUT STRING ":DISP:FORMAT?"; ENTER STACK FORMAT K; SELECT STACK; CASE 1; FETCH (NUM_SCREENS)ONE; CASE 2; FETCH (NUM_SCREENS)TWO; CASE ELSE; FETCH NUM_SCREENS; END SELECT; STORE NUM_SCREENS; END ACTIONS; END COMPONENT; COMPONENT UPPER_LOWER ; TYPE DISCRETE ; VALUES UPPER,LOWER ; INITIAL UPPER ; END COMPONENT ; COMPONENT Upper_source ; TYPE DISCRETE ; VALUES CH1,CH2,CH3,CH4,F1,F2,FFT,WM1,WM2,WM3,WM4 ; INITIAL INVALID ; ! check it out SET ACTIONS ; OUTPUT STRING ":DISP:ASS " ; OUTPUT Upper_source TABLE "CHAN1","CHAN2","CHAN3","CHAN4","FUNC1","FUNC2","FFT", "WMEM1","WMEM2","WMEM3","WMEM4"; OUTPUT STRING ",UPP" ; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":DISP:ASS? " ; OUTPUT Upper_source TABLE "CHAN1","CHAN2","CHAN3","CHAN4","FUNC1","FUNC2","FFT", "WMEM1","WMEM2","WMEM3","WMEM4"; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "UPP" ; FETCH ( UPPER_LOWER ) UPPER ; FETCH Upper_Source ; STORE Upper_Source ; CASE "LOW" ; FETCH ( UPPER_LOWER ) LOWER ; FETCH Upper_Source ; STORE Lower_Source ; INVALIDATE Upper_Source ; CASe ELSE ; FETCH UPPER_LOWER ; IF LIVEMODE THEN; NOTIFY "Bad CASE in SELECT Comp UPPER_LOWER" ; END IF; END SELECT ; STORE UPPER_LOWER ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT Lower_source ; TYPE DISCRETE ; VALUES CH1,CH2,CH3,CH4,F1,F2,FFT,WM1,WM2,WM3,WM4 ; INITIAL INVALID ; ! check it out SET ACTIONS ; OUTPUT STRING ":DISP:ASS " ; OUTPUT Lower_source TABLE "CHAN1","CHAN2","CHAN3","CHAN4","FUNC1","FUNC2","FFT", "WMEM1","WMEM2","WMEM3","WMEM4"; OUTPUT STRING ",LOW" ; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":DISP:ASS? " ; OUTPUT Lower_source TABLE "CHAN1","CHAN2","CHAN3","CHAN4","FUNC1","FUNC2","FFT", "WMEM1","WMEM2","WMEM3","WMEM4"; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "UPP" ; FETCH ( UPPER_LOWER ) UPPER ; FETCH Lower_Source ; STORE Upper_Source ; INVALIDATE Lower_Source ; CASE "LOW" ; FETCH ( UPPER_LOWER ) LOWER ; FETCH Lower_Source ; STORE Lower_Source ; CASE ELSE ; FETCH UPPER_LOWER ; IF LIVEMODE THEN; NOTIFY "Bad CASE in SELECT Comp UPPER_LOWER" ; END IF; END SELECT ; STORE UPPER_LOWER ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT XY_GRAT1; ! peculiarities of id-lang ! TYPE DISCRETE; VALUES OFF,AXES,GRID,FRAME; INITIAL GRID; GET ACTIONS; FETCH XY_GRATICULE; FETCH 2; ADD; STORE XY_GRAT1; END ACTIONS; END COMPONENT; COMPONENT XY_GRATICULE; TYPE DISCRETE; VALUES GRID,FRAME ; INITIAL GRID; SET ACTIONS; OUTPUT STRING ":DISP:GRAT "; OUTPUT XY_GRATICULE TABLE 'GRID;','FRAME;'; GET XY_GRAT1 ; END ACTIONS; GET ACTIONS; OUTPUT STRING ":DISP:GRAT?"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "GRID"; FETCH (XY_GRATICULE)GRID; CASE "FRAM"; FETCH (XY_GRATICULE)FRAME; CASE ELSE; FETCH XY_GRATICULE; END SELECT; STORE XY_GRATICULE; END ACTIONS; END COMPONENT; COMPONENT CONNECT_DOTS; TYPE DISCRETE; VALUES FAST,CDOT,HRES; INITIAL FAST; SET ACTIONS; OUTPUT STRING ":DISP:DWAV "; OUTPUT CONNECT_DOTS TABLE 'FAST;','CDOT;','HRES;'; END ACTIONS; GET ACTIONS; OUTPUT STRING ":DISP:DWAV?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "FAST"; FETCH (CONNECT_DOTS)FAST; CASE "CDOT"; FETCH (CONNECT_DOTS)CDOT; CASE "HRES"; FETCH (CONNECT_DOTS)HRES; CASE ELSE; FETCH CONNECT_DOTS; END SELECT; STORE CONNECT_DOTS; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT; COMPONENT MERGE_PM1 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; OUTPUT STRING ":MERGE "; END ACTIONS; END COMPONENT; COMPONENT RASTER NOTSAVED NOGEN; ! do a get of pixel memory at reset - check it out TYPE IARRAY 16383; INITIAL INVALID; ! ! Binary Block Format: ! ! #6014848 = ! '#800016576' 10-byte header ! < data block > 16576-byte binary data ( ie: 8288 int16's ) ! 'LF' 1-byte LF terminator ! GET ACTIONS; OUTPUT STRING ":DISP:DATA?;"; ! ENTER RASTER FORMAT INT16 8 8288; ! skips '#' at head, eats 'LF' at tail ENTER raster_string FORMAT "#,AA"; ENTER STACK FORMAT "#,DDDDDD"; FETCH 2; DIV; DUP ; STORE raster_length ; ENTER RASTER FORMAT INT16 0 STACK; ! skips '#' at head, eats 'LF' at tail ENTER CHARSTRING FORMAT K; ! consumes 'LF' terminator END ACTIONS; END COMPONENT; component upload_PM1 notsaved; ! COMPONENT RASTER - get actions type integer; set actions; output string ":DISP:SOUR PMEM1;"; GET RASTER ; end actions; end component; component raster_string ; type string 5 ; initial "" ; end component ; component raster_length ; type integer ; initial 0 ; end component ; component download_PM1 notsaved; type integer; set actions; if raster_length then ; output string "*CLS; *SRE 32; *ESE 1"; flush; output string ":DISP:SOUR PMEM1"; flush; OUTPUT STRING ":DISP:DATA "; OUTPUT raster_string FORMAT 'AA' ; FETCH raster_length ; FETCH 2; MUL ; VALSTR ; TRIMSTR ; DUP ; STORE CHARSTRING ; LENGTH ; FETCH raster_string ; FETCH 2 ; FETCH 1 ; SUBSTR ; VAL ; SWAP ; SUB ; DUP ; IF STACK THEN ; LOOP ; FETCH "0" ; FETCH CHARSTRING ; CATSTR ; STORE CHARSTRING ; FETCH 1 ; SUB ; IF STACK THEN ; DUP ; ELSE ; FETCH 1 ; EXIT IF STACK ; END IF ; END LOOP ; ELSE ; END IF ; FETCH CHARSTRING ; TRIMSTR ; OUTPUT stack FORMAT 'K' ; OUTPUT RASTER INT16 raster_length ; OUTPUT STRING " "; flush ; output string "*OPC"; flush; if livemode then; wait spoll bit 5; end if; else ; notify "Nothing saved into pixel memory" ; end if ; end actions; end component; component erase_PM1 notsaved; type integer; set actions; output string ":ERASE PMEM1"; invalidate data_PM1; end actions; end component; component data_PM1 notsaved nogen noerrcheck; type iarray 16383; initial invalid; end component; !>> CHAN1 views ... COMPONENT VIEW_CH1; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; COUPLED VIEW_WF_CH1; SET ACTIONS; FETCH Plug_in1; FETCH ADDR; NOT; OR; IF STACK THEN; SELECT VIEW_CH1; CASE OFF; OUTPUT STRING ":CHAN1:DISP OFF;"; CASE ON; OUTPUT STRING ":CHAN1:DISP ON;"; END SELECT; ELSE; FETCH 0; STORE VIEW_CH1; NOTIFY "Sorry, No Plug-In!!" ; END IF; END ACTIONS; PANEL SET ACTIONS; if VIEW_CH1 then; GET WF_CH1; end if; END ACTIONS; GET ACTIONS; ! Required to find out which signal to display as in instrument IF Plug_in1 THEN; !Something in the slot OUTPUT STRING ":CHAN1:DISP?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (VIEW_CH1)OFF; CASE 1; FETCH (VIEW_CH1)ON; CASE ELSE; FETCH VIEW_CH1; END SELECT; STORE VIEW_CH1; ELSE; IF ADDR THEN; FETCH 0; STORE VIEW_CH1; END IF; END IF; END ACTIONS; END COMPONENT; COMPONENT VIEW_WF_CH1 NOGEN NOERRCHECK; TYPE DISCRETE; VALUES OFF,ON; INITIAL ON; GET ACTIONS; SELECT VIEW_CH1; CASE OFF; FETCH (VIEW_WF_CH1)OFF; CASE ON; FETCH (VIEW_WF_CH1)ON; CASE ELSE; FETCH VIEW_WF_CH1; END SELECT; STORE VIEW_WF_CH1; END ACTIONS; END COMPONENT; !>> CHAN2 views ... COMPONENT VIEW_CH2; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; COUPLED VIEW_WF_CH2; SET ACTIONS; FETCH Plug_in2; FETCH ADDR; NOT; OR; IF STACK THEN; SELECT VIEW_CH2; CASE OFF; OUTPUT STRING ":CHAN2:DISP OFF;"; CASE ON; OUTPUT STRING ":CHAN2:DISP ON;"; END SELECT; ELSE; FETCH 0; STORE VIEW_CH2; NOTIFY "Sorry, No Plug-In!!" ; END IF; END ACTIONS; PANEL SET ACTIONS; if VIEW_CH2 then; GET WF_CH2; end if; END ACTIONS; GET ACTIONS; IF Plug_in2 THEN; !Something in the slot OUTPUT STRING ":CHAN2:DISP?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (VIEW_CH2)OFF; CASE 1; FETCH (VIEW_CH2)ON; CASE ELSE; FETCH VIEW_CH2; END SELECT; STORE VIEW_CH2; ELSE; IF ADDR THEN; FETCH 0; STORE VIEW_CH2; END IF; END IF; END ACTIONS; END COMPONENT; COMPONENT VIEW_WF_CH2 NOGEN NOERRCHECK; TYPE DISCRETE ; VALUES OFF,ON; INITIAL OFF; GET ACTIONS; SELECT VIEW_CH2; CASE OFF; FETCH (VIEW_WF_CH2)OFF; CASE ON; FETCH (VIEW_WF_CH2)ON; CASE ELSE; FETCH VIEW_WF_CH2; END SELECT; STORE VIEW_WF_CH2; END ACTIONS; END COMPONENT; !>> CHAN3 views ... COMPONENT VIEW_CH3; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; COUPLED VIEW_WF_CH3; SET ACTIONS; FETCH Plug_in3; FETCH ADDR; NOT; OR; IF STACK THEN; SELECT VIEW_CH3; CASE OFF; OUTPUT STRING ":CHAN3:DISP OFF;"; CASE ON; OUTPUT STRING ":CHAN3:DISP ON;"; END SELECT; ELSE ; FETCH 0; STORE VIEW_CH3; NOTIFY "Sorry, No Plug-In!!" ; END IF; END ACTIONS; PANEL SET ACTIONS; if VIEW_CH3 then; GET WF_CH3; end if; END ACTIONS; GET ACTIONS; IF Plug_in3 THEN; !Something in the slot OUTPUT STRING ":CHAN3:DISP?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (VIEW_CH3)OFF; CASE 1; FETCH (VIEW_CH3)ON; CASE ELSE; FETCH VIEW_CH3; END SELECT; STORE VIEW_CH3; ELSE; IF ADDR THEN; FETCH 0; STORE VIEW_CH3; END IF; END IF; END ACTIONS; END COMPONENT; COMPONENT VIEW_WF_CH3 NOGEN NOERRCHECK; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; GET ACTIONS; SELECT VIEW_CH3; CASE OFF; FETCH (VIEW_WF_CH3)OFF; CASE ON; FETCH (VIEW_WF_CH3)ON; CASE ELSE; FETCH VIEW_WF_CH3; END SELECT; STORE VIEW_WF_CH3; END ACTIONS; END COMPONENT; !>> CHAN4 views ... COMPONENT VIEW_CH4; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; COUPLED VIEW_WF_CH4; SET ACTIONS; FETCH Plug_in4; FETCH ADDR; NOT; OR; IF STACK THEN; SELECT VIEW_CH4; CASE OFF; OUTPUT STRING ":CHAN4:DISP OFF;"; CASE ON; OUTPUT STRING ":CHAN4:DISP ON;"; END SELECT; else ; FETCH ( VIEW_CH4 ) OFF ; STORE VIEW_CH4 ; NOTIFY "Sorry, No Plug-In!!" ; end if ; END ACTIONS; PANEL SET ACTIONS; if VIEW_CH4 then; GET WF_CH4; end if; END ACTIONS; GET ACTIONS; IF Plug_in4 THEN; !Something in the slot OUTPUT STRING ":CHAN4:DISP?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (VIEW_CH4)OFF; CASE 1; FETCH (VIEW_CH4)ON; CASE ELSE; FETCH VIEW_CH4; END SELECT; STORE VIEW_CH4; ELSE; IF ADDR THEN; FETCH 0; STORE VIEW_CH4; END IF; END IF; END ACTIONS; END COMPONENT; COMPONENT VIEW_WF_CH4 NOGEN NOERRCHECK; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; GET ACTIONS; SELECT VIEW_CH4; CASE OFF; FETCH (VIEW_WF_CH4)OFF; CASE ON; FETCH (VIEW_WF_CH4)ON; CASE ELSE; FETCH VIEW_WF_CH4; END SELECT; STORE VIEW_WF_CH4; END ACTIONS; END COMPONENT; !----------- Memory views ------------------ COMPONENT VMIN_WM1 NOERRCHECK; TYPE CONTINUOUS; INITIAL -2; GET ACTIONS; ! offset-range/2 ... GET WM1_OFFSET ; GET WM1_SENS ; FETCH WM1_OFFSET ; FETCH WM1_SENS ; FETCH 4 ; MUL; SUB; STORE VMIN_WM1; END ACTIONS; END COMPONENT; COMPONENT VMAX_WM1 NOERRCHECK; TYPE CONTINUOUS; INITIAL 2; GET ACTIONS; ! offset+range/2 ... FETCH WM1_OFFSET ; FETCH WM1_SENS ; FETCH 4; MUL; ADD; STORE VMAX_WM1; END ACTIONS; END COMPONENT; COMPONENT VMIN_WM2 NOERRCHECK; TYPE CONTINUOUS; INITIAL -2; GET ACTIONS; ! offset-range/2 ... GET WM2_OFFSET ; GET WM2_SENS ; FETCH WM2_OFFSET ; FETCH WM2_SENS ; FETCH 4 ; MUL; SUB; STORE VMIN_WM2; END ACTIONS; END COMPONENT; COMPONENT VMAX_WM2 NOERRCHECK; TYPE CONTINUOUS; INITIAL 2; GET ACTIONS; ! offset+range/2 ... FETCH WM2_OFFSET ; FETCH WM2_SENS ; FETCH 4; MUL; ADD; STORE VMAX_WM2; END ACTIONS; END COMPONENT; COMPONENT VMIN_WM3 NOERRCHECK; TYPE CONTINUOUS; INITIAL -2; GET ACTIONS; ! offset-range/2 ... GET WM3_OFFSET ; GET WM3_SENS ; FETCH WM3_OFFSET ; FETCH WM3_SENS ; FETCH 4 ; MUL; SUB; STORE VMIN_WM3; END ACTIONS; END COMPONENT; COMPONENT VMAX_WM3 NOERRCHECK; TYPE CONTINUOUS; INITIAL 2; GET ACTIONS; ! offset+range/2 ... FETCH WM3_OFFSET ; FETCH WM3_SENS ; FETCH 4; MUL; ADD; STORE VMAX_WM3; END ACTIONS; END COMPONENT; COMPONENT VMIN_WM4 NOERRCHECK; TYPE CONTINUOUS; INITIAL -2; GET ACTIONS; ! offset-range/2 ... GET WM4_OFFSET ; GET WM4_SENS ; FETCH WM4_OFFSET ; FETCH WM4_SENS ; FETCH 4 ; MUL; SUB; STORE VMIN_WM4; END ACTIONS; END COMPONENT; COMPONENT VMAX_WM4 NOERRCHECK; TYPE CONTINUOUS; INITIAL 2; GET ACTIONS; ! offset+range/2 ... FETCH WM4_OFFSET ; FETCH WM4_SENS ; FETCH 4; MUL; ADD; STORE VMAX_WM4; END ACTIONS; END COMPONENT; COMPONENT VIEW_WF_WM1 NOGEN NOERRCHECK; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; OUTPUT VIEW_WF_WM1 TABLE ":WMEM1:DISP OFF",":WMEM1:DISP ON" ; IF VIEW_WF_WM1 THEN; IF WM1_OK THEN ; GET WF_WM1; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS ; IF WM1_OK THEN ; SELECT WAVEMEM ; CASE 0 ; IF VIEW_WF_WM1 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM1 ; ELSE ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM1 ; END IF ; CASE ELSE ; END SELECT ; ELSE ; INVALIDATE WF_WM1 ; IF LIVEMODE THEN; NOTIFY "Waveform Data May Not Be Valid - Please Save Again !" ; END IF ; END IF ; END ACTIONS ; GET ACTIONS; OUTPUT STRING ":WMEM1:DISP?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "OFF" ; FETCH ( VIEW_WF_WM1 ) OFF ; CASE "ON" ; FETCH ( VIEW_WF_WM1 ) ON ; CASE ELSE ; FETCH VIEW_WF_WM1 ; END SELECT ; STORE VIEW_WF_WM1 ; END ACTIONS; PANEL GET ACTIONS ; IF VIEW_WF_WM1 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM1 ; ELSE ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM1 ; END IF ; END ACTIONS ; END COMPONENT; COMPONENT VIEW_WF_WM2 NOGEN NOERRCHECK; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; OUTPUT VIEW_WF_WM2 TABLE ":WMEM2:DISP OFF",":WMEM2:DISP ON" ; IF VIEW_WF_WM2 THEN; IF WM2_OK THEN ; GET WF_WM2; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS ; IF WM2_OK THEN ; SELECT WAVEMEM ; CASE 1 ; IF VIEW_WF_WM2 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM2 ; ELSE ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM2 ; END IF ; CASE ELSE ; END SELECT ; ELSE ; INVALIDATE WF_WM2 ; IF LIVEMODE THEN; NOTIFY "Waveform Data May Not Be Valid - Please Save Again !" ; END IF ; END IF ; END ACTIONS ; GET ACTIONS; OUTPUT STRING ":WMEM2:DISP?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "OFF" ; FETCH ( VIEW_WF_WM2 ) OFF ; CASE "ON" ; FETCH ( VIEW_WF_WM2 ) ON ; CASE ELSE ; FETCH VIEW_WF_WM2 ; END SELECT ; STORE VIEW_WF_WM2 ; END ACTIONS; PANEL GET ACTIONS ; IF VIEW_WF_WM2 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM2 ; ELSE ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM2 ; END IF ; END ACTIONS ; END COMPONENT; COMPONENT VIEW_WF_WM3 NOGEN NOERRCHECK; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; OUTPUT VIEW_WF_WM3 TABLE ":WMEM3:DISP OFF",":WMEM3:DISP ON" ; IF VIEW_WF_WM3 THEN; IF WM3_OK THEN ; GET WF_WM3; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS ; IF WM3_OK THEN ; SELECT WAVEMEM ; CASE 2 ; IF VIEW_WF_WM3 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM3 ; ELSE ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM3 ; END IF ; CASE ELSE ; END SELECT ; ELSE ; INVALIDATE WF_WM3 ; IF LIVEMODE THEN; NOTIFY "Waveform Data May Not Be Valid - Please Save Again !" ; END IF ; END IF ; END ACTIONS ; GET ACTIONS; OUTPUT STRING ":WMEM3:DISP?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "OFF" ; FETCH ( VIEW_WF_WM3 ) OFF ; CASE "ON" ; FETCH ( VIEW_WF_WM3 ) ON ; CASE ELSE ; FETCH VIEW_WF_WM3 ; END SELECT ; STORE VIEW_WF_WM3 ; END ACTIONS; PANEL GET ACTIONS ; IF VIEW_WF_WM3 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM3 ; ELSE ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM3 ; END IF ; END ACTIONS ; END COMPONENT; COMPONENT VIEW_WF_WM4 NOGEN NOERRCHECK; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; OUTPUT VIEW_WF_WM4 TABLE ":WMEM1:DISP OFF",":WMEM1:DISP ON" ; IF VIEW_WF_WM4 THEN; IF WM4_OK THEN ; GET WF_WM4; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS ; IF WM4_OK THEN ; SELECT WAVEMEM ; CASE 3 ; IF VIEW_WF_WM4 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM4 ; ELSE ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM4 ; END IF ; CASE ELSE ; END SELECT ; ELSE ; INVALIDATE WF_WM4 ; IF LIVEMODE THEN; NOTIFY "Waveform Data May Not Be Valid - Please Save Again !" ; END IF ; END IF ; END ACTIONS ; GET ACTIONS; OUTPUT STRING ":WMEM4:DISP?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "OFF" ; FETCH ( VIEW_WF_WM4 ) OFF ; CASE "ON" ; FETCH ( VIEW_WF_WM4 ) ON ; CASE ELSE ; FETCH VIEW_WF_WM4 ; END SELECT ; STORE VIEW_WF_WM4 ; END ACTIONS; PANEL GET ACTIONS ; IF VIEW_WF_WM4 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM4 ; ELSE ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM4 ; END IF ; END ACTIONS ; END COMPONENT; !============================== ! TIMEBASE SUBSYSTEM !============================== COMPONENT TIME_SENS ; TYPE CONTINUOUS; VALUES RANGE 100E-12,1 ; ! LOG 3,1; INITIAL 20E-6; COUPLED TIME_SENS,TIME_DELAY,WF_TMIN,WF_TMAX,NUM_POINTS,TIME_INCR,TIME_SENS_INCR, TIME_WIND_SENS,TIME_WIND_DELAY, TIME_DELAY_MAX,TIME_DELAY_MIN, WIN_TMIN, WIN_TMAX, MARKER_X1_MIN,MARKER_X2_MIN,MARKER_X1_MAX,MARKER_X2_MAX ; SET ACTIONS; FETCH TIME_SENS; FETCH 10; MUL; ! range is 10x sensitivity ...; OUTPUT STACK FORMAT '":TIM:RANG ",K'; END ACTIONS; GET ACTIONS; OUTPUT STRING ":TIM:RANG?"; ENTER STACK FORMAT K; FETCH 10; DIV; ! range is 10x sensitivity ...; STORE TIME_SENS; !get Min_risetime; get Max_risetime; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT TIME_DELAY; TYPE CONTINUOUS; !VALUES RANGE -10,10; VALUES RANGE TIME_DELAY_MIN, TIME_DELAY_MAX ; INITIAL 0; COUPLED TIME_DELAY,WF_TMIN,WF_TMAX,TIME_SENS_INCR,TIME_WIND_SENS,TIME_WIND_DELAY, WIN_TMIN,WIN_TMAX,MARKER_X1_MIN,MARKER_X2_MIN,MARKER_X1_MAX,MARKER_X2_MAX ; SET ACTIONS; OUTPUT TIME_DELAY FORMAT '":TIM:DEL ",K'; END ACTIONS; GET ACTIONS; OUTPUT STRING ":TIM:DEL?"; ENTER TIME_DELAY FORMAT K; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT TIME_DELAY_MAX NOGEN NOERRCHECK ; TYPE CONTINUOUS ; INITIAL +1 ; GET ACTIONS ; FETCH TIME_SENS ; FETCH 100E-3 ; LE ; IF STACK THEN ; !FETCH 1 ; STORE TIME_DELAY_MAX ; FETCH 1E+12; FETCH 1E-12; MUL ; STORE TIME_DELAY_MAX ; ELSE ; FETCH TIME_SENS ; FETCH 10 ; MUL ; STORE TIME_DELAY_MAX ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT TIME_DELAY_MIN NOGEN, NOERRCHECK ; TYPE CONTINUOUS ; INITIAL -1 ; GET ACTIONS ; FETCH TIME_SENS ; FETCH 100E-3 ; LE ; IF STACK THEN ; !FETCH -1 ; STORE TIME_DELAY_MIN ; FETCH -1E+12; FETCH 1E-12; MUL ; STORE TIME_DELAY_MIN ; ELSE ; FETCH TIME_SENS ; FETCH 10 ; MUL ; FETCH -1 ; MUL ; STORE TIME_DELAY_MIN ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT TIME_REF; TYPE DISCRETE; VALUES LEFT,CENTER,RIGHT; INITIAL CENTER; COUPLED WF_TMIN,WF_TMAX,TIME_WIND_DELAY, MARKER_X1_MIN,MARKER_X2_MIN,MARKER_X1_MAX,MARKER_X2_MAX ; ! TIME_DELAY SET ACTIONS; OUTPUT STRING ":TIM:REF "; OUTPUT TIME_REF TABLE 'LEFT','CENT','RIGHT'; !GET Time_Delay; ! check this out - this is in Jay's driver END ACTIONS; GET ACTIONS; OUTPUT STRING ":TIM:REF?"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "LEFT"; FETCH (TIME_REF)LEFT; CASE "CENT"; FETCH (TIME_REF)CENTER; CASE "RIGHT"; FETCH (TIME_REF)RIGHT; CASE ELSE; FETCH TIME_REF; END SELECT; STORE TIME_REF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT WF_TMIN NOERRCHECK; TYPE CONTINUOUS; INITIAL -100E-6; GET ACTIONS; SELECT TIME_REF; CASE LEFT; FETCH TIME_DELAY; CASE CENTER; FETCH TIME_DELAY; FETCH TIME_SENS; FETCH 5; MUL; SUB; CASE RIGHT ; FETCH Time_Delay; FETCH Time_Sens; FETCH 10; MUL; SUB; END SELECT; STORE WF_TMIN; END ACTIONS; END COMPONENT; COMPONENT WF_TMAX NOERRCHECK; TYPE CONTINUOUS; INITIAL 100E-6; GET ACTIONS; SELECT TIME_REF; CASE LEFT; FETCH TIME_DELAY; FETCH TIME_SENS; FETCH 10; MUL; ADD; CASE CENTER; FETCH TIME_DELAY; FETCH TIME_SENS; FETCH 5; MUL; ADD; CASE RIGHT; FETCH Time_Delay; END SELECT; STORE WF_TMAX; END ACTIONS; END COMPONENT; COMPONENT Time_Incr NOTSAVED NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 200E-9; GET ACTIONS; FETCH Time_Sens; !FETCH 2; DIV; FETCH 100; DIV ; STORE Time_Incr; END ACTIONS; END COMPONENT; !modified for 1 COMPONENT Time_Sens_Incr NOGEN NOERRCHECK; TYPE CONTINUOUS; !INITIAL ?????; GET ACTIONS; FETCH Time_Sens; FETCH 5; DIV; STORE Time_Sens_Incr; END ACTIONS; END COMPONENT; COMPONENT Time_Wind_Stat ; TYPE DISCRETE ; VALUES MAIN,WIND ; INITIAL MAIN ; SET ACTIONS ; OUTPUT STRING ":TIM:VIEW " ; OUTPUT Time_Wind_Stat TABLE 'MAIN;','WIND;'; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; GET ACTIONS ; OUTPUT STRING ":TIM:VIEW?" ; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "MAIN"; FETCH (Time_Wind_Stat) MAIN; CASE "WIND"; FETCH (Time_Wind_Stat) WIND; CASE ELSE; FETCH Time_Wind_Stat; END SELECT ; STORE Time_Wind_Stat; END ACTIONS ; END COMPONENT ; COMPONENT Time_Wind_Delay; TYPE CONTINUOUS; VALUES RANGE WIN_TMIN,WIN_TMAX; ! check this out INITIAL 0 ; COUPLED TIME_WIND_DELAY ; SET ACTIONS; OUTPUT STRING ":TIM:WIND:DEL "; OUTPUT Time_Wind_Delay FORMAT 'K,";"'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; GET ACTIONS; OUTPUT STRING ":TIM:WIND:DEL?;"; ENTER Time_Wind_Delay FORMAT K; END ACTIONS; END COMPONENT; COMPONENT Time_Wind_Sens; TYPE CONTINUOUS; VALUES RANGE 1E-12,TIME_SENS; ! check this out INITIAL 10E-6; COUPLED TIME_WIND_SENS,WIN_TMIN,WIN_TMAX,TIME_WIND_DELAY ; !TIME_INCR,TIME_SENS_INCR SET ACTIONS; FETCH Time_Wind_Sens; FETCH 10; MUL; ! range is 10x sensitivity ... OUTPUT STACK FORMAT '":TIM:WIND:RANG ",K,";"'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; GET ACTIONS; OUTPUT STRING ":TIM:WIND:RANG?;"; ENTER STACK FORMAT K; FETCH 10; DIV; ! range is 10x sensitivity ... STORE Time_Wind_Sens; END ACTIONS; END COMPONENT; COMPONENT WIN_TMIN NOERRCHECK; ! check it out with Ed - precision problem !! TYPE CONTINUOUS; INITIAL -50E-6; GET ACTIONS; FETCH TIME_SENS ; FETCH TIME_WIND_SENS ; EQ ; IF STACK THEN ; FETCH TIME_DELAY ; STORE WIN_TMIN ; ELSE ; SELECT TIME_REF; CASE LEFT; FETCH TIME_DELAY; CASE CENTER; FETCH TIME_DELAY; FETCH TIME_SENS ; FETCH TIME_WIND_SENS; SUB ;FETCH 5; MUL; SUB; CASE RIGHT ; FETCH Time_Delay; FETCH TIME_SENS ; FETCH Time_WIND_SENS; SUB ;FETCH 10; MUL; SUB; END SELECT; STORE WIN_TMIN; END IF ; END ACTIONS; END COMPONENT; COMPONENT WIN_TMAX NOERRCHECK; TYPE CONTINUOUS; INITIAL 50E-6; GET ACTIONS; FETCH TIME_SENS ; FETCH TIME_WIND_SENS ; EQ ; IF STACK THEN ; FETCH TIME_DELAY ; STORE WIN_TMAX ; ELSE ; SELECT TIME_REF; CASE LEFT; FETCH TIME_DELAY; FETCH TIME_SENS; FETCH TIME_WIND_SENS; SUB; FETCH 10; MUL; ADD; CASE CENTER; FETCH TIME_DELAY; FETCH TIME_SENS ;FETCH TIME_WIND_SENS; SUB; FETCH 5; MUL; ADD; CASE RIGHT; FETCH Time_Delay; END SELECT; STORE WIN_TMAX; END IF ; END ACTIONS; END COMPONENT; !============================== ! TRIGGER SUBSYSTEM !============================== COMPONENT TRIGGER_MODE; TYPE DISCRETE; VALUES EDGE,GLITCH,PATTERN,STATE,DEVENTS,DTIME; ! Some enabling/Disabling to be taken care of INITIAL EDGE; COUPLED TRIGGER_INCR,GLITCH_TRIGGER_GTLT ; ! TRIGGER_HOLDOFF SET ACTIONS; SELECT TRIGGER_MODE ; CASE GLITCH ; SET GLITCH_TRIGGER_GTLT ; CASE ELSE ; OUTPUT STRING ":TRIG:MODE "; OUTPUT TRIGGER_MODE TABLE 'EDGE;','GLIT;','PATT;','STAT;','DEV','DTIM'; END SELECT ; END ACTIONS; PANEL SET ACTIONS ; SET TRIGGER_LEVEL_UNITS ; HIDE TRIGGER_SUBSYSTEM, EDGE_MODE; HIDE TRIGGER_SUBSYSTEM, GLITCH_MODE ; HIDE TRIGGER_SUBSYSTEM, PATTERN_MODE; HIDE TRIGGER_SUBSYSTEM, STATE_MODE; HIDE TRIGGER_SUBSYSTEM, DEVENT_MODE ; HIDE TRIGGER_SUBSYSTEM, DTIME_MODE ; SELECT TRIGGER_MODE; CASE EDGE; SHOW TRIGGER_SUBSYSTEM, EDGE_MODE; GOSUB Get_Edge_Trigger_Levels ; CASE GLITCH ; SHOW TRIGGER_SUBSYSTEM, GLITCH_MODE; GOSUB Get_Glitch_Trigger_Levels ; CASE PATTERN; SHOW TRIGGER_SUBSYSTEM, PATTERN_MODE; CASE STATE; SHOW TRIGGER_SUBSYSTEM, STATE_MODE; GOSUB Get_State_Trigger_Levels ; CASE DEVENTS ; SHOW TRIGGER_SUBSYSTEM, DEVENT_MODE; GOSUB Get_Devent_Trigger_Levels ; GOSUB Get_Devent_Arm_Levels ; GOSUB Get_Devent_Event_Levels ; CASE DTIME ; SHOW TRIGGER_SUBSYSTEM, DTIME_MODE; GOSUB Get_Dtime_Trigger_Levels ; GOSUB Get_Dtime_Arm_Levels ; END SELECT; END ACTIONS ; GET ACTIONS; OUTPUT STRING ":TRIG:MODE?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "EDGE"; FETCH (TRIGGER_MODE)EDGE ; CASE "GLIT"; FETCH (TRIGGER_MODE)GLITCH ; CASE "PATT"; FETCH (TRIGGER_MODE)PATTERN; CASE "STAT"; FETCH (TRIGGER_MODE)STATE; CASE "DEV" ; FETCH (TRIGGER_MODE)DEVENTS ; CASE "DTIM" ; FETCH (TRIGGER_MODE)DTIME ; CASE ELSE; FETCH TRIGGER_MODE; ! impt. as GGTH is not trapped here END SELECT; STORE TRIGGER_MODE; END ACTIONS; END COMPONENT; COMPONENT SWEEP_MODE; ! 'TIMEBASE' command, but always used here ... TYPE DISCRETE; VALUES AUTO,TRIGGER; INITIAL AUTO; SET ACTIONS; OUTPUT STRING ":TRIG:SWE "; OUTPUT SWEEP_MODE TABLE 'AUTO;','TRIG;'; END ACTIONS; PANEL SET ACTIONS; HIDE No_Trigger; !! GOSUB UPDATE_TRACE_DATA; END ACTIONS; GET ACTIONS; OUTPUT STRING ":TRIG:SWE?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "AUTO"; FETCH (SWEEP_MODE)AUTO; CASE "TRIG"; FETCH (SWEEP_MODE)TRIGGER; CASE ELSE; FETCH SWEEP_MODE; END SELECT; STORE SWEEP_MODE; END ACTIONS; PANEL GET ACTIONS; HIDE No_Trigger; END ACTIONS; END COMPONENT; COMPONENT MIN_TRIG_LVL_CH1 ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT MAX_TRIG_LVL_CH1 CLONE MIN_TRIG_LVL_CH1 ; COMPONENT MIN_TRIG_LVL_CH2 CLONE MIN_TRIG_LVL_CH1 ; COMPONENT MAX_TRIG_LVL_CH2 CLONE MIN_TRIG_LVL_CH1 ; COMPONENT MIN_TRIG_LVL_CH3 CLONE MIN_TRIG_LVL_CH1 ; COMPONENT MAX_TRIG_LVL_CH3 CLONE MIN_TRIG_LVL_CH1 ; COMPONENT MIN_TRIG_LVL_CH4 CLONE MIN_TRIG_LVL_CH1 ; COMPONENT MAX_TRIG_LVL_CH4 CLONE MIN_TRIG_LVL_CH1 ; COMPONENT TRIGGER_LEVEL_UNITS NOGEN ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; SET ACTIONS ; SELECT TRIGGER_MODE ; CASE EDGE ; FETCH EDGE_TRIGGER_SOURCE ; GOSUB Set_Trigger_Units ; CASE GLITCH; FETCH GLITCH_TRIGGER_SOURCE ; GOSUB Set_Trigger_Units ; CASE PATTERN; CASE STATE; FETCH STATE_TRIGGER_SOURCE ; GOSUB Set_Trigger_Units ; CASE DEVENTS; FETCH DEVENT_ARM_SOURCE ; GOSUB Set_Trigger_Units ; FETCH TRIGGER_LEVEL_UNITS ; STORE DEVENTS_ARM_UNITS ; FETCH DEVENT_TRIGGER_SOURCE ; GOSUB Set_Trigger_Units ; FETCH TRIGGER_LEVEL_UNITS ; STORE DEVENTS_TRIGGER_UNITS ; FETCH DEVENT_EVENT_SOURCE ; GOSUB Set_Trigger_Units ; FETCH TRIGGER_LEVEL_UNITS ; STORE DEVENTS_EVENT_UNITS ; CASE DTIME; FETCH DTIME_ARM_SOURCE ; GOSUB Set_Trigger_Units ; FETCH TRIGGER_LEVEL_UNITS ; STORE DTIME_ARM_UNITS ; FETCH DTIME_TRIGGER_SOURCE ; GOSUB Set_Trigger_Units ; FETCH TRIGGER_LEVEL_UNITS ; STORE DTIME_TRIGGER_UNITS ; END SELECT ; END ACTIONS ; END COMPONENT ; COMPONENT DEVENTS_ARM_UNITS NOGEN ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; END COMPONENT ; COMPONENT DEVENTS_TRIGGER_UNITS CLONE DEVENTS_ARM_UNITS ; COMPONENT DEVENTS_EVENT_UNITS CLONE DEVENTS_ARM_UNITS ; COMPONENT DTIME_ARM_UNITS CLONE DEVENTS_ARM_UNITS ; COMPONENT DTIME_TRIGGER_UNITS CLONE DEVENTS_ARM_UNITS ; ACTIONS Set_Trigger_Units ; SELECT STACK ; CASE 0 ; FETCH UNITS_CH1_DISP ; CASE 1 ; FETCH UNITS_CH2_DISP ; CASE 2 ; FETCH UNITS_CH3_DISP ; CASE 3 ; FETCH UNITS_CH4_DISP ; END SELECT ; STORE TRIGGER_LEVEL_UNITS ; END ACTIONS ; COMPONENT TRIGGER_LEVEL_CH1; TYPE CONTINUOUS; VALUES RANGE MIN_TRIG_LVL_CH1,MAX_TRIG_LVL_CH1 ; INITIAL 0.0; COUPLED EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; ! Valid since these are psuedo-GETs ... SET ACTIONS; IF Plug_In1 THEN ; OUTPUT TRIGGER_LEVEL_CH1 FORMAT '":TRIG:LEV CHAN1, ",K,";"'; END IF ; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; GET ACTIONS; IF Plug_In1 THEN ; ! Thanks to Rev 2.02 OUTPUT STRING ":TRIG:LEV? CHAN1;"; !ENTER STACK FORMAT "#,K" ; DROP ; ENTER TRIGGER_LEVEL_CH1 FORMAT K; END IF ; END ACTIONS; END COMPONENT; COMPONENT TRIGGER_LEVEL_CH2; TYPE CONTINUOUS; VALUES RANGE MIN_TRIG_LVL_CH2,MAX_TRIG_LVL_CH2 ; INITIAL 0.0; COUPLED EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE; ! Valid since these are psuedo-GETs ... SET ACTIONS; IF Plug_In2 THEN ; OUTPUT TRIGGER_LEVEL_CH2 FORMAT '":TRIG:LEV CHAN2, ",K,";"'; ELSE ; FETCH SLOT_21A ; FETCH 1 ; EQ ; IF STACK THEN ; OUTPUT TRIGGER_LEVEL_CH2 FORMAT '":TRIG:LEV CHAN2, ",K,";"'; END IF ; END IF ; END ACTIONS; GET ACTIONS; IF Plug_In2 THEN ; OUTPUT STRING ":TRIG:LEV? CHAN2;"; !ENTER STACK FORMAT "#,K" ; DROP ; ENTER TRIGGER_LEVEL_CH2 FORMAT K; ELSE ; FETCH SLOT_21A ; FETCH 1 ; EQ ; IF STACK THEN ; OUTPUT STRING ":TRIG:LEV? CHAN2;"; !ENTER STACK FORMAT "#,K" ; DROP ; ENTER TRIGGER_LEVEL_CH2 FORMAT K; END IF ; END IF ; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT TRIGGER_LEVEL_CH3; TYPE CONTINUOUS; VALUES RANGE MIN_TRIG_LVL_CH3,MAX_TRIG_LVL_CH3 ; INITIAL 0.0; COUPLED EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; ! Valid since these are psuedo-GETs ... SET ACTIONS; IF Plug_In3 THEN ; OUTPUT TRIGGER_LEVEL_CH3 FORMAT '":TRIG:LEV CHAN3, ",K,";"'; ELSE ; FETCH SLOT_21A ; FETCH 2 ; EQ ; IF STACK THEN ; OUTPUT TRIGGER_LEVEL_CH3 FORMAT '":TRIG:LEV CHAN3, ",K,";"'; END IF ; END IF ; END ACTIONS; GET ACTIONS; If Plug_In3 THEN ; OUTPUT STRING ":TRIG:LEV? CHAN3;"; !ENTER STACK FORMAT "#,K" ; DROP ; ENTER TRIGGER_LEVEL_CH3 FORMAT K; ELSE ; FETCH SLOT_21A ; FETCH 2 ; EQ ; IF STACK THEN ; OUTPUT STRING ":TRIG:LEV? CHAN3;"; !ENTER STACK FORMAT "#,K" ; DROP ; ENTER TRIGGER_LEVEL_CH3 FORMAT K; END IF ; END IF ; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT TRIGGER_LEVEL_CH4; TYPE CONTINUOUS; VALUES RANGE MIN_TRIG_LVL_CH4,MAX_TRIG_LVL_CH4 ; INITIAL 0.0; COUPLED EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; ! Valid since these are psuedo-GETs ... SET ACTIONS; IF Plug_In4 THEN ; OUTPUT TRIGGER_LEVEL_CH4 FORMAT '":TRIG:LEV CHAN4, ",K,";"'; ELSE ; FETCH SLOT_21A ; FETCH 3 ; EQ ; IF STACK THEN ; OUTPUT TRIGGER_LEVEL_CH4 FORMAT '":TRIG:LEV CHAN4, ",K,";"'; END IF ; END IF ; END ACTIONS; GET ACTIONS; If Plug_In4 THEN ; OUTPUT STRING ":TRIG:LEV? CHAN4;"; !ENTER STACK FORMAT "#,K" ; DROP ; ENTER TRIGGER_LEVEL_CH4 FORMAT K; ELSE ; FETCH SLOT_21A ; FETCH 3 ; EQ ; IF STACK THEN ; OUTPUT STRING ":TRIG:LEV? CHAN4;"; !ENTER STACK FORMAT "#,K" ; DROP ; ENTER TRIGGER_LEVEL_CH4 FORMAT K; END IF ; END IF ; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; ACTIONS Get_Trigger_Ranges ; ! Plug_in values EMPTY,HP54711A,HP54712A,HP54713A,HP54721A; SELECT STACK ; CASE 0 ; CASE 1 ; GOSUB Get_Trigger_Range_11A ; CASE 2 ; GOSUB Get_Trigger_Range_12A ; CASE 3 ; GOSUB Get_Trigger_Range_13A ; CASE 4 ; GOSUB Get_Trigger_Range_21A ; CASE 5 ; GOSUB Get_Trigger_Range_22A ; CASE ELSE ; END SELECT ; END ACTIONS ; ACTIONS Get_Trigger_Range_11A ; FETCH TRIG_11A_PROBE ; FETCH 1 ; MUL ; DUP ; FETCH -1 ; MUL ; SELECT SLOT_11A ; CASE 0 ; CASE 1 ; STORE MIN_TRIG_LVL_CH1 ; STORE MAX_TRIG_LVL_CH1 ; CASE 2 ; STORE MIN_TRIG_LVL_CH2 ; STORE MAX_TRIG_LVL_CH2 ; CASE 3 ; STORE MIN_TRIG_LVL_CH3 ; STORE MAX_TRIG_LVL_CH3 ; CASE 4 ; STORE MIN_TRIG_LVL_CH4 ; STORE MAX_TRIG_LVL_CH4 ; END SELECT ; END ACTIONS ; ACTIONS Get_Trigger_Range_12A ; SELECT SLOT_12A ; CASE 0 ; FETCH 0; CASE 1 ; FETCH SENS_CH1 ; CASE 2 ; FETCH SENS_CH2 ; CASE 3 ; FETCH SENS_CH3 ; CASE 4 ; FETCH SENS_CH4 ; END SELECT ; FETCH 12 ; MUL ; DUP ; FETCH -1 ; MUL ; SELECT SLOT_12A ; CASE 0 ; CASE 1 ; STORE MIN_TRIG_LVL_CH1 ; STORE MAX_TRIG_LVL_CH1 ; CASE 2 ; STORE MIN_TRIG_LVL_CH2 ; STORE MAX_TRIG_LVL_CH2 ; CASE 3 ; STORE MIN_TRIG_LVL_CH3 ; STORE MAX_TRIG_LVL_CH3 ; CASE 4 ; STORE MIN_TRIG_LVL_CH4 ; STORE MAX_TRIG_LVL_CH4 ; END SELECT ; END ACTIONS ; ACTIONS Get_Trigger_Range_13A ; SELECT SLOT_13A ; CASE 0 ; FETCH 0; CASE 1 ; FETCH SENS_CH1 ; CASE 2 ; FETCH SENS_CH2 ; CASE 3 ; FETCH SENS_CH3 ; CASE 4 ; FETCH SENS_CH4 ; END SELECT ; FETCH 12 ; MUL ; DUP ; FETCH -1 ; MUL ; SELECT SLOT_13A ; CASE 0; CASE 1 ; STORE MIN_TRIG_LVL_CH1 ; STORE MAX_TRIG_LVL_CH1 ; CASE 2 ; STORE MIN_TRIG_LVL_CH2 ; STORE MAX_TRIG_LVL_CH2 ; CASE 3 ; STORE MIN_TRIG_LVL_CH3 ; STORE MAX_TRIG_LVL_CH3 ; CASE 4 ; STORE MIN_TRIG_LVL_CH4 ; STORE MAX_TRIG_LVL_CH4 ; END SELECT ; END ACTIONS ; ACTIONS Get_Trigger_Range_21A ; SELECT SLOT_21A ; CASE 0 ; FETCH 0; CASE 1 ; FETCH SENS_CH1 ; CASE 2 ; FETCH SENS_CH2 ; CASE 3 ; FETCH SENS_CH3 ; CASE 4 ; FETCH SENS_CH4 ; END SELECT ; FETCH 12 ; MUL ; DUP ; FETCH -1 ; MUL ; SELECT SLOT_21A ; CASE 0 ; CASE 1 ; STORE MIN_TRIG_LVL_CH1 ; STORE MAX_TRIG_LVL_CH1 ; FETCH 1 ; FETCH TRIG_21A_PROBE ; MUL ; DUP ; FETCH -1 ; MUL ; STORE MIN_TRIG_LVL_CH2 ; STORE MAX_TRIG_LVL_CH2 ; CASE 2 ; STORE MIN_TRIG_LVL_CH2 ; STORE MAX_TRIG_LVL_CH2 ; FETCH 1 ; FETCH TRIG_21A_PROBE ; MUL ; DUP ; FETCH -1 ; MUL ; STORE MIN_TRIG_LVL_CH3 ; STORE MAX_TRIG_LVL_CH3 ; CASE 3 ; STORE MIN_TRIG_LVL_CH3 ; STORE MAX_TRIG_LVL_CH3 ; FETCH 1 ; FETCH TRIG_21A_PROBE ; MUL ; DUP ; FETCH -1 ; MUL ; STORE MIN_TRIG_LVL_CH4 ; STORE MAX_TRIG_LVL_CH4 ; CASE 4 ; STORE MIN_TRIG_LVL_CH4 ; STORE MAX_TRIG_LVL_CH4 ; END SELECT ; END ACTIONS ; ACTIONS Get_Trigger_Range_22A ; FETCH TRIG_22A_PROBE_1 ; FETCH 1 ; MUL ; DUP ; FETCH -1 ; MUL ; STORE MIN_TRIG_LVL_CH1 ; STORE MAX_TRIG_LVL_CH1 ; FETCH TRIG_22A_PROBE_2 ; FETCH 1 ; MUL ; DUP ; FETCH -1 ; MUL ; STORE MIN_TRIG_LVL_CH4 ; STORE MAX_TRIG_LVL_CH4 ; END ACTIONS ; COMPONENT TRIGGER_HOLDOFF; TYPE CONTINUOUS; VALUES RANGE 60E-9,320E-9; ! check it out - Jay - 40E-9,320E-3 INITIAL 140E-9; COUPLED TRIGGER_HOLDOFF ; SET ACTIONS; ! Assumes proper trigger mode already set ... OUTPUT STRING ":TRIG:HOLD "; OUTPUT TRIGGER_HOLDOFF FORMAT 'K,";"'; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... OUTPUT STRING ":TRIG:HOLD?;"; ! ENTER CHARSTRING FORMAT "#,5A"; ! consumes "TIME," header ... ENTER TRIGGER_HOLDOFF FORMAT K; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT TRIGGER_HYSTERSIS; TYPE DISCRETE; VALUES NREJ,NORM,HSEN; INITIAL NORM; SET ACTIONS; OUTPUT STRING ":TRIG:HYST "; OUTPUT TRIGGER_HYSTERSIS TABLE 'NREJ;','NORM;','HSEN;'; END ACTIONS; GET ACTIONS; OUTPUT STRING ":TRIG:HYST?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NREJ"; FETCH (TRIGGER_HYSTERSIS)NREJ ; CASE "NORM"; FETCH (TRIGGER_HYSTERSIS)NORM ; CASE "HSEN"; FETCH (TRIGGER_HYSTERSIS)HSEN; CASE ELSE; FETCH TRIGGER_HYSTERSIS; END SELECT; STORE TRIGGER_HYSTERSIS; END ACTIONS; END COMPONENT; !>> 'EDGE' mode COMPONENT EDGE_TRIGGER_SOURCE; TYPE DISCRETE; VALUES CH1,CH2,CH3,CH4; INITIAL CH1; COUPLED EDGE_TRIGGER_SLOPE,EDGE_TRIGGER_UPDATE,TRIGGER_INCR; SET ACTIONS; ! Assumes proper trigger mode already set ...pattern mode not valid SELECT TRIGGER_MODE; CASE 0; OUTPUT STRING ":TRIG:SOURCE "; OUTPUT EDGE_TRIGGER_SOURCE TABLE 'CHAN1;','CHAN2;','CHAN3;','CHAN4;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... !SELECT TRIGGER_MODE; !CASE 0; OUTPUT STRING ":TRIG:SOURCE?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "CHAN1"; FETCH (EDGE_TRIGGER_SOURCE)CH1; CASE "TRIG1"; FETCH (EDGE_TRIGGER_SOURCE)CH1; CASE "CHAN2"; FETCH (EDGE_TRIGGER_SOURCE)CH2; CASE "TRIG2"; FETCH (EDGE_TRIGGER_SOURCE)CH2; CASE "CHAN3"; FETCH (EDGE_TRIGGER_SOURCE)CH3; CASE "TRIG3"; FETCH (EDGE_TRIGGER_SOURCE)CH3; CASE "CHAN4"; FETCH (EDGE_TRIGGER_SOURCE)CH4; CASE "TRIG4"; FETCH (EDGE_TRIGGER_SOURCE)CH4; CASE ELSE; FETCH EDGE_TRIGGER_SOURCE; END SELECT; STORE EDGE_TRIGGER_SOURCE; !CASE ELSE; !END SELECT; END ACTIONS; PANEL SET ACTIONS ; !GOSUB UPDATE_TRACE_DATA; SELECT TRIGGER_MODE; CASE 0; GOSUB Get_Edge_Trigger_Levels ; CASE ELSE ; END SELECT ; SET TRIGGER_LEVEL_UNITS ; END ACTIONS ; END COMPONENT; COMPONENT EDGE_TRIGGER_SLOPE; TYPE DISCRETE; VALUES NEGATIVE,POSITIVE; INITIAL POSITIVE; SET ACTIONS; ! Assumes that trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 0; OUTPUT STRING ":TRIG:SLOPE "; OUTPUT EDGE_TRIGGER_SLOPE TABLE 'NEG;','POS;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 0; OUTPUT STRING ":TRIG:SLOPE?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NEG"; FETCH (EDGE_TRIGGER_SLOPE)NEGATIVE; CASE "POS"; FETCH (EDGE_TRIGGER_SLOPE)POSITIVE; CASE ELSE; FETCH EDGE_TRIGGER_SLOPE; END SELECT; STORE EDGE_TRIGGER_SLOPE; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT EDGE_TRIG_MIN_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT EDGE_TRIG_MAX_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; ACTIONS Get_Edge_Trigger_Levels ; SELECT EDGE_TRIGGER_SOURCE ; CASE CH1 ; FETCH MIN_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MIN_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MIN_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MIN_TRIG_LVL_CH4 ; END SELECT ; STORE EDGE_TRIG_MIN_LVL ; SELECT EDGE_TRIGGER_SOURCE ; CASE CH1 ; FETCH MAX_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MAX_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MAX_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MAX_TRIG_LVL_CH4 ; END SELECT ; STORE EDGE_TRIG_MAX_LVL ; END ACTIONS ; COMPONENT EDGE_TRIGGER_LEVEL NOTSAVED NOGEN; TYPE CONTINUOUS; VALUES RANGE EDGE_TRIG_MIN_LVL,EDGE_TRIG_MAX_LVL ; !values range -1E4 1E4 1E-9; INITIAL 0; SET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... FETCH EDGE_TRIGGER_LEVEL; SELECT EDGE_TRIGGER_SOURCE; CASE CH1; STORE TRIGGER_LEVEL_CH1; SET TRIGGER_LEVEL_CH1; CODEGEN SET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; STORE TRIGGER_LEVEL_CH2; SET TRIGGER_LEVEL_CH2; CODEGEN SET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; STORE TRIGGER_LEVEL_CH3; SET TRIGGER_LEVEL_CH3; CODEGEN SET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; STORE TRIGGER_LEVEL_CH4; SET TRIGGER_LEVEL_CH4; CODEGEN SET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE EDGE_TRIGGER_LEVEL; ! Note that SET on TL? did a verify ... END ACTIONS; GET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... SELECT EDGE_TRIGGER_SOURCE; CASE CH1; CODEGEN GET TRIGGER_LEVEL_CH1; GET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; CODEGEN GET TRIGGER_LEVEL_CH2; GET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; CODEGEN GET TRIGGER_LEVEL_CH3; GET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; CODEGEN GET TRIGGER_LEVEL_CH4; GET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE EDGE_TRIGGER_LEVEL; END ACTIONS; END COMPONENT; COMPONENT EDGE_TRIGGER_UPDATE NOTSAVED NOGEN; TYPE INTEGER; INITIAL DONTCARE; ! This exists as a component rather than an ACTIONS sub due ! to the need to control the order of execution of COUPLINGs from ! numerous other components -- as a component this can be included ! in a COUPLED list whereas an ACTIONS sub could only be called ! from the PANEL SET ACTIONS of the effecting component and thus ! cannot be done after certain other couplings ... GET ACTIONS; SELECT EDGE_TRIGGER_SOURCE; CASE CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE EDGE_TRIGGER_LEVEL; ! the STORE causes view update ... END ACTIONS; END COMPONENT; !>> 'GLITCH' mode COMPONENT GLITCH_TRIGGER_SOURCE; TYPE DISCRETE; VALUES CH1,CH2,CH3,CH4; INITIAL CH1; COUPLED GLITCH_TRIGGER_SLOPE,GLITCH_TRIGGER_UPDATE,TRIGGER_INCR; SET ACTIONS; ! Assumes proper trigger mode already set ...pattern mode not valid SELECT TRIGGER_MODE; CASE 1; ! GLITCH Mode OUTPUT STRING ":TRIG:GLIT:SOUR "; OUTPUT GLITCH_TRIGGER_SOURCE TABLE 'CHAN1;','CHAN2;','CHAN3;','CHAN4;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... !SELECT TRIGGER_MODE; !CASE 1; OUTPUT STRING ":TRIG:GLIT:SOUR?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "CHAN1"; FETCH (GLITCH_TRIGGER_SOURCE)CH1; CASE "TRIG1"; FETCH (GLITCH_TRIGGER_SOURCE)CH1; CASE "CHAN2"; FETCH (GLITCH_TRIGGER_SOURCE)CH2; CASE "TRIG2"; FETCH (GLITCH_TRIGGER_SOURCE)CH2; CASE "CHAN3"; FETCH (GLITCH_TRIGGER_SOURCE)CH3; CASE "TRIG3"; FETCH (GLITCH_TRIGGER_SOURCE)CH3; CASE "CHAN4"; FETCH (GLITCH_TRIGGER_SOURCE)CH4; CASE "TRIG4"; FETCH (GLITCH_TRIGGER_SOURCE)CH4; CASE ELSE; FETCH GLITCH_TRIGGER_SOURCE; END SELECT; STORE GLITCH_TRIGGER_SOURCE; !CASE ELSE; !END SELECT; END ACTIONS; PANEL SET ACTIONS ; SELECT TRIGGER_MODE ; CASE 1 ; GOSUB Get_Glitch_Trigger_Levels ; CASE ELSE ; END SELECT ; SET TRIGGER_LEVEL_UNITS ; !GOSUB UPDATE_TRACE_DATA; END ACTIONS ; END COMPONENT; COMPONENT GLITCH_TRIGGER_GTLT ; ! Check it out - HPIB command does not seem to work ! TYPE DISCRETE; VALUES LTH,GTH; INITIAL LTH; SET ACTIONS; ! Assumes that trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 1; OUTPUT STRING ":TRIG:MODE "; OUTPUT GLITCH_TRIGGER_GTLT TABLE 'GLTH;','GGTH;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 1; OUTPUT STRING ":TRIG:MODE?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "GLTH"; FETCH (GLITCH_TRIGGER_GTLT)LTH; STORE GLITCH_TRIGGER_GTLT; CASE "GGTH"; FETCH (GLITCH_TRIGGER_GTLT)GTH; STORE GLITCH_TRIGGER_GTLT; CASE ELSE; END SELECT; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT GLITCH_TRIGGER_SLOPE; TYPE DISCRETE; VALUES NEGATIVE,POSITIVE; INITIAL NEGATIVE; SET ACTIONS; ! Assumes that trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 1; OUTPUT STRING ":TRIG:GLIT:POL "; OUTPUT GLITCH_TRIGGER_SLOPE TABLE 'NEG;','POS;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 1; OUTPUT STRING ":TRIG:GLIT:POL?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NEG"; FETCH (GLITCH_TRIGGER_SLOPE)NEGATIVE; CASE "POS"; FETCH (GLITCH_TRIGGER_SLOPE)POSITIVE; CASE ELSE; FETCH GLITCH_TRIGGER_SLOPE; END SELECT; STORE GLITCH_TRIGGER_SLOPE; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT GLITCH_TRIG_MIN_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT GLITCH_TRIG_MAX_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; ACTIONS Get_Glitch_Trigger_Levels ; SELECT GLITCH_TRIGGER_SOURCE ; CASE CH1 ; FETCH MIN_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MIN_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MIN_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MIN_TRIG_LVL_CH4 ; END SELECT ; STORE GLITCH_TRIG_MIN_LVL ; SELECT GLITCH_TRIGGER_SOURCE ; CASE CH1 ; FETCH MAX_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MAX_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MAX_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MAX_TRIG_LVL_CH4 ; END SELECT ; STORE GLITCH_TRIG_MAX_LVL ; END ACTIONS ; COMPONENT GLITCH_TRIGGER_LEVEL NOTSAVED NOGEN; TYPE CONTINUOUS; VALUES RANGE GLITCH_TRIG_MIN_LVL, GLITCH_TRIG_MAX_LVL ; !values range -1E4 1E4 1E-9; INITIAL 0; SET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... FETCH GLITCH_TRIGGER_LEVEL; SELECT GLITCH_TRIGGER_SOURCE; CASE CH1; STORE TRIGGER_LEVEL_CH1; SET TRIGGER_LEVEL_CH1; CODEGEN SET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; STORE TRIGGER_LEVEL_CH2; SET TRIGGER_LEVEL_CH2; CODEGEN SET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; STORE TRIGGER_LEVEL_CH3; SET TRIGGER_LEVEL_CH3; CODEGEN SET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; STORE TRIGGER_LEVEL_CH4; SET TRIGGER_LEVEL_CH4; CODEGEN SET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE GLITCH_TRIGGER_LEVEL; ! Note that SET on TL? did a verify ... END ACTIONS; GET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... SELECT GLITCH_TRIGGER_SOURCE; CASE CH1; CODEGEN GET TRIGGER_LEVEL_CH1; GET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; CODEGEN GET TRIGGER_LEVEL_CH2; GET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; CODEGEN GET TRIGGER_LEVEL_CH3; GET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; CODEGEN GET TRIGGER_LEVEL_CH4; GET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE GLITCH_TRIGGER_LEVEL; END ACTIONS; END COMPONENT; COMPONENT GLITCH_TRIGGER_WIDTH ; TYPE CONTINUOUS; VALUES RANGE 3E-9,160E-9; ! check it out - Jay - 40E-9,320E-3 INITIAL 20E-9; COUPLED GLITCH_TRIGGER_WIDTH ; SET ACTIONS; ! Assumes proper trigger mode already set ... SELECT TRIGGER_MODE ; CASE 1 ; OUTPUT STRING ":TRIG:GLIT:WIDTH "; OUTPUT GLITCH_TRIGGER_WIDTH FORMAT 'K,";"'; CASE ELSE ; END SELECT ; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... SELECT TRIGGER_MODE ; CASE 1 ; OUTPUT STRING ":TRIG:GLIT:WIDTH?;"; ! ENTER CHARSTRING FORMAT "#,5A"; ! consumes "TIME," header ... ENTER GLITCH_TRIGGER_WIDTH FORMAT K; CASE ELSE ; END SELECT ; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT GLITCH_TRIGGER_UPDATE NOTSAVED NOGEN; TYPE INTEGER; INITIAL DONTCARE; ! This exists as a component rather than an ACTIONS sub due ! to the need to control the order of execution of COUPLINGs from ! numerous other components -- as a component this can be included ! in a COUPLED list whereas an ACTIONS sub could only be called ! from the PANEL SET ACTIONS of the effecting component and thus ! cannot be done after certain other couplings ... GET ACTIONS; SELECT GLITCH_TRIGGER_SOURCE; CASE CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE GLITCH_TRIGGER_LEVEL; ! the STORE causes view update ... END ACTIONS; END COMPONENT; !>> 'STATE' mode COMPONENT STATE_TRIGGER_SOURCE; TYPE DISCRETE; VALUES CH1,CH2,CH3,CH4; INITIAL CH1; COUPLED STATE_TRIGGER_SLOPE,STATE_TRIGGER_UPDATE,TRIGGER_INCR; SET ACTIONS; ! Assumes proper trigger mode already set ... SELECT TRIGGER_MODE; CASE 3; OUTPUT STRING ":TRIG:STAT:CLOC "; OUTPUT STATE_TRIGGER_SOURCE TABLE 'CHAN1;','CHAN2;','CHAN3;','CHAN4;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... !SELECT TRIGGER_MODE; !CASE 3; OUTPUT STRING ":TRIG:STAT:CLOC?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "1"; FETCH (STATE_TRIGGER_SOURCE)CH1; CASE "2"; FETCH (STATE_TRIGGER_SOURCE)CH2; CASE "3"; FETCH (STATE_TRIGGER_SOURCE)CH3; CASE "4"; FETCH (STATE_TRIGGER_SOURCE)CH4; CASE ELSE; FETCH STATE_TRIGGER_SOURCE; END SELECT; STORE STATE_TRIGGER_SOURCE; !CASE ELSE; !END SELECT; END ACTIONS; PANEL SET ACTIONS ; SELECT TRIGGER_MODE ; CASE 3 ; GOSUB Get_State_Trigger_Levels ; CASE ELSE ; END SELECT ; SET TRIGGER_LEVEL_UNITS ; !GOSUB UPDATE_TRACE_DATA; END ACTIONS ; END COMPONENT; COMPONENT STATE_TRIGGER_SLOPE; TYPE DISCRETE; VALUES NEGATIVE,POSITIVE; INITIAL POSITIVE; SET ACTIONS; ! Assumes that trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 3; OUTPUT STRING ":TRIG:STAT:SLOPE "; OUTPUT STATE_TRIGGER_SLOPE TABLE 'NEG;','POS;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 3; OUTPUT STRING ":TRIG:STAT:SLOPE?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NEG"; FETCH (STATE_TRIGGER_SLOPE)NEGATIVE; CASE "POS"; FETCH (STATE_TRIGGER_SLOPE)POSITIVE; CASE ELSE; FETCH STATE_TRIGGER_SLOPE; END SELECT; STORE STATE_TRIGGER_SLOPE; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT STATE_TRIG_MIN_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT STATE_TRIG_MAX_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; ACTIONS Get_State_Trigger_Levels ; SELECT STATE_TRIGGER_SOURCE ; CASE CH1 ; FETCH MIN_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MIN_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MIN_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MIN_TRIG_LVL_CH4 ; END SELECT ; STORE STATE_TRIG_MIN_LVL ; SELECT STATE_TRIGGER_SOURCE ; CASE CH1 ; FETCH MAX_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MAX_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MAX_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MAX_TRIG_LVL_CH4 ; END SELECT ; STORE STATE_TRIG_MAX_LVL ; END ACTIONS ; COMPONENT STATE_TRIGGER_LEVEL NOGEN; TYPE CONTINUOUS; VALUES RANGE STATE_TRIG_MIN_LVL,STATE_TRIG_MAX_LVL ; INITIAL 0; SET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... FETCH STATE_TRIGGER_LEVEL; SELECT STATE_TRIGGER_SOURCE; CASE CH1; STORE TRIGGER_LEVEL_CH1; SET TRIGGER_LEVEL_CH1; CODEGEN SET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; STORE TRIGGER_LEVEL_CH2; SET TRIGGER_LEVEL_CH2; CODEGEN SET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; STORE TRIGGER_LEVEL_CH3; SET TRIGGER_LEVEL_CH3; CODEGEN SET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; STORE TRIGGER_LEVEL_CH4; SET TRIGGER_LEVEL_CH4; CODEGEN SET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE STATE_TRIGGER_LEVEL; ! Note that SET on TL? did a verify ... END ACTIONS; GET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... SELECT STATE_TRIGGER_SOURCE; CASE CH1; CODEGEN GET TRIGGER_LEVEL_CH1; GET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; CODEGEN GET TRIGGER_LEVEL_CH2; GET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; CODEGEN GET TRIGGER_LEVEL_CH3; GET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; CODEGEN GET TRIGGER_LEVEL_CH4; GET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE STATE_TRIGGER_LEVEL; END ACTIONS; END COMPONENT; COMPONENT STATE_TRIGGER_UPDATE NOTSAVED NOGEN NOERRCHECK; TYPE INTEGER; INITIAL DONTCARE; ! This exists as a component rather than an ACTIONS sub due ! to the need to control the order of execution of COUPLINGs from ! numerous other components -- as a component this can be included ! in a COUPLED list whereas an ACTIONS sub could only be called ! from the PANEL SET ACTIONS of the effecting component and thus ! cannot be done after certain other couplings ... GET ACTIONS; SELECT STATE_TRIGGER_SOURCE; CASE CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE STATE_TRIGGER_LEVEL; END ACTIONS; END COMPONENT; !>> STATE LOGIC COMPONENT STATE_LOGIC_CH1; TYPE DISCRETE; VALUES H,L,X; INITIAL X; SET ACTIONS; ! Assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 3; OUTPUT STRING ":TRIG:STAT:LOGIC CHAN1,"; OUTPUT STATE_LOGIC_CH1 TABLE 'HIGH;','LOW;','DONTCARE;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 3; OUTPUT STRING ":TRIG:STAT:LOGIC? CHAN1;"; ENTER STACK FORMAT "#,K" ; DROP ; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "HIGH"; FETCH (STATE_LOGIC_CH1)H; CASE "LOW"; FETCH (STATE_LOGIC_CH1)L; CASE "DONT"; FETCH (STATE_LOGIC_CH1)X; CASE ELSE; FETCH STATE_LOGIC_CH1; END SELECT; STORE STATE_LOGIC_CH1; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT STATE_LOGIC_CH2; TYPE DISCRETE; VALUES H,L,X; INITIAL X; SET ACTIONS; ! Assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 3; OUTPUT STRING ":TRIG:STAT:LOGIC CHAN2,"; OUTPUT STATE_LOGIC_CH2 TABLE 'HIGH;','LOW;','DONTCARE;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 3; OUTPUT STRING ":TRIG:STAT:LOGIC? CHAN2;"; ENTER STACK FORMAT "#,K" ; DROP ; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "HIGH"; FETCH (STATE_LOGIC_CH2)H; CASE "LOW"; FETCH (STATE_LOGIC_CH2)L; CASE "DONT"; FETCH (STATE_LOGIC_CH2)X; CASE ELSE; FETCH STATE_LOGIC_CH2; END SELECT; STORE STATE_LOGIC_CH2; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT STATE_LOGIC_CH3; TYPE DISCRETE; VALUES H,L,X; INITIAL X; SET ACTIONS; SELECT TRIGGER_MODE; CASE 3; ! Assumes that trigger mode already set ... OUTPUT STRING ":TRIG:STAT:LOGIC CHAN3,"; OUTPUT STATE_LOGIC_CH3 TABLE 'HIGH;','LOW;','DONTCARE;'; CASE ELSE ; END SELECT ; END ACTIONS; GET ACTIONS; SELECT TRIGGER_MODE; CASE 3; ! Assumes that trigger mode already set ... OUTPUT STRING ":TRIG:STAT:LOGIC? CHAN3;"; ENTER STACK FORMAT "#,K" ; DROP ; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "HIGH"; FETCH (STATE_LOGIC_CH3)H; CASE "LOW"; FETCH (STATE_LOGIC_CH3)L; CASE "DONT"; FETCH (STATE_LOGIC_CH3)X; CASE ELSE; FETCH STATE_LOGIC_CH3; END SELECT; STORE STATE_LOGIC_CH3; CASE ELSE ; END SELECT ; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT STATE_LOGIC_CH4; TYPE DISCRETE; VALUES H,L,X; INITIAL X; SET ACTIONS; SELECT TRIGGER_MODE; CASE 3; ! Assumes that trigger mode already set ... OUTPUT STRING ":TRIG:STAT:LOGIC CHAN4,"; OUTPUT STATE_LOGIC_CH4 TABLE 'HIGH;','LOW;','DONTCARE;'; CASE ELSE ; END SELECT ; END ACTIONS; GET ACTIONS; SELECT TRIGGER_MODE; CASE 3; ! Assumes that trigger mode already set ... OUTPUT STRING ":TRIG:STAT:LOGIC? CHAN4;"; ENTER STACK FORMAT "#,K" ; DROP ; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "HIGH"; FETCH (STATE_LOGIC_CH4)H; CASE "LOW"; FETCH (STATE_LOGIC_CH4)L; CASE "DONT"; FETCH (STATE_LOGIC_CH4)X; CASE ELSE; FETCH STATE_LOGIC_CH4; END SELECT; STORE STATE_LOGIC_CH4; CASE ELSE ; END SELECT ; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT STATE_TRIGGER_COND; TYPE DISCRETE; VALUES ISNOT_PRESENT,IS_PRESENT; INITIAL IS_PRESENT; SET ACTIONS; ! Assumes that MODE already set to 'STATE' ... SELECT TRIGGER_MODE; CASE 3; OUTPUT STRING ":TRIG:STAT:COND "; OUTPUT STATE_TRIGGER_COND TABLE 'FALSE;','TRUE;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes that MODE already set to 'STATE' ... SELECT TRIGGER_MODE; CASE 3; OUTPUT STRING ":TRIG:STAT:COND?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "TRUE"; FETCH (STATE_TRIGGER_COND)IS_PRESENT; CASE "FALS"; FETCH (STATE_TRIGGER_COND)ISNOT_PRESENT; CASE ELSE; FETCH STATE_TRIGGER_COND; END SELECT; STORE STATE_TRIGGER_COND; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; !>> 'PATTERN' MODE COMPONENT PATTERN_DISPLAY NOGEN NOERRCHECK; TYPE DISCRETE; VALUES LOGIC,LEVELS; INITIAL LOGIC; END COMPONENT; COMPONENT PATTERN_LOGIC_CH1; TYPE DISCRETE; VALUES H,L,X; INITIAL X; SET ACTIONS; ! Assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 2; OUTPUT STRING ":TRIG:PATT:LOGIC CHAN1,"; OUTPUT PATTERN_LOGIC_CH1 TABLE 'HIGH;','LOW;','DONT;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 2; OUTPUT STRING ":TRIG:PATT:LOGIC? CHAN1;"; ENTER STACK FORMAT "#,K" ; DROP ; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "HIGH"; FETCH (PATTERN_LOGIC_CH1)H; CASE "LOW"; FETCH (PATTERN_LOGIC_CH1)L; CASE "DONT"; FETCH (PATTERN_LOGIC_CH1)X; CASE ELSE; FETCH PATTERN_LOGIC_CH1; END SELECT; STORE PATTERN_LOGIC_CH1; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT PATTERN_LOGIC_CH2; TYPE DISCRETE; VALUES H,L,X; INITIAL X; SET ACTIONS; ! Assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 2; OUTPUT STRING ":TRIG:PATT:LOGIC CHAN2,"; OUTPUT PATTERN_LOGIC_CH2 TABLE 'HIGH;','LOW;','DONT;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 2; OUTPUT STRING ":TRIG:PATT:LOGIC? CHAN2;"; ENTER STACK FORMAT "#,K" ; DROP ; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "HIGH"; FETCH (PATTERN_LOGIC_CH2)H; CASE "LOW"; FETCH (PATTERN_LOGIC_CH2)L; CASE "DONT"; FETCH (PATTERN_LOGIC_CH2)X; CASE ELSE; FETCH PATTERN_LOGIC_CH2; END SELECT; STORE PATTERN_LOGIC_CH2; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT PATTERN_LOGIC_CH3; TYPE DISCRETE; VALUES H,L,X; INITIAL X; SET ACTIONS; SELECT TRIGGER_MODE; CASE 2; ! Assumes that trigger mode already set ... OUTPUT STRING ":TRIG:PATT:LOGIC CHAN3,"; OUTPUT PATTERN_LOGIC_CH3 TABLE 'HIGH;','LOW;','DONTCARE;'; CASE ELSE ; END SELECT ; END ACTIONS; GET ACTIONS; SELECT TRIGGER_MODE; CASE 2; ! Assumes that trigger mode already set ... OUTPUT STRING ":TRIG:PATT:LOGIC? CHAN3;"; ENTER STACK FORMAT "#,K" ; DROP ; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "HIGH"; FETCH (PATTERN_LOGIC_CH3)H; CASE "LOW"; FETCH (PATTERN_LOGIC_CH3)L; CASE "DONT"; FETCH (PATTERN_LOGIC_CH3)X; CASE ELSE; FETCH PATTERN_LOGIC_CH3; END SELECT; STORE PATTERN_LOGIC_CH3; CASE ELSE ; END SELECT ; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT PATTERN_LOGIC_CH4; TYPE DISCRETE; VALUES H,L,X; INITIAL X; SET ACTIONS; SELECT TRIGGER_MODE; CASE 2; ! Assumes that trigger mode already set ... OUTPUT STRING ":TRIG:PATT:LOGIC CHAN4,"; OUTPUT PATTERN_LOGIC_CH4 TABLE 'HIGH;','LOW;','DONTCARE;'; CASE ELSE ; END SELECT ; END ACTIONS; GET ACTIONS; ! Assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 2; OUTPUT STRING ":TRIG:PATT:LOGIC? CHAN4;"; ENTER STACK FORMAT "#,K" ; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "HIGH"; FETCH (PATTERN_LOGIC_CH4)H; CASE "LOW"; FETCH (PATTERN_LOGIC_CH4)L; CASE "DONT"; FETCH (PATTERN_LOGIC_CH4)X; CASE ELSE; FETCH PATTERN_LOGIC_CH4; END SELECT; STORE PATTERN_LOGIC_CH4; CASE ELSE ; END SELECT ; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT PATTERN_TRIGGER_COND NOGEN; TYPE DISCRETE; VALUES ENTERED,EXITED,MORETHAN,LESSTHAN,BETWEEN; INITIAL ENTERED; SET ACTIONS; GOSUB SET_PATTERN_TIMING; END ACTIONS; GET ACTIONS; GOSUB GET_PATTERN_TIMING; END ACTIONS; PANEL SET ACTIONS; !GOSUB UPDATE_TRACE_DATA; ! CODEGEN SET PATTERN_TRIGGER_COND; SELECT PATTERN_TRIGGER_COND; CASE ENTERED; CASE EXITED; CASE MORETHAN; CODEGEN SET PATTERN_PRESENT_MORETHAN; CASE LESSTHAN; CODEGEN SET PATTERN_PRESENT_LESSTHAN; CASE BETWEEN; CODEGEN SET PATTERN_PRESENT_START; CODEGEN SET PATTERN_PRESENT_STOP; END SELECT; END ACTIONS; PANEL GET ACTIONS; CODEGEN GET PATTERN_TRIGGER_COND; SELECT PATTERN_TRIGGER_COND; CASE ENTERED; CASE EXITED; CASE MORETHAN; CODEGEN PEEK PATTERN_PRESENT_MORETHAN; CASE LESSTHAN; CODEGEN PEEK PATTERN_PRESENT_LESSTHAN; CASE BETWEEN; CODEGEN PEEK PATTERN_PRESENT_START; CODEGEN PEEK PATTERN_PRESENT_STOP; END SELECT; END ACTIONS; END COMPONENT; COMPONENT PATTERN_PRESENT_MORETHAN NOGEN; TYPE CONTINUOUS; VALUES RANGE 20E-9,160E-3; INITIAL 20E-9; SET ACTIONS; GOSUB SET_PATTERN_TIMING; END ACTIONS; GET ACTIONS; GOSUB GET_PATTERN_TIMING; END ACTIONS; PANEL SET ACTIONS; GOSUB GET_PATTERN_TIMING; !GOSUB UPDATE_TRACE_DATA; CODEGEN SET PATTERN_PRESENT_MORETHAN; END ACTIONS; PANEL GET ACTIONS; CODEGEN GET PATTERN_PRESENT_MORETHAN; END ACTIONS; END COMPONENT; COMPONENT PATTERN_PRESENT_LESSTHAN NOGEN; TYPE CONTINUOUS; VALUES RANGE 20E-9,160E-3; INITIAL 50E-9; SET ACTIONS; GOSUB SET_PATTERN_TIMING; END ACTIONS; GET ACTIONS; GOSUB GET_PATTERN_TIMING; END ACTIONS; PANEL SET ACTIONS; GOSUB GET_PATTERN_TIMING; !GOSUB UPDATE_TRACE_DATA; CODEGEN SET PATTERN_PRESENT_LESSTHAN; END ACTIONS; PANEL GET ACTIONS; CODEGEN GET PATTERN_PRESENT_LESSTHAN; END ACTIONS; END COMPONENT; COMPONENT PATTERN_PRESENT_START NOGEN; TYPE CONTINUOUS; VALUES RANGE 20E-9,159.999E-3; INITIAL 20E-9; SET ACTIONS; GOSUB SET_PATTERN_TIMING; END ACTIONS; GET ACTIONS; GOSUB GET_PATTERN_TIMING; END ACTIONS; PANEL SET ACTIONS; GOSUB GET_PATTERN_TIMING; !GOSUB UPDATE_TRACE_DATA; CODEGEN SET PATTERN_PRESENT_START; END ACTIONS; PANEL GET ACTIONS; CODEGEN GET PATTERN_PRESENT_START; END ACTIONS; END COMPONENT; COMPONENT PATTERN_PRESENT_STOP NOGEN; TYPE CONTINUOUS; VALUES RANGE 30E-9,160E-9; INITIAL 50E-9; SET ACTIONS; GOSUB SET_PATTERN_TIMING; END ACTIONS; GET ACTIONS; GOSUB GET_PATTERN_TIMING; END ACTIONS; PANEL SET ACTIONS; GOSUB GET_PATTERN_TIMING; !GOSUB UPDATE_TRACE_DATA; CODEGEN SET PATTERN_PRESENT_STOP; END ACTIONS; PANEL GET ACTIONS; CODEGEN GET PATTERN_PRESENT_STOP; END ACTIONS; END COMPONENT; ACTIONS SET_PATTERN_TIMING; ! assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 2; OUTPUT STRING ":TRIG:PATT:COND "; SELECT PATTERN_TRIGGER_COND; CASE ENTERED; OUTPUT STRING "ENT;"; CASE EXITED; OUTPUT STRING "EXIT;"; CASE MORETHAN; OUTPUT PATTERN_PRESENT_MORETHAN FORMAT '"GT,",K,";"'; CASE LESSTHAN; OUTPUT PATTERN_PRESENT_LESSTHAN FORMAT '"LT,",K,";"'; CASE BETWEEN; OUTPUT PATTERN_PRESENT_START FORMAT '"RANG,",K'; OUTPUT PATTERN_PRESENT_STOP FORMAT '",",K,";"'; END SELECT; CASE ELSE; END SELECT; END ACTIONS; ACTIONS GET_PATTERN_TIMING; ! assumes that trigger mode already set ... SELECT TRIGGER_MODE; CASE 2; OUTPUT STRING ":TRIG:PATT:COND?;" ; ENTER CHARSTRING FORMAT "#,AA"; SELECT CHARSTRING; CASE "EN"; ENTER CHARSTRING FORMAT K; ! finishes entry ... FETCH (PATTERN_TRIGGER_COND)ENTERED; CASE "EX"; ENTER CHARSTRING FORMAT K; ! finishes entry ... FETCH (PATTERN_TRIGGER_COND)EXITED; CASE "GT"; ENTER PATTERN_PRESENT_MORETHAN FORMAT '",",K'; FETCH (PATTERN_TRIGGER_COND)MORETHAN; CASE "LT"; ENTER PATTERN_PRESENT_LESSTHAN FORMAT '",",K'; FETCH (PATTERN_TRIGGER_COND)LESSTHAN; CASE "RA"; ENTER CHARSTRING FORMAT '#,AA'; ! finishes entry ... ENTER PATTERN_PRESENT_START FORMAT '#,",",K'; ENTER PATTERN_PRESENT_STOP FORMAT '",",K'; FETCH (PATTERN_TRIGGER_COND)BETWEEN; CASE ELSE; FETCH 0; END SELECT; STORE PATTERN_TRIGGER_COND; CASE ELSE; END SELECT; END ACTIONS; !<< Delay Event Trigger COMPONENT DEVENT_ARM_SOURCE; TYPE DISCRETE; VALUES CH1,CH2,CH3,CH4; INITIAL CH1; COUPLED DEVENT_ARM_SLOPE,DEVENT_ARM_UPDATE,TRIGGER_INCR; SET ACTIONS; ! Assumes proper trigger mode already set ...pattern mode not valid SELECT TRIGGER_MODE; CASE 4; ! GLITCH Mode OUTPUT STRING ":TRIG:DEV:ARM:SOUR "; OUTPUT DEVENT_ARM_SOURCE TABLE 'CHAN1;','CHAN2;','CHAN3;','CHAN4;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... !SELECT TRIGGER_MODE; !CASE 4; OUTPUT STRING ":TRIG:DEV:ARM:SOUR?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "CHAN1"; FETCH (DEVENT_ARM_SOURCE)CH1; CASE "TRIG1"; FETCH (DEVENT_ARM_SOURCE)CH1; CASE "CHAN2"; FETCH (DEVENT_ARM_SOURCE)CH2; CASE "TRIG2"; FETCH (DEVENT_ARM_SOURCE)CH2; CASE "CHAN3"; FETCH (DEVENT_ARM_SOURCE)CH3; CASE "TRIG3"; FETCH (DEVENT_ARM_SOURCE)CH3; CASE "CHAN4"; FETCH (DEVENT_ARM_SOURCE)CH4; CASE "TRIG4"; FETCH (DEVENT_ARM_SOURCE)CH4; CASE ELSE; FETCH DEVENT_ARM_SOURCE; END SELECT; STORE DEVENT_ARM_SOURCE; !CASE ELSE; !END SELECT; END ACTIONS; PANEL SET ACTIONS ; SELECT TRIGGER_MODE ; CASE 4; GOSUB Get_Devent_Arm_Levels ; CASE ELSE ; END SELECT ; SET TRIGGER_LEVEL_UNITS ; !GOSUB UPDATE_TRACE_DATA; END ACTIONS ; END COMPONENT; COMPONENT DEVENT_ARM_SLOPE; TYPE DISCRETE; VALUES NEGATIVE,POSITIVE; INITIAL NEGATIVE; SET ACTIONS; ! Assumes that trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 4; OUTPUT STRING ":TRIG:DEV:ARM:SLOP "; OUTPUT DEVENT_ARM_SLOPE TABLE 'NEG;','POS;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 4; OUTPUT STRING ":TRIG:DEV:ARM:SLOP?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NEG"; FETCH (DEVENT_ARM_SLOPE)NEGATIVE; CASE "POS"; FETCH (DEVENT_ARM_SLOPE)POSITIVE; CASE ELSE; FETCH DEVENT_ARM_SLOPE; END SELECT; STORE DEVENT_ARM_SLOPE; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT DEVENT_ARM_MIN_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT DEVENT_ARM_MAX_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; ACTIONS Get_Devent_Arm_Levels ; SELECT DEVENT_ARM_SOURCE ; CASE CH1 ; FETCH MIN_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MIN_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MIN_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MIN_TRIG_LVL_CH4 ; END SELECT ; STORE DEVENT_ARM_MIN_LVL ; SELECT DEVENT_ARM_SOURCE ; CASE CH1 ; FETCH MAX_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MAX_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MAX_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MAX_TRIG_LVL_CH4 ; END SELECT ; STORE DEVENT_ARM_MAX_LVL ; END ACTIONS ; COMPONENT DEVENT_ARM_LEVEL NOGEN; TYPE CONTINUOUS; VALUES RANGE DEVENT_ARM_MIN_LVL,DEVENT_ARM_MAX_LVL ; INITIAL 0; SET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... FETCH DEVENT_ARM_LEVEL; SELECT DEVENT_ARM_SOURCE; CASE CH1; STORE TRIGGER_LEVEL_CH1; SET TRIGGER_LEVEL_CH1; CODEGEN SET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; STORE TRIGGER_LEVEL_CH2; SET TRIGGER_LEVEL_CH2; CODEGEN SET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; STORE TRIGGER_LEVEL_CH3; SET TRIGGER_LEVEL_CH3; CODEGEN SET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; STORE TRIGGER_LEVEL_CH4; SET TRIGGER_LEVEL_CH4; CODEGEN SET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DEVENT_ARM_LEVEL; ! Note that SET on TL? did a verify ... END ACTIONS; GET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... SELECT DEVENT_ARM_SOURCE; CASE CH1; CODEGEN GET TRIGGER_LEVEL_CH1; GET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; CODEGEN GET TRIGGER_LEVEL_CH2; GET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; CODEGEN GET TRIGGER_LEVEL_CH3; GET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; CODEGEN GET TRIGGER_LEVEL_CH4; GET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DEVENT_ARM_LEVEL; END ACTIONS; END COMPONENT; COMPONENT DEVENT_ARM_UPDATE NOTSAVED NOGEN; TYPE INTEGER; INITIAL DONTCARE; ! This exists as a component rather than an ACTIONS sub due ! to the need to control the order of execution of COUPLINGs from ! numerous other components -- as a component this can be included ! in a COUPLED list whereas an ACTIONS sub could only be called ! from the PANEL SET ACTIONS of the effecting component and thus ! cannot be done after certain other couplings ... GET ACTIONS; SELECT DEVENT_ARM_SOURCE; CASE CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DEVENT_ARM_LEVEL; ! the STORE causes view update ... END ACTIONS; END COMPONENT; COMPONENT DEVENT_EVENT_SOURCE; TYPE DISCRETE; VALUES CH1,CH2,CH3,CH4; INITIAL CH1; COUPLED DEVENT_EVENT_SLOPE,DEVENT_EVENT_UPDATE,TRIGGER_INCR; SET ACTIONS; ! Assumes proper trigger mode already set ...pattern mode not valid SELECT TRIGGER_MODE; CASE 4; ! GLITCH Mode OUTPUT STRING ":TRIG:DEV:EVEN:SOUR "; OUTPUT DEVENT_EVENT_SOURCE TABLE 'CHAN1;','CHAN2;','CHAN3;','CHAN4;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... !SELECT TRIGGER_MODE; !CASE 4; OUTPUT STRING ":TRIG:DEV:EVEN:SOUR?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "CHAN1"; FETCH (DEVENT_EVENT_SOURCE)CH1; CASE "TRIG1"; FETCH (DEVENT_EVENT_SOURCE)CH1; CASE "CHAN2"; FETCH (DEVENT_EVENT_SOURCE)CH2; CASE "TRIG2"; FETCH (DEVENT_EVENT_SOURCE)CH2; CASE "CHAN3"; FETCH (DEVENT_EVENT_SOURCE)CH3; CASE "TRIG3"; FETCH (DEVENT_EVENT_SOURCE)CH3; CASE "CHAN4"; FETCH (DEVENT_EVENT_SOURCE)CH4; CASE "TRIG4"; FETCH (DEVENT_EVENT_SOURCE)CH4; CASE ELSE; FETCH DEVENT_EVENT_SOURCE; END SELECT; STORE DEVENT_EVENT_SOURCE; !CASE ELSE; !END SELECT; END ACTIONS; PANEL SET ACTIONS ; SELECT TRIGGER_MODE ; CASE 4; GOSUB Get_Devent_Event_Levels ; CASE ELSE ; END SELECT ; !GOSUB UPDATE_TRACE_DATA; SET TRIGGER_LEVEL_UNITS ; END ACTIONS ; END COMPONENT; COMPONENT DEVENT_EVENT_SLOPE; TYPE DISCRETE; VALUES NEGATIVE,POSITIVE; INITIAL NEGATIVE; SET ACTIONS; ! Assumes that trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 4; OUTPUT STRING ":TRIG:DEV:EVEN:SLOP "; OUTPUT DEVENT_EVENT_SLOPE TABLE 'NEG;','POS;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 4; OUTPUT STRING ":TRIG:DEV:EVEN:SLOP?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NEG"; FETCH (DEVENT_EVENT_SLOPE)NEGATIVE; CASE "POS"; FETCH (DEVENT_EVENT_SLOPE)POSITIVE; CASE ELSE; FETCH DEVENT_EVENT_SLOPE; END SELECT; STORE DEVENT_EVENT_SLOPE; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT DEVENT_EVENT_MIN_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT DEVENT_EVENT_MAX_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; ACTIONS Get_Devent_Event_Levels ; SELECT DEVENT_EVENT_SOURCE ; CASE CH1 ; FETCH MIN_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MIN_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MIN_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MIN_TRIG_LVL_CH4 ; END SELECT ; STORE DEVENT_EVENT_MIN_LVL ; SELECT DEVENT_EVENT_SOURCE ; CASE CH1 ; FETCH MAX_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MAX_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MAX_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MAX_TRIG_LVL_CH4 ; END SELECT ; STORE DEVENT_EVENT_MAX_LVL ; END ACTIONS ; COMPONENT DEVENT_EVENT_LEVEL NOGEN; TYPE CONTINUOUS; VALUES RANGE DEVENT_EVENT_MIN_LVL,DEVENT_EVENT_MAX_LVL ; INITIAL 0; SET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... FETCH DEVENT_EVENT_LEVEL; SELECT DEVENT_EVENT_SOURCE; CASE CH1; STORE TRIGGER_LEVEL_CH1; SET TRIGGER_LEVEL_CH1; CODEGEN SET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; STORE TRIGGER_LEVEL_CH2; SET TRIGGER_LEVEL_CH2; CODEGEN SET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; STORE TRIGGER_LEVEL_CH3; SET TRIGGER_LEVEL_CH3; CODEGEN SET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; STORE TRIGGER_LEVEL_CH4; SET TRIGGER_LEVEL_CH4; CODEGEN SET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DEVENT_EVENT_LEVEL; ! Note that SET on TL? did a verify ... END ACTIONS; GET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... SELECT DEVENT_EVENT_SOURCE; CASE CH1; CODEGEN GET TRIGGER_LEVEL_CH1; GET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; CODEGEN GET TRIGGER_LEVEL_CH2; GET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; CODEGEN GET TRIGGER_LEVEL_CH3; GET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; CODEGEN GET TRIGGER_LEVEL_CH4; GET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DEVENT_EVENT_LEVEL; END ACTIONS; END COMPONENT; COMPONENT DEVENT_EVENT_DELAY NOGEN; TYPE CONTINUOUS; VALUES RANGE 1,16000000 ; INITIAL 0; SET ACTIONS; SELECT TRIGGER_MODE ; CASE 4 ; OUTPUT DEVENT_EVENT_DELAY FORMAT '":TRIG:DEV:EVEN:DEL ",K,";"' ; CASE ELSE ; END SELECT ; END ACTIONS ; GET ACTIONS ; SELECT TRIGGER_MODE ; CASE 4 ; OUTPUT ":TRIG:DEV:EVEN:DEL?" ; ENTER DEVENT_EVENT_DELAY FORMAT 'K' ; CASE ELSE ; END SELECT ; END ACTIONS ; END COMPONENT ; COMPONENT DEVENT_EVENT_UPDATE NOTSAVED NOGEN; TYPE INTEGER; INITIAL DONTCARE; ! This exists as a component rather than an ACTIONS sub due ! to the need to control the order of execution of COUPLINGs from ! numerous other components -- as a component this can be included ! in a COUPLED list whereas an ACTIONS sub could only be called ! from the PANEL SET ACTIONS of the effecting component and thus ! cannot be done after certain other couplings ... GET ACTIONS; SELECT DEVENT_EVENT_SOURCE; CASE CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DEVENT_EVENT_LEVEL; ! the STORE causes view update ... END ACTIONS; END COMPONENT; COMPONENT DEVENT_TRIGGER_SOURCE; TYPE DISCRETE; VALUES CH1,CH2,CH3,CH4; INITIAL CH1; COUPLED DEVENT_TRIGGER_SLOPE,DEVENT_TRIGGER_UPDATE,TRIGGER_INCR; SET ACTIONS; ! Assumes proper trigger mode already set ...pattern mode not valid SELECT TRIGGER_MODE; CASE 4; ! GLITCH Mode OUTPUT STRING ":TRIG:DEV:TRIG:SOUR "; OUTPUT DEVENT_TRIGGER_SOURCE TABLE 'CHAN1;','CHAN2;','CHAN3;','CHAN4;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... !SELECT TRIGGER_MODE; !CASE 4; OUTPUT STRING ":TRIG:DEV:TRIG:SOUR?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "CHAN1"; FETCH (DEVENT_TRIGGER_SOURCE)CH1; CASE "TRIG1"; FETCH (DEVENT_TRIGGER_SOURCE)CH1; CASE "CHAN2"; FETCH (DEVENT_TRIGGER_SOURCE)CH2; CASE "TRIG2"; FETCH (DEVENT_TRIGGER_SOURCE)CH2; CASE "CHAN3"; FETCH (DEVENT_TRIGGER_SOURCE)CH3; CASE "TRIG3"; FETCH (DEVENT_TRIGGER_SOURCE)CH3; CASE "CHAN4"; FETCH (DEVENT_TRIGGER_SOURCE)CH4; CASE "TRIG4"; FETCH (DEVENT_TRIGGER_SOURCE)CH4; CASE ELSE; FETCH DEVENT_TRIGGER_SOURCE; END SELECT; STORE DEVENT_TRIGGER_SOURCE; !CASE ELSE; !END SELECT; END ACTIONS; PANEL SET ACTIONS ; SELECT TRIGGER_MODE ; CASE 4 ; GOSUB Get_Devent_Trigger_Levels ; CASE ELSE ; END SELECT ; !GOSUB UPDATE_TRACE_DATA; SET TRIGGER_LEVEL_UNITS ; END ACTIONS ; END COMPONENT; COMPONENT DEVENT_TRIGGER_SLOPE; TYPE DISCRETE; VALUES NEGATIVE,POSITIVE; INITIAL NEGATIVE; SET ACTIONS; ! Assumes that trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 4; OUTPUT STRING ":TRIG:DEV:TRIG:SLOP "; OUTPUT DEVENT_TRIGGER_SLOPE TABLE 'NEG;','POS;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 4; OUTPUT STRING ":TRIG:DEV:TRIG:SLOP?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NEG"; FETCH (DEVENT_TRIGGER_SLOPE)NEGATIVE; CASE "POS"; FETCH (DEVENT_TRIGGER_SLOPE)POSITIVE; CASE ELSE; FETCH DEVENT_TRIGGER_SLOPE; END SELECT; STORE DEVENT_TRIGGER_SLOPE; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT DEVENT_TRIG_MIN_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT DEVENT_TRIG_MAX_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; ACTIONS Get_Devent_Trigger_Levels ; SELECT DEVENT_TRIGGER_SOURCE ; CASE CH1 ; FETCH MIN_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MIN_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MIN_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MIN_TRIG_LVL_CH4 ; END SELECT ; STORE DEVENT_TRIG_MIN_LVL ; SELECT DEVENT_TRIGGER_SOURCE ; CASE CH1 ; FETCH MAX_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MAX_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MAX_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MAX_TRIG_LVL_CH4 ; END SELECT ; STORE DEVENT_TRIG_MAX_LVL ; END ACTIONS ; COMPONENT DEVENT_TRIGGER_LEVEL NOGEN; TYPE CONTINUOUS; VALUES RANGE DEVENT_TRIG_MIN_LVL, DEVENT_TRIG_MAX_LVL ; INITIAL 0; SET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... FETCH DEVENT_TRIGGER_LEVEL; SELECT DEVENT_TRIGGER_SOURCE; CASE CH1; STORE TRIGGER_LEVEL_CH1; SET TRIGGER_LEVEL_CH1; CODEGEN SET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; STORE TRIGGER_LEVEL_CH2; SET TRIGGER_LEVEL_CH2; CODEGEN SET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; STORE TRIGGER_LEVEL_CH3; SET TRIGGER_LEVEL_CH3; CODEGEN SET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; STORE TRIGGER_LEVEL_CH4; SET TRIGGER_LEVEL_CH4; CODEGEN SET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DEVENT_TRIGGER_LEVEL; ! Note that SET on TL? did a verify ... END ACTIONS; GET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... SELECT DEVENT_TRIGGER_SOURCE; CASE CH1; CODEGEN GET TRIGGER_LEVEL_CH1; GET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; CODEGEN GET TRIGGER_LEVEL_CH2; GET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; CODEGEN GET TRIGGER_LEVEL_CH3; GET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; CODEGEN GET TRIGGER_LEVEL_CH4; GET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DEVENT_TRIGGER_LEVEL; END ACTIONS; END COMPONENT; COMPONENT DEVENT_TRIGGER_UPDATE NOTSAVED NOGEN; TYPE INTEGER; INITIAL DONTCARE; ! This exists as a component rather than an ACTIONS sub due ! to the need to control the order of execution of COUPLINGs from ! numerous other components -- as a component this can be included ! in a COUPLED list whereas an ACTIONS sub could only be called ! from the PANEL SET ACTIONS of the effecting component and thus ! cannot be done after certain other couplings ... GET ACTIONS; SELECT DEVENT_TRIGGER_SOURCE; CASE CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DEVENT_TRIGGER_LEVEL; ! the STORE causes view update ... END ACTIONS; END COMPONENT; !<< Delay Time Trigger COMPONENT DTIME_ARM_SOURCE; TYPE DISCRETE; VALUES CH1,CH2,CH3,CH4; INITIAL CH1; COUPLED DTIME_ARM_SLOPE,DTIME_ARM_UPDATE,TRIGGER_INCR; SET ACTIONS; ! Assumes proper trigger mode already set ...pattern mode not valid SELECT TRIGGER_MODE; CASE 5; ! OUTPUT STRING ":TRIG:DTIM:ARM:SOUR "; OUTPUT DTIME_ARM_SOURCE TABLE 'CHAN1;','CHAN2;','CHAN3;','CHAN4;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... !SELECT TRIGGER_MODE; !CASE 5; OUTPUT STRING ":TRIG:DTIM:ARM:SOUR?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "CHAN1"; FETCH (DTIME_ARM_SOURCE)CH1; CASE "TRIG1"; FETCH (DTIME_ARM_SOURCE)CH1; CASE "CHAN2"; FETCH (DTIME_ARM_SOURCE)CH2; CASE "TRIG2" ; FETCH (DTIME_ARM_SOURCE)CH2; CASE "CHAN3"; FETCH (DTIME_ARM_SOURCE)CH3; CASE "TRIG3"; FETCH (DTIME_ARM_SOURCE)CH3; CASE "CHAN4"; FETCH (DTIME_ARM_SOURCE)CH4; CASE "TRIG4"; FETCH (DTIME_ARM_SOURCE)CH4; CASE ELSE; FETCH DTIME_ARM_SOURCE; END SELECT; STORE DTIME_ARM_SOURCE; !CASE ELSE; !END SELECT; END ACTIONS; PANEL SET ACTIONS ; SELECT TRIGGER_MODE ; CASE 5 ; GOSUB Get_Dtime_Arm_Levels ; CASE ELSE ; END SELECT ; !GOSUB UPDATE_TRACE_DATA; SET TRIGGER_LEVEL_UNITS ; END ACTIONS ; END COMPONENT; COMPONENT DTIME_ARM_SLOPE; TYPE DISCRETE; VALUES NEGATIVE,POSITIVE; INITIAL NEGATIVE; SET ACTIONS; ! Assumes that trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 5; OUTPUT STRING ":TRIG:DTIM:ARM:SLOP "; OUTPUT DTIME_ARM_SLOPE TABLE 'NEG;','POS;'; GOSUB Get_Dtime_Arm_Levels ; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 5; OUTPUT STRING ":TRIG:DTIM:ARM:SLOP?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NEG"; FETCH (DTIME_ARM_SLOPE)NEGATIVE; CASE "POS"; FETCH (DTIME_ARM_SLOPE)POSITIVE; CASE ELSE; FETCH DTIME_ARM_SLOPE; END SELECT; STORE DTIME_ARM_SLOPE; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT DTIME_ARM_MIN_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT DTIME_ARM_MAX_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; ACTIONS Get_Dtime_Arm_Levels ; SELECT DTIME_ARM_SOURCE ; CASE CH1 ; FETCH MIN_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MIN_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MIN_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MIN_TRIG_LVL_CH4 ; END SELECT ; STORE DTIME_ARM_MIN_LVL ; SELECT DTIME_ARM_SOURCE ; CASE CH1 ; FETCH MAX_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MAX_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MAX_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MAX_TRIG_LVL_CH4 ; END SELECT ; STORE DTIME_ARM_MAX_LVL ; END ACTIONS ; COMPONENT DTIME_ARM_LEVEL NOGEN; TYPE CONTINUOUS; VALUES RANGE DTIME_ARM_MIN_LVL,DTIME_ARM_MAX_LVL ; INITIAL 0; SET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... FETCH DTIME_ARM_LEVEL; SELECT DTIME_ARM_SOURCE; CASE CH1; STORE TRIGGER_LEVEL_CH1; SET TRIGGER_LEVEL_CH1; CODEGEN SET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; STORE TRIGGER_LEVEL_CH2; SET TRIGGER_LEVEL_CH2; CODEGEN SET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; STORE TRIGGER_LEVEL_CH3; SET TRIGGER_LEVEL_CH3; CODEGEN SET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; STORE TRIGGER_LEVEL_CH4; SET TRIGGER_LEVEL_CH4; CODEGEN SET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DTIME_ARM_LEVEL; ! Note that SET on TL? did a verify ... END ACTIONS; GET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... SELECT DTIME_ARM_SOURCE; CASE CH1; CODEGEN GET TRIGGER_LEVEL_CH1; GET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; CODEGEN GET TRIGGER_LEVEL_CH2; GET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; CODEGEN GET TRIGGER_LEVEL_CH3; GET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; CODEGEN GET TRIGGER_LEVEL_CH4; GET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DTIME_ARM_LEVEL; END ACTIONS; END COMPONENT; COMPONENT DTIME_ARM_UPDATE NOTSAVED NOGEN; TYPE INTEGER; INITIAL DONTCARE; ! This exists as a component rather than an ACTIONS sub due ! to the need to control the order of execution of COUPLINGs from ! numerous other components -- as a component this can be included ! in a COUPLED list whereas an ACTIONS sub could only be called ! from the PANEL SET ACTIONS of the effecting component and thus ! cannot be done after certain other couplings ... GET ACTIONS; SELECT DTIME_ARM_SOURCE; CASE CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DTIME_ARM_LEVEL; ! the STORE causes view update ... END ACTIONS; END COMPONENT; COMPONENT DTIME_TRIGGER_SOURCE; TYPE DISCRETE; VALUES CH1,CH2,CH3,CH4; INITIAL CH1; COUPLED DTIME_TRIGGER_SLOPE,DTIME_TRIGGER_UPDATE,TRIGGER_INCR; SET ACTIONS; ! Assumes proper trigger mode already set ...pattern mode not valid SELECT TRIGGER_MODE; CASE 5; ! OUTPUT STRING ":TRIG:DTIM:TRIG:SOUR "; OUTPUT DTIME_TRIGGER_SOURCE TABLE 'CHAN1;','CHAN2;','CHAN3;','CHAN4;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode already set ... !SELECT TRIGGER_MODE; !CASE 5; OUTPUT STRING ":TRIG:DTIM:TRIG:SOUR?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "CHAN1"; FETCH (DTIME_TRIGGER_SOURCE)CH1; CASE "TRIG1"; FETCH (DTIME_TRIGGER_SOURCE)CH1; CASE "CHAN2"; FETCH (DTIME_TRIGGER_SOURCE)CH2; CASE "TRIG2"; FETCH (DTIME_TRIGGER_SOURCE)CH2; CASE "CHAN3"; FETCH (DTIME_TRIGGER_SOURCE)CH3; CASE "TRIG3"; FETCH (DTIME_TRIGGER_SOURCE)CH3; CASE "CHAN4"; FETCH (DTIME_TRIGGER_SOURCE)CH4; CASE "TRIG4"; FETCH (DTIME_TRIGGER_SOURCE)CH4; CASE ELSE; FETCH DTIME_TRIGGER_SOURCE; END SELECT; STORE DTIME_TRIGGER_SOURCE; !CASE ELSE; !END SELECT; END ACTIONS; PANEL SET ACTIONS ; SELECT TRIGGER_MODE ; CASE 5 ; GOSUB Get_Dtime_Trigger_Levels ; CASE ELSE ; END SELECT ; SET TRIGGER_LEVEL_UNITS ; !GOSUB UPDATE_TRACE_DATA; END ACTIONS ; END COMPONENT; COMPONENT DTIME_TRIGGER_SLOPE; TYPE DISCRETE; VALUES NEGATIVE,POSITIVE; INITIAL NEGATIVE; SET ACTIONS; ! Assumes that trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 5; OUTPUT STRING ":TRIG:DTIM:TRIG:SLOP "; OUTPUT DTIME_TRIGGER_SLOPE TABLE 'NEG;','POS;'; CASE ELSE; END SELECT; END ACTIONS; GET ACTIONS; ! Assumes proper trigger mode and source already set ... SELECT TRIGGER_MODE; CASE 5; OUTPUT STRING ":TRIG:DTIM:TRIG:SLOP?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NEG"; FETCH (DTIME_TRIGGER_SLOPE)NEGATIVE; CASE "POS"; FETCH (DTIME_TRIGGER_SLOPE)POSITIVE; CASE ELSE; FETCH DTIME_TRIGGER_SLOPE; END SELECT; STORE DTIME_TRIGGER_SLOPE; CASE ELSE; END SELECT; END ACTIONS; !PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT DTIME_TRIG_MIN_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT DTIME_TRIG_MAX_LVL ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; ACTIONS Get_Dtime_Trigger_Levels ; SELECT DTIME_TRIGGER_SOURCE ; CASE CH1 ; FETCH MIN_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MIN_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MIN_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MIN_TRIG_LVL_CH4 ; END SELECT ; STORE DTIME_TRIG_MIN_LVL ; SELECT DTIME_TRIGGER_SOURCE ; CASE CH1 ; FETCH MAX_TRIG_LVL_CH1 ; CASE CH2 ; FETCH MAX_TRIG_LVL_CH2 ; CASE CH3 ; FETCH MAX_TRIG_LVL_CH3 ; CASE CH4 ; FETCH MAX_TRIG_LVL_CH4 ; END SELECT ; STORE DTIME_TRIG_MAX_LVL ; END ACTIONS ; COMPONENT DTIME_TRIGGER_LEVEL NOGEN; TYPE CONTINUOUS; VALUES RANGE DTIME_TRIG_MIN_LVL,DTIME_TRIG_MAX_LVL ; INITIAL 0; SET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... FETCH DTIME_TRIGGER_LEVEL; SELECT DTIME_TRIGGER_SOURCE; CASE CH1; STORE TRIGGER_LEVEL_CH1; SET TRIGGER_LEVEL_CH1; CODEGEN SET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; STORE TRIGGER_LEVEL_CH2; SET TRIGGER_LEVEL_CH2; CODEGEN SET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; STORE TRIGGER_LEVEL_CH3; SET TRIGGER_LEVEL_CH3; CODEGEN SET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; STORE TRIGGER_LEVEL_CH4; SET TRIGGER_LEVEL_CH4; CODEGEN SET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DTIME_TRIGGER_LEVEL; ! Note that SET on TL? did a verify ... END ACTIONS; GET ACTIONS; ! Note that CODEGEN must exist here rather than in HIT ACTIONS ! because of the need to handle both SETs and GETs ... SELECT DTIME_TRIGGER_SOURCE; CASE CH1; CODEGEN GET TRIGGER_LEVEL_CH1; GET TRIGGER_LEVEL_CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; CODEGEN GET TRIGGER_LEVEL_CH2; GET TRIGGER_LEVEL_CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; CODEGEN GET TRIGGER_LEVEL_CH3; GET TRIGGER_LEVEL_CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; CODEGEN GET TRIGGER_LEVEL_CH4; GET TRIGGER_LEVEL_CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DTIME_TRIGGER_LEVEL; END ACTIONS; END COMPONENT; COMPONENT DTIME_TRIGGER_DELAY NOGEN; TYPE CONTINUOUS; VALUES RANGE 30E-9,160E-3 ; INITIAL 30E-9; SET ACTIONS; SELECT TRIGGER_MODE ; CASE 5 ; OUTPUT DTIME_TRIGGER_DELAY FORMAT '":TRIG:DTIM:DEL ",K,";"' ; CASE ELSE ; END SELECT ; END ACTIONS ; GET ACTIONS ; SELECT TRIGGER_MODE ; CASE 5 ; OUTPUT ":TRIG:DTIM:DEL?" ; ENTER DTIME_TRIGGER_DELAY FORMAT 'K' ; CASE ELSE ; END SELECT ; END ACTIONS ; END COMPONENT ; COMPONENT DTIME_TRIGGER_UPDATE NOTSAVED NOGEN; TYPE INTEGER; INITIAL DONTCARE; ! This exists as a component rather than an ACTIONS sub due ! to the need to control the order of execution of COUPLINGs from ! numerous other components -- as a component this can be included ! in a COUPLED list whereas an ACTIONS sub could only be called ! from the PANEL SET ACTIONS of the effecting component and thus ! cannot be done after certain other couplings ... GET ACTIONS; SELECT DTIME_TRIGGER_SOURCE; CASE CH1; FETCH TRIGGER_LEVEL_CH1; CASE CH2; FETCH TRIGGER_LEVEL_CH2; CASE CH3; FETCH TRIGGER_LEVEL_CH3; CASE CH4; FETCH TRIGGER_LEVEL_CH4; END SELECT; STORE DTIME_TRIGGER_LEVEL; ! the STORE causes view update ... END ACTIONS; END COMPONENT; COMPONENT TRIGGER_INCR NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 80E-3; GET ACTIONS; ! Reaction to 'coupled' links from trigger_source SELECT TRIGGER_MODE; CASE EDGE; FETCH EDGE_TRIGGER_SOURCE; GOSUB Get_Trigger_Incr ; CASE GLITCH ; FETCH GLITCH_TRIGGER_SOURCE ; GOSUB Get_Trigger_Incr ; CASE STATE ; FETCH STATE_TRIGGER_SOURCE ; GOSUB Get_Trigger_Incr ; CASE DEVENTS ; FETCH DEVENT_ARM_SOURCE ; GOSUB Get_Trigger_Incr ; FETCH DEVENT_EVENT_SOURCE ; GOSUB Get_Trigger_Incr ; FETCH DEVENT_TRIGGER_SOURCE ; GOSUB Get_Trigger_Incr ; CASE DTIME; FETCH DTIME_ARM_SOURCE ; GOSUB Get_Trigger_Incr ; FETCH DTIME_TRIGGER_SOURCE ; GOSUB Get_Trigger_Incr ; CASE ELSE ; END SELECT ; END ACTIONS ; END COMPONENT ; ACTIONS Get_Trigger_Incr ; SELECT STACK ; CASE 0; FETCH SENS_INCR_CH1; CASE 1; FETCH SENS_INCR_CH2; CASE 2; FETCH SENS_INCR_CH3; CASE 3; FETCH SENS_INCR_CH4; CASE ELSE ; FETCH TRIGGER_INCR ; END SELECT; STORE TRIGGER_INCR; END ACTIONS ; ACTIONS Fix_Trigger_Inputs ; ! Fix the wandering trigger sources IF PANELMODE THEN ; IF First_Plug_In THEN ; ELSE ; ! if nothing has been plugged in DISABLE TRIGGER_MODE,GLITCH,PATTERN,STATE,DEVENTS,DTIME ; DONTCARE Edge_Trigger_Source ; END IF ; IF SLOT_11A THEN ; FETCH SLOT_12A ; FETCH SLOT_13A ; ADD ; FETCH SLOT_21A ; ADD ; FETCH 0 ; EQ ; !only 11A prset IF STACK THEN ; DISABLE TRIGGER_MODE,GLITCH,PATTERN,STATE,DEVENTS,DTIME ; END IF ; ELSE ; END IF ; IF SLOT_22A THEN ; DISABLE TRIGGER_MODE,STATE,DEVENTS,DTIME ; END IF ; GET Edge_Trigger_Source ; GET Glitch_Trigger_Source ; GET State_Trigger_Source ; ! Clock GET DEVENT_ARM_SOURCE ; GET DEVENT_TRIGGER_SOURCE ; GET DEVENT_EVENT_SOURCE ; GET DTIME_ARM_SOURCE ; GET DTIME_TRIGGER_SOURCE ; SELECT SLOT_11A ; CASE 1 ; GOSUB Disable_Trigger1 ; CASE 2 ; GOSUB Disable_Trigger2 ; CASE 3 ; GOSUB Disable_Trigger3 ; CASE 4 ; GOSUB Disable_Trigger4 ; CASE ELSE ; END SELECT ; IF Plug_in1 THEN ; ELSE ; GOSUB Disable_Trigger1 ; DISABLE Edge_Trigger_Source,CH1 ; END IF ; IF Plug_in2 THEN ; ELSE ; FETCH SLOT_21A ; FETCH 1 ; EQ ; IF STACK THEN ; ELSE ; GOSUB Disable_Trigger2 ; DISABLE Edge_Trigger_Source,CH2 ; END IF ; END IF ; IF Plug_in3 THEN ; ELSE ; FETCH SLOT_21A ; FETCH 2 ; EQ ; IF STACK THEN ; ELSE ; GOSUB Disable_Trigger3 ; DISABLE Edge_Trigger_Source,CH3 ; END IF ; END IF ; IF Plug_in4 THEN ; ELSE ; FETCH SLOT_21A ; FETCH 3 ; EQ ; IF STACK THEN ; ELSE ; FETCH SLOT_22A ; FETCH 1 ; EQ ; IF STACK THEN ; ELSE ; GOSUB Disable_Trigger4 ; DISABLE Edge_Trigger_Source,CH4 ; END IF ; END IF ; END IF ; END IF ; END ACTIONS ; ACTIONS Disable_Trigger1 ; DISABLE STATE_TRIGGER_SOURCE,CH1 ; ! Clock Input DONTCARE STATE_LOGIC_CH1 ; DONTCARE PATTERN_LOGIC_CH1 ; DISABLE GLITCH_TRIGGER_SOURCE,CH1 ; DISABLE DEVENT_ARM_SOURCE,CH1 ; DISABLE DEVENT_TRIGGER_SOURCE,CH1 ; DISABLE DEVENT_EVENT_SOURCE,CH1 ; DISABLE DTIME_ARM_SOURCE,CH1 ; DISABLE DTIME_TRIGGER_SOURCE,CH1 ; END ACTIONS ; ACTIONS Disable_Trigger2 ; DISABLE STATE_TRIGGER_SOURCE,CH2 ; DONTCARE STATE_LOGIC_CH2 ; DONTCARE PATTERN_LOGIC_CH2 ; DISABLE GLITCH_TRIGGER_SOURCE,CH2 ; DISABLE DEVENT_ARM_SOURCE,CH2 ; DISABLE DEVENT_TRIGGER_SOURCE,CH2 ; DISABLE DEVENT_EVENT_SOURCE,CH2 ; DISABLE DTIME_ARM_SOURCE,CH2 ; DISABLE DTIME_TRIGGER_SOURCE,CH1 ; END ACTIONS ; ACTIONS Disable_Trigger3 ; DISABLE STATE_TRIGGER_SOURCE,CH3 ; DONTCARE STATE_LOGIC_CH3 ; DONTCARE PATTERN_LOGIC_CH3 ; DISABLE GLITCH_TRIGGER_SOURCE,CH3 ; DISABLE DEVENT_ARM_SOURCE,CH3 ; DISABLE DEVENT_TRIGGER_SOURCE,CH3 ; DISABLE DEVENT_EVENT_SOURCE,CH3 ; DISABLE DTIME_ARM_SOURCE,CH3 ; DISABLE DTIME_TRIGGER_SOURCE,CH3 ; END ACTIONS ; ACTIONS Disable_Trigger4 ; DISABLE STATE_TRIGGER_SOURCE,CH4 ; DONTCARE STATE_LOGIC_CH4 ; DONTCARE PATTERN_LOGIC_CH4 ; DISABLE GLITCH_TRIGGER_SOURCE,CH4 ; DISABLE DEVENT_ARM_SOURCE,CH4 ; DISABLE DEVENT_TRIGGER_SOURCE,CH4 ; DISABLE DEVENT_EVENT_SOURCE,CH4 ; DISABLE DTIME_ARM_SOURCE,CH4 ; DISABLE DTIME_TRIGGER_SOURCE,CH4 ; END ACTIONS ; !============================== ! TRIGGER N SUBSYSTEM !============================== COMPONENT TRIG_11A_PROBE NOPOKEINITIAL ; TYPE CONTINUOUS ; VALUES RANGE 1E-4,1E+6; INITIAL 1.0; COUPLED EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS; OUTPUT SLOT_11A FORMAT '":TRIG",K,":PROB "' ; OUTPUT TRIG_11A_PROBE FORMAT K ; OUTPUT TRIG_11A_PROBE_UNITS TABLE ',RAT',',DEC' ; IF RECALLING THEN ; ELSE ; SELECT SLOT_11A ; CASE 1 ; GET TRIGGER_LEVEL_CH1 ; CASE 2 ; GET TRIGGER_LEVEL_CH2 ; CASE 3 ; GET TRIGGER_LEVEL_CH3 ; CASE 4 ; GET TRIGGER_LEVEL_CH4 ; END SELECT ; END IF ; END ACTIONS; GET ACTIONS; OUTPUT SLOT_11A FORMAT '":TRIG",K,":PROB?"'; ENTER TRIG_11A_PROBE FORMAT "#,K"; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "RAT" ; FETCH 0 ; CASE "DEC" ; FETCH 1 ; END SELECT ; STORE TRIG_11A_PROBE_UNITS ; END ACTIONS; PANEL SET ACTIONS ; GOSUB Get_Trigger_Range_11A ; SELECT TRIGGER_MODE ; CASE EDGE; GOSUB Get_Edge_Trigger_Levels ; CASE GLITCH ; GOSUB Get_Glitch_Trigger_Levels ; CASE PATTERN; CASE STATE; GOSUB Get_State_Trigger_Levels ; CASE DEVENTS ; GOSUB Get_Devent_Trigger_Levels ; GOSUB Get_Devent_Arm_Levels ; GOSUB Get_Devent_Event_Levels ; CASE DTIME ; GOSUB Get_Dtime_Trigger_Levels ; GOSUB Get_Dtime_Arm_Levels ; END SELECT ; !GOSUB UPDATE_TRACE_DATA ; END ACTIONS ; END COMPONENT ; COMPONENT TRIG_11A_PROBE_UNITS ; TYPE DISCRETE ; VALUES RAT,DEC ; INITIAL RAT ; SET ACTIONS ; IF RECALLING THEN ; ELSE ; SET TRIG_11A_PROBE ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT TRIG_11A_BWL ; TYPE DISCRETE ; VALUES OFF,ON ; INITIAL OFF ; SET ACTIONS ; OUTPUT SLOT_11A FORMAT '":TRIG",K,":BWL "' ; OUTPUT TRIG_11A_BWL TABLE "OFF","ON"; END ACTIONS ; GET ACTIONS ; OUTPUT SLOT_11A FORMAT '":TRIG",K,":BWL?"' ; ENTER TRIG_11A_BWL FORMAT K ; END ACTIONS ; END COMPONENT ; COMPONENT TRIG_21A_PROBE NOPOKEINITIAL ; TYPE CONTINUOUS ; VALUES RANGE 1E-4,1E+6; INITIAL 1.0; COUPLED EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS; OUTPUT SLOT_21A FORMAT '":TRIG",K,":PROB "' ; OUTPUT TRIG_21A_PROBE FORMAT K ; OUTPUT TRIG_21A_PROBE_UNITS TABLE ',RAT',',DEC' ; IF RECALLING THEN ; ELSE ; SELECT SLOT_21A ; CASE 1 ; GET TRIGGER_LEVEL_CH1 ; CASE 2 ; GET TRIGGER_LEVEL_CH2 ; CASE 3 ; GET TRIGGER_LEVEL_CH3 ; CASE 4 ; GET TRIGGER_LEVEL_CH4 ; END SELECT ; END IF ; END ACTIONS; GET ACTIONS; OUTPUT SLOT_21A FORMAT '":TRIG",K,":PROB?"'; ENTER TRIG_21A_PROBE FORMAT "#,K"; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "RAT" ; FETCH 0 ; CASE "DEC" ; FETCH 1 ; END SELECT ; STORE TRIG_21A_PROBE_UNITS ; END ACTIONS; PANEL SET ACTIONS ; GOSUB Get_Trigger_Range_21A ; SELECT TRIGGER_MODE ; CASE EDGE; GOSUB Get_Edge_Trigger_Levels ; CASE GLITCH ; GOSUB Get_Glitch_Trigger_Levels ; CASE PATTERN; CASE STATE; GOSUB Get_State_Trigger_Levels ; CASE DEVENTS ; GOSUB Get_Devent_Trigger_Levels ; GOSUB Get_Devent_Arm_Levels ; GOSUB Get_Devent_Event_Levels ; CASE DTIME ; GOSUB Get_Dtime_Trigger_Levels ; GOSUB Get_Dtime_Arm_Levels ; END SELECT ; !GOSUB UPDATE_TRACE_DATA ; END ACTIONS ; END COMPONENT ; COMPONENT TRIG_21A_PROBE_UNITS ; TYPE DISCRETE ; VALUES RAT,DEC ; INITIAL RAT ; SET ACTIONS ; IF RECALLING THEN ; ELSE ; SET TRIG_21A_PROBE ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT TRIG_22A_PROBE_1 NOPOKEINITIAL ; TYPE CONTINUOUS ; VALUES RANGE 1E-4,1E+6; INITIAL 1.0; COUPLED EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS; OUTPUT STRING ":TRIG1:PROB " ; OUTPUT TRIG_22A_PROBE_1 FORMAT K ; OUTPUT TRIG_22A_PROBE_UNITS TABLE ',RAT',',DEC' ; IF RECALLING THEN ; ELSE ; GET TRIGGER_LEVEL_CH1 ; END IF ; END ACTIONS; GET ACTIONS; OUTPUT STRING ":TRIG1:PROB?"; ENTER TRIG_22A_PROBE_1 FORMAT "#,K"; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "RAT" ; FETCH 0 ; CASE "DEC" ; FETCH 1 ; END SELECT ; STORE TRIG_22A_PROBE_UNITS ; END ACTIONS; PANEL SET ACTIONS ; GOSUB Get_Trigger_Range_22A ; SELECT TRIGGER_MODE ; CASE EDGE; GOSUB Get_Edge_Trigger_Levels ; CASE GLITCH ; GOSUB Get_Glitch_Trigger_Levels ; CASE PATTERN; CASE STATE; GOSUB Get_State_Trigger_Levels ; CASE DEVENTS ; GOSUB Get_Devent_Trigger_Levels ; GOSUB Get_Devent_Arm_Levels ; GOSUB Get_Devent_Event_Levels ; CASE DTIME ; GOSUB Get_Dtime_Trigger_Levels ; GOSUB Get_Dtime_Arm_Levels ; END SELECT ; !GOSUB UPDATE_TRACE_DATA ; END ACTIONS ; END COMPONENT ; COMPONENT TRIG_22A_PROBE_2 NOPOKEINITIAL ; TYPE CONTINUOUS ; VALUES RANGE 1E-4,1E+6; INITIAL 1.0; COUPLED EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS; OUTPUT STRING ":TRIG4:PROB " ; OUTPUT TRIG_22A_PROBE_2 FORMAT K ; OUTPUT TRIG_22A_PROBE_UNITS TABLE ',RAT',',DEC' ; IF RECALLING THEN ; ELSE ; GET TRIGGER_LEVEL_CH4 ; END IF ; END ACTIONS; GET ACTIONS; OUTPUT STRING ":TRIG4:PROB?"; ENTER TRIG_22A_PROBE_2 FORMAT "#,K"; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "RAT" ; FETCH 0 ; CASE "DEC" ; FETCH 1 ; END SELECT ; STORE TRIG_22A_PROBE_UNITS ; END ACTIONS; PANEL SET ACTIONS ; GOSUB Get_Trigger_Range_22A ; SELECT TRIGGER_MODE ; CASE EDGE; GOSUB Get_Edge_Trigger_Levels ; CASE GLITCH ; GOSUB Get_Glitch_Trigger_Levels ; CASE PATTERN; CASE STATE; GOSUB Get_State_Trigger_Levels ; CASE DEVENTS ; GOSUB Get_Devent_Trigger_Levels ; GOSUB Get_Devent_Arm_Levels ; GOSUB Get_Devent_Event_Levels ; CASE DTIME ; GOSUB Get_Dtime_Trigger_Levels ; GOSUB Get_Dtime_Arm_Levels ; END SELECT ; !GOSUB UPDATE_TRACE_DATA ; END ACTIONS ; END COMPONENT ; COMPONENT TRIG_22A_PROBE_UNITS ; TYPE DISCRETE ; VALUES RAT,DEC ; INITIAL RAT ; SET ACTIONS ; IF RECALLING THEN ; ELSE ; SET TRIG_22A_PROBE_1 ; SET TRIG_22A_PROBE_2 ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT TO_TRIG_21A NOTSAVED NOGEN NOERRCHECK ; TYPE INTEGER ; PANEL SET ACTIONS ; IF SLOT_21A THEN ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_11A ; SHOW TRIGGER_N_SUBSYSTEM,TRIGGER_N_21A ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_22A ; ELSE ; NOTIFY "HP54721 - Not Plugged In" ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT TO_TRIG_11A NOTSAVED NOGEN NOERRCHECK ; TYPE INTEGER ; PANEL SET ACTIONS ; IF SLOT_11A THEN ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_21A ; SHOW TRIGGER_N_SUBSYSTEM,TRIGGER_N_11A ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_22A ; ELSE ; NOTIFY "HP54711 - Not Plugged In" ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT TO_TRIG_22A NOTSAVED NOGEN NOERRCHECK ; TYPE INTEGER ; PANEL SET ACTIONS ; IF SLOT_22A THEN ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_11A ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_21A ; SHOW TRIGGER_N_SUBSYSTEM,TRIGGER_N_22A ; ELSE ; NOTIFY "HP54722 - Not Plugged In" ; END IF ; END ACTIONS ; END COMPONENT ; !============================== ! CHANNEL SUBSYSTEM !============================== COMPONENT CHANNEL NOGEN NOERRCHECK; TYPE DISCRETE; VALUES dummy,CH1,CH2,CH3,CH4; INITIAL CH1; panel set actions; HIDE CH1; HIDE CH1_SCR1 ; HIDE CH1_SCR2 ; HIDE STORE_WF_CH1 ; HIDE CH2; HIDE CH2_SCR1 ; HIDE CH2_SCR2 ; HIDE STORE_WF_CH2 ; HIDE CH3; HIDE CH3_SCR1 ; HIDE CH3_SCR2 ; HIDE STORE_WF_CH3 ; HIDE CH4; HIDE CH4_SCR1 ; HIDE CH4_SCR2 ; HIDE STORE_WF_CH4 ; SELECT CHANNEL; CASE dummy ; NOTIFY "Sorry, Nothing Plugged In!!" ; CASE CH1; SHOW CH1; SHOW CH1_SCR1 ; SHOW STORE_WF_CH1 ; CASE CH2; SHOW CH2; SHOW CH2_SCR1 ; SHOW STORE_WF_CH2 ; CASE CH3; SHOW CH3; SHOW CH3_SCR1 ; SHOW STORE_WF_CH3 ; CASE CH4; SHOW CH4; SHOW CH4_SCR1 ; SHOW STORE_WF_CH4 ; END SELECT; output string ":MENU CHAN"; OUTPUT Channel FORMAT K ; end actions; END COMPONENT; !>> CHANNEL #1 ... COMPONENT PROBE_CH1 NOPOKEINITIAL ; TYPE CONTINUOUS ; VALUES RANGE 1E-4,1E+6; INITIAL 1.0; COUPLED PROBE_CH1,MIN_SENS_CH1,MAX_SENS_CH1,SENS_CH1, OFFSET_CH1,VMIN_CH1,VMAX_CH1,SENS_INCR_CH1, TRIGGER_LEVEL_CH1,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_range,Fn2_range,Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in1 THEN; OUTPUT PROBE_CH1 FORMAT '":CHAN1:PROB ",K'; OUTPUT PROBE_UNITS_CH1 TABLE ',RAT',',DEC' ; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE PROBE_CH1; DONTCARE PROBE_UNITS_CH1 ; END IF ; END IF ; END IF ; END ACTIONS; GET ACTIONS; IF Plug_in1 THEN; OUTPUT STRING ":CHAN1:PROB?"; ENTER PROBE_CH1 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE PROBE_CH1; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT PROBE_UNITS_CH1 ; ! the instrument might always store it as RAT - check it out TYPE DISCRETE ; VALUES RAT,DEC ; INITIAL RAT ; SET ACTIONS ; IF RECALLING THEN ; ELSE ; SET PROBE_CH1 ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT MIN_SENS_CH1 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 1E-3; GET ACTIONS; SELECT Plug_in1; CASE (Plug_in1)HP54711A; FETCH 21E-3; CASE (Plug_in1)HP54712A; FETCH 1E-3; CASE (Plug_in1)HP54713A; FETCH 1E-3; CASE (Plug_in1)HP54721A; FETCH 1E-3; CASE (Plug_in1)HP54722A; FETCH 1E-3; !!!!! ????? CASE ELSE; FETCH 1E-3; END SELECT; FETCH PROBE_CH1; MUL; FETCH UNITS_ATT_CH1 ; DIV ; STORE MIN_SENS_CH1; END ACTIONS; END COMPONENT; COMPONENT MAX_SENS_CH1 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 5; GET ACTIONS; SELECT Plug_in1; CASE (Plug_in1)HP54711A; FETCH 1; CASE (Plug_in1)HP54712A; FETCH 1; CASE (Plug_in1)HP54713A; FETCH 5; CASE (Plug_in1)HP54721A; FETCH 1; CASE (Plug_in1)HP54722A; FETCH 5; !!!!! ????? CASE ELSE; FETCH 5; END SELECT; FETCH PROBE_CH1; MUL; FETCH UNITS_ATT_CH1 ; DIV ; ! check it out STORE MAX_SENS_CH1; END ACTIONS; END COMPONENT; COMPONENT SENS_CH1; TYPE CONTINUOUS; VALUES RANGE MIN_SENS_CH1,MAX_SENS_CH1; ! check it out - what effect UNITS has on scale ranges?? INITIAL 1; ! It also depends on UNITS ATT - inversely proportional COUPLED OFFSET_CH1,VMIN_CH1,VMAX_CH1,SENS_INCR_CH1, TRIGGER_LEVEL_CH1,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_range,Fn2_range,Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in1 THEN; OUTPUT SENS_CH1 FORMAT '":CHAN1:SCAL ",K'; IF RECALLING THEN ; ELSE ; GET SENS_CH1 ; END IF ; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE SENS_CH1; END IF; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in1 THEN; OUTPUT STRING ":CHAN1:SCAL?"; ENTER SENS_CH1 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE SENS_CH1; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS; FETCH Plug_in1 ; GOSUB Get_Offset_Ranges ; FETCH Plug_In1 ; GOSUB Get_Trigger_Ranges ; GOSUB UPDATE_TRACE_DATA; END ACTIONS; END COMPONENT; COMPONENT OFFSET_CH1_MIN ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT OFFSET_CH1_MAX ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT OFFSET_CH1; TYPE CONTINUOUS; VALUES RANGE OFFSET_CH1_Min,OFFSET_CH1_MAX ; INITIAL 0; COUPLED OFFSET_CH1,VMIN_CH1,VMAX_CH1,SENS_INCR_CH1, TRIGGER_LEVEL_CH1,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in1 THEN; OUTPUT OFFSET_CH1 FORMAT '":CHAN1:OFFS ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE OFFSET_CH1; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in1 THEN; OUTPUT STRING ":CHAN1:OFFS?"; ENTER OFFSET_CH1 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE OFFSET_CH1; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT VMIN_CH1 NOERRCHECK; TYPE CONTINUOUS; INITIAL -4; GET ACTIONS; ! offset-range/2 ... FETCH OFFSET_CH1; FETCH SENS_CH1; FETCH 4 ; MUL; SUB; STORE VMIN_CH1; END ACTIONS; END COMPONENT; COMPONENT VMAX_CH1 NOERRCHECK; TYPE CONTINUOUS; INITIAL 4; GET ACTIONS; ! offset+range/2 ... FETCH OFFSET_CH1; FETCH SENS_CH1; FETCH 4; MUL; ADD; STORE VMAX_CH1; END ACTIONS; END COMPONENT; COMPONENT SENS_INCR_CH1 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 10E-3; ! 1% of range ... GET ACTIONS; FETCH VMAX_CH1; FETCH VMIN_CH1; SUB; FETCH 80; DIV; STORE SENS_INCR_CH1; END ACTIONS; END COMPONENT; COMPONENT UNITS_CH1_DISP ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; END COMPONENT ; COMPONENT UNITS_CH1 ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; SET ACTIONS ; IF Plug_in1 THEN ; OUTPUT STRING ":CHAN1:UNIT " ; OUTPUT UNITS_CH1 TABLE 'VOLT','AMP','WATT','UNKN' ; ELSE ; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_CH1 ; END IF ; END IF ; END IF ; END ACTIONS ; PANEL SET ACTIONS ; FETCH UNITS_CH1 ; STORE UNITS_CH1_DISP ; SET MARKER_DISP_UNITS_1 ; SET MARKER_DISP_UNITS_2 ; SET UNITS_FN1_DISP ; SET UNITS_FN2_DISP ; SET MEAS_DISP_UNITS ; SET TRIGGER_LEVEL_UNITS ; END ACTIONS ; GET ACTIONS ; IF Plug_in1 THEN ; OUTPUT STRING ":CHAN1:UNIT?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "VOLT" ; FETCH (UNITS_CH1) VOLT ; CASE "AMP" ; FETCH (UNITS_CH1) AMP ; CASE "WATT" ; FETCH (UNITS_CH1) WATT ; CASE "UNKN" ; FETCH (UNITS_CH1) UNKN ; END SELECT ; DUP ; STORE UNITS_CH1 ; STORE UNITS_CH1_DISP ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_CH1 ; END IF ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT UNITS_ATT_CH1 ; TYPE CONTINUOUS ; !VALUES RANGE ??????? ; ! looks like it is limitless - check it out INITIAL 1 ; COUPLED UNITS_ATT_CH1,SENS_CH1,OFFSET_CH1,TRIGGER_LEVEL_CH1,MIN_SENS_CH1,MAX_SENS_CH1, EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS ; IF Plug_in1 THEN; OUTPUT UNITS_ATT_CH1 FORMAT '":CHAN1:UNIT:ATT ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_ATT_CH1; END IF ; END IF ; END IF; END ACTIONS ; GET ACTIONS ; IF Plug_in1 THEN; OUTPUT STRING ":CHAN1:UNIT:ATT?"; ENTER UNITS_ATT_CH1 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE UNITS_ATT_CH1; END IF ; END IF; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT UNITS_OFF_CH1 ; TYPE CONTINUOUS ; !VALUES RANGE ??????? ! check it out - some relationship between channel offset INITIAL 0 ; COUPLED UNITS_OFF_CH1,SENS_CH1,OFFSET_CH1,TRIGGER_LEVEL_CH1, EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS ; IF Plug_in1 THEN; OUTPUT UNITS_OFF_CH1 FORMAT '":CHAN1:UNIT:OFFS ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_OFF_CH1; END IF ; END IF ; END IF; END ACTIONS ; GET ACTIONS ; IF Plug_in1 THEN; OUTPUT STRING ":CHAN1:UNIT:OFFS?"; ENTER UNITS_OFF_CH1 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE UNITS_OFF_CH1; END IF ; END IF ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT BWLIMIT_CH1; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; FETCH Plug_in1; FETCH (Plug_in1)HP54713A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN1:BWL "; OUTPUT BWLIMIT_CH1 TABLE 'OFF;','ON;'; ELSE; DONTCARE BWLIMIT_CH1; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in1; FETCH (Plug_in1)HP54713A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN1:BWL?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (BWLIMIT_CH1)OFF; CASE 1; FETCH (BWLIMIT_CH1)ON; CASE ELSE; FETCH BWLIMIT_CH1; END SELECT; STORE BWLIMIT_CH1; ELSE; DONTCARE BWLIMIT_CH1; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT CALOUT_CH1 ; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; FETCH Plug_in1; FETCH (Plug_in1)HP54721A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN1:OUTP "; OUTPUT CALOUT_CH1 TABLE 'OFF;','ON;'; ELSE; DONTCARE CALOUT_CH1; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in1; FETCH (Plug_in1)HP54721A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN1:OUTP?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (CALOUT_CH1)OFF; CASE 1; FETCH (CALOUT_CH1)ON; CASE ELSE; FETCH CALOUT_CH1; END SELECT; STORE CALOUT_CH1; ELSE; DONTCARE CALOUT_CH1; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT SENS_711A_CH1 ; TYPE DISCRETE; VALUES MAX,DEF; INITIAL DEF; SET ACTIONS; FETCH Plug_in1; FETCH (Plug_in1)HP54711A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN1:SENS "; OUTPUT SENS_711A_CH1 TABLE 'MAX;','DEF;'; ELSE; DONTCARE SENS_711A_CH1; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in1; FETCH (Plug_in1)HP54711A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN1:SENS?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "MAX"; FETCH (SENS_711A_CH1)MAX; CASE "DEF"; FETCH (SENS_711A_CH1)DEF; CASE ELSE; FETCH SENS_711A_CH1; END SELECT; STORE SENS_711A_CH1; ELSE; DONTCARE SENS_711A_CH1; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT COUPLING_CH1; TYPE DISCRETE; VALUES DC,DC50,LF1_50,LF1,LF2 ; INITIAL DC50; SET ACTIONS; IF Plug_in1 THEN; OUTPUT STRING ":CHAN1:INP "; OUTPUT COUPLING_CH1 TABLE 'DC;','DC50;','LF1_50;','LF1;','LF2;'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE COUPLING_CH1; ! this only serves the purpose of space in store-state ? END IF ; END IF ; ! check it out END IF; END ACTIONS; GET ACTIONS; IF Plug_in1 THEN; OUTPUT STRING ":CHAN1:INP?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "DC"; FETCH (COUPLING_CH1)DC; CASE "DC50"; FETCH (COUPLING_CH1)DC50; CASE "LF1"; FETCH (COUPLING_CH1)LF1; CASE "LF2"; FETCH (COUPLING_CH1)LF2; CASE "LF1_50"; FETCH (COUPLING_CH1)LF1_50; CASE ELSE; FETCH COUPLING_CH1; END SELECT; STORE COUPLING_CH1; ELSE; IF LIVEMODE THEN ; DONTCARE COUPLING_CH1; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT SKEW_CH1 ; TYPE CONTINUOUS ; VALUES RANGE -100E-6,100E-6 ; INITIAL 0.0; SET ACTIONS ; OUTPUT SKEW_CH1 FORMAT '":CAL:SKEW CHAN1,",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING "CAL:SKEW? CHAN1" ; ENTER SKEW_CH1 FORMAT 'K' ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT STORE_CH1_WM1 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN1,WMEM1;"; OUTPUT STRING ":WMEM1:SAVE CHAN1"; FETCH 1 ; STORE WM1_OK ; get X_INC; fetch X_INC; store XINC_WM1; get X_MIN; fetch X_MIN; store XMIN_WM1; !If VIEW_WF_WM1 THEN; ! get wf_WM1; !end if; FETCH VMIN_CH1; STORE VMIN_WM1; FETCH VMAX_CH1; STORE VMAX_WM1; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; FETCH (SOURCE_WM1)CHAN1; STORE SOURCE_WM1; FETCH UNITS_CH1_DISP ; STORE UNITS_WM1_DISP ; FETCH 0 ; STORE WM1_X_Axis_Units ; FETCH TIME_SENS ;STORE WM1_TIME_SENS ; FETCH TIME_DELAY ; STORE WM1_TIME_DELAY ; FETCH TIME_REF ; STORE WM1_TIME_REF ; FETCH SENS_CH1 ; STORE WM1_SENS ; FETCH OFFSET_CH1 ; STORE WM1_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM1; IF VIEW_WF_WM1 THEN ; GET WF_WM1; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH1_WM2 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN1,WMEM2;"; OUTPUT STRING ":WMEM2:SAVE CHAN1"; FETCH 1 ; STORE WM2_OK ; get X_INC; fetch X_INC; store XINC_WM2; get X_MIN; fetch X_MIN; store XMIN_WM2; FETCH VMIN_CH1; STORE VMIN_WM2; FETCH VMAX_CH1; STORE VMAX_WM2; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM2 THEN; ! get wf_WM2; !end if; FETCH (SOURCE_WM2)CHAN1; STORE SOURCE_WM2; FETCH UNITS_CH1_DISP ; STORE UNITS_WM2_DISP ; FETCH 0 ; STORE WM2_X_Axis_Units ; FETCH TIME_SENS ;STORE WM2_TIME_SENS ; FETCH TIME_DELAY ; STORE WM2_TIME_DELAY ; FETCH TIME_REF ; STORE WM2_TIME_REF ; FETCH SENS_CH1 ; STORE WM2_SENS ; FETCH OFFSET_CH1 ; STORE WM2_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM2; IF VIEW_WF_WM2 THEN ; GET WF_WM2; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH1_WM3 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN1,WMEM3;"; OUTPUT STRING ":WMEM3:SAVE CHAN1"; FETCH 1 ; STORE WM3_OK ; get X_INC; fetch X_INC; store XINC_WM3; get X_MIN; fetch X_MIN; store XMIN_WM3; FETCH VMIN_CH1; STORE VMIN_WM3; FETCH VMAX_CH1; STORE VMAX_WM3; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM3 THEN; ! get wf_WM3; !end if; FETCH (SOURCE_WM3)CHAN1; STORE SOURCE_WM3; FETCH UNITS_CH1_DISP ; STORE UNITS_WM3_DISP ; FETCH 0 ; STORE WM3_X_Axis_Units ; FETCH TIME_SENS ;STORE WM3_TIME_SENS ; FETCH TIME_DELAY ; STORE WM3_TIME_DELAY ; FETCH TIME_REF ; STORE WM3_TIME_REF ; FETCH SENS_CH1 ; STORE WM3_SENS ; FETCH OFFSET_CH1 ; STORE WM3_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM3; IF VIEW_WF_WM3 THEN ; GET WF_WM3; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH1_WM4 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN1,WMEM4;"; OUTPUT STRING ":WMEM4:SAVE CHAN1"; FETCH 1 ; STORE WM4_OK ; get X_INC; fetch X_INC; store XINC_WM4; get X_MIN; fetch X_MIN; store XMIN_WM4; FETCH VMIN_CH1; STORE VMIN_WM4; FETCH VMAX_CH1; STORE VMAX_WM4; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM4 THEN; ! get wf_WM4; !end if; FETCH (SOURCE_WM4)CHAN1; STORE SOURCE_WM4; FETCH UNITS_CH1_DISP ; STORE UNITS_WM4_DISP ; FETCH 0 ; STORE WM4_X_Axis_Units ; FETCH TIME_SENS ;STORE WM4_TIME_SENS ; FETCH TIME_DELAY ; STORE WM4_TIME_DELAY ; FETCH TIME_REF ; STORE WM4_TIME_REF ; FETCH SENS_CH1 ; STORE WM4_SENS ; FETCH OFFSET_CH1 ; STORE WM4_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM4; IF VIEW_WF_WM4 THEN ; GET WF_WM4; END IF ; END ACTIONS; END COMPONENT; !>> CHANNEL #2 ... COMPONENT PROBE_CH2 NOPOKEINITIAL ; TYPE CONTINUOUS ; VALUES RANGE 1E-4,1E+6; INITIAL 1.0; COUPLED PROBE_CH2,MIN_SENS_CH2,MAX_SENS_CH2,SENS_CH2, OFFSET_CH2,VMIN_CH2,VMAX_CH2,SENS_INCR_CH2, TRIGGER_LEVEL_CH2,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_range,Fn2_range,Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2 ; SET ACTIONS; IF Plug_in2 THEN; OUTPUT PROBE_CH2 FORMAT '":CHAN2:PROB ",K'; OUTPUT PROBE_UNITS_CH2 TABLE ',RAT',',DEC' ; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE PROBE_CH2; DONTCARE PROBE_UNITS_CH2; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in2 THEN; OUTPUT STRING ":CHAN2:PROB?"; ENTER PROBE_CH2 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE PROBE_CH2; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS; GOSUB UPDATE_TRACE_DATA; END ACTIONS; END COMPONENT; COMPONENT PROBE_UNITS_CH2 ; ! the instrument might always store it as RAT - check it out TYPE DISCRETE ; VALUES RAT,DEC ; INITIAL RAT ; SET ACTIONS ; IF RECALLING THEN ; ELSE ; SET PROBE_CH2 ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT MIN_SENS_CH2 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 1E-3; GET ACTIONS; SELECT Plug_in2; CASE (Plug_in2)HP54711A; FETCH 21E-3; CASE (Plug_in2)HP54712A; FETCH 1E-3; CASE (Plug_in2)HP54713A; FETCH 1E-3; CASE (Plug_in2)HP54721A; FETCH 1E-3; CASE ELSE; FETCH 1E-3; END SELECT; FETCH PROBE_CH2; MUL; FETCH UNITS_ATT_CH2 ; DIV ; STORE MIN_SENS_CH2; END ACTIONS; END COMPONENT; COMPONENT MAX_SENS_CH2 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 5; GET ACTIONS; SELECT Plug_in2; CASE (Plug_in2)HP54711A; FETCH 1; CASE (Plug_in2)HP54712A; FETCH 1; CASE (Plug_in2)HP54713A; FETCH 5; CASE (Plug_in2)HP54721A; FETCH 1; CASE ELSE; FETCH 5; END SELECT; FETCH PROBE_CH2; MUL; FETCH UNITS_ATT_CH2 ; DIV ; STORE MAX_SENS_CH2; END ACTIONS; END COMPONENT; COMPONENT SENS_CH2; TYPE CONTINUOUS; VALUES RANGE MIN_SENS_CH2,MAX_SENS_CH2; INITIAL 1; COUPLED OFFSET_CH2,VMIN_CH2,VMAX_CH2,SENS_INCR_CH2, TRIGGER_LEVEL_CH2,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_range,Fn2_range,Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in2 THEN; OUTPUT SENS_CH2 FORMAT '":CHAN2:SCAL ",K'; IF RECALLING THEN ; ELSE ; GET SENS_CH2 ; END IF ; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE SENS_CH2; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in2 THEN; OUTPUT STRING ":CHAN2:SCAL?"; ENTER SENS_CH2 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE SENS_CH2; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS; FETCH Plug_in2 ; GOSUB Get_Offset_Ranges ; FETCH Plug_in2 ; GOSUB Get_Trigger_Ranges ; GOSUB UPDATE_TRACE_DATA; END ACTIONS; END COMPONENT; COMPONENT OFFSET_CH2_MIN ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT OFFSET_CH2_MAX ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT OFFSET_CH2; TYPE CONTINUOUS; VALUES RANGE OFFSET_CH2_MIN,OFFSET_CH2_MAX; INITIAL 0; COUPLED OFFSET_CH2,VMIN_CH2,VMAX_CH2,SENS_INCR_CH2, TRIGGER_LEVEL_CH2,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in2 THEN; OUTPUT OFFSET_CH2 FORMAT '":CHAN2:OFFS ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE OFFSET_CH2; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in2 THEN; OUTPUT STRING ":CHAN2:OFFS?"; ENTER OFFSET_CH2 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE OFFSET_CH2; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT VMIN_CH2 NOERRCHECK; TYPE CONTINUOUS; INITIAL -4; GET ACTIONS; ! offset-range/2 ... FETCH OFFSET_CH2; FETCH SENS_CH2; FETCH 4; MUL; SUB; STORE VMIN_CH2; END ACTIONS; END COMPONENT; COMPONENT VMAX_CH2 NOERRCHECK; TYPE CONTINUOUS; INITIAL +4; GET ACTIONS; ! offset+range/2 ... FETCH OFFSET_CH2; FETCH SENS_CH2; FETCH 4; MUL; ADD; STORE VMAX_CH2; END ACTIONS; END COMPONENT; COMPONENT SENS_INCR_CH2 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 10E-3; ! 1% of range ... GET ACTIONS; FETCH VMAX_CH2; FETCH VMIN_CH2; SUB; FETCH 80; DIV; STORE SENS_INCR_CH2; END ACTIONS; END COMPONENT; COMPONENT UNITS_CH2_DISP ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; END COMPONENT ; COMPONENT UNITS_CH2 ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; SET ACTIONS ; IF Plug_in2 THEN ; OUTPUT STRING ":CHAN2:UNIT " ; OUTPUT UNITS_CH2 TABLE 'VOLT','AMP','WATT','UNKN' ; ELSE ; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_CH2 ; END IF ; END IF ; END IF ; END ACTIONS ; PANEL SET ACTIONS ; FETCH UNITS_CH2 ; STORE UNITS_CH2_DISP ; SET MARKER_DISP_UNITS_1 ; SET MARKER_DISP_UNITS_2 ; SET UNITS_FN1_DISP ; SET UNITS_FN2_DISP ; SET MEAS_DISP_UNITS ; SET TRIGGER_LEVEL_UNITS ; END ACTIONS ; GET ACTIONS ; IF Plug_in2 THEN ; OUTPUT STRING ":CHAN2:UNIT?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "VOLT" ; FETCH (UNITS_CH2) VOLT ; CASE "AMP" ; FETCH (UNITS_CH2) AMP ; CASE "WATT" ; FETCH (UNITS_CH2) WATT ; CASE "UNKN" ; FETCH (UNITS_CH2) UNKN ; END SELECT ; DUP ; STORE UNITS_CH2 ; STORE UNITS_CH2_DISP ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_CH2 ; END IF ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT UNITS_ATT_CH2 ; TYPE CONTINUOUS ; !VALUES RANGE ??????? ; INITIAL 1 ; COUPLED UNITS_ATT_CH2,SENS_CH2,OFFSET_CH2,TRIGGER_LEVEL_CH2,MIN_SENS_CH2,MAX_SENS_CH2, EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS ; IF Plug_in2 THEN; OUTPUT UNITS_ATT_CH2 FORMAT '":CHAN2:UNIT:ATT ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_ATT_CH2; END IF ; END IF ; END IF; END ACTIONS ; GET ACTIONS ; IF Plug_in2 THEN; OUTPUT STRING ":CHAN2:UNIT:ATT?"; ENTER UNITS_ATT_CH2 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE UNITS_ATT_CH2; END IF ; END IF; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT UNITS_OFF_CH2 ; TYPE CONTINUOUS ; !VALUES RANGE ??????? INITIAL 0 ; COUPLED UNITS_OFF_CH2,SENS_CH2,OFFSET_CH2,TRIGGER_LEVEL_CH2, EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS ; IF Plug_in2 THEN; OUTPUT UNITS_OFF_CH2 FORMAT '":CHAN2:UNIT:OFFS ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_OFF_CH2; END IF ; END IF ; END IF; END ACTIONS ; GET ACTIONS ; IF Plug_in2 THEN; OUTPUT STRING ":CHAN2:UNIT:OFFS?"; ENTER UNITS_OFF_CH2 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE UNITS_OFF_CH2; END IF ; END IF ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT BWLIMIT_CH2; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; FETCH Plug_in2; FETCH (Plug_in2)HP54713A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN2:BWL "; OUTPUT BWLIMIT_CH2 TABLE 'OFF;','ON;'; ELSE; DONTCARE BWLIMIT_CH2; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in2; FETCH (Plug_in2)HP54713A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN2:BWL?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (BWLIMIT_CH2)OFF; CASE 1; FETCH (BWLIMIT_CH2)ON; CASE ELSE; FETCH BWLIMIT_CH2; END SELECT; STORE BWLIMIT_CH2; ELSE; DONTCARE BWLIMIT_CH2; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT CALOUT_CH2 ; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; FETCH Plug_in2; FETCH (Plug_in2)HP54721A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN2:OUTP "; OUTPUT CALOUT_CH2 TABLE 'OFF;','ON;'; ELSE; DONTCARE CALOUT_CH2; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in2; FETCH (Plug_in2)HP54721A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN2:OUTP?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (CALOUT_CH2)OFF; CASE 1; FETCH (CALOUT_CH2)ON; CASE ELSE; FETCH CALOUT_CH2; END SELECT; STORE CALOUT_CH2; ELSE; DONTCARE CALOUT_CH2; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT SENS_711A_CH2 ; TYPE DISCRETE; VALUES MAX,DEF; INITIAL DEF; SET ACTIONS; FETCH Plug_in2; FETCH (Plug_in2)HP54711A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN2:SENS "; OUTPUT SENS_711A_CH2 TABLE 'MAX;','DEF;'; ELSE; DONTCARE SENS_711A_CH2; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in2; FETCH (Plug_in2)HP54711A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN2:SENS?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "MAX"; FETCH (SENS_711A_CH2)MAX; CASE "DEF"; FETCH (SENS_711A_CH2)DEF; CASE ELSE; FETCH SENS_711A_CH2; END SELECT; STORE SENS_711A_CH2; ELSE; DONTCARE SENS_711A_CH2; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT COUPLING_CH2; TYPE DISCRETE; VALUES DC,DC50,LF1_50,LF1,LF2 ; INITIAL DC50; SET ACTIONS; IF Plug_in2 THEN; OUTPUT STRING ":CHAN2:INP "; OUTPUT COUPLING_CH2 TABLE 'DC;','DC50;','LF1_50;','LF1;','LF2;'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE COUPLING_CH2; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in2 THEN; OUTPUT STRING ":CHAN2:INP?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "DC"; FETCH (COUPLING_CH2)DC; CASE "DC50"; FETCH (COUPLING_CH2)DC50; CASE "LF1"; FETCH (COUPLING_CH2)LF1; CASE "LF2"; FETCH (COUPLING_CH2)LF2; CASE "LF1_50"; FETCH (COUPLING_CH2)LF1_50; CASE ELSE; FETCH COUPLING_CH2; END SELECT; STORE COUPLING_CH2; ELSE; IF LIVEMODE THEN ; DONTCARE COUPLING_CH2; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT SKEW_CH2 ; TYPE CONTINUOUS ; VALUES RANGE -100E-6,100E-6 ; INITIAL 0.0; SET ACTIONS ; OUTPUT SKEW_CH2 FORMAT '":CAL:SKEW CHAN2,",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING "CAL:SKEW? CHAN2" ; ENTER SKEW_CH2 FORMAT 'K' ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT STORE_CH2_WM1 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN2,WMEM1;"; OUTPUT STRING ":WMEM1:SAVE CHAN2"; FETCH 1 ; STORE WM1_OK ; get X_INC; fetch X_INC; store XINC_WM1; get X_MIN; fetch X_MIN; store XMIN_WM1; FETCH VMIN_CH2; STORE VMIN_WM1; FETCH VMAX_CH2; STORE VMAX_WM1; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM1 THEN; ! get wf_WM1; !end if; FETCH (SOURCE_WM1)CHAN2; STORE SOURCE_WM1; FETCH UNITS_CH2_DISP ; STORE UNITS_WM1_DISP ; FETCH 0 ; STORE WM1_X_Axis_Units ; FETCH TIME_SENS ;STORE WM1_TIME_SENS ; FETCH TIME_DELAY ; STORE WM1_TIME_DELAY ; FETCH TIME_REF ; STORE WM1_TIME_REF ; FETCH SENS_CH2 ; STORE WM1_SENS ; FETCH OFFSET_CH2 ; STORE WM1_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM1; IF VIEW_WF_WM1 THEN ; GET WF_WM1; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH2_WM2 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN2,WMEM2;"; OUTPUT STRING ":WMEM2:SAVE CHAN2"; FETCH 1 ; STORE WM2_OK ; get X_INC; fetch X_INC; store XINC_WM2; get X_MIN; fetch X_MIN; store XMIN_WM2; FETCH VMIN_CH2; STORE VMIN_WM2; FETCH VMAX_CH2; STORE VMAX_WM2; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM2 THEN; ! get wf_WM2; !end if; FETCH (SOURCE_WM2)CHAN2; STORE SOURCE_WM2; FETCH UNITS_CH2_DISP ; STORE UNITS_WM2_DISP ; FETCH 0 ; STORE WM2_X_Axis_Units ; FETCH TIME_SENS ;STORE WM2_TIME_SENS ; FETCH TIME_DELAY ; STORE WM2_TIME_DELAY ; FETCH TIME_REF ; STORE WM2_TIME_REF ; FETCH SENS_CH2 ; STORE WM2_SENS ; FETCH OFFSET_CH2 ; STORE WM2_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM2; IF VIEW_WF_WM2 THEN ; GET WF_WM2; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH2_WM3 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN2,WMEM3;"; OUTPUT STRING ":WMEM3:SAVE CHAN2"; FETCH 1 ; STORE WM3_OK ; get X_INC; fetch X_INC; store XINC_WM3; get X_MIN; fetch X_MIN; store XMIN_WM3; FETCH VMIN_CH2; STORE VMIN_WM3; FETCH VMAX_CH2; STORE VMAX_WM3; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM3 THEN; ! get wf_WM3; !end if; FETCH (SOURCE_WM3)CHAN2; STORE SOURCE_WM3; FETCH UNITS_CH2_DISP ; STORE UNITS_WM3_DISP ; FETCH 0 ; STORE WM3_X_Axis_Units ; FETCH TIME_SENS ;STORE WM3_TIME_SENS ; FETCH TIME_DELAY ; STORE WM3_TIME_DELAY ; FETCH TIME_REF ; STORE WM3_TIME_REF ; FETCH SENS_CH2 ; STORE WM3_SENS ; FETCH OFFSET_CH2 ; STORE WM3_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM3; IF VIEW_WF_WM3 THEN ; GET WF_WM3; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH2_WM4 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN2,WMEM4;"; OUTPUT STRING ":WMEM4:SAVE CHAN2"; FETCH 1 ; STORE WM4_OK ; get X_INC; fetch X_INC; store XINC_WM4; get X_MIN; fetch X_MIN; store XMIN_WM4; FETCH VMIN_CH2; STORE VMIN_WM4; FETCH VMAX_CH2; STORE VMAX_WM4; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM4 THEN; ! get wf_WM4; !end if; FETCH (SOURCE_WM4)CHAN2; STORE SOURCE_WM4; FETCH UNITS_CH2_DISP ; STORE UNITS_WM4_DISP ; FETCH 0 ; STORE WM4_X_Axis_Units ; FETCH TIME_SENS ;STORE WM4_TIME_SENS ; FETCH TIME_DELAY ; STORE WM4_TIME_DELAY ; FETCH TIME_REF ; STORE WM4_TIME_REF ; FETCH SENS_CH2 ; STORE WM4_SENS ; FETCH OFFSET_CH2 ; STORE WM4_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM4; IF VIEW_WF_WM4 THEN ; GET WF_WM4; END IF ; END ACTIONS; END COMPONENT; !>> CHANNEL #3 ... COMPONENT PROBE_CH3 NOPOKEINITIAL ; TYPE CONTINUOUS ; VALUES RANGE 1E-4,1E+6; INITIAL 1.0; COUPLED PROBE_CH3,MIN_SENS_CH3,MAX_SENS_CH3,SENS_CH3, OFFSET_CH3,VMIN_CH3,VMAX_CH3,SENS_INCR_CH3, TRIGGER_LEVEL_CH3,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_range,Fn2_range,Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in3 THEN; OUTPUT PROBE_CH3 FORMAT '":CHAN3:PROB ",K'; OUTPUT PROBE_UNITS_CH3 TABLE ',RAT',',DEC' ; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE PROBE_CH3; DONTCARE PROBE_UNITS_CH3; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in3 THEN; OUTPUT STRING ":CHAN3:PROB?"; ENTER PROBE_CH3 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE PROBE_CH3; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT PROBE_UNITS_CH3 ; ! the instrument might always store it as RAT - check it out TYPE DISCRETE ; VALUES RAT,DEC ; INITIAL RAT ; SET ACTIONS ; IF RECALLING THEN ; ELSE ; SET PROBE_CH3 ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT MIN_SENS_CH3 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 1E-3; GET ACTIONS; SELECT Plug_in3; CASE (Plug_in3)HP54711A; FETCH 21E-3; CASE (Plug_in3)HP54712A; FETCH 1E-3; CASE (Plug_in3)HP54713A; FETCH 1E-3; CASE (Plug_in3)HP54721A; FETCH 1E-3; CASE ELSE; FETCH 1E-3; END SELECT; FETCH PROBE_CH3; MUL; FETCH UNITS_ATT_CH3 ; DIV ; STORE MIN_SENS_CH3; END ACTIONS; END COMPONENT; COMPONENT MAX_SENS_CH3 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 5; GET ACTIONS; SELECT Plug_in3; CASE (Plug_in3)HP54711A; FETCH 1; CASE (Plug_in3)HP54712A; FETCH 1; CASE (Plug_in3)HP54713A; FETCH 5; CASE (Plug_in3)HP54721A; FETCH 1; CASE ELSE; FETCH 5; END SELECT; FETCH PROBE_CH3; MUL; FETCH UNITS_ATT_CH3 ; DIV ; STORE MAX_SENS_CH3; END ACTIONS; END COMPONENT; COMPONENT SENS_CH3; TYPE CONTINUOUS; VALUES RANGE MIN_SENS_CH3,MAX_SENS_CH3; INITIAL 1; COUPLED OFFSET_CH3,VMIN_CH3,VMAX_CH3,SENS_INCR_CH3, TRIGGER_LEVEL_CH3,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_range,Fn2_range,Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in3 THEN; OUTPUT SENS_CH3 FORMAT '":CHAN3:SCAL ",K'; IF RECALLING THEN ; ELSE ; GET SENS_CH3 ; END IF ; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE SENS_CH3; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in3 THEN; OUTPUT STRING ":CHAN3:SCAL?"; ENTER SENS_CH3 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE SENS_CH3; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS; GOSUB UPDATE_TRACE_DATA; FETCH Plug_in3 ; GOSUB Get_Offset_Ranges ; FETCH Plug_in3 ; GOSUB Get_Trigger_Ranges ; END ACTIONS; END COMPONENT; COMPONENT OFFSET_CH3_MIN ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT OFFSET_CH3_MAX ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT OFFSET_CH3; TYPE CONTINUOUS; VALUES RANGE OFFSET_CH3_MIN,OFFSET_CH3_MAX; INITIAL 0; COUPLED OFFSET_CH3,VMIN_CH3,VMAX_CH3,SENS_INCR_CH3, TRIGGER_LEVEL_CH3,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in3 THEN; OUTPUT OFFSET_CH3 FORMAT '":CHAN3:OFFS ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODe THEN ; DONTCARE OFFSET_CH3; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in3 THEN; OUTPUT STRING ":CHAN3:OFFS?"; ENTER OFFSET_CH3 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE OFFSET_CH3; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT VMIN_CH3 NOERRCHECK; TYPE CONTINUOUS; INITIAL -4; GET ACTIONS; ! offset-range/2 ... FETCH OFFSET_CH3; FETCH SENS_CH3; FETCH 4; MUL; SUB; STORE VMIN_CH3; END ACTIONS; END COMPONENT; COMPONENT VMAX_CH3 NOERRCHECK; TYPE CONTINUOUS; INITIAL +4; GET ACTIONS; ! offset+range/2 ... FETCH OFFSET_CH3; FETCH SENS_CH3; FETCH 4; MUL; ADD; STORE VMAX_CH3; END ACTIONS; END COMPONENT; COMPONENT SENS_INCR_CH3 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 10E-3; ! 1% of range ... GET ACTIONS; FETCH VMAX_CH3; FETCH VMIN_CH3; SUB; FETCH 80; DIV; STORE SENS_INCR_CH3; END ACTIONS; END COMPONENT; COMPONENT UNITS_CH3_DISP ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; END COMPONENT ; COMPONENT UNITS_CH3 ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; SET ACTIONS ; IF Plug_in3 THEN ; OUTPUT STRING ":CHAN3:UNIT " ; OUTPUT UNITS_CH3 TABLE 'VOLT','AMP','WATT','UNKN' ; ELSE ; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_CH3 ; END IF ; END IF ; END IF ; END ACTIONS ; PANEL SET ACTIONS ; FETCH UNITS_CH3 ; STORE UNITS_CH3_DISP ; SET MARKER_DISP_UNITS_1 ; SET MARKER_DISP_UNITS_2 ; SET UNITS_FN1_DISP ; SET UNITS_FN2_DISP ; SET MEAS_DISP_UNITS ;SET TRIGGER_LEVEL_UNITS ; END ACTIONS ; GET ACTIONS ; IF Plug_in3 THEN ; OUTPUT STRING ":CHAN3:UNIT?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "VOLT" ; FETCH (UNITS_CH3) VOLT ; CASE "AMP" ; FETCH (UNITS_CH3) AMP ; CASE "WATT" ; FETCH (UNITS_CH3) WATT ; CASE "UNKN" ; FETCH (UNITS_CH3) UNKN ; END SELECT ; DUP ; STORE UNITS_CH3 ; STORE UNITS_CH3_DISP ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_CH3 ; END IF ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT UNITS_ATT_CH3 ; TYPE CONTINUOUS ; !VALUES RANGE ??????? ; INITIAL 1 ; COUPLED UNITS_ATT_CH3,SENS_CH3,OFFSET_CH3,TRIGGER_LEVEL_CH3,MIN_SENS_CH3,MAX_SENS_CH3, EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS ; IF Plug_in3 THEN; OUTPUT UNITS_ATT_CH3 FORMAT '":CHAN3:UNIT:ATT ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_ATT_CH3; END IF ; END IF ; END IF; END ACTIONS ; GET ACTIONS ; IF Plug_in3 THEN; OUTPUT STRING ":CHAN3:UNIT:ATT?"; ENTER UNITS_ATT_CH3 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE UNITS_ATT_CH3; END IF ; END IF; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT UNITS_OFF_CH3 ; TYPE CONTINUOUS ; !VALUES RANGE ??????? INITIAL 0 ; COUPLED UNITS_OFF_CH3,SENS_CH3,OFFSET_CH3,TRIGGER_LEVEL_CH3, EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS ; IF Plug_in3 THEN; OUTPUT UNITS_OFF_CH3 FORMAT '":CHAN3:UNIT:OFFS ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_OFF_CH3; END IF ; END IF ; END IF; END ACTIONS ; GET ACTIONS ; IF Plug_in3 THEN; OUTPUT STRING ":CHAN3:UNIT:OFFS?"; ENTER UNITS_OFF_CH3 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE UNITS_OFF_CH3; END IF ; END IF ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT BWLIMIT_CH3; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; FETCH Plug_in3; FETCH (Plug_in3)HP54713A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN3:BWL "; OUTPUT BWLIMIT_CH3 TABLE 'OFF;','ON;'; ELSE; DONTCARE BWLIMIT_CH3; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in3; FETCH (Plug_in3)HP54713A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN3:BWL?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (BWLIMIT_CH3)OFF; CASE 1; FETCH (BWLIMIT_CH3)ON; CASE ELSE; FETCH BWLIMIT_CH3; END SELECT; STORE BWLIMIT_CH3; ELSE; DONTCARE BWLIMIT_CH3; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT CALOUT_CH3 ; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; FETCH Plug_in3; FETCH (Plug_in3)HP54721A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN3:OUTP "; OUTPUT CALOUT_CH3 TABLE 'OFF;','ON;'; ELSE; DONTCARE CALOUT_CH3; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in3; FETCH (Plug_in3)HP54721A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN3:OUTP?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (CALOUT_CH3)OFF; CASE 1; FETCH (CALOUT_CH3)ON; CASE ELSE; FETCH CALOUT_CH3; END SELECT; STORE CALOUT_CH3; ELSE; DONTCARE CALOUT_CH3; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT SENS_711A_CH3 ; TYPE DISCRETE; VALUES MAX,DEF; INITIAL DEF; SET ACTIONS; FETCH Plug_in3; FETCH (Plug_in3)HP54711A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN3:SENS "; OUTPUT SENS_711A_CH3 TABLE 'MAX;','DEF;'; ELSE; DONTCARE SENS_711A_CH3; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in3; FETCH (Plug_in3)HP54711A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN3:SENS?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "MAX"; FETCH (SENS_711A_CH3)MAX; CASE "DEF"; FETCH (SENS_711A_CH3)DEF; CASE ELSE; FETCH SENS_711A_CH3; END SELECT; STORE SENS_711A_CH3; ELSE; DONTCARE SENS_711A_CH3; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT COUPLING_CH3; TYPE DISCRETE; VALUES DC,DC50,LF1_50,LF1,LF2 ; INITIAL DC50; SET ACTIONS; IF Plug_in3 THEN; OUTPUT STRING ":CHAN3:INP "; OUTPUT COUPLING_CH3 TABLE 'DC;','DC50;','LF1_50;','LF1;','LF2;'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE COUPLING_CH3; ! this only serves the purpose of space in store-state ? END IF ; END IF ; ! check it out END IF; END ACTIONS; GET ACTIONS; IF Plug_in3 THEN; OUTPUT STRING ":CHAN3:INP?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "DC"; FETCH (COUPLING_CH3)DC; CASE "DC50"; FETCH (COUPLING_CH3)DC50; CASE "LF1"; FETCH (COUPLING_CH3)LF1; CASE "LF2"; FETCH (COUPLING_CH3)LF2; CASE "LF1_50"; FETCH (COUPLING_CH3)LF1_50; CASE ELSE; FETCH COUPLING_CH3; END SELECT; STORE COUPLING_CH3; ELSE; IF LIVEMODE THEN ; DONTCARE COUPLING_CH3; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT SKEW_CH3 ; TYPE CONTINUOUS ; VALUES RANGE -100E-6,100E-6 ; INITIAL 0.0; SET ACTIONS ; OUTPUT SKEW_CH3 FORMAT '":CAL:SKEW CHAN3,",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING "CAL:SKEW? CHAN3" ; ENTER SKEW_CH3 FORMAT 'K' ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT STORE_CH3_WM1 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN3,WMEM1;"; OUTPUT STRING ":WMEM1:SAVE CHAN3"; FETCH 1 ; STORE WM1_OK ; get X_INC; fetch X_INC; store XINC_WM1; get X_MIN; fetch X_MIN; store XMIN_WM1; FETCH VMIN_CH3; STORE VMIN_WM1; FETCH VMAX_CH3; STORE VMAX_WM1; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM1 THEN; ! get wf_WM1; !end if; FETCH (SOURCE_WM1)CHAN3; STORE SOURCE_WM1; FETCH UNITS_CH3_DISP ; STORE UNITS_WM1_DISP ; FETCH 0 ; STORE WM1_X_Axis_Units ; FETCH TIME_SENS ;STORE WM1_TIME_SENS ; FETCH TIME_DELAY ; STORE WM1_TIME_DELAY ; FETCH TIME_REF ; STORE WM1_TIME_REF ; FETCH SENS_CH3 ; STORE WM1_SENS ; FETCH OFFSET_CH3 ; STORE WM1_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM1; IF VIEW_WF_WM1 THEN ; GET WF_WM1; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH3_WM2 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN3,WMEM2;"; OUTPUT STRING ":WMEM2:SAVE CHAN3"; FETCH 1 ; STORE WM2_OK ; get X_INC; fetch X_INC; store XINC_WM2; get X_MIN; fetch X_MIN; store XMIN_WM2; FETCH VMIN_CH3; STORE VMIN_WM2; FETCH VMAX_CH3; STORE VMAX_WM2; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM2 THEN; ! get wf_WM2; !end if; FETCH (SOURCE_WM2)CHAN3; STORE SOURCE_WM2; FETCH UNITS_CH3_DISP ; STORE UNITS_WM2_DISP ; FETCH 0 ; STORE WM2_X_Axis_Units ; FETCH TIME_SENS ;STORE WM2_TIME_SENS ; FETCH TIME_DELAY ; STORE WM2_TIME_DELAY ; FETCH TIME_REF ; STORE WM2_TIME_REF ; FETCH SENS_CH3 ; STORE WM2_SENS ; FETCH OFFSET_CH3 ; STORE WM2_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM2; IF VIEW_WF_WM2 THEN ; GET WF_WM2; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH3_WM3 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN3,WMEM3;"; OUTPUT STRING ":WMEM3:SAVE CHAN3"; FETCH 1 ; STORE WM3_OK ; get X_INC; fetch X_INC; store XINC_WM3; get X_MIN; fetch X_MIN; store XMIN_WM3; FETCH VMIN_CH3; STORE VMIN_WM3; FETCH VMAX_CH3; STORE VMAX_WM3; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM3 THEN; ! get wf_WM3; !end if; FETCH (SOURCE_WM3)CHAN3; STORE SOURCE_WM3; FETCH UNITS_CH3_DISP ; STORE UNITS_WM3_DISP ; FETCH 0 ; STORE WM3_X_Axis_Units ; FETCH TIME_SENS ;STORE WM3_TIME_SENS ; FETCH TIME_DELAY ; STORE WM3_TIME_DELAY ; FETCH TIME_REF ; STORE WM3_TIME_REF ; FETCH SENS_CH3 ; STORE WM3_SENS ; FETCH OFFSET_CH3 ; STORE WM3_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM3; IF VIEW_WF_WM3 THEN ; GET WF_WM3; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH3_WM4 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN3,WMEM4;"; OUTPUT STRING ":WMEM4:SAVE CHAN3"; FETCH 1 ; STORE WM4_OK ; get X_INC; fetch X_INC; store XINC_WM4; get X_MIN; fetch X_MIN; store XMIN_WM4; FETCH VMIN_CH3; STORE VMIN_WM4; FETCH VMAX_CH3; STORE VMAX_WM4; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM4 THEN; ! get wf_WM4; !end if; FETCH (SOURCE_WM4)CHAN3; STORE SOURCE_WM4; FETCH UNITS_CH3_DISP ; STORE UNITS_WM4_DISP ; FETCH 0 ; STORE WM4_X_Axis_Units ; FETCH TIME_SENS ;STORE WM4_TIME_SENS ; FETCH TIME_DELAY ; STORE WM4_TIME_DELAY ; FETCH TIME_REF ; STORE WM4_TIME_REF ; FETCH SENS_CH3 ; STORE WM4_SENS ; FETCH OFFSET_CH3 ; STORE WM4_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM4; IF VIEW_WF_WM4 THEN ; GET WF_WM4; END IF ; END ACTIONS; END COMPONENT; !>> CHANNEL #4 ... COMPONENT PROBE_CH4 NOPOKEINITIAL ; TYPE CONTINUOUS ; VALUES RANGE 1E-4,1E+6; INITIAL 1.0; COUPLED PROBE_CH4,MIN_SENS_CH4,MAX_SENS_CH4,SENS_CH4, OFFSET_CH4,VMIN_CH4,VMAX_CH4,SENS_INCR_CH4, TRIGGER_LEVEL_CH4,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_range,Fn2_range,Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in4 THEN; OUTPUT PROBE_CH4 FORMAT '":CHAN4:PROB ",K'; OUTPUT PROBE_UNITS_CH4 TABLE ',RAT',',DEC' ; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE PROBE_CH4; DONTCARE PROBE_UNITS_CH4; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in4 THEN; OUTPUT STRING ":CHAN4:PROB?"; ENTER PROBE_CH4 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE PROBE_CH4; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT PROBE_UNITS_CH4 ; ! the instrument might always store it as RAT - check it out TYPE DISCRETE ; VALUES RAT,DEC ; INITIAL RAT ; SET ACTIONS ; IF RECALLING THEN ; ELSE ; SET PROBE_CH4 ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT MIN_SENS_CH4 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 1E-3; GET ACTIONS; SELECT Plug_in4; CASE (Plug_in4)HP54711A; FETCH 21E-3; CASE (Plug_in4)HP54712A; FETCH 1E-3; CASE (Plug_in4)HP54713A; FETCH 1E-3; CASE (Plug_in4)HP54721A; FETCH 1E-3; CASE ELSE; FETCH 1E-3; END SELECT; FETCH PROBE_CH4; MUL; FETCH UNITS_ATT_CH4 ; DIV ; STORE MIN_SENS_CH4; END ACTIONS; END COMPONENT; COMPONENT MAX_SENS_CH4 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 5; GET ACTIONS; SELECT Plug_in4; CASE (Plug_in4)HP54711A; FETCH 1; CASE (Plug_in4)HP54712A; FETCH 1; CASE (Plug_in4)HP54713A; FETCH 5; CASE (Plug_in4)HP54721A; FETCH 1; CASE ELSE; FETCH 5; END SELECT; FETCH PROBE_CH4; MUL; FETCH UNITS_ATT_CH4 ; DIV ; STORE MAX_SENS_CH4; END ACTIONS; END COMPONENT; COMPONENT SENS_CH4; TYPE CONTINUOUS; VALUES RANGE MIN_SENS_CH4,MAX_SENS_CH4; INITIAL 1; COUPLED OFFSET_CH4,VMIN_CH4,VMAX_CH4,SENS_INCR_CH4, TRIGGER_LEVEL_CH4,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_range,Fn2_range,Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in4 THEN; OUTPUT SENS_CH4 FORMAT '":CHAN4:SCAL ",K'; IF RECALLING THEN ; ELSE ; GET SENS_CH4 ; END IF ; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE SENS_CH4; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in4 THEN; OUTPUT STRING ":CHAN4:SCAL?"; ENTER SENS_CH4 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE SENS_CH4; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS; GOSUB UPDATE_TRACE_DATA; FETCH Plug_in4 ; GOSUB Get_Offset_Ranges ; FETCH Plug_in4 ; GOSUB Get_Trigger_Ranges ; END ACTIONS; END COMPONENT; COMPONENT OFFSET_CH4_MIN ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT OFFSET_CH4_MAX ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT OFFSET_CH4; TYPE CONTINUOUS; VALUES RANGE OFFSET_CH4_MIN,OFFSET_CH4_MAX; INITIAL 0; COUPLED OFFSET_CH4,VMIN_CH4,VMAX_CH4,SENS_INCR_CH4, TRIGGER_LEVEL_CH4,EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, Fn1_offset,Fn2_offset, VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2; SET ACTIONS; IF Plug_in4 THEN; OUTPUT OFFSET_CH4 FORMAT '":CHAN4:OFFS ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE OFFSET_CH4; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in4 THEN; OUTPUT STRING ":CHAN4:OFFS?"; ENTER OFFSET_CH4 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE OFFSET_CH4; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT VMIN_CH4 NOERRCHECK; TYPE CONTINUOUS; INITIAL -4; GET ACTIONS; ! offset-range/2 ... FETCH OFFSET_CH4; FETCH SENS_CH4; FETCH 4; MUL; SUB; STORE VMIN_CH4; END ACTIONS; END COMPONENT; COMPONENT VMAX_CH4 NOERRCHECK; TYPE CONTINUOUS; INITIAL +4; GET ACTIONS; ! offset+range/2 ... FETCH OFFSET_CH4; FETCH SENS_CH4; FETCH 4 ; MUL; ADD; STORE VMAX_CH4; END ACTIONS; END COMPONENT; COMPONENT SENS_INCR_CH4 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 10E-3; ! 1% of range ... GET ACTIONS; FETCH VMAX_CH4; FETCH VMIN_CH4; SUB; FETCH 80; DIV; STORE SENS_INCR_CH4; END ACTIONS; END COMPONENT; COMPONENT UNITS_CH4_DISP ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; END COMPONENT ; COMPONENT UNITS_CH4 ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN ; INITIAL VOLT ; SET ACTIONS ; IF Plug_in4 THEN ; OUTPUT STRING ":CHAN4:UNIT " ; OUTPUT UNITS_CH4 TABLE 'VOLT','AMP','WATT','UNKN' ; ELSE ; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_CH4 ; END IF ; END IF ; END IF ; END ACTIONS ; PANEL SET ACTIONS ; FETCH UNITS_CH4 ; STORE UNITS_CH4_DISP ; SET MARKER_DISP_UNITS_1 ; SET MARKER_DISP_UNITS_2 ; SET UNITS_FN1_DISP ; SET UNITS_FN2_DISP ; SET MEAS_DISP_UNITS ; SET TRIGGER_LEVEL_UNITS ; END ACTIONS ; GET ACTIONS ; IF Plug_in4 THEN ; OUTPUT STRING ":CHAN4:UNIT?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "VOLT" ; FETCH (UNITS_CH4) VOLT ; CASE "AMP" ; FETCH (UNITS_CH4) AMP ; CASE "WATT" ; FETCH (UNITS_CH4) WATT ; CASE "UNKN" ; FETCH (UNITS_CH4) UNKN ; END SELECT ; DUP ; STORE UNITS_CH4 ; STORE UNITS_CH4_DISP ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_CH4 ; END IF ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT UNITS_ATT_CH4 ; TYPE CONTINUOUS ; !VALUES RANGE ??????? ; INITIAL 1 ; COUPLED UNITS_ATT_CH4,SENS_CH4,OFFSET_CH4,TRIGGER_LEVEL_CH4,MIN_SENS_CH4,MAX_SENS_CH4, EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS ; IF Plug_in4 THEN; OUTPUT UNITS_ATT_CH4 FORMAT '":CHAN4:UNIT:ATT ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_ATT_CH4; END IF ; END IF ; END IF; END ACTIONS ; GET ACTIONS ; IF Plug_in4 THEN; OUTPUT STRING ":CHAN4:UNIT:ATT?"; ENTER UNITS_ATT_CH4 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE UNITS_ATT_CH4; END IF ; END IF; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT UNITS_OFF_CH4 ; TYPE CONTINUOUS ; !VALUES RANGE ??????? INITIAL 0 ; COUPLED UNITS_OFF_CH4,SENS_CH4,OFFSET_CH4,TRIGGER_LEVEL_CH4, EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE ; SET ACTIONS ; IF Plug_in4 THEN; OUTPUT UNITS_OFF_CH4 FORMAT '":CHAN4:UNIT:OFFS ",K'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE UNITS_OFF_CH4; END IF ; END IF ; END IF; END ACTIONS ; GET ACTIONS ; IF Plug_in4 THEN; OUTPUT STRING ":CHAN4:UNIT:OFFS?"; ENTER UNITS_OFF_CH4 FORMAT K; ELSE; IF LIVEMODE THEN ; DONTCARE UNITS_OFF_CH4; END IF ; END IF ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT BWLIMIT_CH4; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; FETCH Plug_in4; FETCH (Plug_in4)HP54713A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN4:BWL "; OUTPUT BWLIMIT_CH4 TABLE 'OFF;','ON;'; ELSE; DONTCARE BWLIMIT_CH4; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in4; FETCH (Plug_in4)HP54713A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN4:BWL?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (BWLIMIT_CH4)OFF; CASE 1; FETCH (BWLIMIT_CH4)ON; CASE ELSE; FETCH BWLIMIT_CH4; END SELECT; STORE BWLIMIT_CH4; ELSE; DONTCARE BWLIMIT_CH4; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT CALOUT_CH4 ; TYPE DISCRETE; VALUES OFF,ON; INITIAL OFF; SET ACTIONS; FETCH Plug_in4; FETCH (Plug_in4)HP54721A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN4:OUTP "; OUTPUT CALOUT_CH4 TABLE 'OFF;','ON;'; ELSE; DONTCARE CALOUT_CH4; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in4; FETCH (Plug_in4)HP54721A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN4:OUTP?;"; ENTER STACK FORMAT K; SELECT STACK; CASE 0; FETCH (CALOUT_CH4)OFF; CASE 1; FETCH (CALOUT_CH4)ON; CASE ELSE; FETCH CALOUT_CH4; END SELECT; STORE CALOUT_CH4; ELSE; DONTCARE CALOUT_CH4; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT SENS_711A_CH4 ; TYPE DISCRETE; VALUES MAX,DEF; INITIAL DEF; SET ACTIONS; FETCH Plug_in4; FETCH (Plug_in4)HP54711A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN4:SENS "; OUTPUT SENS_711A_CH4 TABLE 'MAX;','DEF;'; ELSE; DONTCARE SENS_711A_CH4; END IF; END ACTIONS; GET ACTIONS; FETCH Plug_in4; FETCH (Plug_in4)HP54711A; EQ; IF STACK THEN; OUTPUT STRING ":CHAN4:SENS?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "MAX"; FETCH (SENS_711A_CH4)MAX; CASE "DEF"; FETCH (SENS_711A_CH4)DEF; CASE ELSE; FETCH SENS_711A_CH4; END SELECT; STORE SENS_711A_CH4; ELSE; DONTCARE SENS_711A_CH4; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; COMPONENT COUPLING_CH4; TYPE DISCRETE; VALUES DC,DC50,LF1_50,LF1,LF2 ; INITIAL DC50; SET ACTIONS; IF Plug_in4 THEN; OUTPUT STRING ":CHAN4:INP "; OUTPUT COUPLING_CH4 TABLE 'DC;','DC50;','LF1_50;','LF1;','LF2;'; ELSE; IF RECALLING THEN ; ELSE ; IF LIVEMODE THEN ; DONTCARE COUPLING_CH4; END IF ; END IF ; END IF; END ACTIONS; GET ACTIONS; IF Plug_in4 THEN; OUTPUT STRING ":CHAN4:INP?;"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "DC"; FETCH (COUPLING_CH4)DC; CASE "DC50"; FETCH (COUPLING_CH4)DC50; CASE "LF1"; FETCH (COUPLING_CH4)LF1; CASE "LF2"; FETCH (COUPLING_CH4)LF2; CASE "LF1_50"; FETCH (COUPLING_CH4)LF1_50; CASE ELSE; FETCH COUPLING_CH4; END SELECT; STORE COUPLING_CH4; ELSE; IF LIVEMODE THEN ; DONTCARE COUPLING_CH4; END IF ; END IF; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT; COMPONENT SKEW_CH4 ; TYPE CONTINUOUS ; VALUES RANGE -100E-6,100E-6 ; INITIAL 0.0; SET ACTIONS ; OUTPUT SKEW_CH4 FORMAT '":CAL:SKEW CHAN4,",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING "CAL:SKEW? CHAN4" ; ENTER SKEW_CH4 FORMAT 'K' ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA; END COMPONENT ; ! the foll ranges are saved as they are configuration dependent ! also all the MIN/MAX variables are also saved COMPONENT OFFSET_INCR_CH1 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL INVALID ; GET ACTIONS; FETCH SENS_CH1 ; FETCH 50; DIV ; STORE OFFSET_INCR_CH1 ; END ACTIONS; END COMPONENT; COMPONENT OFFSET_INCR_CH2 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL INVALID ; GET ACTIONS; FETCH SENS_CH2 ; FETCH 50; DIV ; STORE OFFSET_INCR_CH2 ; END ACTIONS; END COMPONENT; COMPONENT OFFSET_INCR_CH3 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL INVALID ; GET ACTIONS; FETCH SENS_CH3 ; FETCH 50; DIV ; STORE OFFSET_INCR_CH3 ; END ACTIONS; END COMPONENT; COMPONENT OFFSET_INCR_CH4 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL INVALID ; GET ACTIONS; FETCH SENS_CH4 ; FETCH 50; DIV ; STORE OFFSET_INCR_CH4 ; END ACTIONS; END COMPONENT; ACTIONS Get_Offset_Ranges ; ! Plug_in values EMPTY,HP54711A,HP54712A,HP54713A,HP54721A; SELECT STACK ; CASE 0 ; CASE 1 ; GOSUB Get_Offset_Range_11A ; CASE 2 ; GOSUB Get_Offset_Range_12A ; CASE 3 ; GOSUB Get_Offset_Range_13A ; CASE 4 ; GOSUB Get_Offset_Range_21A ; CASE 5 ; GOSUB Get_Offset_Range_22A ; CASE ELSE ; END SELECT ; END ACTIONS ; ACTIONS Get_Offset_Range_13A ; SELECT SLOT_13A ; CASE 0 ; CASE 1 ; FETCH SENS_CH1 ; CASE 2 ; FETCH SENS_CH2 ; CASE 3 ; FETCH SENS_CH3 ; CASE 4 ; FETCH SENS_CH4 ; END SELECT ; DUP ; DUP ; FETCH 49E-3 ; LE ; IF STACK THEN ; DROP; DROP; FETCH -2; FETCH +2; ELSE ; FETCH 249E-3; LE ; IF STACK THEN ; DROP ; FETCH -10;FETCH +10; ELSE ; FETCH 1.24 ; LE ; IF STACK THEN ; FETCH -50 ; FETCH 50 ; ELSE ; FETCH -250 ; FETCH 250 ; END IF ; END IF ; END IF ; SELECT SLOT_13A ; CASE 0 ; CASE 1 ; STORE OFFSET_CH1_MAX ; STORE OFFSET_CH1_MIN ; GET OFFSET_INCR_CH1 ; CASE 2 ; STORE OFFSET_CH2_MAX ; STORE OFFSET_CH2_MIN ; GET OFFSET_INCR_CH2 ; CASE 3 ; STORE OFFSET_CH3_MAX ; STORE OFFSET_CH3_MIN ; GET OFFSET_INCR_CH3 ; CASE 4 ; STORE OFFSET_CH4_MAX ; STORE OFFSET_CH4_MIN ; GET OFFSET_INCR_CH4 ; END SELECT ; END ACTIONS ; ACTIONS Get_Offset_Range_11A ; SELECT SLOT_11A ; CASE 0 ; CASE 1 ; FETCH SENS_CH1 ; CASE 2 ; FETCH SENS_CH2 ; CASE 3 ; FETCH SENS_CH3 ; CASE 4 ; FETCH SENS_CH4 ; END SELECT ; FETCH -11 ; MUL ; DUP ; FETCH -1 ; MUL ; !DUP ; DUP ; DUP ; !FETCH 50E-3 ; !LE ; !IF STACK THEN ; ! DROP ; DROP ; DROP ; FETCH -440E-3; FETCH 440E-3 ; !ELSE ; ! FETCH 100E-3 ; ! LE ; ! IF STACK THEN ; ! DROP ; DROP ; FETCH -550E-3 ; FETCH 550E-3 ; ! ELSE ; ! FETCH 200E-3 ; ! LE ; ! IF STACK THEN ; ! DROP ; FETCH -1.1 ; FETCH 1.1 ; ! ELSE ; ! FETCH 500E-3 ; ! LE ; ! IF STACK THEN ; ! FETCH -5.5 ; FETCH 5.5 ; ! ELSE ; ! FETCH -11 ; FETCH 11 ; ! END IF ; ! END IF ; ! END IF ; !END IF ; SELECT SLOT_11A ; CASE 0 ; CASE 1 ; STORE OFFSET_CH1_MAX ; STORE OFFSET_CH1_MIN ; GET OFFSET_INCR_CH1 ; CASE 2 ; STORE OFFSET_CH2_MAX ; STORE OFFSET_CH2_MIN ; GET OFFSET_INCR_CH2 ; CASE 3 ; STORE OFFSET_CH3_MAX ; STORE OFFSET_CH3_MIN ; GET OFFSET_INCR_CH3 ; CASE 4 ; STORE OFFSET_CH4_MAX ; STORE OFFSET_CH4_MIN ; GET OFFSET_INCR_CH4 ; END SELECT ; END ACTIONS ; ACTIONS Get_Offset_Range_21A ; SELECT SLOT_21A ; CASE 0 ; CASE 1 ; FETCH SENS_CH1 ; CASE 2 ; FETCH SENS_CH2 ; CASE 3 ; FETCH SENS_CH3 ; CASE 4 ; FETCH SENS_CH4 ; END SELECT ; !FETCH 10; !LE ; !IF STACK THEN ; ! FETCH -120 ; FETCH +120 ; !ELSE ; ! FETCH -12 ; MUL ; DUP ; FETCH -1 ; MUL ; !END IF ; DUP ; DUP ; DUP ; DUP ; DUP ; FETCH 10E-3 ; LE ; IF STACK THEN ; DROP ; DROP ; DROP ; DROP ; DROP ; FETCH -120E-3 ; FETCH 120E-3 ; ELSE ; FETCH 20E-3 ; LE ; IF STACK THEN ; DROP ; DROP ; DROP ; DROP ; FETCH -240E-3 ; FETCH 240E-3 ; ELSE ; FETCH 50E-3 ; LE ; IF STACK THEN ; DROP ; DROP ; DROP ; FETCH -600E-3 ; FETCH 600E-3 ; ELSE ; FETCH 100E-3 ; LE ; IF STACK THEN ; DROP ; DROP ; FETCH -1.2; FETCH 1.2; ELSE ; FETCH 200E-3 ; LE ; IF STACK THEN ; DROP ; FETCH -2.4 ; FETCH 2.4; ELSE ; FETCH 500E-3 ; LE ; IF STACK THEN ; FETCH -6.0 ; FETCH 6.0 ; ELSE ; FETCH -12 ; FETCH 12 ; END IF ; END IF ; END IF ; END IF ; END IF ; END IF ; SELECT SLOT_21A ; CASE 0 ; CASE 1 ; STORE OFFSET_CH1_MAX ; STORE OFFSET_CH1_MIN ; GET OFFSET_INCR_CH1 ; CASE 2 ; STORE OFFSET_CH2_MAX ; STORE OFFSET_CH2_MIN ; GET OFFSET_INCR_CH2 ; CASE 3 ; STORE OFFSET_CH3_MAX ; STORE OFFSET_CH3_MIN ; GET OFFSET_INCR_CH3 ; CASE 4 ; STORE OFFSET_CH4_MAX ; STORE OFFSET_CH4_MIN ; GET OFFSET_INCR_CH4 ; END SELECT ; END ACTIONS ; ACTIONS Get_Offset_Range_12A ; SELECT SLOT_12A ; CASE 0 ; CASE 1 ; FETCH SENS_CH1 ; CASE 2 ; FETCH SENS_CH2 ; CASE 3 ; FETCH SENS_CH3 ; CASE 4 ; FETCH SENS_CH4 ; END SELECT ; FETCH -12 ; MUL ; DUP ; FETCH -1 ; MUL ; !!Insert the correct code here - check it out SELECT SLOT_12A ; CASE 0 ; CASE 1 ; STORE OFFSET_CH1_MAX ; STORE OFFSET_CH1_MIN ; GET OFFSET_INCR_CH1 ; CASE 2 ; STORE OFFSET_CH2_MAX ; STORE OFFSET_CH2_MIN ; GET OFFSET_INCR_CH2 ; CASE 3 ; STORE OFFSET_CH3_MAX ; STORE OFFSET_CH3_MIN ; GET OFFSET_INCR_CH3 ; CASE 4 ; STORE OFFSET_CH4_MAX ; STORE OFFSET_CH4_MIN ; GET OFFSET_INCR_CH4 ; END SELECT ; END ACTIONS ; ACTIONS Get_Offset_Range_22A ; FETCH SENS_CH1 ; FETCH -11 ; MUL ; DUP ; FETCH -1 ; MUL ; STORE OFFSET_CH1_MAX ; STORE OFFSET_CH1_MIN ; GET OFFSET_INCR_CH1 ; END ACTIONS ; COMPONENT STORE_CH4_WM1 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN4,WMEM1;"; OUTPUT STRING ":WMEM1:SAVE CHAN4"; FETCH 1 ; STORE WM1_OK ; get X_INC; fetch X_INC; store XINC_WM1; get X_MIN; fetch X_MIN; store XMIN_WM1; FETCH VMIN_CH4; STORE VMIN_WM1; FETCH VMAX_CH4; STORE VMAX_WM1; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM1 THEN; ! get wf_WM1; !end if; FETCH (SOURCE_WM1)CHAN4; STORE SOURCE_WM1; FETCH UNITS_CH4_DISP ; STORE UNITS_WM1_DISP ; FETCH 0 ; STORE WM1_X_Axis_Units ; FETCH TIME_SENS ;STORE WM1_TIME_SENS ; FETCH TIME_DELAY ; STORE WM1_TIME_DELAY ; FETCH TIME_REF ; STORE WM1_TIME_REF ; FETCH SENS_CH4 ; STORE WM1_SENS ; FETCH OFFSET_CH4 ; STORE WM1_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM1; IF VIEW_WF_WM1 THEN ; GET WF_WM1; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH4_WM2 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN4,WMEM2;"; OUTPUT STRING ":WMEM2:SAVE CHAN4"; FETCH 1 ; STORE WM2_OK ; get X_INC; fetch X_INC; store XINC_WM2; get X_MIN; fetch X_MIN; store XMIN_WM2; FETCH VMIN_CH4; STORE VMIN_WM2; FETCH VMAX_CH4; STORE VMAX_WM2; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM2 THEN; ! get wf_WM2; !end if; FETCH (SOURCE_WM2)CHAN4; STORE SOURCE_WM2; FETCH UNITS_CH4_DISP ; STORE UNITS_WM2_DISP ; FETCH 0 ; STORE WM2_X_Axis_Units ; FETCH TIME_SENS ;STORE WM2_TIME_SENS ; FETCH TIME_DELAY ; STORE WM2_TIME_DELAY ; FETCH TIME_REF ; STORE WM2_TIME_REF ; FETCH SENS_CH4 ; STORE WM2_SENS ; FETCH OFFSET_CH4 ; STORE WM2_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM2; IF VIEW_WF_WM2 THEN ; GET WF_WM2; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH4_WM3 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN4,WMEM3;"; OUTPUT STRING ":WMEM3:SAVE CHAN4"; FETCH 1 ; STORE WM3_OK ; get X_INC; fetch X_INC; store XINC_WM3; get X_MIN; fetch X_MIN; store XMIN_WM3; FETCH VMIN_CH4; STORE VMIN_WM3; FETCH VMAX_CH4; STORE VMAX_WM3; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM3 THEN; ! get wf_WM3; !end if; FETCH (SOURCE_WM3)CHAN4; STORE SOURCE_WM3; FETCH UNITS_CH4_DISP ; STORE UNITS_WM3_DISP ; FETCH 0 ; STORE WM3_X_Axis_Units ; FETCH TIME_SENS ;STORE WM3_TIME_SENS ; FETCH TIME_DELAY ; STORE WM3_TIME_DELAY ; FETCH TIME_REF ; STORE WM3_TIME_REF ; FETCH SENS_CH4 ; STORE WM3_SENS ; FETCH OFFSET_CH4 ; STORE WM3_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM3; IF VIEW_WF_WM3 THEN ; GET WF_WM3; END IF ; END ACTIONS; END COMPONENT; COMPONENT STORE_CH4_WM4 NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; SET ACTIONS; !OUTPUT STRING ":STORE:WAV CHAN4,WMEM4;"; OUTPUT STRING ":WMEM4:SAVE CHAN4"; FETCH 1 ; STORE WM4_OK ; get X_INC; fetch X_INC; store XINC_WM4; get X_MIN; fetch X_MIN; store XMIN_WM4; FETCH VMIN_CH4; STORE VMIN_WM4; FETCH VMAX_CH4; STORE VMAX_WM4; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM4 THEN; ! get wf_WM4; !end if; FETCH (SOURCE_WM4)CHAN4; STORE SOURCE_WM4; FETCH UNITS_CH4_DISP ; STORE UNITS_WM4_DISP ; FETCH 0 ; STORE WM4_X_Axis_Units ; FETCH TIME_SENS ;STORE WM4_TIME_SENS ; FETCH TIME_DELAY ; STORE WM4_TIME_DELAY ; FETCH TIME_REF ; STORE WM4_TIME_REF ; FETCH SENS_CH4 ; STORE WM4_SENS ; FETCH OFFSET_CH4 ; STORE WM4_OFFSET ; END ACTIONS; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM4; IF VIEW_WF_WM4 THEN ; GET WF_WM4; END IF ; END ACTIONS; END COMPONENT; !============================== ! MEASURE SUBSYSTEM !============================== COMPONENT Two_sources NOGEN NOERRCHECK; TYPE DISCRETE ; VALUES No,Yes; INITIAL Yes; END COMPONENT; COMPONENT Flag_source ; TYPE INTEGER ; INITIAL 0 ; END COMPONENT ; COMPONENT meas_source2; TYPE DISCRETE ; values c1,c2,c3,c4,fn1,fn2,fft,wm1,wm2,wm3,wm4; INITIAL c1; COUPLED VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2 ; SET ACTIONS; output string ":MEAS:SOUR "; output meas_source table "CHAN1","CHAN2","CHAN3","CHAN4", "FUNC1","FUNC2","FFT","WMEM1","WMEM2" "WMEM3","WMEM4"; output meas_source2 table ",CHAN1",",CHAN2",",CHAN3",",CHAN4", ",FUNC1",",FUNC2",",FFT",",WMEM1",",WMEM2",",WMEM3",",WMEM4"; FETCH (Two_sources)Yes; STORE Two_sources; !invalidate Vtime_voltage; FETCH 1 ; STORE Flag_source ; END ACTIONS; GET ACTIONS; GET meas_source; END ACTIONS; END COMPONENT; component meas_source; type discrete; values c1,c2,c3,c4,fn1,fn2,fft,wm1,wm2,wm3,wm4; initial c1; COUPLED VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2 ; set actions; output string ":MEAS:SOUR "; output meas_source table "CHAN1","CHAN2","CHAN3","CHAN4", "FUNC1","FUNC2","FFT","WMEM1","WMEM2" "WMEM3","WMEM4"; FETCH (Two_sources)No ; STORE Two_sources; fetch meas_source; store meas_source2; !invalidate Vtime_voltage; invalidate meas_source2; set meas_disp_units ; FETCH 1 ; STORE Flag_source ; end actions; get actions; output string ":MEAS:SOUR?"; enter CHARSTRING format 'K'; FETCH CHARSTRING; dup; dup; FETCH 1; FETCH 5; SUBSTR; STORE Temp_string; select Temp_string; case "CHAN1"; fetch (meas_source)c1; case "CHAN2"; fetch (meas_source)c2; case "CHAN3"; fetch (meas_source)c3; case "CHAN4"; fetch (meas_source)c4; CASE "FUNC1"; FETCH (meas_source) fn1; CASE "FUNC2"; FETCH (meas_source) fn2; CASE "FFT" ; FETCH (meas_source) fft; CASE "WMEM1"; FETCH (meas_source) wm1; CASE "WMEM2"; FETCH (meas_source) wm2; CASE "WMEM3"; FETCH (meas_source) wm3; CASE "WMEM4"; FETCH (meas_source) wm4; case else; fetch meas_source; end select; store meas_source; FETCH ","; POS; IF STACK THEN; ! 2 sources speified FETCH (Two_sources)Yes; STORE Two_sources; FETCH 7; FETCH 5; SUBSTR; STORE Temp_string; select Temp_string; case "CHAN1"; fetch (meas_source2)c1; case "CHAN2"; fetch (meas_source2)c2; case "CHAN3"; fetch (meas_source2)c3; case "CHAN4"; fetch (meas_source2)c4; CASE "FUNC1"; FETCH (meas_source2) fn1; CASE "FUNC2"; FETCH (meas_source2) fn2; CASE "FFT" ; FETCH (meas_source2) fft; CASE "WMEM1"; FETCH (meas_source2) wm1; CASE "WMEM2"; FETCH (meas_source2) wm2; CASE "WMEM3"; FETCH (meas_source2) wm3; CASE "WMEM4"; FETCH (meas_source2) wm4; case else; fetch meas_source2; end select; STORE meas_source2; ELSE; ! only one source drop; FETCH (Two_sources)No ; STORE Two_sources; fetch meas_source; store meas_source2; !invalidate Vtime_voltage; invalidate meas_source2; END IF; end actions; end component; ACTIONS Get_Meas_Marker_Source ; IF Flag_source THEN ; GET MARKER_X1Y1_SRC ; GET MARKER_X2Y2_SRC ; SET MARKER_DISP_UNITS_1 ; SET MARKER_DISP_UNITS_2 ; SET X_AXIS_UNITS ; GET VMIN_MSMT1; GET VMAX_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT2 ; GET MARKER_X1_MIN ; GET MARKER_X1_MAX ; GET MARKER_X2_MIN ; GET MARKER_X2_MAX ; END IF ; IF Meas_cont_stat THEN ; FETCH 0 ; STORE Flag_source ; END IF ; END ACTIONS ; COMPONENT Meas_precision; ! This is not implemented - to be removed after chacking next ver TYPE DISCRETE ; VALUES Coarse, Fine; INITIAL Fine; SET ACTIONS; OUTPUT Meas_precision TABLE ":MEAS:PREC COAR",":MEAS:PREC FINE"; END ACTIONS; GET ACTIONS; OUTPUT STRING ":MEAS:PREC?"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "COAR"; FETCH (Meas_precision) Coarse; CASE "FINE"; FETCH (Meas_precision) Fine; CASE ELSE; FETCH Meas_precision; END SELECT; STORE Meas_precision; END ACTIONS; END COMPONENT; component meas_all notsaved; ! check it out - if command is available - ask ed type integer; set actions; output string ":MEAS:ALL?"; gosub meas_wait; enter meas_t_freq format '#,K'; enter meas_t_period format '#,K'; enter meas_t_pwid format '#,K'; enter meas_t_nwid format '#,K'; enter meas_t_rtime format '#,K'; enter meas_t_ftime format '#,K'; ENTER Meas_v_amplitude FORMAT '#,K'; enter meas_v_pp format '#,K'; ENTER Meas_v_preshoot FORMAT '#,K'; ENTER Meas_v_overshoot FORMAT '#,K'; enter meas_t_duty format '#,K'; enter meas_v_rms format '#,K'; enter meas_v_max format '#,K'; enter meas_v_min format '#,K'; enter meas_v_top format '#,K'; enter meas_v_base format '#,K'; end actions; PANEL SET ACTIONS; CODEGEN PEEK,meas_t_freq; CODEGEN PEEK,meas_t_period; CODEGEN PEEK,meas_t_pwid; CODEGEN PEEK,meas_t_nwid; CODEGEN PEEK,meas_t_rtime; CODEGEN PEEK,meas_t_ftime; CODEGEN PEEK,meas_t_duty; CODEGEN PEEK,Meas_v_amplitude; CODEGEN PEEK,Meas_v_overshoot; CODEGEN PEEK,meas_v_rms; CODEGEN PEEK,meas_v_max; CODEGEN PEEK,meas_v_min; CODEGEN PEEK,meas_v_top; CODEGEN PEEK,meas_v_base; END ACTIONS; end component; component meas_scratch notsaved; type integer; set actions; output string ":MEAS:SCR"; !fetch 0; store marker_state; ! clear markers invalidate meas_t_freq ; invalidate meas_t_period ; invalidate meas_t_pwid ; invalidate meas_t_nwid ; invalidate meas_t_rtime ; invalidate meas_t_ftime ; invalidate meas_t_duty ; invalidate meas_t_tmax ; invalidate meas_t_tmin ; invalidate meas_t_tvolt ; invalidate meas_v_amplitude ; invalidate meas_v_pp ; invalidate meas_v_preshoot ; invalidate meas_v_overshoot ; invalidate meas_v_rms ; invalidate meas_v_max ; invalidate meas_v_min ; invalidate meas_v_top ; invalidate meas_v_base ; invalidate meas_v_aver ; invalidate meas_v_lower ; invalidate meas_v_upper ; invalidate meas_v_mid ; invalidate meas_v_time ; invalidate meas_delta ; invalidate meas_fft_freq ; invalidate meas_fft_magn ; invalidate meas_fft_dfreq ; invalidate meas_fft_dmagn ; FETCH 0 ; DUP ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; DUP ; DUP ; DUP ; STORE Meas_param1 ; STORE Meas_param2 ; STORE Meas_param3 ; STORE Meas_param4 ; GOSUB Disable_Limit_Source ; end actions; panel set actions ; if Meas_cont_stat THEN ; GOSUB UPDATE_TRACE_DATA ; end if ; end actions ; end component; COMPONENT Meas_cont_stat ; ! decides whether to send in command mode or cont. mode TYPE DISCRETE ; VALUES OFF,ON ; INITIAL OFF ; SET ACTIONS ; SELECT Meas_cont_stat ; CASE OFF ; FETCH 0 ; DUP ; DUP ; DUP ; STORE Meas_param1 ; STORE Meas_param2 ; STORE Meas_param3 ; STORE Meas_param4 ; CASE ON ; NOTIFY "Please select measurement(s), return to main, click on 'Get CONT results', then view , Thank You ! " ; END SELECT ; END ACTIONS ; END COMPONENT ; COMPONENT Meas_param1 ; ! repeat Meas_param2,Meas_param3,Meas_param4 TYPE DISCRETE ; VALUES dummy, meas_v_amplitude, meas_v_pp , meas_v_preshoot, meas_v_overshoot, meas_v_rms, meas_v_max, meas_v_min, meas_v_top, meas_v_base, meas_v_aver, meas_v_lower, meas_v_upper, meas_v_mid, meas_v_time, meas_t_freq, meas_t_period, meas_t_duty, meas_t_pwid, meas_t_nwid, meas_t_rtime, meas_t_ftime, meas_t_tmax, meas_t_tmin, meas_t_tvolt, meas_delta, meas_fft_freq, meas_fft_magn, meas_fft_dfreq, meas_fft_dmagn ; ! all measurements INITIAL dummy ; END COMPONENT ; COMPONENT Meas_param2 CLONE Meas_param1 ; COMPONENT Meas_param3 CLONE Meas_param1 ; COMPONENT Meas_param4 CLONE Meas_param1 ; ACTIONS Disable_Meas_params ; Disable Meas_param1,dummy, meas_v_amplitude, meas_v_pp , meas_v_preshoot, meas_v_overshoot, meas_v_rms, meas_v_max, meas_v_min, meas_v_top, meas_v_base, meas_v_aver, meas_v_lower, meas_v_upper, meas_v_mid, meas_v_time, meas_t_freq, meas_t_period, meas_t_duty, meas_t_pwid, meas_t_nwid, meas_t_rtime, meas_t_ftime, meas_t_tmax, meas_t_tmin, meas_t_tvolt, meas_delta, meas_fft_freq, meas_fft_magn, meas_fft_dfreq, meas_fft_dmagn ; ! all measurements Disable Meas_param2,dummy, meas_v_amplitude, meas_v_pp , meas_v_preshoot, meas_v_overshoot, meas_v_rms, meas_v_max, meas_v_min, meas_v_top, meas_v_base, meas_v_aver, meas_v_lower, meas_v_upper, meas_v_mid, meas_v_time, meas_t_freq, meas_t_period, meas_t_duty, meas_t_pwid, meas_t_nwid, meas_t_rtime, meas_t_ftime, meas_t_tmax, meas_t_tmin, meas_t_tvolt, meas_delta, meas_fft_freq, meas_fft_magn, meas_fft_dfreq, meas_fft_dmagn ; ! all measurements Disable Meas_param3,dummy, meas_v_amplitude, meas_v_pp , meas_v_preshoot, meas_v_overshoot, meas_v_rms, meas_v_max, meas_v_min, meas_v_top, meas_v_base, meas_v_aver, meas_v_lower, meas_v_upper, meas_v_mid, meas_v_time, meas_t_freq, meas_t_period, meas_t_duty, meas_t_pwid, meas_t_nwid, meas_t_rtime, meas_t_ftime, meas_t_tmax, meas_t_tmin, meas_t_tvolt, meas_delta, meas_fft_freq, meas_fft_magn, meas_fft_dfreq, meas_fft_dmagn ; ! all measurements Disable Meas_param4,dummy, meas_v_amplitude, meas_v_pp , meas_v_preshoot, meas_v_overshoot, meas_v_rms, meas_v_max, meas_v_min, meas_v_top, meas_v_base, meas_v_aver, meas_v_lower, meas_v_upper, meas_v_mid, meas_v_time, meas_t_freq, meas_t_period, meas_t_duty, meas_t_pwid, meas_t_nwid, meas_t_rtime, meas_t_ftime, meas_t_tmax, meas_t_tmin, meas_t_tvolt, meas_delta, meas_fft_freq, meas_fft_magn, meas_fft_dfreq, meas_fft_dmagn ; ! all measurements END ACTIONS ; COMPONENT Meas_meas_type ; TYPE DISCRETE ; VALUES CURR,MIN,MAX,MEAN,SDEV ; INITIAL CURR ; SET ACTIONS ; SELECT Meas_meas_type ; CASE CURR ; FETCH 0 ; CASE ELSE ; FETCH 1 ; END SELECT ; STORE Meas_statistics ; SET Meas_statistics ; END ACTIONS ; END COMPONENT ; COMPONENT Meas_statistics ; TYPE DISCRETE ; VALUES OFF,ON ; INITIAL OFF ; SET ACTIONS ; OUTPUT Meas_statistics TABLE ":MEAS:STAT OFF",":MEAS:STAT ON" ; END ACTIONS ; PANEL SET ACTIONS ; IF Meas_statistics THEN ; ELSE ; FETCH ( Meas_meas_type ) CURR ; STORE Meas_meas_type ; END IF ; END ACTIONS ; GET ACTIONS ; OUTPUT ":MEAS:STAT?" ; ENTER Meas_statistics FORMAT K ; END ACTIONS ; END COMPONENT ; COMPONENT Meas_Stat_Curr1 NOTSAVED; TYPE CONTINUOUS; GET ACTIONS; END ACTIONS; END COMPONENT; COMPONENT Meas_Stat_Min1 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Max1 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Mean1 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Sdev1 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Size1 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Curr2 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Min2 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Max2 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Mean2 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Sdev2 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Size2 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Curr3 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Min3 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Max3 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Mean3 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Sdev3 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Size3 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Curr4 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Min4 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Max4 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Mean4 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Sdev4 CLONE Meas_Stat_Curr1; COMPONENT Meas_Stat_Size4 CLONE Meas_Stat_Curr1; COMPONENT Meas_results ; TYPE INTEGER ; SET ACTIONS ; IF Meas_param1 THEN ; IF Limit_stat THEN ; NOTIFY "Turn Off Limit Testing" ; ELSE ; OUTPUT ":MEAS:RES?"; SELECT Meas_statistics ; CASE OFF ; IF Meas_param1 THEN ; ENTER Meas_Stat_Curr1 FORMAT '#,K' ; FETCH Meas_Stat_Curr1; FETCH Meas_param1 ; GOSUB Store_meas_result ; END IF ; IF Meas_param2 THEN ; ENTER Meas_Stat_Curr2 FORMAT '#,K' ; FETCH Meas_Stat_Curr2; FETCH Meas_param2 ; GOSUB Store_meas_result ; END IF ; IF Meas_param3 THEN ; ENTER Meas_Stat_Curr3 FORMAT '#,K' ; FETCH Meas_Stat_Curr3; FETCH Meas_param3 ; GOSUB Store_meas_result ; END IF ; IF Meas_param4 THEN ; ENTER Meas_Stat_Curr4 FORMAT '#,K' ; FETCH Meas_Stat_Curr4; FETCH Meas_param4 ; GOSUB Store_meas_result ; END IF ; CASE ON ; IF Meas_param1 THEN ; ENTER Meas_Stat_Curr1 FORMAT '#,K'; ENTER Meas_Stat_Min1 FORMAT '#,K'; ENTER Meas_Stat_Max1 FORMAT '#,K'; ENTER Meas_Stat_Mean1 FORMAT '#,K'; ENTER Meas_Stat_Sdev1 FORMAT '#,K'; ENTER Meas_Stat_Size1 FORMAT '#,K'; SELECT Meas_meas_type ; CASE CURR ; FETCH Meas_Stat_Curr1; CASE MIN ; FETCH Meas_Stat_Min1; CASE MAX ; FETCH Meas_Stat_Max1; CASE MEAN ; FETCH Meas_Stat_Mean1; CASE ELSE ; FETCH Meas_Stat_Sdev1; END SELECT ; FETCH Meas_param1 ; GOSUB Store_meas_result ; END IF ; IF Meas_param2 THEN ; ENTER Meas_Stat_Curr2 FORMAT '#,K'; ENTER Meas_Stat_Min2 FORMAT '#,K'; ENTER Meas_Stat_Max2 FORMAT '#,K'; ENTER Meas_Stat_Mean2 FORMAT '#,K'; ENTER Meas_Stat_Sdev2 FORMAT '#,K'; ENTER Meas_Stat_Size2 FORMAT '#,K'; SELECT Meas_meas_type ; CASE CURR ; FETCH Meas_Stat_Curr2; CASE MIN ; FETCH Meas_Stat_Min2; CASE MAX ; FETCH Meas_Stat_Max2; CASE MEAN ; FETCH Meas_Stat_Mean2; CASE ELSE ; FETCH Meas_Stat_Sdev2; END SELECT ; FETCH Meas_param2 ; GOSUB Store_meas_result ; END IF ; IF Meas_param3 THEN ; ENTER Meas_Stat_Curr3 FORMAT '#,K'; ENTER Meas_Stat_Min3 FORMAT '#,K'; ENTER Meas_Stat_Max3 FORMAT '#,K'; ENTER Meas_Stat_Mean3 FORMAT '#,K'; ENTER Meas_Stat_Sdev3 FORMAT '#,K'; ENTER Meas_Stat_Size3 FORMAT '#,K'; SELECT Meas_meas_type ; CASE CURR ; FETCH Meas_Stat_Curr3; CASE MIN ; FETCH Meas_Stat_Min3; CASE MAX ; FETCH Meas_Stat_Max3; CASE MEAN ; FETCH Meas_Stat_Mean3; CASE ELSE ; FETCH Meas_Stat_Sdev3; END SELECT ; FETCH Meas_param3 ; GOSUB Store_meas_result ; END IF ; IF Meas_param4 THEN ; ENTER Meas_Stat_Curr4 FORMAT '#,K'; ENTER Meas_Stat_Min4 FORMAT '#,K'; ENTER Meas_Stat_Max4 FORMAT '#,K'; ENTER Meas_Stat_Mean4 FORMAT '#,K'; ENTER Meas_Stat_Sdev4 FORMAT '#,K'; ENTER Meas_Stat_Size4 FORMAT '#,K'; SELECT Meas_meas_type ; CASE CURR ; FETCH Meas_Stat_Curr4; CASE MIN ; FETCH Meas_Stat_Min4; CASE MAX ; FETCH Meas_Stat_Max4; CASE MEAN ; FETCH Meas_Stat_Mean4; CASE ELSE ; FETCH Meas_Stat_Sdev4; END SELECT ; FETCH Meas_param4 ; GOSUB Store_meas_result ; END IF ; END SELECT ; END IF ; ELSE ; NOTIFY "Please select what is to be measured" ; END IF ; END ACTIONS ; END COMPONENT ; ACTIONS Store_meas_result ; ! Caution - if order is changed this goes haywire !! SELECT Stack ; CASE 0 ; CASE 1 ; STORE meas_v_amplitude ; CASE 2 ; STORE meas_v_pp ; CASE 3 ; STORE meas_v_preshoot ; CASE 4 ; STORE meas_v_overshoot ; CASE 5 ; STORE meas_v_rms ; CASE 6 ; STORE meas_v_max ; CASE 7 ; STORE meas_v_min ; CASE 8 ; STORE meas_v_top ; CASE 9 ; STORE meas_v_base ; CASE 10 ; STORE meas_v_aver ; CASE 11 ; STORE meas_v_lower ; CASE 12 ; STORE meas_v_upper ; CASE 13 ; STORE meas_v_mid ; CASE 14 ; STORE meas_v_time ; CASE 15 ; STORE meas_t_freq ; CASE 16 ; STORE meas_t_period ; CASE 17 ; STORE meas_t_duty ; CASE 18 ; STORE meas_t_pwid ; CASE 19 ; STORE meas_t_nwid ; CASE 20 ; STORE meas_t_rtime ; CASE 21 ; STORE meas_t_ftime ; CASE 22 ; STORE meas_t_tmax ; CASE 23 ; STORE meas_t_tmin ; CASE 24 ; STORE meas_t_tvolt ; CASE 25 ; STORE meas_delta ; CASE 26 ; STORE meas_fft_freq ; CASE 27 ; STORE meas_fft_magn ; CASE 28 ; STORE meas_fft_dfreq ; CASE 29 ; STORE meas_fft_dmagn ; END SELECT ; END ACTIONS ; ACTIONS Store_meas_params ; GOSUB Is_It_Same ; IF Meas_param1 THEN ; IF Meas_param2 THEN ; IF Meas_param3 THEN ; IF Meas_param4 THEN ; IF Flag_duplicate THEN ; DROP ; ELSE ; FETCH Meas_param2 ; STORE Meas_param1 ; GET Limit_Source ; FETCH Limit_Ulimit_2 ; STORE Limit_Ulimit_1 ; FETCH Limit_Llimit_2 ; STORE Limit_Llimit_1 ; FETCH Meas_param3 ; STORE Meas_param2 ; FETCH Limit_Ulimit_3 ; STORE Limit_Ulimit_2 ; FETCH Limit_Llimit_3 ; STORE Limit_Llimit_2 ; FETCH Meas_param4 ; STORE Meas_param3 ; FETCH Limit_Ulimit_4 ; STORE Limit_Ulimit_3 ; FETCH Limit_Llimit_4 ; STORE Limit_Llimit_3 ; STORE Meas_param4 ; INVALIDATE Limit_Ulimit_4 ; INVALIDATE Limit_LLimit_4 ; GOSUB Invalidate_Limit_Results ; END IF ; ELSE ; IF Flag_duplicate THEN ; DROP ; ELSE ; STORE Meas_param4 ; END IF ; END IF ; ELSE ; IF Flag_duplicate THEN ; DROP ; ELSE ; STORE Meas_param3 ; END IF ; END IF ; ELSE ; IF Flag_duplicate THEN ; DROP ; ELSE ; STORE Meas_param2 ; END IF ; END IF ; ELSE ; IF Flag_duplicate THEN ; DROP ; ELSE ; STORE Meas_param1 ; END IF ; GET Limit_Source ; END IF ; GOSUB Enable_Limit_Source ; FETCH 0 ; STORE Flag_duplicate ; END ACTIONS ; COMPONENT Flag_duplicate ; TYPE INTEGER ; VALUES RANGE 0,1 ; INITIAL 0 ; END COMPONENT ; ACTIONS Is_It_Same ; DUP;DUP;DUP;DUP; FETCH Meas_param1 ; EQ ; IF STACK THEN ; IF Flag_source THEN ; ELSE ; FETCH 1 ; STORE Flag_duplicate ; END IF ; END IF ; FETCH Meas_param2 ; EQ ; IF STACK THEN ; IF Flag_source THEN ; ELSE ; FETCH 1 ; STORE Flag_duplicate ; END IF ; END IF ; FETCH Meas_param3 ; EQ ; IF STACK THEN ; IF Flag_source THEN ; ELSE ; FETCH 1 ; STORE Flag_duplicate ; END IF ; END IF ; FETCH Meas_param4 ; EQ ; IF STACK THEN ; IF Flag_source THEN ; ELSE ; FETCH 1 ; STORE Flag_duplicate ; END IF ; END IF ; END ACTIONS ; component meas_show_vmeas notsaved nogen noerrcheck; type integer; panel set actions; HIDE Meas_vmeas_more;hide meas_main; hide meas_tmeas; show meas_vmeas; HIDE Meas_vmeas_more1 ; HIDE meas_tmeas_more ; hide meas_fmeas ; end actions; end component; component meas_show_tmeas notsaved nogen noerrcheck; type integer; panel set actions; HIDE Meas_vmeas_more;hide meas_main; hide meas_vmeas; show meas_tmeas; HIDE Meas_vmeas_more1 ; HIDE meas_tmeas_more ; hide meas_fmeas ; end actions; end component; component meas_show_fmeas notsaved nogen noerrcheck; type integer; panel set actions; HIDE Meas_vmeas_more;hide meas_main; hide meas_vmeas; show meas_fmeas; HIDE Meas_vmeas_more1 ; HIDE meas_tmeas_more ; hide meas_tmeas ; end actions; end component; component meas_show_main notsaved nogen noerrcheck; type integer; panel set actions; HIDE Meas_vmeas_more;hide meas_tmeas; hide meas_vmeas; show meas_main; HIDE Meas_vmeas_more1 ; HIDE meas_tmeas_more ; HIDE meas_fmeas ; end actions; end component; COMPONENT Meas_show_vmeas_more NOTSAVED NOGEN NOERRCHECK; TYPE INTEGER; PANEL SET ACTIONS; hide meas_tmeas; hide meas_vmeas; HIDE meas_main; SHOW Meas_vmeas_more; HIDE Meas_vmeas_more1 ; HIDE meas_tmeas_more ; HIDE meas_fmeas ; END ACTIONS; END COMPONENT; COMPONENT Meas_show_vmeas_more1 NOTSAVED NOGEN NOERRCHECK; TYPE INTEGER; PANEL SET ACTIONS; hide meas_tmeas; hide meas_vmeas; HIDE meas_main; HIDE Meas_vmeas_more; SHOW Meas_vmeas_more1 ; HIDE meas_tmeas_more ; HIDE meas_fmeas ; END ACTIONS; END COMPONENT; component meas_show_tmeas_more notsaved nogen noerrcheck; type integer; panel set actions; hide meas_main; hide meas_vmeas; hide meas_tmeas; Hide meas_vmeas_more ; SHOW meas_tmeas_more ; HIDE meas_fmeas ; end actions ; end component; actions meas_wait; if livemode then; wait spoll bit 4; end if; FETCH (Two_sources) No; STORE Two_sources; invalidate meas_source2; end actions; ! measurement parameters ! voltage measurements COMPONENT MEAS_DISP_UNITS NOGEN ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN,DB ; INITIAL VOLT ; SET ACTIONS ; SELECT MEAS_SOURCE ; CASE c1 ; FETCH UNITS_CH1_DISP ; CASE c2 ; FETCH UNITS_CH2_DISP ; CASE c3 ; FETCH UNITS_CH3_DISP ; CASE c4 ; FETCH UNITS_CH4_DISP ; CASE fn1 ; FETCH UNITS_FN1_DISP ; CASE fn2 ; FETCH UNITS_FN2_DISP ; CASE fft ; FETCH (MEAS_DISP_UNITS)DB ; CASE wm1 ; FETCH UNITS_WM1_DISP ; CASE wm2 ; FETCH UNITS_WM2_DISP ; CASE wm3 ; FETCH UNITS_WM3_DISP ; CASE wm4 ; FETCH UNITS_WM4_DISP ; END SELECT ; STORE MEAS_DISP_UNITS ; END ACTIONS ; END COMPONENT ; component meas_v_amplitude notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VAMP?"; gosub meas_wait; enter meas_v_amplitude format 'K'; CASE ON ; output string ":MEAS:VAMP"; FETCH ( Meas_param1 ) meas_v_amplitude ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_v_pp notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VPP?"; gosub meas_wait; enter meas_v_pp format 'K'; CASE ON ; output string ":MEAS:VPP"; FETCH ( Meas_param1 ) meas_v_pp ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; COMPONENT Meas_v_preshoot NOTSAVED; TYPE CONTINUOUS ; INITIAL 0,INVALID; GET ACTIONS; SELECT Meas_cont_stat ; CASE OFF ; OUTPUT STRING ":MEAS:PRES?"; gosub meas_wait; ENTER Meas_v_preshoot FORMAT 'K'; CASE ON ; output string ":MEAS:PRES"; FETCH ( Meas_param1 ) meas_v_preshoot ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS; END COMPONENT; COMPONENT Meas_v_overshoot NOTSAVED; TYPE CONTINUOUS ; INITIAL 0,INVALID; GET ACTIONS; SELECT Meas_cont_stat ; CASE OFF ; OUTPUT STRING ":MEAS:OVER?"; gosub meas_wait; ENTER Meas_v_overshoot FORMAT 'K'; CASE ON ; output string ":MEAS:OVER"; FETCH ( Meas_param1 ) meas_v_overshoot ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS; END COMPONENT; component meas_v_rms notsaved; ! this requires additional parameters - check it out type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VRMS? "; output meas_v_rms_period TABLE "CYCLE ","DISPLAY " ; output meas_v_rms_acdc TABLE ",AC ",",DC " ; gosub meas_wait; enter meas_v_rms format 'K'; CASE ON ; output string ":MEAS:VRMS "; output meas_v_rms_period TABLE "CYCLE","DISPLAY" ; output meas_v_rms_acdc TABLE ",AC ",",DC " ; FETCH ( Meas_param1 ) meas_v_rms ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; IF MEAS_V_RMS_PERIOD THEN ; ELSE ; FETCH 1 ; STORE MARKER_STATE_VER ; END IF ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; end actions; end component; component meas_v_rms_period ; type discrete ; values CYCLE,DISPLAY ; INITIAL DISPLAY ; end component ; component meas_v_rms_acdc ; type discrete ; values AC,DC ; INITIAL AC ; end component ; component meas_v_max notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VMAX?"; gosub meas_wait; enter meas_v_max format 'K'; CASE ON ; output string ":MEAS:VMAX" ; FETCH ( Meas_param1 ) meas_v_max ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_v_min notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VMIN?"; gosub meas_wait; enter meas_v_min format 'K'; CASE ON ; output string ":MEAS:VMIN" ; FETCH ( Meas_param1 ) meas_v_min ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_v_top notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VTOP?"; gosub meas_wait; enter meas_v_top format 'K'; CASE ON ; output string ":MEAS:VTOP" ; FETCH ( Meas_param1 ) meas_v_top ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_v_base notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VBASE?"; gosub meas_wait; enter meas_v_base format 'K'; CASE ON ; output string ":MEAS:VBASE" ; FETCH ( Meas_param1 ) meas_v_base ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_v_aver notsaved; ! check it out type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VAV? "; output meas_v_aver_period TABLE "CYCLE","DISPLAY" ; gosub meas_wait; enter meas_v_aver format 'K'; CASE ON ; output string ":MEAS:VAV " ; output meas_v_aver_period TABLE "CYCLE","DISPLAY" ; FETCH ( Meas_param1 ) meas_v_aver ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; IF MEAS_V_AVER_PERIOD THEN ; ELSE ; FETCH 1 ; STORE MARKER_STATE_VER ; END IF ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; end actions; end component; component meas_v_aver_period ; type discrete ; values CYCLE,DISPLAY ; INITIAL DISPLAY ; end component ; component meas_v_lower notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VLOW?"; gosub meas_wait; enter meas_v_lower format 'K'; CASE ON ; output string ":MEAS:VLOW" ; FETCH ( Meas_param1 ) meas_v_lower ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_v_upper notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VUP?"; gosub meas_wait; enter meas_v_upper format 'K'; CASE ON ; output string ":MEAS:VUP" ; FETCH ( Meas_param1 ) meas_v_upper ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_v_mid notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VMID?"; gosub meas_wait; enter meas_v_mid format 'K'; CASE ON ; output string ":MEAS:VMID" ; FETCH ( Meas_param1 ) meas_v_mid ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_v_time notsaved; ! check it out type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:VTIM? "; output meas_v_time_sec FORMAT 'K' ; gosub meas_wait; enter meas_v_time format 'K'; CASE ON ; output string ":MEAS:VTIM " ; FETCH ( Meas_param1 ) meas_v_time ; output meas_v_time_sec FORMAT 'K' ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_VER ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_v_time_sec ; type continuous ; !values range ; initial 0 ; end component ; ! time measurements component meas_t_freq notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:FREQ?"; gosub meas_wait; enter meas_t_freq format 'K'; CASE ON ; output string ":MEAS:FREQ"; FETCH ( Meas_param1 ) meas_t_freq ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_t_period notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:PER?"; gosub meas_wait; enter meas_t_period format 'K'; CASE ON ; output string ":MEAS:PER"; FETCH ( Meas_param1 ) meas_t_period ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions ; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_t_duty notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:DUTY?"; gosub meas_wait; enter meas_t_duty format 'K'; CASE ON ; output string ":MEAS:DUTY"; FETCH ( Meas_param1 ) meas_t_duty ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_t_pwid notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:PWID?"; gosub meas_wait; enter meas_t_pwid format 'K'; CASE ON ; output string ":MEAS:PWID"; FETCH ( Meas_param1 ) meas_t_pwid ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_t_nwid notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:NWID?"; gosub meas_wait; enter meas_t_nwid format 'K'; CASE ON ; output string ":MEAS:NWID"; FETCH ( Meas_param1 ) meas_t_nwid ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_t_rtime notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:RIS?"; gosub meas_wait; enter meas_t_rtime format 'K'; CASE ON ; output string ":MEAS:RIS"; FETCH ( Meas_param1 ) meas_t_rtime ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 1 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_t_ftime notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:FALL?"; gosub meas_wait; enter meas_t_ftime format 'K'; CASE ON ; output string ":MEAS:FALL"; FETCH ( Meas_param1 ) meas_t_ftime ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 1 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_t_tmax notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:TMAX?"; gosub meas_wait; enter meas_t_tmax format 'K'; CASE ON ; output string ":MEAS:TMAX"; FETCH ( Meas_param1 ) meas_t_tmax ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_t_tmin notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:TMIN?"; gosub meas_wait; enter meas_t_tmin format 'K'; CASE ON ; output string ":MEAS:TMIN"; FETCH ( Meas_param1 ) meas_t_tmin ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_t_tvolt notsaved; ! check it out - hp54601 driver type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:TVOL? "; output meas_t_volt FORMAT 'K' ; output meas_t_slope TABLE ",+",",-" ; output meas_t_occur FORMAT 'K' ; gosub meas_wait; enter meas_t_tvolt format 'K'; CASE ON ; output string ":MEAS:TVOL "; output meas_t_volt FORMAT 'K' ; output meas_t_slope TABLE ",+",",-" ; output meas_t_occur FORMAT 'K' ; FETCH ( Meas_param1 ) meas_t_tvolt ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; end component; component meas_t_volt ; type continuous ; initial 0 ; !values range ; end component ; component meas_t_slope ; type discrete ; values RISING,FALLING ; initial RISING ; end component ; component meas_t_occur ; type integer ; !values ; initial 1 ; end component ; ! Delta Measurement component meas_delta ; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:DELT? "; output meas_source table "CHAN1","CHAN2","CHAN3","CHAN4", "FUNC1","FUNC2","WMEM1","WMEM2" "WMEM3","WMEM4"; if Two_sources then ; output meas_source table ",CHAN1",",CHAN2",",CHAN3",",CHAN4", ",FUNC1",",FUNC2",",WMEM1",",WMEM2" ",WMEM3",",WMEM4"; end if ; gosub meas_wait; enter meas_delta format 'K'; CASE ON ; output string ":MEAS:DELT "; output meas_source table "CHAN1","CHAN2","CHAN3","CHAN4", "FUNC1","FUNC2","WMEM1","WMEM2" "WMEM3","WMEM4"; if Two_sources then ; output meas_source table ",CHAN1",",CHAN2",",CHAN3",",CHAN4", ",FUNC1",",FUNC2",",WMEM1",",WMEM2" ",WMEM3",",WMEM4"; end if ; FETCH ( Meas_param1 ) meas_delta ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; FETCH 0 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component ; !===================================== ! FFT Measurements !===================================== component meas_fft_freq notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:FFT:FREQ?"; gosub meas_wait; enter meas_fft_freq format 'K'; CASE ON ; output string ":MEAS:FFT:FREQ"; FETCH ( Meas_param1 ) meas_fft_freq ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; ! check it out FETCH 1 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_fft_magn notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:FFT:MAGN?"; gosub meas_wait; enter meas_fft_magn format 'K'; CASE ON ; output string ":MEAS:FFT:MAGN"; FETCH ( Meas_param1 ) meas_fft_magn ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; ! check it out FETCH 1 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_fft_dfreq notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:FFT:DFR?"; gosub meas_wait; enter meas_fft_dfreq format 'K'; CASE ON ; output string ":MEAS:FFT:DFR"; FETCH ( Meas_param1 ) meas_fft_dfreq ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; ! check it out FETCH 1 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; component meas_fft_dmagn notsaved; type continuous; initial 0,invalid; get actions; SELECT Meas_cont_stat ; CASE OFF ; output string ":MEAS:FFT:DMAG?"; gosub meas_wait; enter meas_fft_dmagn format 'K'; CASE ON ; output string ":MEAS:FFT:DMAG"; FETCH ( Meas_param1 ) meas_fft_dmagn ; GOSUB Store_meas_params ; END SELECT ; GOSUB Get_Meas_Marker_Source ; end actions; PANEL GET ACTIONS ; IF Meas_cont_stat THEN ; IF MARKER_STATE_MEAS THEN ; FETCH 1 ; STORE MARKER_STATE_VER ; ! check it out FETCH 1 ; STORE MARKER_STATE_HOR ; GOSUB UPDATE_MARKER_VALUES ; END IF ; END IF ; END ACTIONS ; end component; COMPONENT Meas_fft_peak1 ; type integer ; values range 1,100000 ; initial 1 ; set actions ; OUTPUT Meas_fft_peak1 FORMAT '":MEAS:FFT:PEAK1 ",K' ; end actions ; get actions ; OUTPUT STRING ":MEAS:FFT:PEAK1?" ; ENTER Meas_fft_peak1 FORMAT 'K' ; end actions ; END COMPONENT ; COMPONENT Meas_fft_peak2 ; type integer ; values range 1,100000 ; initial 2 ; set actions ; OUTPUT Meas_fft_peak2 FORMAT '":MEAS:FFT:PEAK2 ",K' ; end actions ; get actions ; OUTPUT STRING ":MEAS:FFT:PEAK2?" ; ENTER Meas_fft_peak2 FORMAT 'K' ; end actions ; END COMPONENT ; COMPONENT Meas_peak_thresh ; type continuous ; values range -200,200 ; initial invalid ; set actions ; OUTPUT Meas_peak_thresh FORMAT '":MEAS:FFT:THR ",K' ; end actions ; get actions ; OUTPUT STRING ":MEAS:FFT:THR?" ; ENTER Meas_peak_thresh FORMAT 'K' ; end actions ; END COMPONENT ; !============================== ! Measurement Definitions !============================== component measdef_show_main notsaved nogen noerrcheck; type integer; panel set actions; show measdef_main ; hide measdef_thr;hide measdef_tbase; hide measdef_delta ; end actions; end component; component measdef_show_delta notsaved nogen noerrcheck; type integer; panel set actions; hide measdef_main ; hide measdef_thr;hide measdef_tbase; show measdef_delta ; end actions; end component; component measdef_show_thr notsaved nogen noerrcheck; type integer; panel set actions; hide measdef_main ; show measdef_thr;hide measdef_tbase; hide measdef_delta ; set meas_thr_units ; end actions; end component; component measdef_show_tbase notsaved nogen noerrcheck; type integer; panel set actions; hide measdef_main ; hide measdef_thr;show measdef_tbase; hide measdef_delta ; end actions; end component; component meas_delta_strtedge_dirn ; type discrete ; values RISING,FALLING,EITHER ; initial RISING ; end component ; component meas_delta_stopedge_dirn ; type discrete ; values RISING,FALLING,EITHER ; initial FALLING ; end component ; component meas_delta_strtedge_num ; type integer ; values range 1, 65534 ; initial 1 ; end component ; component meas_delta_stopedge_num ; type integer ; values range 1, 65534 ; initial 1 ; end component ; component meas_delta_strtedge_pos ; type discrete ; values upper, middle, lower ; initial middle ; end component ; component meas_delta_stopedge_pos ; type discrete ; values upper, middle, lower ; initial middle ; end component ; component meas_set_delta_def ; type integer ; set actions ; output string ":MEAS:DEF DELT " ; output meas_delta_strtedge_dirn TABLE ",RIS",",FALL",",EITH" ; output meas_delta_strtedge_num FORMAT '",",K' ; output meas_delta_strtedge_pos TABLE ",UPP",",MIDD",",LOW" ; output meas_delta_stopedge_dirn TABLE ",RIS",",FALL",",EITH" ; output meas_delta_stopedge_num FORMAT '",",K' ; output meas_delta_stopedge_pos TABLE ",UPP",",MIDD",",LOW" ; IF RECALLING THEN ; ELSE ; GET meas_set_delta_def ; END IF ; end actions ; get actions ; if livemode then ; output string ":MEAS:DEF? DELT" ; enter charstring format "#,AAAAAAAAAA" ; enter charstring format "#,AAAA" ; FETCH CHARSTRING ; FETCH "," ; POS ; DUP ; STORE NUM_BUFFER ; IF STACK THEN ; FETCH charstring ; FETCH 1 ; FETCH NUM_BUFFER ; FETCH 1; SUB ; SUBSTR ; STORE CHARSTRING ; ELSE ; FETCH CHARSTRING ; ENTER charstring FORMAT "#,A" ; STORE CHARSTRING ; END IF; select charstring ; case "RIS" ; FETCH ( meas_delta_strtedge_dirn ) RISING ; CASE "FALL" ; FETCH ( meas_delta_strtedge_dirn ) FALLING ; CASE "EITH" ; FETCH ( meas_delta_strtedge_dirn ) EITHER ; CASE ELSE ; notify "trouble" ; end select ; store meas_delta_strtedge_dirn ; enter meas_delta_strtedge_num format "#,K" ; enter charstring format "#,AAAA" ; FETCH CHARSTRING ; FETCH "," ; POS ; DUP ; STORE NUM_BUFFER ; IF STACK THEN ; FETCH charstring ; FETCH 1 ; FETCH NUM_BUFFER ; FETCH 1; SUB ; SUBSTR ; STORE CHARSTRING ; ELSE ; FETCH CHARSTRING ; ENTER charstring FORMAT "#,A" ; STORE CHARSTRING ; END IF; select charstring ; case "UPP" ; FETCH ( meas_delta_strtedge_pos ) upper ; CASE "MIDD" ; FETCH ( meas_delta_strtedge_pos ) middle ; CASE "LOW" ; FETCH ( meas_delta_strtedge_pos ) lower ; CASE ELSE ; notify "trouble" ; end select ; store meas_delta_strtedge_pos ; enter charstring format "#,AAAA" ; FETCH CHARSTRING ; FETCH "," ; POS ; DUP ; STORE NUM_BUFFER ; IF STACK THEN ; FETCH charstring ; FETCH 1 ; FETCH NUM_BUFFER ; FETCH 1; SUB ; SUBSTR ; STORE CHARSTRING ; ELSE ; FETCH CHARSTRING ; ENTER charstring FORMAT "#,A" ; STORE CHARSTRING ; END IF; select charstring ; case "RIS" ; FETCH ( meas_delta_stopedge_dirn ) RISING ; CASE "FALL" ; FETCH ( meas_delta_stopedge_dirn ) FALLING ; CASE "EITH" ; FETCH ( meas_delta_stopedge_dirn ) EITHER ; CASE ELSE ; notify "trouble" ; end select ; store meas_delta_stopedge_dirn ; enter meas_delta_stopedge_num format "#,K" ; enter charstring format "K" ; select charstring ; case "UPP" ; FETCH ( meas_delta_stopedge_pos ) upper ; CASE "MIDD" ; FETCH ( meas_delta_stopedge_pos ) middle ; CASE "LOW" ; FETCH ( meas_delta_stopedge_pos ) lower ; CASE ELSE ; notify "trouble" ; end select ; store meas_delta_stopedge_pos ; end if ; end actions ; end component ; component meas_thr_std ; type integer ; set actions ; output string ":MEAS:DEF THR,STAN" ; get meas_set_thr_def ; end actions ; end component ; component meas_thr_units ; type discrete ; values PCT,UNITS ; initial PCT ; PANEL SET ACTIONS ; SELECT meas_thr_units ; CASE PCT ; HIDE measdef_thr_volts ; SHOW measdef_thr_pct ; CASE UNITS ; HIDE measdef_thr_pct ; SHOW measdef_thr_volts ; END SELECT ; END ACTIONS ; end component ; component meas_thr_upp_pct ; type integer ; values range -25,125 ; initial 90 ; end component ; component meas_thr_upp_volts ; type continuous ; values range -998E+6,1E+9; initial 5.00; end component ; component meas_thr_mid_pct ; type integer ; values range -25,125 ; initial 50 ; end component ; component meas_thr_mid_volts ; type continuous ; values range -999E+6,+999E+6 ; initial 1.60 ; end component ; component meas_thr_low_pct ; type integer ; values range -25,125 ; initial 10 ; end component ; component meas_thr_low_volts ; type continuous ; values range -1E+9,998E+6 ; initial 0.0; end component ; component meas_set_thr_def ; type integer ; set actions ; output string ":MEAS:DEF THR," ; SELECT meas_thr_units ; CASE PCT ; output "PERC," ; output meas_thr_upp_pct FORMAT 'K,","' ; output meas_thr_mid_pct FORMAT 'K,","' ; output meas_thr_low_pct FORMAT 'K' ; CASE UNITS ; output "VOLT," ; output meas_thr_upp_volts FORMAT 'K,","' ; output meas_thr_mid_volts FORMAT 'K,","' ; output meas_thr_low_volts FORMAT 'K' ; END SELECT ; IF RECALLING THEN ; ELSE ; GET meas_set_thr_def ; END IF ; end actions ; get actions ; if livemode then ; output string ":MEAS:DEF? THR" ; enter charstring format "#,AAAAAAAAAAA" ; ! read , also enter charstring format "#,AAAAAAAA" ; ! thank goodness STANDARD is 8, the others 7 SELECT charstring ; CASE "STANDARD" ; enter charstring format K ; CASE ELSE ; FETCH CHARSTRING ; FETCH "PERCENT" ; POS ; IF STACK THEN ; enter meas_thr_upp_pct format "#,K" ; enter meas_thr_mid_pct format "#,K" ; enter meas_thr_low_pct format "K" ; ELSE ; enter meas_thr_upp_volts format "#,K" ; enter meas_thr_mid_volts format "#,K" ; enter meas_thr_low_volts format "K" ; END IF ; END SELECT ; end if ; end actions ; end component ; component meas_tbase_std ; type integer ; set actions ; output string ":MEAS:DEF TOPB,STAN" ; GET meas_set_tbase_def ; end actions ; end component ; component meas_tbase_tvolts ; type continuous ; values range -999E+6,1E+9 ; initial 5 ; end component ; component meas_tbase_bvolts ; type continuous ; values range -1E+9,999E+6 ; initial 0 ; end component ; component meas_set_tbase_def ; type integer ; set actions ; output string ":MEAS:DEF TOPB," ; output meas_tbase_tvolts FORMAT 'K,","' ; output meas_tbase_bvolts FORMAT 'K' ; IF RECALLING THEN ; ELSE ; GET meas_set_tbase_def ; END IF ; end actions ; get actions ; if livemode then ; output string ":MEAS:DEF? TOPB" ; enter charstring format "#,AAAAAAAA" ; enter charstring format "#,K" ; SELECT CHARSTRING ; CASE "CALCULATED" ; ! Rev 1.18 CASE "STANDARD" ; ! Rev 2.02 CASE ELSE ; FETCH CHARSTRING ; DUP ; DUP; FETCH "," ; POS; DUP; STORE NUM_BUFFER ; FETCH 1;SUB ;FETCH 1;SWAP;SUBSTR ;val ;store meas_tbase_tvolts ; DUP;DUP;LENGTH ;FETCH NUM_BUFFER ;SUB;STORE NUM_BUFFER ; FETCH "," ;POS ;FETCH 1 ;ADD ;FETCH NUM_BUFFER ; SUBSTR ; VAL ; store meas_tbase_bvolts ; END SELECT ; end if ; end actions ; end component ; ACTIONS Fix_Meas_Sources ; Get Meas_source ; END ACTIONS ; !=============================== ! Limit Test Subsystem !=============================== COMPONENT Limit_Stat ; TYPE DISCRETE ; VALUES OFF,ON ; INITIAL OFF ; SET ACTIONS ; OUTPUT Limit_Stat TABLE ":LTES:TEST OFF", ":LTES:TEST ON" ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":LTES:TEST?" ; ENTER Limit_Stat FORMAT 'K' ; END ACTIONS ; END COMPONENT ; COMPONENT Limit_Source ; TYPE DISCRETE ; VALUES NONE,ONE,TWO,THREE,FOUR; INITIAL NONE ; SET ACTIONS ; OUTPUT Limit_Source TABLE "",":LTES:SOUR 1",":LTES:SOUR 2",":LTES:SOUR 3",":LTES:SOUR 4" ; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":LTES:SOUR?" ; ENTER STACK FORMAT 'K' ; SELECT STACK ; CASE 1 ; IF Meas_param1 THEN ; FETCH (Limit_Source) ONE ; ELSE ; IF PANELMODE THEN ; NOTIFY "No Measurement Selected" ; END IF ; END IF ; CASE 2 ; FETCH (Limit_Source) TWO ; CASE 3 ; FETCH (Limit_Source) THREE ; CASE 4 ; FETCH (Limit_Source) FOUR ; CASE ELSE ; FETCH Limit_Source ; NOTIFY "BAD CASE IN Limit_Source" ; END SELECT ; STORE Limit_Source ; END IF ; END ACTIONS ; END COMPONENT ; ACTIONS Enable_Limit_Source ; IF Meas_param1 THEN ; ENABLE Limit_Source,ONE ; END IF ; IF Meas_param2 THEN ; ENABLE Limit_Source,TWO ; END IF ; IF Meas_param3 THEN ; ENABLE Limit_Source,THREE ; END IF ; IF Meas_param4 THEN ; ENABLE Limit_Source,FOUR ; END IF ; END ACTIONS ; ACTIONS Disable_Limit_Source ; FETCH ( Limit_Source ) NONE ; STORE Limit_Source ; DISABLE Limit_Source,ONE,TWO,THREE,FOUR ; GOSUB Disable_Meas_params ; END ACTIONS ; COMPONENT Limit_Failc_1 ; TYPE DISCRETE ; VALUES INS,OUT,ALW,NEV ; INITIAL OUT ; SET ACTIONS ; OUTPUT DEFAULT TABLE ":LTES:FAIL INS",":LTES:FAIL OUTS",":LTES:FAIL ALW",":LTES:FAIL NEV"; SELECT Limit_Source ; CASE NONE ; CASE ONE ; GET Limit_Mnf_1 ; CASE TWO ; GET Limit_Mnf_2 ; CASE THREE; GET Limit_Mnf_3 ; CASE FOUR ; GET Limit_Mnf_4 ; END SELECT ; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":LTES:FAIL?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "INS" ; FETCH (Limit_Failc_1) INS ; CASE "OUTS" ; FETCH (Limit_Failc_1) OUT ; CASE "ALW" ; FETCH (Limit_Failc_1) ALW ; CASE "NEV" ; FETCH (Limit_Failc_1) NEV ; CASE ELSE ; FETCH DEFAULT ; NOTIFY "BAD CASE IN Limit_Failc" ; END SELECT ; STORE DEFAULT ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT Limit_Failc_2 CLONE Limit_Failc_1 ; COMPONENT Limit_Failc_3 CLONE Limit_Failc_1 ; COMPONENT Limit_Failc_4 CLONE Limit_Failc_1 ; COMPONENT Limit_Mnf_1 ; TYPE DISCRETE ; VALUES Fail,Pass,Ignore ; INITIAL Fail ; SET ACTIONS ; OUTPUT DEFAULT TABLE ":LTES:MNF FAIL",":LTES:MNF PASS",":LTES:MNF IGN"; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":LTES:MNF?" ; ENTER CHARSTRING FORMAT 'K' ; SELECT CHARSTRING ; CASE "FAIL" ; FETCH (Limit_Mnf_1) FAIL ; CASE "PASS" ; FETCH (Limit_Mnf_1) PASS ; CASE "IGN" ; FETCH (Limit_Mnf_1) IGNORE ; CASE ELSE ; FETCH DEFAULT ; NOTIFY "BAD CASE IN Limit_Mnf" ; END SELECT ; STORE DEFAULT ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT Limit_Mnf_2 CLONE Limit_Mnf_1 ; COMPONENT Limit_Mnf_3 CLONE Limit_Mnf_1 ; COMPONENT Limit_Mnf_4 CLONE Limit_Mnf_1 ; COMPONENT Limit_Ulimit_1 ; TYPE CONTINUOUS ; !VALUES RANGE ; INITIAL 10 ; SET ACTIONS ; OUTPUT DEFAULT FORMAT '":LTES:ULIM ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":LTES:ULIM?" ; ENTER DEFAULT FORMAT 'K' ; END ACTIONS ; END COMPONENT ; COMPONENT Limit_Llimit_1 ; TYPE CONTINUOUS ; !VALUES RANGE ; INITIAL -10 ; SET ACTIONS ; OUTPUT DEFAULT FORMAT '":LTES:LLIM ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":LTES:LLIM?" ; ENTER DEFAULT FORMAT 'K' ; END ACTIONS ; END COMPONENT ; COMPONENT Limit_Ulimit_2 CLONE Limit_Ulimit_1 ; COMPONENT Limit_Ulimit_3 CLONE Limit_Ulimit_1 ; COMPONENT Limit_Ulimit_4 CLONE Limit_Ulimit_1 ; COMPONENT Limit_Llimit_2 CLONE Limit_Llimit_1 ; COMPONENT Limit_Llimit_3 CLONE Limit_Llimit_1 ; COMPONENT Limit_Llimit_4 CLONE Limit_Llimit_1 ; COMPONENT Limit_Run ; TYPE DISCRETE ; VALUES FOR,FAIL,WAV ; INITIAL FOR ; SET ACTIONS ; OUTPUT Limit_Run TABLE ":LTES:RUN FOR",":LTES:RUN FAIL, ",":LTES:RUN WAV, "; SELECT Limit_Run ; CASE FOR ; CASE FAIL ; OUTPUT Total_Fail FORMAT 'K' ; CASE WAV ; OUTPUT Max_Waveform FORMAT 'K' ; END SELECT ; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":LTES:RUN?" ; ENTER CHARSTRING FORMAT '#,AAA' ; SELECT CHARSTRING ; CASE "FOR" ; FETCH (Limit_Run) FOR ; ENTER CHARSTRING FORMAT '#,A' ; CASE "FAI" ; FETCH (Limit_Run) FAIL ; ENTER CHARSTRING FORMAT '#,A' ; ENTER Total_Fail FORMAT '#,K' ; CASE "WAV" ; FETCH (Limit_Run) WAV ; ENTER Max_Waveform FORMAT '#,K' ; CASE ELSE ; FETCH Limit_Run ; NOTIFY "BAD CASE IN Limit_Run" ; END SELECT ; STORE Limit_Run ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT Total_Fail; TYPE CONTINUOUS ; !VALUES RANGE INITIAL 1; SET ACTIONS; SET Limit_Run ; END ACTIONS; GET ACTIONS; GET limit_Run ; END ACTIONS; END COMPONENT; COMPONENT Max_Waveform ; TYPE CONTINUOUS ; !VALUES RANGE INITIAL 1000000; SET ACTIONS; SET Limit_Run ; END ACTIONS; GET ACTIONS; GET limit_Run ; END ACTIONS; END COMPONENT; COMPONENT Limit_fail_1 ; TYPE CONTINUOUS ; INITIAL INVALID ; get actions; end actions; END COMPONENT ; COMPONENT Limit_status_1 ; TYPE DISCRETE ; VALUES PASS,HIGH,LOW,INS,OTH ; INITIAL INVALID ; get actions; end actions; END COMPONENT ; COMPONENT Limit_total_1 CLONE Limit_fail_1 ; COMPONENT Limit_fail_2 CLONE Limit_fail_1 ; COMPONENT Limit_total_2 CLONE Limit_fail_1 ; COMPONENT Limit_status_2 CLONE Limit_status_1 ; COMPONENT Limit_fail_3 CLONE Limit_fail_1 ; COMPONENT Limit_total_3 CLONE Limit_fail_1 ; COMPONENT Limit_status_3 CLONE Limit_status_1 ; COMPONENT Limit_fail_4 CLONE Limit_fail_1 ; COMPONENT Limit_status_4 CLONE Limit_status_1 ; COMPONENT Limit_total_4 CLONE Limit_fail_1 ; ACTIONS Invalidate_Limit_Results ; INVALIDATE Limit_status_1 ; INVALIDATE Limit_total_1 ; INVALIDATE Limit_fail_1 ; INVALIDATE Limit_status_2 ; INVALIDATE Limit_total_2 ; INVALIDATE Limit_fail_2 ; INVALIDATE Limit_status_3 ; INVALIDATE Limit_total_3 ; INVALIDATE Limit_fail_3 ; INVALIDATE Limit_status_4 ; INVALIDATE Limit_total_4 ; INVALIDATE Limit_fail_4 ; END ACTIONS ; COMPONENT Get_Limit_Results ; TYPE INTEGER ; SET ACTIONS ; IF Limit_Source THEN ; output string "*SRE?"; enter STACK format 'K'; ! Save SRE output string ":OPEE?"; enter STACK format 'K'; ! Save OPEE output string "*CLS;*SRE 128;:OPEE 256"; flush; OUTPUT STRING ":LTEST:SSUM:FORM BRI;" ; FETCH 1 ; STORE Limit_Stat ; SET Limit_Stat ; FETCH 0 ; STORE Result_OK ; if livemode then ; if Limit_Run THEN ; LOOP ; wait spoll bit 7; OUTPUT STRING ":LTER?" ; ENTER STACK FORMAT 'K' ; FETCH 0 ; BIT ; EXIT IF STACK ; END LOOP ; else ; NOTIFY "Limit Results may not be valid in RUN FOREVER" ; end if ; end if ; OUTPUT STRING ":OPER?" ; ENTER STACK FORMAT 'K'; DROP ; OUTPUT STACK FORMAT '";*CLS;:OPEE ",K,";"' ; ! restore OPEE OUTPUT STACK FORMAT '";*SRE ",K,";"' ; ! restore SRE OUTPUT STRING ":MEAS:RES?" ; IF Meas_param1 THEN ; ENTER STACK FORMAT '#,K' ; FETCH Meas_param1 ; GOSUB Store_meas_result ; ENTER Limit_fail_1 FORMAT '#,K' ; ENTER Limit_total_1 FORMAT '#,K' ; ENTER STACK FORMAT '#,K' ; GOSUB Work_Around ; IF Result_OK THEN ; STORE Limit_status_1 ; ELSE ; DROP ; END IF ; !ENTER Limit_status_1 FORMAT '#,K' ; END IF ; IF Meas_param2 THEN ; ENTER STACK FORMAT '#,K' ; FETCH Meas_param2 ; GOSUB Store_meas_result ; ENTER Limit_fail_2 FORMAT '#,K' ; ENTER Limit_total_2 FORMAT '#,K' ; ENTER STACK FORMAT '#,K' ; GOSUB Work_Around ; IF Result_OK THEN ; STORE Limit_status_2 ; ELSE ; DROP ; END IF ; !ENTER Limit_status_2 FORMAT '#,K' ; END IF ; IF Meas_param3 THEN ; ENTER STACK FORMAT '#,K' ; FETCH Meas_param3 ; GOSUB Store_meas_result ; ENTER Limit_fail_3 FORMAT '#,K' ; ENTER Limit_total_3 FORMAT '#,K' ; ENTER STACK FORMAT '#,K' ; GOSUB Work_Around ; IF Result_OK THEN ; STORE Limit_status_3 ; ELSE ; DROP ; END IF ; !ENTER Limit_status_3 FORMAT '#,K' ; END IF ; IF Meas_param4 THEN ; ENTER STACK FORMAT '#,K' ; FETCH Meas_param4 ; GOSUB Store_meas_result ; ENTER Limit_fail_4 FORMAT '#,K' ; ENTER Limit_total_4 FORMAT '#,K' ; ENTER STACK FORMAT '#,K' ; GOSUB Work_Around ; IF Result_OK THEN ; STORE Limit_status_4 ; ELSE ; DROP ; END IF ; !ENTER Limit_status_4 FORMAT '#,K' ; END IF ; FETCH 0 ; STORE Limit_Stat ; SET Limit_Stat ; NOTIFY "It is advisable to cycle power on the instrument" ; ELSE ; NOTIFY "Select Measurement On Which to Perform Limit Testing" ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT Result_OK ; TYPE INTEGER ; INITIAL 0 ; END COMPONENT ; ACTIONS Work_Around ; DUP ; SELECT STACK ; CASE 0 ; FETCH 1 ; STORE Result_OK ; CASE 1 ; FETCH 1 ; STORE Result_OK ; CASE 2 ; FETCH 1 ; STORE Result_OK ; CASE 3 ; FETCH 1 ; STORE Result_OK ; CASE 4 ; FETCH 1 ; STORE Result_OK ; CASE ELSE ; FETCH 0 ; STORE Result_OK ; IF PANELMODE THEN ; NOTIFY "Error Being Returned !!!!" ; END IF ; END SELECT ; END ACTIONS ; !============================== ! Function subsystem ! !============================== ! COMPONENT Function NOERRCHECK; TYPE DISCRETE ; VALUES Function1, Function2; INITIAL Function1; PANEL SET ACTIONS; HIDE Math_subsystem,Function1; HIDE Math_subsystem,Function2; SELECT Function; CASE Function1; SHOW Math_subsystem,Function1; CASE Function2; SHOW Math_subsystem,Function2; END SELECT; END ACTIONS; END COMPONENT; COMPONENT Fn1_display; ! turn fn1 off/on TYPE DISCRETE ; VALUES Off,On; INITIAL Off; SET ACTIONS; !OUTPUT Fn1_display TABLE ":BLAN ",":VIEW "; !OUTPUT STRING "FUNC1;"; FLUSH ; OUTPUT Fn1_display TABLE ":FUNC1:DISP OFF",":FUNC1:DISP ON" ; !GET Fn1_display ; flush ; output string ";*WAI" ; output string ";*CLS;*SRE 32;*ESE 1"; flush; output string "*OPC"; flush ; ! *OPC - does the setting of bit if livemode then; wait spoll bit 5; end if; SELECT Fn1_display ; CASE On ; GET Fn1_hoz_pos ; GET Fn1_hoz_range ; GET Fn1_offset; !can't be coupled actions because needed by waveform GET Fn1_range; GET VMIN_FN1; GET VMAX_FN1; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2; CASE Off ; END SELECT ; END ACTIONS; ! check it out - a whole lot of get and panel set actions to be incl PANEL SET ACTIONS; IF FN1_DISPLAY THEN; GET WF_FUNC1; END IF; END ACTIONS; GET ACTIONS ; OUTPUT STRING ":FUNC1:DISP?" ; ENTER Fn1_display FORMAT K ; END ACTIONS ; END COMPONENT; COMPONENT Fn1_operand1 NOERRCHECK; ! CAUTION - do not change order of discrete comps TYPE DISCRETE ; VALUES Channel1, Channel2, Channel3, Channel4,WM1,WM2,WM3,WM4,CONST; INITIAL Channel1; PANEL SET ACTIONS ; SET UNITS_FN1_DISP ; FETCH Function1 ; FETCH 12 ; EQ ; ! Fetch ( Function1 ) FFtm ; IF STACK THEN ; GOSUB Get_FFT1_Ranges ; END IF ; FETCH Fn1_operand1 ; FETCH (Fn1_operand1) CONST ; EQ ; IF STACK THEN ; SHOW Fn1_constant_1 ; SHOW Fn1_constant_text ; ELSE ; HIDE Fn1_constant_1 ; FETCH Fn1_operand2 ; FETCH 8 ; EQ ; IF STACK THEN ; SHOW Fn1_constant_text ; ELSE ; HIDE Fn1_constant_text ; END IF ; END IF ; END ACTIONS ; END COMPONENT; COMPONENT Fn1_operand2 NOERRCHECK; ! CAUTION - do not change order of discrete comps TYPE DISCRETE ; VALUES Channel1, Channel2, Channel3, Channel4,WM1,WM2,WM3,WM4,CONST; INITIAL Channel1; PANEL SET ACTIONS ; SET UNITS_FN1_DISP ; FETCH Fn1_operand2 ; FETCH (Fn1_operand2) CONST ; EQ ; IF STACK THEN ; SHOW Fn1_constant_2 ; SHOW Fn1_constant_text ; ELSE ; HIDE Fn1_constant_2 ; FETCH Fn1_operand1 ; FETCH (Fn1_operand1) CONST ; EQ ; IF STACK THEN ; SHOW Fn1_constant_text ; ELSE ; HIDE Fn1_constant_text ; END IF ; END IF ; END ACTIONS ; END COMPONENT; COMPONENT Fn1_Constant1 ; TYPE CONTINUOUS ; INITIAL 0 ; END COMPONENT ; COMPONENT Fn1_Constant2 CLONE Fn1_Constant1 ; COMPONENT Function1 NOERRCHECK; ! FFT - check it out TYPE DISCRETE ; VALUES '+','-','*','/',Invert,Integrate,Differentiate,Max,Min,Magnify,Versus,FFTm; ! check it out - more discrete comps in Jay's driver INITIAL Magnify ; PANEL SET ACTIONS; SELECT Function1; ! only '+', '-' and Versus values have two operands. CASE '+'; SHOW Function1,Fn1_operand_panel; HIDE Function1,Fn1_FFTFn_Panel; CASE '-'; SHOW Function1,Fn1_operand_panel; HIDE Function1,Fn1_FFTFn_Panel; CASE '*'; SHOW Function1,Fn1_operand_panel; HIDE Function1,Fn1_FFTFn_Panel; CASE '/'; SHOW Function1,Fn1_operand_panel; CASE Versus; SHOW Function1,Fn1_operand_panel; HIDE Function1,Fn1_FFTFn_Panel; CASE FFTm; HIDE Function1,Fn1_operand_panel; !hide the second operand SHOW Function1,Fn1_FFTFn_Panel; GOSUB Get_FFT1_Ranges ; CASE ELSE; HIDE Function1,Fn1_operand_panel; !hide the second operand HIDE Function1,Fn1_FFTFn_Panel; END SELECT; END ACTIONS; END COMPONENT; COMPONENT Fn1_range; TYPE CONTINUOUS ; VALUES RANGE 100E-18,10E+15; !,0.001E-3; ! takes care of all possible values INITIAL 8E+00; COUPLED VMIN_FN1,VMAX_FN1,Fn1_range,Fn1_ver_tracking, VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2 ; ! Fn1_offset; SET ACTIONS; FETCH Fn1_range; FETCH 8; MUL; OUTPUT STACK FORMAT '":FUNC1:RANG ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FUNC1:RANG?"; ENTER STACK FORMAT K; FETCH 8; DIV; STORE Fn1_range; END ACTIONS; END COMPONENT; COMPONENT Fn1_offset; TYPE CONTINUOUS ; VALUES RANGE -10E15,10E15; ! 0.125E-3; ! all possible values INITIAL 0.0; COUPLED VMIN_FN1,VMAX_FN1,Fn1_ver_tracking, VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2; ! ,Fn1_offset; SET ACTIONS; OUTPUT Fn1_offset FORMAT '":FUNC1:OFFS ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FUNC1:OFFS?"; ENTER Fn1_offset FORMAT K; END ACTIONS; END COMPONENT; COMPONENT Fn1_hoz_tracking ; TYPE DISCRETE ; VALUES TSOURCE,MANUAL ; INITIAL TSOURCE ; COUPLED Fn1_hoz_range, Fn1_hoz_pos,MARKER_X1_MIN,MARKER_X1_MAX,MARKER_X2_MIN,MARKER_X2_MAX ; SET ACTIONS ; OUTPUT Fn1_hoz_tracking TABLE ":FUNC1:HOR TSO",":FUNC1:HOR MAN" ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":FUNC1:HOR?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "TSO" ; FETCH (Fn1_hoz_tracking) TSOURCE ; CASE "MAN" ; FETCH (Fn1_hoz_tracking) MANUAL ; CASE ELSE ; FETCH Fn1_hoz_tracking ; NOTIFY "BAD CASE IN Fn1_hoz_tracking" ; END SELECT ; STORE Fn1_hoz_tracking ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT Fn1_hoz_pos ; TYPE CONTINUOUS ; VALUES RANGE -1E+12,1E+12; INITIAL 0; COUPLED Fn1_hoz_tracking ,MARKER_X1_MIN,MARKER_X1_MAX,MARKER_X2_MIN,MARKER_X2_MAX; SET ACTIONS; OUTPUT Fn1_hoz_pos FORMAT '":FUNC1:HOR:POS ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FUNC1:HOR:POS?" ; ENTER Fn1_hoz_pos FORMAT K; END ACTIONS; END COMPONENT; COMPONENT Fn1_hoz_range ; TYPE CONTINUOUS ; VALUES RANGE 1E-12,1E+12; INITIAL 100; COUPLED Fn1_hoz_tracking,MARKER_X1_MIN,MARKER_X1_MAX,MARKER_X2_MIN,MARKER_X2_MAX ; SET ACTIONS; FETCH Fn1_hoz_range; FETCH 10; MUL; OUTPUT STACK FORMAT '":FUNC1:HOR:RANG ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FUNC1:HOR:RANG?"; ENTER STACK FORMAT K; FETCH 10; DIV; STORE Fn1_hoz_range; END ACTIONS; END COMPONENT; COMPONENT Fn1_ver_tracking ; TYPE DISCRETE ; VALUES TSOURCE,MANUAL ; INITIAL TSOURCE ; COUPLED Fn1_range, Fn1_offset; SET ACTIONS ; OUTPUT Fn1_ver_tracking TABLE ":FUNC1:VERT TSO",":FUNC1:VERT MAN" ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":FUNC1:VERT?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "TSO" ; FETCH (Fn1_ver_tracking) TSOURCE ; CASE "MAN" ; FETCH (Fn1_ver_tracking) MANUAL ; CASE ELSE ; FETCH Fn1_ver_tracking ; NOTIFY "BAD CASE IN Fn1_ver_tracking" ; END SELECT ; STORE Fn1_ver_tracking ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT VMIN_FN1 NOERRCHECK; TYPE CONTINUOUS; INITIAL -640E-3; GET ACTIONS; ! offset-range/2 ... FETCH Fn1_offset; FETCH Fn1_range; FETCH 4; MUL; SUB; STORE VMIN_FN1; END ACTIONS; END COMPONENT; COMPONENT VMAX_FN1 NOERRCHECK; TYPE CONTINUOUS; INITIAL 640E-3; GET ACTIONS; ! offset+range/2 ... FETCH Fn1_offset; FETCH Fn1_range; FETCH 4 ; MUL; ADD ; STORE VMAX_FN1; END ACTIONS; END COMPONENT; COMPONENT Define_function1 NOTSAVED; TYPE INTEGER; !coupled Fn1_range,Fn1_offset,VMIN_FN1,VMAX_FN1; SET ACTIONS; OUTPUT STRING ":FUNC1:"; OUTPUT Function1 TABLE "ADD ","SUBT ","MULT ","DIV ","INV ","INT ","DIFF ","MAX ","MIN ","MAGN ", "VERS ","FFTM "; SELECT Fn1_Operand1 ; CASE CONST ; OUTPUT Fn1_Constant1 FORMAT K ; CASE ELSE ; OUTPUT Fn1_Operand1 TABLE "CHAN1","CHAN2","CHAN3","CHAN4", "WMEM1","WMEM2","WMEM3","WMEM4",""; END SELECT ; SELECT Function1; CASE Magnify; CASE Integrate ; CASE Differentiate ; CASE Invert ; CASE Max; CASE Min; CASE FFTm ; CASE ELSE; ! for +,- and Vs, send the 2nd operand also SELECT Fn1_Operand2 ; CASE CONST ; OUTPUT Fn1_Constant2 FORMAT '",",K' ; CASE ELSE ; OUTPUT Fn1_operand2 TABLE ",CHAN1",",CHAN2",",CHAN3",",CHAN4", ",WMEM1",",WMEM2",",WMEM3",",WMEM4",""; END SELECT ; END SELECT; flush ; OUTPUT STRING ";*WAI" ; output string ";*CLS;*SRE 32;*ESE 1"; flush; output string "*OPC"; flush ; ! *OPC - does the setting of bit if livemode then; wait spoll bit 5; end if; !can't be coupled actions because needed by waveform GET Fn1_hoz_pos ; GET Fn1_hoz_range ; GET Fn1_offset; GET Fn1_range; GET VMIN_FN1; GET VMAX_FN1; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2; END ACTIONS; PANEL SET ACTIONS; SET UNITS_FN1_DISP ; SET X_AXIS_UNITS ; IF FN1_DISPLAY THEN; GET WF_FUNC1; END IF; END ACTIONS; END COMPONENT; !************************************************************************ ! FFT Function !************************************************************************ COMPONENT FN1_FFT_Show NOTSAVED NOGEN NOERRCHECK; TYPE DISCRETE; VALUES OFF ON; INITIAL OFF; PANEL SET ACTIONS; SELECT FN1_FFT_Show; CASE OFF; HIDE Function1,FFT1_Controls; SHOW Function1,FN1_Norm_ctrls; CASE ON; HIDE Function1,FN1_Norm_ctrls; SHOW Function1,FFT1_Controls; END SELECT; END ACTIONS; END COMPONENT; COMPONENT FFT1_Magnify; TYPE DISCRETE; VALUES OFF ON; INITIAL OFF; SET ACTIONS; OUTPUT FFT1_Magnify TABLE "FUNC1:FFT:MAGN OFF" "FUNC1:FFT:MAGN ON"; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC1:FFT:MAGN?"; ENTER FFT1_Magnify format K; END ACTIONS; END COMPONENT; COMPONENT FFT1_MSpan; TYPE CONTINUOUS; !VALUES RANGE ???????; INITIAL INVALID; COUPLED FFT1_MSpan,FFT1_Center_freq,FFT1_Span,FFT1_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT1_Span FORMAT '"FUNC1:FFT:MSPAN ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC1:FFT:MSPAN?"; ENTER FFT1_MSpan FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT1_Center_freq; TYPE CONTINUOUS; !VALUES RANGE 0 FFT1_Max_cf; INITIAL INVALID; COUPLED FFT1_MSpan,FFT1_Center_freq,FFT1_Span,FFT1_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT1_Center_freq FORMAT '"FUNC1:FFT:FREQ ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC1:FFT:FREQ?"; ENTER FFT1_Center_freq FORMAT K; END ACTIONS; END COMPONENT; ACTIONS Get_FFT1_Ranges ; ! Plug_in values EMPTY,HP54711A,HP54712A,HP54713A,HP54721A; ! VALUES Channel1, Channel2, Channel3, Channel4,WM1,WM2,WM3,WM4,CONST; SELECT Fn1_operand1 ; CASE Channel1 ; FETCH Plug_in1 ; GOSUB FFT1_Plug_In ; CASE Channel2 ; FETCH Plug_in2 ; GOSUB FFT1_Plug_In ; CASE Channel3 ; FETCH Plug_in3 ; GOSUB FFT1_Plug_In ; CASE Channel4 ; FETCH Plug_in4 ; GOSUB FFT1_Plug_In ; CASE ELSE ; END SELECT ; END ACTIONS ; ACTIONS FFT1_Plug_In ; ! Plug_in values EMPTY,HP54711A,HP54712A,HP54713A,HP54721A; SELECT STACK ; CASE 0 ; CASE 1 ; GOSUB Get_FFT1_Range_11A ; CASE 2 ; GOSUB Get_FFT1_Range_12A ; CASE 3 ; GOSUB Get_FFT1_Range_13A ; CASE 4 ; GOSUB Get_FFT1_Range_21A ; CASE 5 ; GOSUB Get_FFT1_Range_22A ; CASE ELSE ; END SELECT ; END ACTIONS ; ACTIONS Get_FFT1_Range_11A ; FETCH 1E+9 ; STORE Max_FFT1_Span ; END ACTIONS ; ACTIONS Get_FFT1_Range_12A ; FETCH 1E+9 ; STORE Max_FFT1_Span ; END ACTIONS ; ACTIONS Get_FFT1_Range_13A ; FETCH 1E+9 ; STORE Max_FFT1_Span ; END ACTIONS ; ACTIONS Get_FFT1_Range_21A ; FETCH 2E+9 ; STORE Max_FFT1_Span ; END ACTIONS ; ACTIONS Get_FFT1_Range_22A ; FETCH 4E+9 ; STORE Max_FFT1_Span ; END ACTIONS ; COMPONENT Max_FFT1_Span ; TYPE CONTINUOUS ; END COMPONENT ; COMPONENT FFT1_Span; TYPE CONTINUOUS; VALUES RANGE 50,Max_FFT1_Span; INITIAL INVALID; COUPLED FFT1_MSpan,FFT1_Center_freq,FFT1_Span,FFT1_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT1_Span FORMAT '"FUNC1:FFT:SPAN ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC1:FFT:SPAN?"; ENTER FFT1_Span FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT1_Resolution; TYPE CONTINUOUS; !VALUES RANGE 5,500E6; INITIAL INVALID; COUPLED FFT1_MSpan,FFT1_Center_freq,FFT1_Span,FFT1_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT1_Resolution FORMAT '"FUNC1:FFT:RES ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC1:FFT:RES?"; ENTER FFT1_Resolution FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT1_Window; TYPE DISCRETE; VALUES Rect, Hanning, Flattop; INITIAL Hanning; SET Actions; OUTPUT STRING "FUNC1:FFT:WIND "; OUTPUT FFT1_Window TABLE "RECT" "HANN" "FLAT"; END ACTIONS; GET Actions; OUTPUT STRING "FUNC1:FFT:WIND?"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "RECT"; FETCH (FFT1_Window)Rect; CASE "HANN"; FETCH (FFT1_Window)Hanning; CASE "FLAT"; FETCH (FFT1_Window)Flattop; CASE ELSE; FETCH FFT1_Window; END SELECT; STORE FFT1_Window; END ACTIONS; END COMPONENT; !**************************** Function 1 FFT components *************** ! This has to be done after instrument arrives - take Jay's help !************************************************************************ COMPONENT Fn2_display; ! turn fn2 off/on TYPE DISCRETE ; VALUES Off,On; INITIAL Off; SET ACTIONS; !OUTPUT Fn2_display TABLE ":BLAN ",":VIEW "; !OUTPUT STRING "FUNC2;"; FLUSH ; OUTPUT Fn2_display TABLE ":FUNC2:DISP OFF",":FUNC2:DISP ON" ; !GET Fn2_display ; flush ; output string ";*WAI" ; output string ";*CLS;*SRE 32;*ESE 1"; flush; output string "*OPC"; flush ; ! *OPC - does the setting of bit if livemode then; wait spoll bit 5; end if; SELECT Fn2_display ; CASE On ; GET Fn2_offset; !can't be coupled actions because needed by waveform GET Fn2_range; GET Fn2_hoz_range ; GET Fn2_hoz_pos ; GET VMIN_FN2; GET VMAX_FN2; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2; CASE Off ; END SELECT ; END ACTIONS; PANEL SET ACTIONS; IF FN2_DISPLAY THEN; GET WF_FUNC2; END IF; END ACTIONS; GET ACTIONS ; OUTPUT STRING ":FUNC2:DISP?" ; ENTER Fn2_display FORMAT K ; END ACTIONS ; END COMPONENT; COMPONENT Function2 NOERRCHECK; TYPE DISCRETE ; VALUES '+','-','*','/',Invert,Integrate,Differentiate,Max,Min,Magnify,Versus,FFTm; INITIAL Magnify; PANEL SET ACTIONS; SELECT Function2; CASE '+'; HIDE Function2,Fn2_FFTFn_Panel; SHOW Function2,Fn2_operand_panel; CASE '-'; HIDE Function2,Fn2_FFTFn_Panel; SHOW Function2,Fn2_operand_panel; CASE '*'; HIDE Function2,Fn2_FFTFn_Panel; SHOW Function2,Fn2_operand_panel; CASE '/'; HIDE Function2,Fn2_FFTFn_Panel; SHOW Function2,Fn2_operand_panel; CASE Versus; HIDE Function2,Fn2_FFTFn_Panel; SHOW Function2,Fn2_operand_panel; CASE FFTm; HIDE Function2,Fn2_operand_panel; !hide the second operand SHOW Function2,Fn2_FFTFn_Panel; GOSUB Get_FFT2_Ranges ; CASE ELSE; HIDE Function2,Fn2_FFTFn_Panel; HIDE Function2,Fn2_operand_panel; END SELECT; END ACTIONS; END COMPONENT; COMPONENT Fn2_operand1 NOERRCHECK; ! CAUTION - do not change order of discrete comps TYPE DISCRETE ; VALUES Channel1, Channel2, Channel3, Channel4,Func1,WM1,WM2,WM3,WM4,CONST; INITIAL Channel1; PANEL SET ACTIONS ; SET UNITS_FN2_DISP ; FETCH Function2 ; FETCH 12 ; EQ ; ! Fetch ( Function1 ) FFtm ; IF STACK THEN ; GOSUB Get_FFT2_Ranges ; END IF ; FETCH Fn2_operand1 ; FETCH (Fn2_operand1) CONST ; EQ ; IF STACK THEN ; SHOW Fn2_constant_1 ; SHOW Fn2_constant_text ; ELSE ; HIDE Fn2_constant_1 ; FETCH Fn2_operand2 ; FETCH 8 ; EQ ; IF STACK THEN ; SHOW Fn2_constant_text ; ELSE ; HIDE Fn2_constant_text ; END IF ; END IF ; END ACTIONS ; END COMPONENT; COMPONENT Fn2_operand2 NOERRCHECK; ! CAUTION - do not change order of discrete comps TYPE DISCRETE ; VALUES Channel1, Channel2, Channel3, Channel4,Func1,WM1,WM2,WM3,WM4,CONST; INITIAL Channel1; PANEL SET ACTIONS ; SET UNITS_FN2_DISP ; FETCH Fn2_operand2 ; FETCH (Fn2_operand2) CONST ; EQ ; IF STACK THEN ; SHOW Fn2_constant_2 ; SHOW Fn2_constant_text ; ELSE ; HIDE Fn2_constant_2 ; FETCH Fn2_operand1 ; FETCH (Fn2_operand1) CONST ; EQ ; IF STACK THEN ; SHOW Fn2_constant_text ; ELSE ; HIDE Fn2_constant_text ; END IF ; END IF ; END ACTIONS ; END COMPONENT; COMPONENT Fn2_Constant1 CLONE Fn1_Constant1 ; COMPONENT Fn2_Constant2 CLONE Fn1_Constant1 ; COMPONENT Fn2_range; TYPE CONTINUOUS ; VALUES RANGE 100E-18,10E+15; !,0.001E-3; ! takes care of all possible values INITIAL 8E+00; COUPLED VMIN_FN2,VMAX_FN2,Fn2_range,Fn2_ver_tracking, VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2; !,Fn2_offset; SET ACTIONS; FETCH Fn2_range; FETCH 8; MUL; OUTPUT STACK FORMAT '":FUNC2:RANG ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FUNC2:RANG?"; ENTER STACK FORMAT K; FETCH 8; DIV; STORE Fn2_range; END ACTIONS; END COMPONENT; COMPONENT Fn2_offset; TYPE CONTINUOUS ; VALUES RANGE -10E15,10E15; ! 0.125E-3; ! all possible values INITIAL 0.0; COUPLED VMIN_FN2,VMAX_FN2,Fn2_offset,Fn2_ver_tracking, VMIN_MSMT1,VMIN_MSMT2,VMAX_MSMT1,VMAX_MSMT2; SET ACTIONS; OUTPUT Fn2_offset FORMAT '":FUNC2:OFFS ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FUNC2:OFFS?"; ENTER Fn2_offset FORMAT K; END ACTIONS; END COMPONENT; COMPONENT Fn2_hoz_tracking ; TYPE DISCRETE ; VALUES TSOURCE,MANUAL ; INITIAL TSOURCE ; COUPLED Fn2_hoz_pos, Fn2_hoz_range ,MARKER_X1_MIN,MARKER_X1_MAX,MARKER_X2_MIN,MARKER_X2_MAX; SET ACTIONS ; OUTPUT Fn2_hoz_tracking TABLE ":FUNC2:HOR TSO",":FUNC2:HOR MAN" ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":FUNC2:HOR?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "TSO" ; FETCH (Fn2_hoz_tracking) TSOURCE ; CASE "MAN" ; FETCH (Fn2_hoz_tracking) MANUAL ; CASE ELSE ; FETCH Fn2_hoz_tracking ; NOTIFY "BAD CASE IN Fn2_hoz_tracking" ; END SELECT ; STORE Fn2_hoz_tracking ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT Fn2_hoz_pos ; TYPE CONTINUOUS ; VALUES RANGE -1E+12,1E+12; INITIAL 0; COUPLED Fn2_hoz_tracking,MARKER_X1_MIN,MARKER_X1_MAX,MARKER_X2_MIN,MARKER_X2_MAX ; SET ACTIONS; OUTPUT Fn2_hoz_pos FORMAT '":FUNC2:HOR:POS ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FUNC2:HOR:POS?" ; ENTER Fn2_hoz_pos FORMAT K; END ACTIONS; END COMPONENT; COMPONENT Fn2_hoz_range ; TYPE CONTINUOUS ; VALUES RANGE 1E-12,1E+12; INITIAL 100; COUPLED Fn2_hoz_tracking,MARKER_X1_MIN,MARKER_X1_MAX,MARKER_X2_MIN,MARKER_X2_MAX ; SET ACTIONS; FETCH Fn2_hoz_range; FETCH 10; MUL; OUTPUT STACK FORMAT '":FUNC2:HOR:RANG ",K'; END ACTIONS; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS; OUTPUT STRING ":FUNC2:HOR:RANG?"; ENTER STACK FORMAT K; FETCH 10; DIV; STORE Fn2_hoz_range; END ACTIONS; END COMPONENT; COMPONENT Fn2_ver_tracking ; TYPE DISCRETE ; VALUES TSOURCE,MANUAL ; INITIAL TSOURCE ; COUPLED Fn2_range, Fn2_offset ; SET ACTIONS ; OUTPUT Fn2_ver_tracking TABLE ":FUNC2:VERT TSO",":FUNC2:VERT MAN" ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":FUNC2:VERT?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "TSO" ; FETCH (Fn2_ver_tracking) TSOURCE ; CASE "MAN" ; FETCH (Fn2_ver_tracking) MANUAL ; CASE ELSE ; FETCH Fn2_ver_tracking ; NOTIFY "BAD CASE IN Fn2_ver_tracking" ; END SELECT ; STORE Fn2_ver_tracking ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT VMIN_FN2 NOERRCHECK; TYPE CONTINUOUS; INITIAL -640E-3; GET ACTIONS; ! offset-range/2 ... FETCH Fn2_offset; FETCH Fn2_range; FETCH 4; MUL; SUB; STORE VMIN_FN2; END ACTIONS; END COMPONENT; COMPONENT VMAX_FN2 NOERRCHECK; TYPE CONTINUOUS; INITIAL 640E-3; GET ACTIONS; ! offset+range/2 ... FETCH Fn2_offset; FETCH Fn2_range; FETCH 4 ; MUL; ADD; STORE VMAX_FN2; END ACTIONS; END COMPONENT; COMPONENT Define_function2 NOTSAVED; TYPE INTEGER; !coupled Fn2_range,Fn2_offset,VMIN_FN2,VMAX_FN2; SET ACTIONS; OUTPUT STRING ":FUNC2:"; OUTPUT Function2 TABLE "ADD ","SUBT ","MULT ","DIV ","INV ","INT ","DIFF ","MAX ","MIN ","MAGN ","VERS ","FFTM "; SELECT Fn2_Operand1 ; CASE CONST ; OUTPUT Fn2_Constant1 FORMAT K ; CASE ELSE ; OUTPUT Fn2_Operand1 TABLE "CHAN1","CHAN2","CHAN3","CHAN4","FUNC1", "WMEM1","WMEM2","WMEM3","WMEM4",""; END SELECT ; SELECT Function2; CASE Magnify; CASE Integrate ; CASE Differentiate ; CASE Invert ; CASE Max; CASE Min; CASE FFTm; CASE ELSE; ! for +,- and Vs, send the 2nd operand also SELECT Fn2_Operand2 ; CASE CONST ; OUTPUT Fn2_Constant2 FORMAT '",",K' ; CASE ELSE ; OUTPUT Fn2_operand2 TABLE ",CHAN1",",CHAN2",",CHAN3",",CHAN4",",FUNC1", ",WMEM1",",WMEM2",",WMEM3",",WMEM4",""; END SELECT ; END SELECT; flush ; output string ";*WAI" ; output string ";*CLS;*SRE 32;*ESE 1"; flush; output string "*OPC"; flush ; ! *OPC - does the setting of bit if livemode then; wait spoll bit 5; end if; !can't be coupled actions because needed by waveform GET Fn2_offset; GET Fn2_range ; GET Fn2_hoz_pos ; GET Fn2_hoz_range ; GET VMIN_FN2; GET VMAX_FN2; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2; END ACTIONS; PANEL SET ACTIONS; SET UNITS_FN2_DISP ; SET X_AXIS_UNITS ; IF FN2_DISPLAY THEN; GET WF_FUNC2; END IF; END ACTIONS; END COMPONENT; !************************************************************************ ! FFT Function !************************************************************************ COMPONENT FN2_FFT_Show NOTSAVED NOGEN NOERRCHECK; TYPE DISCRETE; VALUES OFF ON; INITIAL OFF; PANEL SET ACTIONS; SELECT FN2_FFT_Show; CASE OFF; HIDE Function2,FFT2_Controls; SHOW Function2,FN2_Norm_ctrls; CASE ON; HIDE Function2,FN2_Norm_ctrls; SHOW Function2,FFT2_Controls; END SELECT; END ACTIONS; END COMPONENT; COMPONENT FFT2_Magnify; TYPE DISCRETE; VALUES OFF ON; INITIAL OFF; SET ACTIONS; OUTPUT FFT2_Magnify TABLE "FUNC2:FFT:MAGN OFF" "FUNC2:FFT:MAGN ON"; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC2:FFT:MAGN?"; ENTER FFT2_Magnify format K; END ACTIONS; END COMPONENT; COMPONENT FFT2_MSpan; TYPE CONTINUOUS; !VALUES RANGE ???????; INITIAL INVALID; COUPLED FFT2_MSpan,FFT2_Center_freq,FFT2_Span,FFT2_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT2_Span FORMAT '"FUNC2:FFT:MSPAN ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC2:FFT:MSPAN?"; ENTER FFT2_MSpan FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT2_Center_freq; TYPE CONTINUOUS; !VALUES RANGE 0 FFT1_Max_cf; INITIAL INVALID; COUPLED FFT2_MSpan,FFT2_Center_freq,FFT2_Span,FFT2_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT2_Center_freq FORMAT '"FUNC2:FFT:FREQ ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC2:FFT:FREQ?"; ENTER FFT2_Center_freq FORMAT K; END ACTIONS; END COMPONENT; ACTIONS Get_FFT2_Ranges ; ! Plug_in values EMPTY,HP54711A,HP54712A,HP54713A,HP54721A; ! VALUES Channel1, Channel2, Channel3, Channel4,WM1,WM2,WM3,WM4,CONST; SELECT Fn2_operand2 ; CASE Channel1 ; FETCH Plug_in1 ; GOSUB FFT2_Plug_In ; CASE Channel2 ; FETCH Plug_in2 ; GOSUB FFT2_Plug_In ; CASE Channel3 ; FETCH Plug_in3 ; GOSUB FFT2_Plug_In ; CASE Channel4 ; FETCH Plug_in4 ; GOSUB FFT2_Plug_In ; CASE ELSE ; END SELECT ; END ACTIONS ; ACTIONS FFT2_Plug_In ; ! Plug_in values EMPTY,HP54711A,HP54712A,HP54713A,HP54721A; SELECT STACK ; CASE 0 ; CASE 1 ; GOSUB Get_FFT2_Range_11A ; CASE 2 ; GOSUB Get_FFT2_Range_12A ; CASE 3 ; GOSUB Get_FFT2_Range_13A ; CASE 4 ; GOSUB Get_FFT2_Range_21A ; CASE ELSE ; END SELECT ; END ACTIONS ; ACTIONS Get_FFT2_Range_11A ; FETCH 1E+9 ; STORE Max_FFT2_Span ; END ACTIONS ; ACTIONS Get_FFT2_Range_12A ; FETCH 1E+9 ; STORE Max_FFT2_Span ; END ACTIONS ; ACTIONS Get_FFT2_Range_13A ; FETCH 1E+9 ; STORE Max_FFT2_Span ; END ACTIONS ; ACTIONS Get_FFT2_Range_21A ; FETCH 2E+9 ; STORE Max_FFT2_Span ; END ACTIONS ; COMPONENT Max_FFT2_Span ; TYPE CONTINUOUS ; END COMPONENT ; COMPONENT FFT2_Span; TYPE CONTINUOUS; VALUES RANGE 50,Max_FFT2_Span; INITIAL INVALID; COUPLED FFT2_MSpan,FFT2_Center_freq,FFT2_Span,FFT2_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT2_Span FORMAT '"FUNC2:FFT:SPAN ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC2:FFT:SPAN?"; ENTER FFT2_Span FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT2_Resolution; TYPE CONTINUOUS; !VALUES RANGE 5,500E6; INITIAL INVALID; COUPLED FFT2_MSpan,FFT2_Center_freq,FFT2_Span,FFT2_Resolution; SET ACTIONS; GOSUB Set_Display_Ready_Bit ; OUTPUT FFT2_Resolution FORMAT '"FUNC2:FFT:RES ",K'; GOSUB Get_Display_Ready_Bit ; END ACTIONS; GET ACTIONS; OUTPUT STRING "FUNC2:FFT:RES?"; ENTER FFT2_Resolution FORMAT K; END ACTIONS; END COMPONENT; COMPONENT FFT2_Window; TYPE DISCRETE; VALUES Rect, Hanning, Flattop; INITIAL Hanning; SET Actions; OUTPUT STRING "FUNC2:FFT:WIND "; OUTPUT FFT2_Window TABLE "RECT" "HANN" "FLAT"; END ACTIONS; GET Actions; OUTPUT STRING "FUNC2:FFT:WIND?"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "RECT"; FETCH (FFT2_Window)Rect; CASE "HANN"; FETCH (FFT2_Window)Hanning; CASE "FLAT"; FETCH (FFT2_Window)Flattop; CASE ELSE; FETCH FFT2_Window; END SELECT; STORE FFT2_Window; END ACTIONS; END COMPONENT; COMPONENT UNITS_FN1_DISP ; ! check it out - get a better algorithm TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN,DB ; INITIAL VOLT ; SET ACTIONS ; FETCH (Function1) FFTm ; FETCH Function1 ; EQ ; IF STACK THEN ; FETCH (UNITS_FN1_DISP ) DB ; STORE UNITS_FN1_DISP ; ELSE ; SELECT Fn1_operand1 ; CASE Channel1 ; FETCH UNITS_CH1_DISP ; CASE Channel2 ; FETCH UNITS_CH2_DISP ; CASE Channel3 ; FETCH UNITS_CH3_DISP ; CASE Channel4 ; FETCH UNITS_CH4_DISP ; CASE WM1 ; FETCH UNITS_WM1_DISP ; CASE WM2 ; FETCH UNITS_WM2_DISP ; CASE WM3 ; FETCH UNITS_WM3_DISP ; CASE WM4 ; FETCH UNITS_WM4_DISP ; CASE CONST; SELECT Function1 ; CASE '+' ; GOSUB Get_Units_Fn1_Operand2 ; CASE '-' ; GOSUB Get_Units_Fn1_Operand2 ; CASE '/' ; GOSUB Get_Units_Fn1_Operand2 ; CASE '*' ; GOSUB Get_Units_Fn1_Operand2 ; CASE Versus ; GOSUB Get_Units_Fn1_Operand2 ; CASE ELSE ; FETCH UNITS_FN1_DISP ; END SELECT ; END SELECT ; STORE UNITS_FN1_DISP ; END IF ; END ACTIONS ; END COMPONENT ; ACTIONS Get_Units_Fn1_Operand2 ; SELECT Fn1_operand2 ; CASE Channel1 ; FETCH UNITS_CH1_DISP ; CASE Channel2 ; FETCH UNITS_CH2_DISP ; CASE Channel3 ; FETCH UNITS_CH3_DISP ; CASE Channel4 ; FETCH UNITS_CH4_DISP ; CASE WM1 ; FETCH UNITS_WM1_DISP ; CASE WM2 ; FETCH UNITS_WM2_DISP ; CASE WM3 ; FETCH UNITS_WM3_DISP ; CASE WM4 ; FETCH UNITS_WM4_DISP ; CASE CONST; FETCH UNITS_FN1_DISP ; END SELECT ; END ACTIONS ; COMPONENT Fn1_store_wm1 notsaved; TYPE integer; set actions; if Fn1_display then; ! otherwise instrument does not save - what peculiarities !! !output string ":STORE:WAV FUNC1,WMEM1"; ! GOK what purpose this serves !! OUTPUT STRING ":WMEM1:SAVE FUNC1" ; FETCH 1 ; STORE WM1_OK ; get X_INC; fetch X_INC; store XINC_WM1; get X_MIN; fetch X_MIN; store XMIN_WM1; FETCH VMIN_FN1; STORE VMIN_WM1; FETCH VMAX_FN1; STORE VMAX_WM1; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM1 THEN; ! get wf_WM1; !end if; FETCH (SOURCE_WM1)FUNC1; STORE SOURCE_WM1; FETCH UNITS_FN1_DISP ; STORE UNITS_WM1_DISP ; SELECT Function1 ; CASE FFTm ; FETCH 1 ; STORE WM1_X_Axis_Units ; CASE ELSE ; FETCH 0 ; STORE WM1_X_Axis_Units ; END SELECT ; FETCH Fn1_hoz_range ;STORE WM1_TIME_SENS ; FETCH Fn1_hoz_pos ; STORE WM1_TIME_DELAY ; FETCH TIME_REF ; STORE WM1_TIME_REF ; FETCH Fn1_range ; STORE WM1_SENS ; FETCH Fn1_offset ; STORE WM1_OFFSET ; else; if panelmode then; notify "Must turn ON the Function Display"; end if; end if; end actions; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM1; IF VIEW_WF_WM1 THEN ; GET WF_WM1; END IF ; END ACTIONS; END COMPONENT; COMPONENT Fn1_store_wm2 notsaved; TYPE integer; set actions; if Fn1_display then; !output string ":STORE:WAV FUNC1,WMEM2"; OUTPUT STRING ":WMEM2:SAVE FUNC1" ; FETCH 1 ; STORE WM2_OK ; get X_INC; fetch X_INC; store XINC_WM2; get X_MIN; fetch X_MIN; store XMIN_WM2; FETCH VMIN_FN1; STORE VMIN_WM2; FETCH VMAX_FN1; STORE VMAX_WM2; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM2 THEN; ! get wf_WM2; !end if; FETCH (SOURCE_WM2)FUNC1; STORE SOURCE_WM2; FETCH UNITS_FN1_DISP ; STORE UNITS_WM2_DISP ; SELECT Function1 ; CASE FFTm ; FETCH 1 ; STORE WM2_X_Axis_Units ; CASE ELSE ; FETCH 0 ; STORE WM2_X_Axis_Units ; END SELECT ; FETCH Fn1_hoz_range ;STORE WM2_TIME_SENS ; FETCH Fn1_hoz_pos ; STORE WM2_TIME_DELAY ; FETCH TIME_REF ; STORE WM2_TIME_REF ; FETCH Fn1_range ; STORE WM2_SENS ; FETCH Fn1_offset ; STORE WM2_OFFSET ; else; if panelmode then; notify "Must turn ON the Function Display"; end if; end if; end actions; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM2; IF VIEW_WF_WM2 THEN ; GET WF_WM2; END IF ; END ACTIONS; END COMPONENT; COMPONENT Fn1_store_wm3 notsaved; TYPE integer; set actions; if Fn1_display then; !output string ":STORE:WAV FUNC1,WMEM3"; OUTPUT STRING ":WMEM3:SAVE FUNC1" ; FETCH 1 ; STORE WM3_OK ; get X_INC; fetch X_INC; store XINC_WM3; get X_MIN; fetch X_MIN; store XMIN_WM3; FETCH VMIN_FN1; STORE VMIN_WM3; FETCH VMAX_FN1; STORE VMAX_WM3; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM3 THEN; ! get wf_WM3; !end if; FETCH (SOURCE_WM3)FUNC1; STORE SOURCE_WM3; FETCH UNITS_FN1_DISP ; STORE UNITS_WM3_DISP ; SELECT Function1 ; CASE FFTm ; FETCH 1 ; STORE WM3_X_Axis_Units ; CASE ELSE ; FETCH 0 ; STORE WM3_X_Axis_Units ; END SELECT ; FETCH Fn1_hoz_range ;STORE WM3_TIME_SENS ; FETCH Fn1_hoz_pos ; STORE WM3_TIME_DELAY ; FETCH TIME_REF ; STORE WM3_TIME_REF ; FETCH Fn1_range ; STORE WM3_SENS ; FETCH Fn1_offset ; STORE WM3_OFFSET ; else; if panelmode then; notify "Must turn ON the Function Display"; end if; end if; end actions; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM3; IF VIEW_WF_WM3 THEN ; GET WF_WM3; END IF ; END ACTIONS; END COMPONENT; COMPONENT Fn1_store_wm4 notsaved; TYPE integer; set actions; if Fn1_display then; !output string ":STORE:WAV FUNC1,WMEM4"; OUTPUT STRING ":WMEM4:SAVE FUNC1" ; FETCH 1 ; STORE WM4_OK ; get X_INC; fetch X_INC; store XINC_WM4; get X_MIN; fetch X_MIN; store XMIN_WM4; FETCH VMIN_FN1; STORE VMIN_WM4; FETCH VMAX_FN1; STORE VMAX_WM4; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM1 THEN; ! get wf_WM4; !end if; FETCH (SOURCE_WM4)FUNC1; STORE SOURCE_WM4; FETCH UNITS_FN1_DISP ; STORE UNITS_WM4_DISP ; SELECT Function1 ; CASE FFTm ; FETCH 1 ; STORE WM4_X_Axis_Units ; CASE ELSE ; FETCH 0 ; STORE WM4_X_Axis_Units ; END SELECT ; FETCH Fn1_hoz_range ;STORE WM4_TIME_SENS ; FETCH Fn1_hoz_pos ; STORE WM4_TIME_DELAY ; FETCH TIME_REF ; STORE WM4_TIME_REF ; FETCH Fn1_range ; STORE WM4_SENS ; FETCH Fn1_offset ; STORE WM4_OFFSET ; else; if panelmode then; notify "Must turn ON the Function Display"; end if; end if; end actions; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM4; IF VIEW_WF_WM4 THEN ; GET WF_WM4; END IF ; END ACTIONS; END COMPONENT; COMPONENT UNITS_FN2_DISP ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN,DB ; INITIAL VOLT ; SET ACTIONS ; FETCH (Function2) FFTm ; FETCH Function2 ; EQ ; IF STACK THEN ; FETCH (UNITS_FN2_DISP ) DB ; STORE UNITS_FN2_DISP ; ELSE ; SELECT Fn2_operand1 ; CASE Channel1 ; FETCH UNITS_CH1_DISP ; CASE Channel2 ; FETCH UNITS_CH2_DISP ; CASE Channel3 ; FETCH UNITS_CH3_DISP ; CASE Channel4 ; FETCH UNITS_CH4_DISP ; CASE Func1 ; FETCH UNITS_FN1_DISP ; CASE WM1 ; FETCH UNITS_WM1_DISP ; CASE WM2 ; FETCH UNITS_WM2_DISP ; CASE WM3 ; FETCH UNITS_WM3_DISP ; CASE WM4 ; FETCH UNITS_WM4_DISP ; CASE CONST; SELECT Function1 ; CASE '+' ; GOSUB Get_Units_Fn2_Operand2 ; CASE '-' ; GOSUB Get_Units_Fn2_Operand2 ; CASE '/' ; GOSUB Get_Units_Fn2_Operand2 ; CASE '*' ; GOSUB Get_Units_Fn2_Operand2 ; CASE Versus ; GOSUB Get_Units_Fn2_Operand2 ; CASE ELSE ; FETCH UNITS_FN2_DISP ; END SELECT ; END SELECT ; STORE UNITS_FN2_DISP ; END IF ; END ACTIONS ; END COMPONENT ; ACTIONS Get_Units_Fn2_Operand2 ; SELECT Fn2_operand2 ; CASE Channel1 ; FETCH UNITS_CH1_DISP ; CASE Channel2 ; FETCH UNITS_CH2_DISP ; CASE Channel3 ; FETCH UNITS_CH3_DISP ; CASE Channel4 ; FETCH UNITS_CH4_DISP ; CASE Func1 ; FETCH UNITS_FN1_DISP ; CASE WM1 ; FETCH UNITS_WM1_DISP ; CASE WM2 ; FETCH UNITS_WM2_DISP ; CASE WM3 ; FETCH UNITS_WM3_DISP ; CASE WM4 ; FETCH UNITS_WM4_DISP ; CASE CONST; FETCH UNITS_FN2_DISP ; END SELECT ; END ACTIONS ; COMPONENT Fn2_store_wm1 notsaved; TYPE integer; set actions; if Fn2_display then; !output string ":STORE:WAV FUNC2,WMEM1"; OUTPUT STRING ":WMEM1:SAVE FUNC2" ; FETCH 1 ; STORE WM1_OK ; get X_INC; fetch X_INC; store XINC_WM1; get X_MIN; fetch X_MIN; store XMIN_WM1; FETCH VMIN_FN2; STORE VMIN_WM1; FETCH VMAX_FN2; STORE VMAX_WM1; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM1 THEN; ! get wf_WM1; !end if; FETCH (SOURCE_WM1)FUNC2; STORE SOURCE_WM1; FETCH UNITS_FN2_DISP ; STORE UNITS_WM1_DISP ; SELECT Function2 ; CASE FFTm ; FETCH 1 ; STORE WM1_X_Axis_Units ; CASE ELSE ; FETCH 0 ; STORE WM1_X_Axis_Units ; END SELECT ; FETCH Fn2_hoz_range ;STORE WM1_TIME_SENS ; FETCH Fn2_hoz_pos ; STORE WM1_TIME_DELAY ; FETCH TIME_REF ; STORE WM1_TIME_REF ; FETCH Fn2_range ; STORE WM1_SENS ; FETCH Fn2_offset ; STORE WM1_OFFSET ; else; if panelmode then; notify "Must turn ON the Function Display"; end if; end if; end actions; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM1; IF VIEW_WF_WM1 THEN ; GET WF_WM1; END IF ; END ACTIONS; END COMPONENT; COMPONENT Fn2_store_wm2 notsaved; TYPE integer; set actions; if Fn2_display then; !output string ":STORE:WAV FUNC2,WMEM2"; OUTPUT STRING ":WMEM2:SAVE FUNC2" ; FETCH 1 ; STORE WM2_OK ; get X_INC; fetch X_INC; store XINC_WM2; get X_MIN; fetch X_MIN; store XMIN_WM2; FETCH VMIN_FN2; STORE VMIN_WM2; FETCH VMAX_FN2; STORE VMAX_WM2; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM2 THEN; ! get wf_WM2; !end if; FETCH (SOURCE_WM2)FUNC2; STORE SOURCE_WM2; FETCH UNITS_FN2_DISP ; STORE UNITS_WM2_DISP ; SELECT Function2 ; CASE FFTm ; FETCH 1 ; STORE WM2_X_Axis_Units ; CASE ELSE ; FETCH 0 ; STORE WM2_X_Axis_Units ; END SELECT ; FETCH Fn2_hoz_range ;STORE WM2_TIME_SENS ; FETCH Fn2_hoz_pos ; STORE WM2_TIME_DELAY ; FETCH TIME_REF ; STORE WM2_TIME_REF ; FETCH Fn2_range ; STORE WM2_SENS ; FETCH Fn2_offset ; STORE WM2_OFFSET ; else; if panelmode then; notify "Must turn ON the Function Display"; end if; end if; end actions; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM2; IF VIEW_WF_WM2 THEN ; GET WF_WM2; END IF ; END ACTIONS; END COMPONENT; COMPONENT Fn2_store_wm3 notsaved; TYPE integer; set actions; if Fn2_display then; !output string ":STORE:WAV FUNC2,WMEM3"; OUTPUT STRING ":WMEM3:SAVE FUNC2" ; FETCH 1 ; STORE WM3_OK ; get X_INC; fetch X_INC; store XINC_WM3; get X_MIN; fetch X_MIN; store XMIN_WM3; FETCH VMIN_FN2; STORE VMIN_WM3; FETCH VMAX_FN2; STORE VMAX_WM3; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM3 THEN; ! get wf_WM3; !end if; FETCH (SOURCE_WM3)FUNC2; STORE SOURCE_WM3; FETCH UNITS_FN2_DISP ; STORE UNITS_WM3_DISP ; SELECT Function2 ; CASE FFTm ; FETCH 1 ; STORE WM3_X_Axis_Units ; CASE ELSE ; FETCH 0 ; STORE WM3_X_Axis_Units ; END SELECT ; FETCH Fn2_hoz_range ;STORE WM3_TIME_SENS ; FETCH Fn2_hoz_pos ; STORE WM3_TIME_DELAY ; FETCH TIME_REF ; STORE WM3_TIME_REF ; FETCH Fn2_range ; STORE WM3_SENS ; FETCH Fn2_offset ; STORE WM3_OFFSET ; else; if panelmode then; notify "Must turn ON the Function Display"; end if; end if; end actions; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM3; IF VIEW_WF_WM3 THEN ; GET WF_WM3; END IF ; END ACTIONS; END COMPONENT; COMPONENT Fn2_store_wm4 notsaved; TYPE integer; set actions; if Fn2_display then; !output string ":STORE:WAV FUNC2,WMEM4"; OUTPUT STRING ":WMEM4:SAVE FUNC2" ; FETCH 1 ; STORE WM4_OK ; get X_INC; fetch X_INC; store XINC_WM4; get X_MIN; fetch X_MIN; store XMIN_WM4; FETCH VMIN_FN2; STORE VMIN_WM4; FETCH VMAX_FN2; STORE VMAX_WM4; GET VMIN_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT1; GET VMAX_MSMT2 ; !If VIEW_WF_WM4 THEN; ! get wf_WM4; !end if; FETCH (SOURCE_WM4)FUNC2; STORE SOURCE_WM4; FETCH UNITS_FN2_DISP ; STORE UNITS_WM4_DISP ; SELECT Function2 ; CASE FFTm ; FETCH 1 ; STORE WM4_X_Axis_Units ; CASE ELSE ; FETCH 0 ; STORE WM4_X_Axis_Units ; END SELECT ; FETCH Fn2_hoz_range ;STORE WM4_TIME_SENS ; FETCH Fn2_hoz_pos ; STORE WM4_TIME_DELAY ; FETCH TIME_REF ; STORE WM4_TIME_REF ; FETCH Fn2_range ; STORE WM4_SENS ; FETCH Fn2_offset ; STORE WM4_OFFSET ; else; if panelmode then; notify "Must turn ON the Function Display"; end if; end if; end actions; PANEL SET ACTIONS; !FETCH 1; STORE VIEW_WF_WM4; IF VIEW_WF_WM4 THEN ; GET WF_WM4; END IF ; END ACTIONS; END COMPONENT; ACTIONS Fix_Function_Operands ; IF Plug_in1 THEN ; ELSE ; IF Plug_in2 THEN ; FETCH ( Fn1_operand1 ) Channel2 ; DUP ; DUP ; DUP ; STORE Fn1_operand1 ; STORE Fn1_operand2 ; STORE Fn2_operand1 ; STORE Fn2_operand2 ; ELSE ; IF Plug_in3 THEN ; FETCH ( Fn1_operand1 ) Channel3 ; DUP ; DUP ; DUP ; STORE Fn1_operand1 ; STORE Fn1_operand2 ; STORE Fn2_operand1 ; STORE Fn2_operand2 ; ELSE ; IF Plug_in4 THEN ; FETCH ( Fn1_operand1 ) Channel4 ; DUP ; DUP ; DUP ; STORE Fn1_operand1 ; STORE Fn1_operand2 ; STORE Fn2_operand1 ; STORE Fn2_operand2 ; ELSE ; FETCH ( Fn1_operand1 ) WM1 ; DUP ; STORE Fn1_operand1 ; STORE Fn1_operand2 ; FETCH ( Fn2_operand1 ) Func1 ; DUP ; STORE Fn2_operand1 ; STORE Fn2_operand2 ; END IF ; END IF ; END IF ; END IF ; END ACTIONS ; !============================== ! MARKER SUBSYSTEM !============================== COMPONENT MARKER_MODE ; TYPE DISCRETE ; VALUES OFF, MANUAL, WAVEFORM, MEAS ; INITIAL MEAS ; COUPLED VMIN_MSMT1, VMAX_MSMT1, VMIN_MSMT2, VMAX_MSMT2 ; SET ACTIONS ; OUTPUT MARKER_MODE TABLE ":MARK:MODE OFF",":MARK:MODE MAN", ":MARK:MODE WAV",":MARK:MODE MEAS" ; END ACTIONS ; PANEL SET ACTIONS ; SELECT MARKER_MODE ; CASE OFF ; FETCH 0 ; DUP ; DUP ; STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; CASE MANUAL ; FETCH 1 ; DUP ; DUP ;STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; GOSUB UPDATE_MARKER_VALUES ; CASE WAVEFORM ; FETCH 0 ; DUP ; DUP ;STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_MEAS ; FETCH 1 ; STORE MARKER_STATE_WAV ; GOSUB UPDATE_MARKER_VALUES ; CASE MEAS ; FETCH 0 ; STORE MARKER_STATE_MAN ; FETCH 1 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; GOSUB UPDATE_MARKER_VALUES ; END SELECT ; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":MARK:MODE?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "OFF" ; FETCH ( MARKER_MODE ) OFF ; CASE "MAN" ; FETCH ( MARKER_MODE ) MANUAL ; CASE "WAV" ; FETCH ( MARKER_MODE ) WAVEFORM ; CASE "MEAS"; FETCH ( MARKER_MODE ) MEAS ; CASE ELSE ; NOTIFY "BAD CASE IN MARKER_MODE" ; FETCH MARKER_MODE ; END SELECT ; STORE MARKER_MODE ; END IF ; END ACTIONS ; PANEL GET ACTIONS ; SELECT MARKER_MODE ; CASE OFF ; FETCH 0 ; DUP ; DUP ; STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; CASE MANUAL ; FETCH 1 ; DUP ; DUP ; STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; GOSUB UPDATE_MARKER_VALUES ; CASE WAVEFORM ; FETCH 0 ;DUP ; DUP ; STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_MEAS ; FETCH 1 ; STORE MARKER_STATE_WAV ; GOSUB UPDATE_MARKER_VALUES ; CASE MEAS ; FETCH 0 ; STORE MARKER_STATE_MAN ; FETCH 1 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; GOSUB UPDATE_MARKER_VALUES ; END SELECT ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_READOUT ; TYPE DISCRETE ; VALUES OFF, ON; INITIAL OFF ; SET ACTIONS ; OUTPUT MARKER_READOUT TABLE ":MARK:MEAS:READ OFF",":MARK:MEAS:READ ON"; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":MARK:MEAS:READ?" ; ENTER MARKER_READOUT FORMAT K ; ! Rev 2.02 !ENTER CHARSTRING FORMAT K ; ! Rev 1.18 !SELECT CHARSTRING ; ! CASE 'OFF' ; FETCH ( MARKER_READOUT ) OFF ; ! CASE 'ON' ; FETCH ( MARKER_READOUT ) ON ; ! CASE ELSE ; FETCH MARKER_READOUT ; ! NOTIFY "Bad CASE in SELECT Comp MARKER_READOUT " ; !END SELECT ; !STORE MARKER_READOUT ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_X1Y1_SRC ; TYPE DISCRETE ; VALUES CH1,CH2,CH3,CH4,FN1,FN2,FFT,WM1,WM2,WM3,WM4 ; INITIAL CH1 ; COUPLED VMIN_MSMT1, VMAX_MSMT1, MARKER_X1_MIN, MARKER_X1_MAX ; SET ACTIONS ; OUTPUT STRING ":MARK:X1Y1 " ; OUTPUT MARKER_X1Y1_SRC TABLE "CHAN1","CHAN2","CHAN3","CHAN4","FUNC1","FUNC2","FFT", "WMEM1","WMEM2","WMEM3","WMEM4"; SET MARKER_DISP_UNITS_1 ; SET X_AXIS_UNITS ; END ACTIONS ; PANEL SET ACTIONS UPDATE_MARKER_VALUES ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":MARK:X1Y1?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "CHAN1" ; FETCH ( MARKER_X1Y1_SRC ) CH1 ; CASE "CHAN2" ; FETCH ( MARKER_X1Y1_SRC ) CH2 ; CASE "CHAN3" ; FETCH ( MARKER_X1Y1_SRC ) CH3 ; CASE "CHAN4" ; FETCH ( MARKER_X1Y1_SRC ) CH4 ; CASE "FUNC1" ; FETCH ( MARKER_X1Y1_SRC ) FN1 ; CASE "FUNC2" ; FETCH ( MARKER_X1Y1_SRC ) FN2 ; CASE "FFT" ; FETCH ( MARKER_X1Y1_SRC ) FFT ; CASE "WMEM1" ; FETCH ( MARKER_X1Y1_SRC ) WM1 ; CASE "WMEM2" ; FETCH ( MARKER_X1Y1_SRC ) WM2 ; CASE "WMEM3" ; FETCH ( MARKER_X1Y1_SRC ) WM3 ; CASE "WMEM4" ; FETCH ( MARKER_X1Y1_SRC ) WM4 ; CASe ELSE ; FETCH MARKER_X1Y1_SRC ; NOTIFY "Bad CASE in SELECT Comp MARKER_X1Y1_SRC " ; END SELECT ; STORE MARKER_X1Y1_SRC ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_X2Y2_SRC ; TYPE DISCRETE ; VALUES CH1,CH2,CH3,CH4,FN1,FN2,FFT,WM1,WM2,WM3,WM4 ; INITIAL CH1 ; COUPLED VMIN_MSMT2, VMAX_MSMT2,MARKER_X2_MIN, MARKER_X2_MAX ; SET ACTIONS ; OUTPUT STRING ":MARK:X2Y2 " ; OUTPUT MARKER_X2Y2_SRC TABLE "CHAN1","CHAN2","CHAN3","CHAN4","FUNC1","FUNC2","FFT", "WMEM1","WMEM2","WMEM3","WMEM4"; SET MARKER_DISP_UNITS_2 ; SET X_AXIS_UNITS ; END ACTIONS ; PANEL SET ACTIONS UPDATE_MARKER_VALUES ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":MARK:X2Y2?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "CHAN1" ; FETCH ( MARKER_X2Y2_SRC ) CH1 ; CASE "CHAN2" ; FETCH ( MARKER_X2Y2_SRC ) CH2 ; CASE "CHAN3" ; FETCH ( MARKER_X2Y2_SRC ) CH3 ; CASE "CHAN4" ; FETCH ( MARKER_X2Y2_SRC ) CH4 ; CASE "FUNC1" ; FETCH ( MARKER_X2Y2_SRC ) FN1 ; CASE "FUNC2" ; FETCH ( MARKER_X2Y2_SRC ) FN2 ; CASE "FFT" ; FETCH ( MARKER_X2Y2_SRC ) FFT ; CASE "WMEM1" ; FETCH ( MARKER_X2Y2_SRC ) WM1 ; CASE "WMEM2" ; FETCH ( MARKER_X2Y2_SRC ) WM2 ; CASE "WMEM3" ; FETCH ( MARKER_X2Y2_SRC ) WM3 ; CASE "WMEM4" ; FETCH ( MARKER_X2Y2_SRC ) WM4 ; CASe ELSE ; FETCH MARKER_X2Y2_SRC ; NOTIFY "Bad CASE in SELECT Comp MARKER_X2Y2_SRC " ; END SELECT ; STORE MARKER_X2Y2_SRC ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_DISP_UNITS_1 NOGEN ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN,DB ; INITIAL VOLT ; SET ACTIONS ; SELECT MARKER_X1Y1_SRC ; CASE CH1 ; FETCH UNITS_CH1_DISP ; CASE CH2 ; FETCH UNITS_CH2_DISP ; CASE CH3 ; FETCH UNITS_CH3_DISP ; CASE CH4 ; FETCH UNITS_CH4_DISP ; CASE FN1 ; FETCH UNITS_FN1_DISP ; CASE FN2 ; FETCH UNITS_FN2_DISP ; CASE FFT ; FETCH (MARKER_DISP_UNITS_1) DB ; CASE WM1 ; FETCH UNITS_WM1_DISP ; CASE WM2 ; FETCH UNITS_WM2_DISP ; CASE WM3 ; FETCH UNITS_WM3_DISP ; CASE WM4 ; FETCH UNITS_WM4_DISP ; END SELECT ; STORE MARKER_DISP_UNITS_1 ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_DISP_UNITS_2 NOGEN ; TYPE DISCRETE ; VALUES VOLT,AMP,WATT,UNKN,DB ; INITIAL VOLT ; SET ACTIONS ; SELECT MARKER_X2Y2_SRC ; CASE CH1 ; FETCH UNITS_CH1_DISP ; CASE CH2 ; FETCH UNITS_CH2_DISP ; CASE CH3 ; FETCH UNITS_CH3_DISP ; CASE CH4 ; FETCH UNITS_CH4_DISP ; CASE FN1 ; FETCH UNITS_FN1_DISP ; CASE FN2 ; FETCH UNITS_FN2_DISP ; CASE FFT ; FETCH (MARKER_DISP_UNITS_2) DB ; CASE WM1 ; FETCH UNITS_WM1_DISP ; CASE WM2 ; FETCH UNITS_WM2_DISP ; CASE WM3 ; FETCH UNITS_WM3_DISP ; CASE WM4 ; FETCH UNITS_WM4_DISP ; END SELECT ; STORE MARKER_DISP_UNITS_2 ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_STATE_MAN ; TYPE INTEGER ; INITIAL 0 ; END COMPONENT ; COMPONENT MARKER_STATE_MEAS ; TYPE INTEGER ; INITIAL 1 ; END COMPONENT ; COMPONENT MARKER_STATE_WAV ; TYPE INTEGER ; INITIAL 0 ; END COMPONENT ; COMPONENT MARKER_STATE_HOR ; TYPE INTEGER ; INITIAL 0 ; END COMPONENT ; COMPONENT MARKER_STATE_VER ; TYPE INTEGER ; INITIAL 0 ; END COMPONENT ; COMPONENT VMIN_MSMT1 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL -4; ! same as 'vmin_ch1' ... GET ACTIONS; FETCH MARKER_MODE ; FETCH ( MARKER_MODE ) WAVEFORM ; EQ ; IF STACK THEN ; FETCH MARKER_Y1_POS ; STORE VMIN_MSMT1 ; ELSE ; SELECT MARKER_X1Y1_SRC; CASE CH1; FETCH VMIN_CH1; CASE CH2; FETCH VMIN_CH2; CASE CH3; FETCH VMIN_CH3; CASE CH4; FETCH VMIN_CH4; CASE WM1; FETCH VMIN_WM1; CASE WM2; FETCH VMIN_WM2; CASE WM3; FETCH VMIN_WM3; CASE WM4; FETCH VMIN_WM4; CASE FN1; FETCH VMIN_FN1; CASE FN2; FETCH VMIN_FN2; CASE FFT; FETCH VMIN_FFT; CASE ELSE; FETCH -4; ! a well-disguised 'punt' for now ... END SELECT; STORE VMIN_MSMT1; END IF ; END ACTIONS; END COMPONENT; COMPONENT VMAX_MSMT1 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 4; ! same as 'vmax_ch1' ... GET ACTIONS; FETCH MARKER_MODE ; FETCH ( MARKER_MODE ) WAVEFORM ; EQ ; IF STACK THEN ; FETCH MARKER_Y1_POS ; STORE VMAX_MSMT1 ; ELSE ; SELECT MARKER_X1Y1_SRC ; CASE CH1; FETCH VMAX_CH1; CASE CH2; FETCH VMAX_CH2; CASE CH3; FETCH VMAX_CH3; CASE CH4; FETCH VMAX_CH4; CASE WM1; FETCH VMAX_WM1; CASE WM2; FETCH VMAX_WM2; CASE WM3; FETCH VMAX_WM3; CASE WM4; FETCH VMAX_WM4; CASE FN1; FETCH VMAX_FN1; CASE FN2; FETCH VMAX_FN2; CASE FFT; FETCH VMAX_FFT; CASE ELSE; FETCH 4; ! a well-disguised 'punt' for now ... END SELECT; STORE VMAX_MSMT1; END IF ; END ACTIONS; END COMPONENT; COMPONENT VMIN_MSMT2 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL -4; ! same as 'vmin_ch1' ... GET ACTIONS; FETCH MARKER_MODE ; FETCH ( MARKER_MODE ) WAVEFORM ; EQ ; IF STACK THEN ; FETCH MARKER_Y2_POS ; STORE VMIN_MSMT2 ; ELSE ; SELECT MARKER_X2Y2_SRC ; CASE CH1; FETCH VMIN_CH1; CASE CH2; FETCH VMIN_CH2; CASE CH3; FETCH VMIN_CH3; CASE CH4; FETCH VMIN_CH4; CASE WM1; FETCH VMIN_WM1; CASE WM2; FETCH VMIN_WM2; CASE WM3; FETCH VMIN_WM3; CASE WM4; FETCH VMIN_WM4; CASE FN1; FETCH VMIN_FN1; CASE FN2; FETCH VMIN_FN2; CASE FFT; FETCH VMIN_FFT; CASE ELSE; FETCH -4; ! a well-disguised 'punt' for now ... END SELECT; STORE VMIN_MSMT2; END IF ; END ACTIONS; END COMPONENT; COMPONENT VMAX_MSMT2 NOGEN NOERRCHECK; TYPE CONTINUOUS; INITIAL 4; ! same as 'vmax_ch1' ... GET ACTIONS; FETCH MARKER_MODE ; FETCH ( MARKER_MODE ) WAVEFORM ; EQ ; IF STACK THEN ; FETCH MARKER_Y2_POS ; STORE VMAX_MSMT2 ; ELSE ; SELECT MARKER_X2Y2_SRC ; CASE CH1; FETCH VMAX_CH1; CASE CH2; FETCH VMAX_CH2; CASE CH3; FETCH VMAX_CH3; CASE CH4; FETCH VMAX_CH4; CASE WM1; FETCH VMAX_WM1; CASE WM2; FETCH VMAX_WM2; CASE WM3; FETCH VMAX_WM3; CASE WM4; FETCH VMAX_WM4; CASE FN1; FETCH VMAX_FN1; CASE FN2; FETCH VMAX_FN2; CASE FFT; FETCH VMAX_FFT; CASE ELSE; FETCH 4; ! a well-disguised 'punt' for now ... END SELECT; STORE VMAX_MSMT2; END IF ; END ACTIONS; END COMPONENT; COMPONENT MARKER_X1_MIN ; TYPE CONTINUOUS ; INITIAL -100E-6; GET ACTIONS ; SELECT MARKER_X1Y1_SRC ; CASE FFT ; GET XMIN_FFT ; FETCH XMIN_FFT ; CASE FN1 ; FETCH Fn1_hoz_pos ; FETCH Fn1_hoz_range ; FETCH 5 ; MUL ; SUB ; CASE FN2 ; FETCH Fn2_hoz_pos ; FETCH Fn2_hoz_range ; FETCH 5 ; MUL ; SUB ; CASE WM1 ; GET XMIN_WM1 ; FETCH XMIN_WM1 ; CASE WM2 ; GET XMIN_WM2 ; FETCH XMIN_WM2 ; CASE WM3 ; GET XMIN_WM3 ; FETCH XMIN_WM3 ; CASE WM4 ; GET XMIN_WM4 ; FETCH XMIN_WM4 ; CASE ELSE ; FETCH WF_TMIN ; END SELECT ; STORE MARKER_X1_MIN ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_X1_MAX ; TYPE CONTINUOUS ; INITIAL +100E-6; GET ACTIONS ; SELECT MARKER_X1Y1_SRC ; CASE FFT ; FETCH XMIN_FFT ; SELECT FFT_Magnify ; CASE 0 ; FETCH FFT_Span ; ADD ; CASE 1 ; FETCH FFT_MSpan ; ADD ; END SELECT ; CASE FN1 ; FETCH Fn1_hoz_pos ; FETCH Fn1_hoz_range ; FETCH 5 ; MUL ; ADD ; CASE FN2 ; FETCH Fn2_hoz_pos ; FETCH Fn2_hoz_range ; FETCH 5 ; MUL ; ADD ; CASE WM1 ; FETCH XMIN_WM1 ; FETCH WM1_TIME_SENS ; FETCH 10 ; MUL ; ADD ; CASE WM2 ; FETCH XMIN_WM2 ; FETCH WM2_TIME_SENS ; FETCH 10 ; MUL ; ADD ; CASE WM3 ; FETCH XMIN_WM3 ; FETCH WM3_TIME_SENS ; FETCH 10 ; MUL ; ADD ; CASE WM4 ; FETCH XMIN_WM4 ; FETCH WM4_TIME_SENS ; FETCH 10 ; MUL ; ADD ; CASE ELSE ; FETCH WF_TMAX ; END SELECT ; STORE MARKER_X1_MAX ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_X1_POS ; ! This is also for the X Marker TYPE CONTINUOUS ; !VALUES RANGE WF_TMIN,WF_TMAX ; VALUES RANGE MARKER_X1_MIN , MARKER_X1_MAX ; INITIAL 0.0 ; SET ACTIONS ; OUTPUT MARKER_X1_POS FORMAT '":MARK:TSTA ",K' ; GOSUB UPDATE_MARKER_VALUES ; END ACTIONS ; GET ACTIONS ; SELECT MARKER_MODE ; CASE WAVEFORM ; OUTPUT STRING ":MARK:CURS? STAR" ; ENTER MARKER_X1_POS FORMAT "#,K" ; ENTER MARKER_Y1_POS FORMAT K ; CASE ELSE ; OUTPUT STRING ":MARK:TSTA?" ; ENTER MARKER_X1_POS FORMAT K ; END SELECT ; END ACTIONS ; END COMPONENT ; component t1_next notsaved nogen; type integer; panel set actions; !fetch WF_TMAX; fetch WF_TMIN; sub; abs; fetch 50; div; !fetch MARKER_X1_POS; add; dup; fetch WF_TMAX; ge; fetch MARKER_X1_MAX; fetch MARKER_X1_MIN ; sub; abs; fetch 50; div; fetch MARKER_X1_POS; add; dup; fetch MARKER_X1_MAX ; ge; if stack then; drop; else; store MARKER_X1_POS ; set MARKER_X1_POS ; end if; GOSUB UPDATE_MARKER_VALUES ; end actions; end component; component t1_prev notsaved nogen; type integer; panel set actions; fetch MARKER_X1_POS ; !fetch WF_TMAX; fetch WF_TMIN; sub; abs; fetch 50; div; !sub; dup; fetch WF_TMIN; le; fetch MARKER_X1_MAX; fetch MARKER_X1_MIN ; sub; abs; fetch 50; div; sub; dup; fetch MARKER_X1_MIN ; le; if stack then; drop; else; store MARKER_X1_POS ; set MARKER_X1_POS ; end if; GOSUB UPDATE_MARKER_VALUES ; end actions; end component; COMPONENT MARKER_X2_MIN ; TYPE CONTINUOUS ; INITIAL -100E-6; GET ACTIONS ; SELECT MARKER_X2Y2_SRC ; CASE FFT ; FETCH -1E+18 ; CASE FN1 ; FETCH Fn1_hoz_pos ; FETCH Fn1_hoz_range ; FETCH 5 ; MUL ; SUB ; CASE FN2 ; FETCH Fn2_hoz_pos ; FETCH Fn2_hoz_range ; FETCH 5 ; MUL ; SUB ; CASE WM1 ; GET XMIN_WM1 ; FETCH XMIN_WM1 ; CASE WM2 ; GET XMIN_WM2 ; FETCH XMIN_WM2 ; CASE WM3 ; GET XMIN_WM3 ; FETCH XMIN_WM3 ; CASE WM4 ; GET XMIN_WM4 ; FETCH XMIN_WM4 ; CASE ELSE ; FETCH WF_TMIN ; END SELECT ; STORE MARKER_X2_MIN ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_X2_MAX ; TYPE CONTINUOUS ; INITIAL +100E-6; GET ACTIONS ; SELECT MARKER_X2Y2_SRC ; CASE FFT ; FETCH +1E+18 ; CASE FN1 ; FETCH Fn1_hoz_pos ; FETCH Fn1_hoz_range ; FETCH 5 ; MUL ; ADD ; CASE FN2 ; FETCH Fn2_hoz_pos ; FETCH Fn2_hoz_range ; FETCH 5 ; MUL ; ADD ; CASE WM1 ; FETCH XMIN_WM1 ; FETCH WM1_TIME_SENS ; FETCH 10 ; MUL ; ADD ; CASE WM2 ; FETCH XMIN_WM2 ; FETCH WM2_TIME_SENS ; FETCH 10 ; MUL ; ADD ; CASE WM3 ; FETCH XMIN_WM3 ; FETCH WM3_TIME_SENS ; FETCH 10 ; MUL ; ADD ; CASE WM4 ; FETCH XMIN_WM4 ; FETCH WM4_TIME_SENS ; FETCH 10 ; MUL ; ADD ; CASE ELSE ; FETCH WF_TMAX ; END SELECT ; STORE MARKER_X2_MAX ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_X2_POS ; ! This is also for the + Marker TYPE CONTINUOUS ; !VALUES RANGE WF_TMIN, WF_TMAX ; VALUES RANGE MARKER_X2_MIN , MARKER_X2_MAX ; INITIAL 0.0 ; SET ACTIONS ; OUTPUT MARKER_X2_POS FORMAT '":MARK:TSTO ",K' ; GOSUB UPDATE_MARKER_VALUES ; END ACTIONS ; GET ACTIONS ; SELECT MARKER_MODE ; CASE WAVEFORM ; OUTPUT STRING ":MARK:CURS? STOP" ; ENTER MARKER_X2_POS FORMAT "#,K" ; ENTER MARKER_Y2_POS FORMAT K ; CASE ELSE ; OUTPUT STRING ":MARK:TSTO?" ; ENTER MARKER_X2_POS FORMAT K ; END SELECT ; END ACTIONS ; END COMPONENT ; component t2_next notsaved nogen; type integer; panel set actions; !fetch WF_TMAX; fetch WF_TMIN; sub; abs; fetch 50; div; !fetch MARKER_X2_POS ; add; dup; fetch WF_TMAX; ge; fetch MARKER_X2_MAX; fetch MARKER_X2_MIN ; sub; abs; fetch 50; div; fetch MARKER_X2_POS; add; dup; fetch MARKER_X2_MAX ; ge; if stack then; drop; else; store MARKER_X2_POS; set MARKER_X2_POS ; end if; GOSUB UPDATE_MARKER_VALUES ; end actions; end component; component t2_prev notsaved nogen; type integer; panel set actions; fetch MARKER_X2_POS ; !fetch WF_TMAX; fetch WF_TMIN; sub; abs; fetch 50; div; !sub; dup; fetch WF_TMIN; le; fetch MARKER_X2_MAX; fetch MARKER_X2_MIN ; sub; abs; fetch 50; div; sub; dup; fetch MARKER_X2_MIN ; le; if stack then; drop; else; store MARKER_X2_POS ; set MARKER_X2_POS ; end if; end actions; end component; COMPONENT MARKER_Y1_POS ; TYPE CONTINUOUS ; VALUES RANGE VMIN_MSMT1, VMAX_MSMT1 ; INITIAL 0.0 ; SET ACTIONS ; OUTPUT MARKER_Y1_POS FORMAT '":MARK:VSTA ",K' ; GOSUB UPDATE_MARKER_VALUES ; END ACTIONS ; GET ACTIONS ; SELECT MARKER_MODE ; CASE WAVEFORM ; OUTPUT STRING ":MARK:CURS? STAR" ; ENTER MARKER_X1_POS FORMAT "#,K" ; ENTER MARKER_Y1_POS FORMAT K ; CASE ELSE ; OUTPUT STRING ":MARK:VSTA?" ; ENTER MARKER_Y1_POS FORMAT K ; END SELECT ; END ACTIONS ; END COMPONENT ; component v1_next notsaved nogen; type integer; panel set actions; fetch VMAX_MSMT1; fetch VMIN_MSMT1; sub; abs; fetch 32; div; fetch MARKER_Y1_POS ; add; dup; fetch VMAX_MSMT1; ge; if stack then; drop; else; store MARKER_Y1_POS; set MARKER_Y1_POS; end if; GOSUB UPDATE_MARKER_VALUES ; end actions; end component; component v1_prev notsaved nogen; type integer; panel set actions; fetch MARKER_Y1_POS; fetch VMAX_MSMT1; fetch VMIN_MSMT1; sub; abs; fetch 32; div; sub; dup; fetch VMIN_MSMT1; le; if stack then; drop; else; store MARKER_Y1_POS; set MARKER_Y1_POS; end if; GOSUB UPDATE_MARKER_VALUES ; end actions; end component; COMPONENT MARKER_Y2_POS ; TYPE CONTINUOUS ; VALUES RANGE VMIN_MSMT2, VMAX_MSMT2 ; INITIAL 0.0 ; SET ACTIONS ; OUTPUT MARKER_Y2_POS FORMAT '":MARK:VSTO ",K' ; GOSUB UPDATE_MARKER_VALUES ; END ACTIONS ; GET ACTIONS ; SELECT MARKER_MODE ; CASE WAVEFORM ; OUTPUT STRING ":MARK:CURS? STOP" ; ENTER MARKER_X2_POS FORMAT "#,K" ; ENTER MARKER_Y2_POS FORMAT K ; CASE ELSE ; OUTPUT STRING ":MARK:VSTO?" ; ENTER MARKER_Y2_POS FORMAT K ; END SELECT ; END ACTIONS ; END COMPONENT ; component v2_next notsaved nogen; type integer; panel set actions; fetch VMAX_MSMT2; fetch VMIN_MSMT2; sub; abs; fetch 32; div; fetch MARKER_Y2_POS ; add; dup; fetch VMAX_MSMT2; ge; if stack then; drop; else; store MARKER_Y2_POS; set MARKER_Y2_POS; end if; GOSUB UPDATE_MARKER_VALUES ; end actions; end component; component v2_prev notsaved nogen; type integer; panel set actions; fetch MARKER_Y2_POS; fetch VMAX_MSMT2; fetch VMIN_MSMT2; sub; abs; fetch 32; div; sub; dup; fetch VMIN_MSMT2; le; if stack then; drop; else; store MARKER_Y2_POS; set MARKER_Y2_POS; end if; GOSUB UPDATE_MARKER_VALUES ; end actions; end component; COMPONENT MARKER_TDELTA ; TYPE CONTINUOUS ; INITIAL 0.0 ; GET ACTIONS ; SELECT MARKER_MODE ; CASE WAVEFORM ; OUTPUT STRING ":MARK:CURS? DELT" ; ENTER MARKER_TDELTA FORMAT "#,K" ; ENTER MARKER_VDELTA FORMAT K ; CASE ELSE ; OUTPUT STRING ":MARK:TDEL?" ; ENTER MARKER_TDELTA FORMAT K ; END SELECT ; END ACTIONS ; END COMPONENT ; COMPONENT MARKER_VDELTA ; TYPE CONTINUOUS ; INITIAL 0.0 ; GET ACTIONS ; SELECT MARKER_MODE ; CASE WAVEFORM ; OUTPUT STRING ":MARK:CURS? DELT" ; ENTER MARKER_TDELTA FORMAT "#,K" ; ENTER MARKER_VDELTA FORMAT K ; CASE ELSE ; OUTPUT STRING ":MARK:VDEL?" ; ENTER MARKER_VDELTA FORMAT K ; END SELECT ; END ACTIONS ; END COMPONENT ; ACTIONS UPDATE_MARKER_VALUES ; IF LIVEMODE THEN ; OUTPUT STRING ";:MARK:MODE?" ; ! cant do GET MARKER_MODE , it calls UPDATE_MARKER_VALUES too!! ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "OFF" ; FETCH ( MARKER_MODE ) OFF ; CASE "MAN" ; FETCH ( MARKER_MODE ) MANUAL ; CASE "WAV" ; FETCH ( MARKER_MODE ) WAVEFORM ; CASE "MEAS"; FETCH ( MARKER_MODE ) MEAS ; CASE ELSE ; NOTIFY "BAD CASE IN MARKER_MODE" ; FETCH MARKER_MODE ; END SELECT ; STORE MARKER_MODE ; SELECT MARKER_MODE ; ! Panel Get Actions CASE OFF ; FETCH 0 ; DUP ; DUP ; STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; CASE MANUAL ; FETCH 1 ; DUP ; DUP ; STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; CASE WAVEFORM ; FETCH 0 ;DUP ; DUP ; STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 0 ; STORE MARKER_STATE_MEAS ; FETCH 1 ; STORE MARKER_STATE_WAV ; CASE MEAS ; FETCH 0 ; STORE MARKER_STATE_MAN ; FETCH 1 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; END SELECT ; GET MARKER_X1_POS ; GET MARKER_X2_POS ; SELECT MARKER_MODE ; CASE WAVEFORM ; GET VMIN_MSMT1 ; GET VMAX_MSMT1 ; GET VMIN_MSMT2 ; GET VMAX_MSMT2 ; CASE ELSE ; GET MARKER_Y1_POS ; GET MARKER_Y2_POS ; END SELECT ; GET MARKER_TDELTA ; GET MARKER_VDELTA ; END IF ; END ACTIONS ; ACTIONS Fix_Marker_Sources ; Get MARKER_X1Y1_SRC ; Get MARKER_X2Y2_SRC ; END ACTIONS ; ! check it out - major work here !============================== ! WAVEFORM ACQ SUBSYSTEM !============================== !>> Acquisition/scaling parameters COMPONENT Acq_mode ; TYPE DISCRETE ; VALUES RTIME,ETIME ; INITIAL ETIME ; COUPLED Acq_type,VIEW_CH1,VIEW_WF_CH1,VIEW_CH2,VIEW_WF_CH2, VIEW_CH3,VIEW_WF_CH3,VIEW_CH4,VIEW_WF_CH4, Acq_Comp_State, FFT_display,FFT_Span,FFT_Resolution,FFT_MSpan,FFT_Center_freq, Fn1_display,Fn2_display ; SET ACTIONS ; OUTPUT Acq_mode TABLE ":ACQ:MODE RTIME",":ACQ:MODE ETIME" ; IF Acq_mode THEN ; ELSE ; DONTCARE Acq_srate ; END IF ; END ACTIONS ; PANEL SET ACTIONS ; SELECT Acq_mode ; CASE RTIME ; HIDE ACQUISITION_EQVTMODE ; SHOW ACQUISITION_REALMODE ; CASE ETIME ; SHOW ACQUISITION_EQVTMODE ; HIDE ACQUISITION_REALMODE ; END SELECT ; set DIGITIZE; END ACTIONS ; GET ACTIONS ; IF LIVEMODE THEN ; OUTPUT STRING ":ACQ:MODE?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "RTIME" ; FETCH ( Acq_mode ) RTIME ; CASE "ETIME" ; FETCH ( Acq_mode ) ETIME ; CASE ELSE ; NOTIFY "BAD CASE IN Acq_mode" ; FETCH Acq_mode ; END SELECT ; STORE Acq_mode ; END IF ; END ACTIONS ; END COMPONENT ; COMPONENT ACQ_TYPE; TYPE DISCRETE; VALUES NORMAL,RAW,INT,AVER; ! NORMAL,AVERAGE - eqvt time INITIAL NORMAL; ! RAW,INT - real time COUPLED ACQ_TYPE,ACQ_INT_STAT , Acq_Comp_State, VIEW_CH1,VIEW_CH2,VIEW_CH3,VIEW_CH4,NUM_POINTS , VIEW_WF_CH1,VIEW_WF_CH2,VIEW_WF_CH3,VIEW_WF_CH4 ; ! Must couple WF_TYPE - display SET ACTIONS; OUTPUT STRING ":ACQ:TYPE "; OUTPUT ACQ_TYPE TABLE 'NORM','RAW','INT','AVER'; END ACTIONS; PANEL SET ACTIONS ; !HIDE Display_subsystem,Normal; HIDE Display_subsystem,Raw; All are the same !HIDE Display_subsystem,Interpolate; HIDE Display_subsystem,Average; set DIGITIZE; END ACTIONS; GET ACTIONS; OUTPUT STRING ":ACQ:TYPE?"; ENTER CHARSTRING FORMAT K; SELECT CHARSTRING; CASE "NORM"; FETCH (ACQ_TYPE)NORMAL; CASE "RAW"; FETCH (ACQ_TYPE)RAW; CASE "INT"; FETCH (ACQ_TYPE)INT; CASE "AVER"; FETCH (ACQ_TYPE)AVER; CASE ELSE; FETCH ACQ_TYPE; END SELECT; STORE ACQ_TYPE; END ACTIONS; END COMPONENT; ACTIONS FIX_ACQ_TYPE; ENABLE ACQ_TYPE AVER; ! check it out GET ACQ_TYPE; END ACTIONS; COMPONENT COMPLETION; TYPE INTEGER; VALUES RANGE 0,100; INITIAL 90; COUPLED VIEW_CH1,VIEW_WF_CH1,VIEW_CH2,VIEW_WF_CH2, VIEW_CH3,VIEW_WF_CH3,VIEW_CH4,VIEW_WF_CH4, Acq_Comp_State ; SET ACTIONS; OUTPUT COMPLETION FORMAT '":ACQ:COMP ",K'; END ACTIONS; GET ACTIONS; OUTPUT STRING ":ACQ:COMP?"; ENTER COMPLETION FORMAT K; END ACTIONS; PANEL SET ACTIONS ; SET DIGITIZE ; END ACTIONS ; END COMPONENT; COMPONENT MAX_NUM_POINTS ; TYPE CONTINUOUS ; INITIAL 16384 ; END COMPONENT ; COMPONENT NUM_POINTS; TYPE CONTINUOUS ; VALUES RANGE 16,MAX_NUM_POINTS,1; INITIAL 512,DONTCARE; ! Default setup - value canot be queried !coupled NUM_POINTS; ! Check with the division , if any value has to be COUPLED NUM_POINTS,VIEW_CH1,VIEW_WF_CH1,VIEW_CH2,VIEW_WF_CH2, VIEW_CH3,VIEW_WF_CH3,VIEW_CH4,VIEW_WF_CH4; SET ACTIONS; ! set for initial conditions (set_init) OUTPUT NUM_POINTS FORMAT '":ACQ:POINTS ",K'; VALIDATE NUM_POINTS ; END ACTIONS; GET ACTIONS; OUTPUT STRING ":ACQ:POINTS?"; ENTER CHARSTRING FORMAT K ; if LIVEMODE THEN; SELECT CHARSTRING ; CASE "AUTO" ; DONTCARE NUM_POINTS ; ! autoscale CASE ELSE ; FETCH ""; FETCH CHARSTRING ; TRIMSTR; CATSTR ; VAL ; STORE NUM_POINTS ; VALIDATE NUM_POINTS ; END SELECT ; END IF; END ACTIONS; PANEL SET ACTIONS ; SET DIGITIZE ; END ACTIONS ; END COMPONENT; COMPONENT NUM_POINTS_AUTO ; TYPE INTEGER ; COUPLED VIEW_CH1,VIEW_WF_CH1,VIEW_CH2,VIEW_WF_CH2, VIEW_CH3,VIEW_WF_CH3,VIEW_CH4,VIEW_WF_CH4; SET ACTIONS ; OUTPUT STRING "ACQ:POIN AUTO " ; DONTCARE NUM_POINTS ; END ACTIONS ; PANEL SET ACTIONS ; SET DIGITIZE ; END ACTIONS ; END COMPONENT ; ACTIONS Fix_Max_Record_Length ; IF SLOT_21A THEN ; FETCH 32768 ; STORE MAX_NUM_POINTS ; FETCH 4.0E+9 ; STORE Max_Acq_srate ; END IF ; IF SLOT_22A THEN ; FETCH 65536 ; STORE MAX_NUM_POINTS ; FETCH 8.0E+9 ; STORE Max_Acq_srate ; END IF ; END ACTIONS ; COMPONENT MAX_Acq_srate ; TYPE CONTINUOUS ; INITIAL 2.0E+9 ; END COMPONENT ; COMPONENT Acq_srate ; TYPE CONTINUOUS ; VALUES RANGE 0.5,Max_Acq_srate ; INITIAL DONTCARE ; COUPLED Acq_srate,VIEW_CH1,VIEW_WF_CH1,VIEW_CH2,VIEW_WF_CH2, VIEW_CH3,VIEW_WF_CH3,VIEW_CH4,VIEW_WF_CH4; SET ACTIONS ; IF Acq_mode THEN ; ELSE ; OUTPUT Acq_srate FORMAT '":ACQ:SRAT ",K' ; VALIDATE Acq_srate ; END IF ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":ACQ:SRAT?" ; ENTER CHARSTRING FORMAT K ; SELECT CHARSTRING ; CASE "AUTO" ; DONTCARE Acq_srate ; CASE ELSE ; FETCH ""; FETCH CHARSTRING ; TRIMSTR; CATSTR ; VAL ; VALIDATE Acq_srate ; STORE Acq_srate ; END SELECT ; END ACTIONS ; PANEL SET ACTIONS ; SET DIGITIZE ; END ACTIONS ; END COMPONENT ; COMPONENT Acq_srate_auto ; TYPE INTEGER ; COUPLED VIEW_CH1,VIEW_WF_CH1,VIEW_CH2,VIEW_WF_CH2, VIEW_CH3,VIEW_WF_CH3,VIEW_CH4,VIEW_WF_CH4; SET ACTIONS ; OUTPUT STRING ":ACQ:SRAT AUTO" ; DONTCARE Acq_srate ; END ACTIONS ; PANEL SET ACTIONS ; SET DIGITIZE ; END ACTIONS ; END COMPONENT ; component acq_points notsaved; type integer; initial 0,invalid; get actions; output string ":ACQ:POINTS?"; enter acq_points format 'K'; end actions; end component; COMPONENT Acq_count ; TYPE INTEGER ; VALUES RANGE 1,4096 ; INITIAL 16 ; COUPLED VIEW_CH1,VIEW_WF_CH1,VIEW_CH2,VIEW_WF_CH2, VIEW_CH3,VIEW_WF_CH3,VIEW_CH4,VIEW_WF_CH4; SET ACTIONS ; OUTPUT Acq_count FORMAT '":ACQ:COUN ",K' ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":ACQ:COUN?"; ENTER Acq_count FORMAT 'K' ; END ACTIONS ; PANEL SET ACTIONS ; SET DIGITIZE ; END ACTIONS ; END COMPONENT ; COMPONENT Acq_int_stat ; TYPE DISCRETE ; VALUES OFF,ON ; INITIAL ON; COUPLED ACQ_TYPE ; SET ACTIONS ; OUTPUT Acq_int_stat TABLE ":ACQ:INT OFF",":ACQ:INT ON" ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":ACQ:INT?" ; ENTER Acq_int_stat FORMAT K ; END ACTIONS ; PANEL SET ACTIONS UPDATE_TRACE_DATA ; END COMPONENT ; COMPONENT Acq_bwlimit ; TYPE DISCRETE ; VALUES OFF,ON ; INITIAL OFF; COUPLED VIEW_CH1,VIEW_WF_CH1,VIEW_CH2,VIEW_WF_CH2, VIEW_CH3,VIEW_WF_CH3,VIEW_CH4,VIEW_WF_CH4; SET ACTIONS ; OUTPUT Acq_bwlimit TABLE ":ACQ:BWL OFF",":ACQ:BWL ON" ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":ACQ:BWL?" ; ENTER Acq_bwlimit FORMAT K ; END ACTIONS ; PANEL SET ACTIONS ; SET DIGITIZE ; END ACTIONS ; END COMPONENT ; COMPONENT YINCREMENT NOTSAVED NOGEN; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT YORIGIN NOTSAVED NOGEN; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT YREF NOTSAVED NOGEN; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT valid_data NOTSAVED NOGEN; TYPE integer; initial 1; END COMPONENT; COMPONENT X_ORIGIN_MAIN ; TYPE CONTINUOUS ; GET ACTIONS ; END ACTIONS ; END COMPONENT ; COMPONENT X_DISP_ORIGIN ; TYPE CONTINUOUS ; GET ACTIONS ; END ACTIONS ; END COMPONENT ; COMPONENT X_DISP_RANGE ; TYPE CONTINUOUS ; GET ACTIONS ; END ACTIONS ; END COMPONENT ; COMPONENT X_WAV_INC ; TYPE CONTINUOUS ; GET ACTIONS ; END ACTIONS ; END COMPONENT ; COMPONENT WF_SIZE NOTSAVED; TYPE INTEGER; !VALUES RANGE ???? ; !INITIAL ????; GET ACTIONS; !OUTPUT STRING ":WAV:VAL?"; enter stack format K; !if stack then; !fetch 1; store valid_data; IF Time_Wind_Stat THEN ; OUTPUT STRING ":WAV:VIEW WIND;" ; ELSE ; OUTPUT STRING ":WAV:VIEW MAIN;" ; END IF ; OUTPUT STRING ":WAV:FORMAT WORD;" ; OUTPUT STRING ":WAV:PRE?"; if livemode then; wait spoll bit 4; ! message available end if; ENTER NUM_BUFFER FORMAT "#,K"; ! format ENTER NUM_BUFFER FORMAT "#,K"; ! wftype ENTER WF_SIZE FORMAT "#,K"; ! wf size ENTER NUM_BUFFER FORMAT "#,K"; ! bin count !ENTER NUM_BUFFER FORMAT "#,K"; ! x-incr ENTER X_WAV_INC FORMAT "#,K"; !ENTER NUM_BUFFER FORMAT "#,K"; ! x-origin ENTER X_ORIGIN_MAIN FORMAT "#,K" ; ENTER NUM_BUFFER FORMAT "#,K"; ! x-ref ENTER YINCREMENT FORMAT "#,K"; ! y-incr ENTER YORIGIN FORMAT "#,K"; ! y-origin ! check it out - the formula below ? YREF is always 0 ENTER STACK FORMAT "#,K"; FETCH -1; MUL; STORE YREF; ! need '-YREF' in conversion expression ... ENTER NUM_BUFFER FORMAT "#,K"; ! coupling !ENTER NUM_BUFFER FORMAT "#,K"; ! x-disp-range ENTER X_DISP_RANGE FORMAT "#,K"; ! x-disp-range !ENTER NUM_BUFFER FORMAT "#,K"; ! x-disp-org ENTER X_DISP_ORIGIN FORMAT "#,K"; ! x-disp-org ENTER NUM_BUFFER FORMAT "#,K"; ! y-disp-range ENTER NUM_BUFFER FORMAT "#,K"; ! y-disp-org ENTER charstring FORMAT K; ! date ! check it out - a lot more ENTER as in page 23-23,23-24 ! OUTPUT "*OPC?" ; ENTER STACK FORMAT K ; NOTIFY STACK ; !else; !fetch 0; store valid_data; !end if; END ACTIONS; END COMPONENT; COMPONENT X_INC; TYPE CONTINUOUS; INITIAL 1E-6; GET ACTIONS; if livemode then ; SELECT Time_Wind_Stat ; CASE MAIN ; FETCH TIME_SENS; FETCH 10; MUL; FETCH WF_SIZE; DIV; STORE X_INC; CASE WIND ; FETCH TIME_WIND_SENS; FETCH 10; MUL; FETCH WF_SIZE; DIV; STORE X_INC; END SELECT ; end if ; END ACTIONS; END COMPONENT; COMPONENT X_MIN; TYPE CONTINUOUS; INITIAL -500E-6; GET ACTIONS; SELECT Time_Wind_Stat ; CASE MAIN ; SELECT TIME_REF; CASE LEFT; FETCH 0; CASE CENTER; FETCH TIME_SENS; FETCH -5; MUL; CASE RIGHT; FETCH TIME_SENS; FETCH -10; MUL; END SELECT; FETCH TIME_DELAY; ADD; STORE X_MIN; CASE WIND ; SELECT TIME_REF; CASE LEFT; FETCH 0; CASE CENTER; FETCH TIME_WIND_SENS; FETCH -5; MUL; CASE RIGHT; FETCH TIME_WIND_SENS; FETCH -10; MUL; END SELECT; FETCH TIME_WIND_DELAY; ADD; STORE X_MIN; END SELECT ; END ACTIONS; END COMPONENT; COMPONENT XMIN_FFT; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS; SELECT FFT_Magnify ; CASE 0 ; FETCH 0 ; STORE XMIN_FFT ; CASE 1 ; FETCH FFT_Center_Freq ; FETCH FFT_MSpan ; FETCH 10 ; DIV ; FETCH 5 ; MUL ; SUB ; STORE XMIN_FFT ; END SELECT ; !FETCH FFT_Center_Freq ; STORE XMIN_FFT ; END ACTIONS; END COMPONENT; COMPONENT XINC_FFT; TYPE CONTINUOUS; INITIAL INVALID ; GET ACTIONS; SELECT FFT_Magnify ; CASE 0 ; FETCH FFT_Span ; CASE 1 ; FETCH FFT_MSpan ; END SELECT ; FETCH WF_SIZE; DIV; STORE XINC_FFT ; END ACTIONS; END COMPONENT; COMPONENT X_SCALE_LEFT ; TYPE INTEGER; INITIAL INVALID ; GET ACTIONS; fetch 1; if livemode then; FETCH X_ORIGIN_MAIN; FETCH X_DISP_ORIGIN; SUB; FETCH X_WAV_INC; IDIV ; SUB ; end if; STORE X_SCALE_LEFT ; END ACTIONS; END COMPONENT; COMPONENT X_SCALE_RIGHT ; TYPE INTEGER ; INITIAL INVALID ; GET ACTIONS ; if livemode then; FETCH X_SCALE_LEFT ; FETCH X_DISP_RANGE ; FETCH X_WAV_INC ; IDIV ; ADD ; else; fetch 512; end if; STORE X_SCALE_RIGHT ; END ACTIONS ; END COMPONENT ; COMPONENT X_SCALE_LEFT_CH1 ; TYPE INTEGER; INITIAL INVALID ; END COMPONENT ; COMPONENT X_SCALE_RIGHT_CH1 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_CH2 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_CH2 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_CH3 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_CH3 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_CH4 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_CH4 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_WM1 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_WM1 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_WM2 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_WM2 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_WM3 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_WM3 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_WM4 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_WM4 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_FUNC1 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_FUNC1 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_FUNC2 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_FUNC2 CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_LEFT_FFT CLONE X_SCALE_LEFT_CH1 ; COMPONENT X_SCALE_RIGHT_FFT CLONE X_SCALE_LEFT_CH1 ; COMPONENT XMIN_CH1; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT XINC_CH1; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT XMIN_CH2; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT XINC_CH2; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT XMIN_CH3; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT XINC_CH3; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT XMIN_CH4; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT XINC_CH4; TYPE CONTINUOUS; INITIAL INVALID; END COMPONENT; COMPONENT XMIN_WM1; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; SELECT WM1_TIME_REF; CASE LEFT; FETCH 0; CASE CENTER; FETCH WM1_TIME_SENS; FETCH -5; MUL; CASE RIGHT; FETCH WM1_TIME_SENS; FETCH -10; MUL; END SELECT; FETCH WM1_TIME_DELAY; ADD; STORE XMIN_WM1 ; END ACTIONS ; END COMPONENT; COMPONENT XINC_WM1; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; FETCH WM1_TIME_SENS; FETCH 10; MUL; FETCH WF_SIZE; DIV; STORE XINC_WM1; END ACTIONS ; END COMPONENT; COMPONENT XMIN_WM2; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; SELECT WM2_TIME_REF; CASE LEFT; FETCH 0; CASE CENTER; FETCH WM2_TIME_SENS; FETCH -5; MUL; CASE RIGHT; FETCH WM2_TIME_SENS; FETCH -10; MUL; END SELECT; FETCH WM2_TIME_DELAY; ADD; STORE XMIN_WM2 ; END ACTIONS ; END COMPONENT; COMPONENT XINC_WM2; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; FETCH WM2_TIME_SENS; FETCH 10; MUL; FETCH WF_SIZE; DIV; STORE XINC_WM2; END ACTIONS ; END COMPONENT; COMPONENT XMIN_WM3; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; SELECT WM3_TIME_REF; CASE LEFT; FETCH 0; CASE CENTER; FETCH WM3_TIME_SENS; FETCH -5; MUL; CASE RIGHT; FETCH WM3_TIME_SENS; FETCH -10; MUL; END SELECT; FETCH WM3_TIME_DELAY; ADD; STORE XMIN_WM3 ; END ACTIONS ; END COMPONENT; COMPONENT XINC_WM3; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; FETCH WM3_TIME_SENS; FETCH 10; MUL; FETCH WF_SIZE; DIV; STORE XINC_WM3; END ACTIONS ; END COMPONENT; COMPONENT XMIN_WM4; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; SELECT WM4_TIME_REF; CASE LEFT; FETCH 0; CASE CENTER; FETCH WM4_TIME_SENS; FETCH -5; MUL; CASE RIGHT; FETCH WM4_TIME_SENS; FETCH -10; MUL; END SELECT; FETCH WM4_TIME_DELAY; ADD; STORE XMIN_WM4 ; END ACTIONS ; END COMPONENT; COMPONENT XINC_WM4; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; FETCH WM4_TIME_SENS; FETCH 10; MUL; FETCH WF_SIZE; DIV; STORE XINC_WM4; END ACTIONS ; END COMPONENT; COMPONENT XMIN_FUNC1; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; FETCH Fn1_hoz_pos ; FETCH Fn1_hoz_range ; FETCH 5 ; MUL ; SUB ; STORE XMIN_FUNC1 ; END ACTIONS ; END COMPONENT; COMPONENT XINC_FUNC1; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; FETCH Fn1_hoz_range ; FETCH 10; MUL; FETCH WF_SIZE; DIV; STORE XINC_FUNC1; END ACTIONS ; END COMPONENT; COMPONENT XMIN_FUNC2; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; FETCH Fn2_hoz_pos ; FETCH Fn2_hoz_range ; FETCH 5 ; MUL ; SUB ; STORE XMIN_FUNC2 ; END ACTIONS ; END COMPONENT; COMPONENT XINC_FUNC2; TYPE CONTINUOUS; INITIAL INVALID; GET ACTIONS ; FETCH Fn2_hoz_range ; FETCH 10; MUL; FETCH WF_SIZE; DIV; STORE XINC_FUNC2; END ACTIONS ; END COMPONENT; COMPONENT WF_SIZE_CH1; TYPE INTEGER; END COMPONENT ; COMPONENT WF_SIZE_CH2 CLONE WF_SIZE_CH1 ; COMPONENT WF_SIZE_CH3 CLONE WF_SIZE_CH1 ; COMPONENT WF_SIZE_CH4 CLONE WF_SIZE_CH1 ; COMPONENT WF_SIZE_WM1 CLONE WF_SIZE_CH1 ; COMPONENT WF_SIZE_WM2 CLONE WF_SIZE_CH1 ; COMPONENT WF_SIZE_WM3 CLONE WF_SIZE_CH1 ; COMPONENT WF_SIZE_WM4 CLONE WF_SIZE_CH1 ; COMPONENT WF_SIZE_FUNC1 CLONE WF_SIZE_CH1 ; COMPONENT WF_SIZE_FUNC2 CLONE WF_SIZE_CH1 ; COMPONENT WF_SIZE_FFT CLONE WF_SIZE_CH1 ; COMPONENT WF_DATA NOTSAVED; ! check it out - Jay's driver it is completely different TYPE INTEGER; INITIAL DONTCARE; get actions; FETCH VIEW_CH1; FETCH VIEW_CH2; ADD; FETCH VIEW_CH3; ADD; FETCH VIEW_CH4; ADD; IF STACK THEN; ! at least one channel enabled for acquisition ! GOSUB UPDATE_TRACE_DATA; IF VIEW_CH1 THEN; CODEGEN GET WF_CH1; END IF; IF VIEW_CH2 THEN; CODEGEN GET WF_CH2; END IF; IF VIEW_CH3 THEN; CODEGEN GET WF_CH3; END IF; IF VIEW_CH4 THEN; CODEGEN GET WF_CH4; END IF; CODEGEN PEEK WF_SIZE; ELSE; IF LIVEMODE THEN ; NOTIFY "No channels enabled for digitize operation"; END IF ; END IF; ! at least one channel enabled for acquisition end actions; END COMPONENT; !>> NORMAL and AVERAGE waveforms COMPONENT WF_CH1 NOTSAVED ; ! 'GET' does NOT include a 'DIGITIZE' operation ... TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE ; XMIN XMIN_CH1; XINCR XINC_CH1; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOUR CHAN1"; GET WF_SIZE; ! gets scaling parameters for CH1 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_CH1 ; if valid_data then; OUTPUT STRING ":WAV:DATA?"; if livemode then; wait spoll bit 4; ! message available end if; ! Mismatch in preambe & data in version 3 of firmware enter CHARSTRING format "#,A"; ! consume header # enter NUM_BUFFER format "#,D"; ! consume Byte fetch NUM_BUFFER; gosub Get_num_bytes; store NUM_BUFFER ; fetch NUM_BUFFER ; FETCH 2 ; DIV ; STORE WF_SIZE_CH1 ; ENTER WF_CH1 FORMAT INT16 0 WF_SIZE_CH1; ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_CH1; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_CH1; ! scales y-data in array ... GET X_MIN; FETCH X_MIN; STORE XMIN_CH1; GET X_INC; FETCH X_INC; STORE XINC_CH1; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_CH1 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_CH1 ; else; if panelmode then; notify "No valid data on Channel 1"; end if; end if; else; if num_points then; else; fetch 512; store num_points; end if; fetch num_points; dup; dup; store WF_SIZE; store WF_SIZE_CH1; store X_SCALE_RIGHT_CH1; fetch 1; store X_SCALE_LEFT_CH1; fetch 1; loop; dup; dup; fetch num_points; div; dup; fetch 1000; mul; sin; swap; fetch Demo_Freq; mul; FETCH Demo_Phase; add; sin; add; swap; store WF_CH1; dup; fetch num_points; ge; exit if stack; fetch 1; add; end loop; drop; fetch Demo_Freq; fetch 25; add; store Demo_Freq; fetch Demo_Freq; fetch 1245; gt; if stack then; fetch Demo_Freq; fetch 327; sub; store Demo_Freq; end if; fetch Demo_Phase; fetch 35; add; store Demo_Phase; fetch Demo_Phase; fetch 367; gt; if stack then; fetch Demo_Phase; fetch 327; sub; store Demo_Phase; end if; validate WF_CH1; end if ; END ACTIONS; END COMPONENT; COMPONENT WF_CH2 NOTSAVED; ! 'GET' does NOT include a 'DIGITIZE' operation ... TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE; XMIN XMIN_CH2; XINCR XINC_CH2; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOUR CHAN2"; GET WF_SIZE; ! gets scaling parameters for CH2 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_CH2 ; if valid_data then; OUTPUT STRING ":WAV:DATA?"; if livemode then; wait spoll bit 4; ! message available end if; enter CHARSTRING format "#,A"; ! consume header # enter NUM_BUFFER format "#,D"; ! consume Byte fetch NUM_BUFFER; gosub Get_num_bytes; store NUM_BUFFER ; fetch NUM_BUFFER ; FETCH 2 ; DIV ; STORE WF_SIZE_CH2 ; ENTER WF_CH2 FORMAT INT16 0 WF_SIZE_CH2; ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_CH2; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_CH2; ! scales y-data in array ... GET X_MIN; FETCH X_MIN; STORE XMIN_CH2; GET X_INC; FETCH X_INC; STORE XINC_CH2; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_CH2 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_CH2 ; else; if panelmode then; notify "No valid data on Channel 2"; end if; end if; else; if num_points then; else; fetch 512; store num_points; end if; fetch num_points; dup; dup; store WF_SIZE; store WF_SIZE_CH2; store X_SCALE_RIGHT_CH2; fetch 1; store X_SCALE_LEFT_CH2; fetch 1; loop; dup; dup; fetch num_points; div; dup; fetch 1050; mul; sin; swap; fetch Demo_Freq; mul; FETCH Demo_Phase; add; sin; add; swap; store WF_CH2; dup; fetch num_points; ge; exit if stack; fetch 1; add; end loop; drop; fetch Demo_Freq; fetch 25; add; store Demo_Freq; fetch Demo_Freq; fetch 1245; gt; if stack then; fetch Demo_Freq; fetch 327; sub; store Demo_Freq; end if; fetch Demo_Phase; fetch 35; add; store Demo_Phase; fetch Demo_Phase; fetch 367; gt; if stack then; fetch Demo_Phase; fetch 327; sub; store Demo_Phase; end if; validate WF_CH2; end if ; END ACTIONS; END COMPONENT; COMPONENT WF_CH3 NOTSAVED; ! 'GET' does NOT include a 'DIGITIZE' operation ... TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE; XMIN XMIN_CH3; XINCR XINC_CH3; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOUR CHAN3"; GET WF_SIZE; ! gets scaling parameters for CH3 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_CH3 ; if valid_data then; OUTPUT STRING ":WAV:DATA?"; if livemode then; wait spoll bit 4; ! message available end if; enter CHARSTRING format "#,A"; ! consume header # enter NUM_BUFFER format "#,D"; ! consume Byte fetch NUM_BUFFER; gosub Get_num_bytes; store NUM_BUFFER ; fetch NUM_BUFFER ; FETCH 2 ; DIV ; STORE WF_SIZE_CH3 ; ENTER WF_CH3 FORMAT INT16 0 WF_SIZE_CH3; ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_CH3; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_CH3; ! scales y-data in array ... GET X_MIN; FETCH X_MIN; STORE XMIN_CH3; GET X_INC; FETCH X_INC; STORE XINC_CH3; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_CH3 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_CH3 ; else; if panelmode then; notify "No valid data on Channel 3"; end if; end if; else; if num_points then; else; fetch 512; store num_points; end if; fetch num_points; dup; dup; store WF_SIZE; store WF_SIZE_CH3; store X_SCALE_RIGHT_CH3; fetch 1; store X_SCALE_LEFT_CH3; fetch 1; loop; dup; dup; fetch num_points; div; dup; fetch 10000; mul; sin; swap; FETCH Demo_Freq; mul; sin; fetch 1.5; add; mul; swap; store WF_CH3; dup; fetch num_points; ge; exit if stack; fetch 1; add; end loop; drop; fetch Demo_Freq; fetch 25; add; store Demo_Freq; fetch Demo_Freq; fetch 1245; gt; if stack then; fetch Demo_Freq; fetch 327; sub; store Demo_Freq; end if; fetch Demo_Phase; fetch 35; add; store Demo_Phase; fetch Demo_Phase; fetch 367; gt; if stack then; fetch Demo_Phase; fetch 327; sub; store Demo_Phase; end if; validate WF_CH3; end if ; END ACTIONS; END COMPONENT; COMPONENT WF_CH4 NOTSAVED; ! 'GET' does NOT include a 'DIGITIZE' operation ... TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE; XMIN XMIN_CH4; XINCR XINC_CH4; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOUR CHAN4"; GET WF_SIZE; ! gets scaling parameters for CH4 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_CH4 ; if valid_data then; OUTPUT STRING ":WAV:DATA?"; if livemode then; wait spoll bit 4; ! message available end if; enter CHARSTRING format "#,A"; ! consume header # enter NUM_BUFFER format "#,D"; ! consume Byte fetch NUM_BUFFER; gosub Get_num_bytes; store NUM_BUFFER ; fetch NUM_BUFFER ; FETCH 2 ; DIV ; STORE WF_SIZE_CH4 ; ENTER WF_CH4 FORMAT INT16 0 WF_SIZE_CH4; ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_CH4; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_CH4; ! scales y-data in array ... GET X_MIN; FETCH X_MIN; STORE XMIN_CH4; GET X_INC; FETCH X_INC; STORE XINC_CH4; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_CH4 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_CH4 ; else; if panelmode then; notify "No valid data on Channel 4"; end if; end if; else; if num_points then; else; fetch 512; store num_points; end if; fetch num_points; dup; dup; store WF_SIZE; store WF_SIZE_CH4; store X_SCALE_RIGHT_CH4; fetch 1; store X_SCALE_LEFT_CH4; fetch 1; loop; dup; dup; fetch num_points; div; dup; fetch 1150; mul; sin; swap; fetch Demo_Freq; mul; FETCH Demo_Phase; add; sin; add; swap; store WF_CH4; dup; fetch num_points; ge; exit if stack; fetch 1; add; end loop; drop; fetch Demo_Freq; fetch 25; add; store Demo_Freq; fetch Demo_Freq; fetch 1245; gt; if stack then; fetch Demo_Freq; fetch 327; sub; store Demo_Freq; end if; fetch Demo_Phase; fetch 35; add; store Demo_Phase; fetch Demo_Phase; fetch 367; gt; if stack then; fetch Demo_Phase; fetch 327; sub; store Demo_Phase; end if; validate WF_CH4; end if ; END ACTIONS ; END COMPONENT; ! *************** FUNCTION Waveforms ************************ COMPONENT WF_FUNC1 NOTSAVED; TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE; XMIN XMIN_FUNC1; XINCR XINC_FUNC1; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOURCE FUNC1;"; GET WF_SIZE; ! gets scaling parameters for WM1 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_FUNC1 ; OUTPUT STRING ":WAV:DATA?;"; if livemode then; wait spoll bit 4; ! message available end if; ENTER WF_FUNC1 FORMAT INT16 8,WF_SIZE_FUNC1; ! "#6" binary block format ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_FUNC1; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_FUNC1; ! scales y-data in array ... GET XMIN_FUNC1; GET XINC_FUNC1; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_FUNC1 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_FUNC1 ; end if ; END ACTIONS; END COMPONENT; COMPONENT WF_FUNC2 NOTSAVED; TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE; XMIN XMIN_FUNC2; XINCR XINC_FUNC2; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOURCE FUNC2;"; GET WF_SIZE; ! gets scaling parameters for WM1 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_FUNC2 ; OUTPUT STRING ":WAV:DATA?;"; if livemode then; wait spoll bit 4; ! message available end if; ENTER WF_FUNC2 FORMAT INT16 8,WF_SIZE_FUNC2; ! "#6" binary block format ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_FUNC2; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_FUNC2; ! scales y-data in array ... GET XMIN_FUNC2; GET XINC_FUNC2; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_FUNC2 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_FUNC2 ; end if ; END ACTIONS; END COMPONENT; ! *************** Memory Waveforms ************************ COMPONENT WF_WM1 NOTSAVED; TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE; XMIN XMIN_WM1; XINCR XINC_WM1; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOURCE WMEM1;"; GET WF_SIZE; ! gets scaling parameters for WM1 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_WM1 ; OUTPUT STRING ":WAV:DATA?;"; if livemode then; wait spoll bit 4; ! message available end if; ENTER WF_WM1 FORMAT INT16 8,WF_SIZE_WM1; ! "#6" binary block format ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_WM1; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_WM1; ! scales y-data in array ... GET XMIN_WM1 ; GET XINC_WM1; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_WM1 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_WM1 ; end if ; END ACTIONS; END COMPONENT; COMPONENT WF_WM2 NOTSAVED; TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE; XMIN XMIN_WM2; XINCR XINC_WM2; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOURCE WMEM2;"; GET WF_SIZE; ! gets scaling parameters for WM3 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_WM2 ; OUTPUT STRING ":WAV:DATA?;"; if livemode then; wait spoll bit 4; ! message available end if; ENTER WF_WM2 FORMAT INT16 8 WF_SIZE_WM2; ! "#6" binary block format ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_WM2; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_WM2; ! scales y-data in array ... GET XMIN_WM2 ; GET XINC_WM2; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_WM2 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_WM2 ; end if ; END ACTIONS; END COMPONENT; COMPONENT WF_WM3 NOTSAVED; TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE; XMIN XMIN_WM3; XINCR XINC_WM3; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOURCE WMEM3;"; GET WF_SIZE; ! gets scaling parameters for WM3 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_WM3 ; OUTPUT STRING ":WAV:DATA?;"; if livemode then; wait spoll bit 4; ! message available end if; ENTER WF_WM3 FORMAT INT16 8 WF_SIZE_WM3; ! "#6" binary block format ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_WM3; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_WM3; ! scales y-data in array ... GET XMIN_WM3 ; GET XINC_WM3; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_WM3 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_WM3 ; end if ; END ACTIONS; END COMPONENT; COMPONENT WF_WM4 NOTSAVED; TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE WAVEFORM; POINTS WF_SIZE; XMIN XMIN_WM4; XINCR XINC_WM4; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOURCE WMEM4;"; GET WF_SIZE; ! gets scaling parameters for WM4 along with wf size ... OUTPUT STRING ":WAV:DATA?;"; if livemode then; wait spoll bit 4; ! message available end if; FETCH WF_SIZE ; STORE WF_SIZE_WM4 ; ENTER WF_WM4 FORMAT INT16 6 WF_SIZE_WM4; ! "#6" binary block format ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_WM4; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_WM4; ! scales y-data in array ... GET XMIN_WM4 ; GET XINC_WM4; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_WM4 ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_WM4 ; end if ; END ACTIONS; END COMPONENT; COMPONENT WF_FFT NOTSAVED ; ! 'GET' does NOT include a 'DIGITIZE' operation ... TYPE RTRACE 6144; INITIAL INVALID; TRACETYPE MSPECTRUM ; POINTS WF_SIZE ; XMIN XMIN_FFT ; XINCR XINC_FFT ; XLOG OFF; XUNIT "s"; GET ACTIONS; if livemode then ; OUTPUT STRING ":WAV:SOUR FFT"; GET WF_SIZE; ! gets scaling parameters for CH1 along with wf size ... FETCH WF_SIZE ; STORE WF_SIZE_FFT ; OUTPUT STRING ":WAV:DATA?"; if livemode then; wait spoll bit 4; ! message available end if; enter CHARSTRING format "#,A"; ! consume header # enter NUM_BUFFER format "#,D"; ! consume Byte ENTER WF_FFT FORMAT INT16 NUM_BUFFER WF_SIZE_FFT; ENTER CHARSTRING FORMAT K; ! consumes NL at end of binary block ... MATSCALE 1,YREF WF_FFT; ! subtracts yref from array ... MATSCALE YINCREMENT,YORIGIN WF_FFT; ! scales y-data in array ... GET XMIN_FFT ; GET XINC_FFT ; !GET X_MIN; FETCH X_MIN; STORE XMIN_FFT; !GET X_INC; FETCH X_INC; STORE XINC_FFT; GET X_SCALE_LEFT ; FETCH X_SCALE_LEFT ; STORE X_SCALE_LEFT_FFT ; GET X_SCALE_RIGHT ; FETCH X_SCALE_RIGHT ; STORE X_SCALE_RIGHT_FFT ; end if ; END ACTIONS; END COMPONENT; !>> Digitize/Upload routines COMPONENT auto_update NOTSAVED; TYPE INTEGER; GET ACTIONS; !set digitize ; !gosub update_trace_data ; IF LIVEMODE THEN ; IF Meas_param1 THEN ; IF Limit_stat THEN ; ELSE ; set Meas_results ; END IF ; END IF ; END IF ; END ACTIONS; END COMPONENT; COMPONENT DIGITIZE NOTSAVED; TYPE INTEGER; INITIAL DONTCARE; COUPLED WF_TMIN,WF_TMAX,MARKER_X1_MIN,MARKER_X2_MIN,MARKER_X1_MAX,MARKER_X2_MAX ; SET ACTIONS; fetch 0; store dig_imm_flag; gosub digitize_chan; END ACTIONS; END COMPONENT; component dig_imm_flag notsaved nogen noerrcheck; type integer; END COMPONENT; component dig_ok clone dig_imm_flag; component digitize_imm notsaved noerrcheck; type integer; initial dontcare; set actions; fetch 1; store dig_imm_flag; fetch TIME_SENS; fetch 200E-3; le; ! check this out - not in Jay's driver if stack then; gosub digitize_chan; else; if panelmode then; notify "Timebase is too large for Immediate Digitize"; end if; end if; end actions; end component; actions digitize_check; fetch 1; store dig_ok; HIDE No_Trigger; ! Determine if any channels are enabled for 'digitize' ! operation -- note that the algorithm depends on a non-zero ! representation for 'ON' ... FETCH VIEW_CH1; FETCH VIEW_CH2; ADD; FETCH VIEW_CH3; ADD; FETCH VIEW_CH4; ADD; IF STACK THEN; ! at least one channel enabled for acquisition select Sweep_mode; ! check it out - not in Jay's driver case Trigger; output string "*CLS;*TRG;*OPC?"; enter stack format K; drop ; output string "*STB?"; enter stack format K; fetch 0; bit; if stack then; else; WAIT TIME .25; ! Give it a chance output string "*STB?"; enter stack format K; fetch 0; bit; if stack then; else; fetch 0; store dig_ok; SHOW No_Trigger; end if; end if; case else; end select; else; fetch 0; store dig_ok; IF LIVEMODE THEN ; notify "No channels enabled for digitize operation"; END IF ; END IF; end actions; actions digitize_chan; gosub digitize_check; if dig_ok then; clear; output string "*CLS;*SRE 32;*ESE 1"; flush; OUTPUT STRING ":DIG "; fetch 0; store dig_ok; IF VIEW_CH1 THEN; OUTPUT STRING "CHAN1"; fetch 1; store dig_ok; END IF; IF VIEW_CH2 THEN; IF dig_ok THEN; OUTPUT STRING ","; END IF; OUTPUT STRING "CHAN2"; fetch 1; store dig_ok; END IF; IF VIEW_CH3 THEN; IF dig_ok THEN; OUTPUT STRING ","; END IF; OUTPUT STRING "CHAN3"; fetch 1; store dig_ok; END IF; IF VIEW_CH4 THEN; IF dig_ok THEN; OUTPUT STRING ","; END IF; OUTPUT STRING "CHAN4"; fetch 1; store dig_ok; END IF; output string "; *OPC"; flush; if livemode then; wait spoll bit 5; end if; if dig_imm_flag then; else; !output string "; *OPC"; flush; !if livemode then; !wait spoll bit 5; !end if; GOSUB UPDATE_TRACE_DATA; end if; end if; end actions; ACTIONS UPDATE_TRACE_DATA; HIDE No_Trigger; GOSUB INVALIDATE_TRACE_DATA; IF RECALLING THEN ; ELSE ; GOSUB UPLOAD_TRACE_DATA; END IF ; END ACTIONS; ACTIONS INVALIDATE_TRACE_DATA; ! check it out - check out all commented lines. INVALIDATE WF_CH1; INVALIDATE WF_CH2; INVALIDATE WF_CH3; INVALIDATE WF_CH4; INVALIDATE WF_FUNC1; INVALIDATE WF_FUNC2; INVALIDATE WF_WM1; INVALIDATE WF_WM2; INVALIDATE WF_WM3; INVALIDATE WF_WM4; INVALIDATE RASTER; ! Check this out - the get actions for RASTER to be incl in DISP_UPLOAD END ACTIONS; ACTIONS UPLOAD_TRACE_DATA; ! Upload data from channel buffers in scope -- assumes that at least ! one channel has been digitized prior to attempted upload operation ... IF VIEW_CH1 THEN; SET VIEW_CH1 ; ! GET WF_CH1; END IF; IF VIEW_CH2 THEN; SET VIEW_CH2; ! GET WF_CH2; END IF; IF VIEW_CH3 THEN; SET VIEW_CH3; ! GET WF_CH3; END IF; IF VIEW_CH4 THEN; SET VIEW_CH4 ; ! GET WF_CH4; END IF; IF FN1_DISPLAY THEN; GET WF_FUNC1; END IF; IF FN2_DISPLAY THEN; GET WF_FUNC2; END IF; IF VIEW_WF_WM1 THEN; GET WF_WM1; END IF; IF VIEW_WF_WM2 THEN; GET WF_WM2; END IF; IF VIEW_WF_WM3 THEN; GET WF_WM3; END IF; IF VIEW_WF_WM4 THEN; GET WF_WM4; END IF; IF FFT_Display THEN ; GET WF_FFT ; END IF ; END ACTIONS; COMPONENT X_AXIS_UNITS ; TYPE DISCRETE ; VALUES s,Hz ; INITIAL s ; PANEL SET ACTIONS ; SELECT Function ; CASE Function1 ; SELECT Function1 ; CASE FFTm ; FETCH ( X_AXIS_UNITS ) Hz ; CASE ELSE ; FETCH ( X_AXIS_UNITS ) s ; END SELECT ; STORE Fn1_X_Axis_Units ; CASE Function2 ; SELECT Function2 ; CASE FFTm ; FETCH ( X_AXIS_UNITS ) Hz ; CASE ELSE ; FETCH ( X_AXIS_UNITS ) s ; END SELECT ; STORE Fn2_X_Axis_Units ; END SELECT ; SELECT MARKER_X1Y1_SRC ; CASE FFT ; FETCH ( X_AXIS_UNITS ) Hz ; CASE FN1 ; FETCH Function1 ; FETCH ( Function1 ) FFTm ; EQ ; IF STACK THEN ; FETCH ( X_AXIS_UNITS ) Hz ; ELSE ; FETCH ( X_AXIS_UNITS ) s ; END IF ; CASE FN2 ; FETCH Function2 ; FETCH ( Function2 ) FFTm ; EQ ; IF STACK THEN ; FETCH ( X_AXIS_UNITS ) Hz ; ELSE ; FETCH ( X_AXIS_UNITS ) s ; END IF ; CASE ELSE ; FETCH ( X_AXIS_UNITS ) s ; END SELECT ; STORE Mrkr1_X_Axis_Units ; SELECT MARKER_X2Y2_SRC ; CASE FFT ; FETCH ( X_AXIS_UNITS ) Hz ; CASE FN1 ; FETCH Function1 ; FETCH ( Function1 ) FFTm ; EQ ; IF STACK THEN ; FETCH ( X_AXIS_UNITS ) Hz ; ELSE ; FETCH ( X_AXIS_UNITS ) s ; END IF ; CASE FN2 ; FETCH Function2 ; FETCH ( Function2 ) FFTm ; EQ ; IF STACK THEN ; FETCH ( X_AXIS_UNITS ) Hz ; ELSE ; FETCH ( X_AXIS_UNITS ) s ; END IF ; CASE ELSE ; FETCH ( X_AXIS_UNITS ) s ; END SELECT ; STORE Mrkr2_X_Axis_Units ; END ACTIONS ; END COMPONENT ; COMPONENT Fn1_X_Axis_Units CLONE X_AXIS_UNITS ; COMPONENT Fn2_X_Axis_Units CLONE X_AXIS_UNITS ; COMPONENT Mrkr1_X_Axis_Units CLONE X_AXIS_UNITS ; COMPONENT Mrkr2_X_Axis_UNits CLONE X_AXIS_UNITS ; COMPONENT WM1_X_Axis_Units CLONE X_AXIS_UNITS ; COMPONENT WM2_X_Axis_Units CLONE X_AXIS_UNITS ; COMPONENT WM3_X_Axis_Units CLONE X_AXIS_UNITS ; COMPONENT WM4_X_Axis_Units CLONE X_AXIS_UNITS ; ! misc panel !============================== ! AUTOSCALE OPERATIONS !============================== COMPONENT AUTOSCALE NOTSAVED; TYPE INTEGER; ! check it out - all couplings in Jay's driver INITIAL DONTCARE; !COUPLED TIME_SENS,TIME_DELAY,Time_Wind_Sens,Time_Wind_Delay,TIME_REF,NUM_POINTS,Sweep_mode, !WF_TMIN,WF_TMAX,WIN_TMIN,WIN_TMAX,NUM_SCREENS,Acq_srate,Acq_type,COMPLETION,Time_Wind_Stat, !TIME_INCR, !SENS_CH1,OFFSET_CH1,VMIN_CH1,VMAX_CH1,MIN_SENS_CH1,MAX_SENS_CH1, !VIEW_CH1,VIEW_WF_CH1,OFFSET_INCR_CH1,SENS_INCR_CH1, !SENS_CH2,OFFSET_CH2,VMIN_CH2,VMAX_CH2,MIN_SENS_CH2,MAX_SENS_CH2, !VIEW_CH2,VIEW_WF_CH2,OFFSET_INCR_CH2,SENS_INCR_CH2, !SENS_CH3,OFFSET_CH3,VMIN_CH3,VMAX_CH3,MIN_SENS_CH3,MAX_SENS_CH3, !VIEW_CH3,VIEW_WF_CH3,OFFSET_INCR_CH3,SENS_INCR_CH3, !SENS_CH4,OFFSET_CH4,VMIN_CH4,VMAX_CH4,MIN_SENS_CH4,MAX_SENS_CH4, !VIEW_CH4,VIEW_WF_CH4,OFFSET_INCR_CH4,SENS_INCR_CH4, !TRIGGER_MODE,TRIGGER_HOLDOFF,TRIGGER_HYSTERSIS, !EDGE_TRIGGER_SOURCE,EDGE_TRIGGER_SLOPE,TRIGGER_INCR, !TRIGGER_LEVEL_CH1,TRIGGER_LEVEL_CH2,TRIGGER_LEVEL_CH3,TRIGGER_LEVEL_CH4, !EDGE_TRIGGER_UPDATE,STATE_TRIGGER_UPDATE,GLITCH_TRIGGER_UPDATE, !DEVENT_ARM_UPDATE,DEVENT_EVENT_UPDATE,DEVENT_TRIGGER_UPDATE, !DTIME_ARM_UPDATE,DTIME_TRIGGER_UPDATE, !Fn1_display,Fn2_display,Fn1_range,Fn2_range,Fn1_offset,Fn2_offset, !VMIN_FN1,VMAX_FN1,VMIN_FN2,VMAX_FN2, !Fn1_hoz_pos,Fn2_hoz_pos,Fn1_hoz_range,Fn2_hoz_range, !VMIN_MSMT1,VMAX_MSMT1,VMIN_MSMT2,VMAX_MSMT2,meas_source, !MARKER_MODE,MARKER_READOUT,MARKER_X1_MIN,MARKER_X2_MIN,MARKER_X1_MAX,MARKER_X2_MAX, !FFT_display,Limit_stat,FFT_SENS,FFT_OFFSET,VMIN_FFT,VMAX_FFT, !FFT_MSpan , FFT_Center_freq , FFT_Span , FFT_Resolution , !FFT1_MSpan , FFT1_Center_freq , FFT1_Span , FFT1_Resolution , !FFT2_MSpan , FFT2_Center_freq , FFT2_Span , FFT2_Resolution , !VIEW_WF_WM1,VIEW_WF_WM2,VIEW_WF_WM3,VIEW_WF_WM4, !WF_DATA; !AUTOSCALE; ! what about all the units -check it out SET ACTIONS; clear; output string "*CLS;*SRE 32;*ESE 1"; flush; OUTPUT STRING ":AUTOSCALE;";output string "*OPC"; flush ; ! *OPC - does the setting of bit if livemode then; wait spoll bit 5; end if; IF RECALLING THEN ; ELSE ; GET MARKER_X1Y1_SRC ; ! Remove these couplings above GET MARKER_X2Y2_SRC ; GET Meas_source ; GOSUB MAV_BIT ; GET TIME_SENS ; GET TIME_DELAY; GET Time_Wind_Sens; GET Time_Wind_Delay; GET TIME_REF; GET NUM_POINTS; GET Sweep_mode; GOSUB MAV_BIT ; GET WF_TMIN ; GET WF_TMAX ; GET WIN_TMIN; GET WIN_TMAX; GET NUM_SCREENS; GET Acq_srate; GET Acq_type; GET COMPLETION; GET Time_Wind_Stat; GET TIME_INCR; GOSUB MAV_BIT ; GET SENS_CH1; GET OFFSET_CH1; GET VMIN_CH1; GET VMAX_CH1; GET MIN_SENS_CH1; GET MAX_SENS_CH1; GET VIEW_CH1; GET VIEW_WF_CH1; GET OFFSET_INCR_CH1; GET SENS_INCR_CH1; GOSUB MAV_BIT ; GET SENS_CH2; GET OFFSET_CH2; GET VMIN_CH2; GET VMAX_CH2; GET MIN_SENS_CH2; GET MAX_SENS_CH2; GET VIEW_CH2; GET VIEW_WF_CH2; GET OFFSET_INCR_CH2; GET SENS_INCR_CH2; GOSUB MAV_BIT ; GET SENS_CH3; GET OFFSET_CH3; GET VMIN_CH3; GET VMAX_CH3; GET MIN_SENS_CH3; GET MAX_SENS_CH3; GET VIEW_CH3; GET VIEW_WF_CH3; GET OFFSET_INCR_CH3; GET SENS_INCR_CH3; GOSUB MAV_BIT ; GET SENS_CH4; GET OFFSET_CH4; GET VMIN_CH4; GET VMAX_CH4; GET MIN_SENS_CH4; GET MAX_SENS_CH4; GET VIEW_CH4; GET VIEW_WF_CH4; GET OFFSET_INCR_CH4; GET SENS_INCR_CH4; GOSUB MAV_BIT ; GET TRIGGER_MODE; GET TRIGGER_HOLDOFF; GET TRIGGER_HYSTERSIS; GET EDGE_TRIGGER_SOURCE; GET EDGE_TRIGGER_SLOPE; GET TRIGGER_INCR; GOSUB MAV_BIT ; GET TRIGGER_LEVEL_CH1; GET TRIGGER_LEVEL_CH2; GET TRIGGER_LEVEL_CH3; GET TRIGGER_LEVEL_CH4; GET EDGE_TRIGGER_UPDATE; GET STATE_TRIGGER_UPDATE; GET GLITCH_TRIGGER_UPDATE; GET DEVENT_ARM_UPDATE; GET DEVENT_EVENT_UPDATE; GET DEVENT_TRIGGER_UPDATE; GET DTIME_ARM_UPDATE; GET DTIME_TRIGGER_UPDATE; GOSUB MAV_BIT ; GET Fn1_display; GET Fn2_display; GET Fn1_range; GET Fn2_range; GET Fn1_offset; GET Fn2_offset; GOSUB MAV_BIT ; GET VMIN_FN1; GET VMAX_FN1; GET VMIN_FN2; GET VMAX_FN2; GET Fn1_hoz_pos; GET Fn2_hoz_pos; GET Fn1_hoz_range; GET Fn2_hoz_range; GOSUB MAV_BIT ; GET VMIN_MSMT1; GET VMAX_MSMT1; GET VMIN_MSMT2; GET VMAX_MSMT2; GET meas_source; GET MARKER_MODE; GET MARKER_READOUT; GET MARKER_X1_MIN; GET MARKER_X2_MIN; GET MARKER_X1_MAX; GET MARKER_X2_MAX; GOSUB MAV_BIT ; GET FFT_display; GET Limit_stat; GET FFT_SENS; GET FFT_OFFSET; GET VMIN_FFT; GET VMAX_FFT; GOSUB MAV_BIT ; GET FFT_MSpan ; GET FFT_Center_freq ; GET FFT_Span ; GET FFT_Resolution ; GOSUB MAV_BIT ; GET FFT1_MSpan ; GET FFT1_Center_freq ; GET FFT1_Span ; GET FFT1_Resolution ; GOSUB MAV_BIT ; GET FFT2_MSpan ; GET FFT2_Center_freq ; GET FFT2_Span ; GET FFT2_Resolution ; GOSUB MAV_BIT ; GET VIEW_WF_WM1; GET VIEW_WF_WM2; GET VIEW_WF_WM3; GET VIEW_WF_WM4; GOSUB MAV_BIT ; GET WF_DATA; END IF ; END ACTIONS; PANEL SET ACTIONS ; FETCH ( SUBSYSTEM ) TIMEBASE ; STORE SUBSYSTEM ; SET SUBSYSTEM ; SHOW TRIGGER_SUBSYSTEM,TRIGGER_SCR1 ; HIDE TRIGGER_SUBSYSTEM,TRIGGER_SCR2 ; SHOW TRIGGER_SCR2, EDGE_MODE; HIDE GLITCH_MODE ; HIDE PATTERN_MODE ; HIDE STATE_MODE ; HIDE DEVENT_MODE ; HIDE DTIME_MODE ; SET MARKER_DISP_UNITS_1 ; SET MARKER_DISP_UNITS_2 ; SET MEAS_DISP_UNITS ; SET TRIGGER_LEVEL_UNITS ; SET X_AXIS_UNITS ; FETCH 0 ; DUP ; DUP ; STORE MARKER_STATE_MAN ; STORE MARKER_STATE_VER ; STORE MARKER_STATE_HOR ; FETCH 1 ; STORE MARKER_STATE_MEAS ; FETCH 0 ; STORE MARKER_STATE_WAV ; END ACTIONS ; END COMPONENT; ACTIONS Set_Display_Ready_Bit ; clear; output string ";*CLS;*SRE 32;*ESE 1;"; flush; END ACTIONS ; ACTIONS Get_Display_Ready_Bit ; output string ";*OPC"; flush ; ! *OPC - does the setting of bit if livemode then; wait spoll bit 5; end if; END ACTIONS ; ACTIONS MAV_Bit ; if livemode then; output string ";*OPC?" ; wait spoll bit 4; ! message available enter stack ; drop ; end if; END ACTIONS ; ACTIONS Recall_Screens ; !Trigger HIDE TRIGGER_SUBSYSTEM, EDGE_MODE; HIDE TRIGGER_SUBSYSTEM, GLITCH_MODE ; HIDE TRIGGER_SUBSYSTEM, PATTERN_MODE; HIDE TRIGGER_SUBSYSTEM, STATE_MODE; HIDE TRIGGER_SUBSYSTEM, DEVENT_MODE ; HIDE TRIGGER_SUBSYSTEM, DTIME_MODE ; SELECT TRIGGER_MODE; CASE EDGE; SHOW TRIGGER_SUBSYSTEM, EDGE_MODE; CASE GLITCH ; SHOW TRIGGER_SUBSYSTEM, GLITCH_MODE; CASE PATTERN; SHOW TRIGGER_SUBSYSTEM, PATTERN_MODE; CASE STATE; SHOW TRIGGER_SUBSYSTEM, STATE_MODE; CASE DEVENTS ; SHOW TRIGGER_SUBSYSTEM, DEVENT_MODE; CASE DTIME ; SHOW TRIGGER_SUBSYSTEM, DTIME_MODE; END SELECT; !Waveform Math SET Fn1_operand1 ; SET Fn1_operand2 ; SET Function1 ; SET FN1_FFT_Show ; SET Fn2_operand1 ; SET Fn2_operand2 ; SET Function2 ; SET FN2_FFT_Show ; SELECT Acq_mode ; CASE RTIME ; HIDE ACQUISITION_EQVTMODE ; SHOW ACQUISITION_REALMODE ; CASE ETIME ; SHOW ACQUISITION_EQVTMODE ; HIDE ACQUISITION_REALMODE ; END SELECT ; !Would have had to set UNITS, or do not make them NOTSAVED !Also have to set MIN , MAX ranges END ACTIONS ; actions set_init; IF PANELMODE THEN; HIDE No_Trigger; SHOW ROOT,CRT; SHOW CONTROLS, STANDARD; SHOW ROOT, CONTROLS; SHOW STD_TIMEBASE_CONTROLS ; DISABLE CHANNEL,dummy ; ! GOSUB Set_Channel_Param ; IF LIVEMODE THEN ; FETCH First_Plug_In ; STORE CHANNEL ; ! set SUBSYSTEM will set CHANNEL in turn END IF ; !IF PANELMODE THEN ; FETCH First_Plug_in ; FETCH 1; SUB ; DUP ; STORE View_source ; STORE Upper_source ; !END IF ; SHOW TRIGGER_SUBSYSTEM,TRIGGER_SCR1 ; HIDE TRIGGER_SUBSYSTEM,TRIGGER_SCR2 ; SHOW TRIGGER_SCR2, EDGE_MODE; HIDE GLITCH_MODE ; HIDE PATTERN_MODE ; HIDE STATE_MODE ; HIDE DEVENT_MODE ; HIDE DTIME_MODE ; IF SLOT_11A THEN ; SHOW TRIGGER_N_SUBSYSTEM,TRIGGER_N_11A ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_21A ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_22A ; ELSE ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_11A ; IF SLOT_21A THEN ; SHOW TRIGGER_N_SUBSYSTEM,TRIGGER_N_21A ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_22A ; ELSE ; HIDE TRIGGER_N_SUBSYSTEM,TRIGGER_N_21A ; SHOW TRIGGER_N_SUBSYSTEM,TRIGGER_N_22A ; END IF ; END IF ; HIDE DEVENT_MODE,DEVENT_SCR1 ; HIDE DEVENT_MODE,DEVENT_SCR2 ; HIDE Math_subsystem,Function2; SHOW Math_subsystem,Function1; SHOW Function1,Function1_scr1 ; SHOW FN1_Norm_ctrls; HIDE Function1,Function1_scr2 ; SHOW Function2,Function2_scr1 ; SHOW FN2_Norm_ctrls; HIDE Function2,Function2_scr2 ; HIDE Function1,Fn1_operand_panel; HIDE Function2,Fn2_operand_panel; HIDE Fn1_FFTfn_panel ; HIDE Fn2_FFTfn_panel ; HIDE Fn1_constant_1 ; HIDE Fn1_constant_2 ; HIDE Fn1_constant_text ; HIDE Fn2_constant_1 ; HIDE Fn2_constant_2 ; HIDE Fn2_constant_text ; HIDE FFT1_Controls ; HIDE FFT2_Controls ; HIDE Meas_vmeas; HIDE Meas_tmeas; HIDE Meas_vmeas_more;show meas_main; HIDE Meas_vmeas_more1 ; HIDE Meas_tmeas_more ; HIDE Meas_fmeas ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM1 ; HIDE WMEMORY_SCR2_WM2 ; HIDE WMEMORY_SCR2_WM3 ; HIDE WMEMORY_SCR2_WM4 ; HIDE WMEMORY_SCR2 ; show measdef_main ; hide measdef_thr;hide measdef_tbase; hide measdef_delta ; SHOW ACQUISITION_EQVTMODE ; HIDE ACQUISITION_REALMODE ; SHOW FFT_SUBSYSTEM,FFT_SCR1 ; HIDE FFT_SUBSYSTEM,FFT_SCR2 ; SHOW WMEMORY_SUBSYSTEM,WMEMORY_SCR1 ; HIDE WMEMORY_SUBSYSTEM,WMEMORY_SCR2 ; DISABLE PERSIST,VARIABLE ; SHOW DISPLAY_SUBSYSTEM,DISPLAY_MEM_CONTROLS ; set SUBSYSTEM; GOSUB Get_Edge_Trigger_Levels ; set DIGITIZE ; END IF; end actions; ACTIONS Get_Plug_in1; OUTPUT STRING ":MODEL? PLUG1"; ENTER CHARSTRING FORMAT K; FETCH CHARSTRING; FETCH 1; FETCH 5; substr; STORE CHARSTRING; FETCH 1 ; SELECT CHARSTRING; CASE "54711"; STORE SLOT_11A ; FETCH (Plug_in1)HP54711A; DISABLE COUPLING_CH1,DC,LF1_50,LF1,LF2 ; DONTCARE COUPLING_CH1; DONTCARE BWLIMIT_CH1; DONTCARE CALOUT_CH1 ; GET TRIG_11A_PROBE ; CASE "54712"; STORE SLOT_12A ; FETCH (Plug_in1)HP54712A; DISABLE COUPLING_CH1,DC,LF1,LF2 ; DONTCARE BWLIMIT_CH1; DONTCARE CALOUT_CH1 ; DONTCARE SENS_711A_CH1; CASE "54713"; STORE SLOT_13A ; FETCH (Plug_in1)HP54713A; DISABLE COUPLING_CH1,LF1_50 ; DONTCARE CALOUT_CH1 ; DONTCARE SENS_711A_CH1; CASE "54721"; STORE SLOT_21A ; FETCH (Plug_in1)HP54721A; DISABLE COUPLING_CH1,DC,LF1,LF2 ; DONTCARE BWLIMIT_CH1; DONTCARE SENS_711A_CH1; GET TRIG_21A_PROBE ; CASE "54722"; STORE SLOT_22A ; FETCH (Plug_in1)HP54722A; DISABLE COUPLING_CH1,DC,LF1_50,LF1,LF2 ; DONTCARE BWLIMIT_CH1; DONTCARE SENS_711A_CH1; GET TRIG_22A_PROBE_1 ; GET TRIG_22A_PROBE_2 ; CASE ELSE; DROP ; FETCH (Plug_in1)EMPTY; IF LIVEMODE THEN ; DISABLE CHANNEL CH1; DONTCARE SENS_CH1; DONTCARE PROBE_CH1; DISABLE Fn1_operand1,Channel1 ; DISABLE Fn1_operand2,Channel1 ; DISABLE Fn2_operand1,Channel1 ; DISABLE Fn2_operand2,Channel1 ; DISABLE Meas_source,c1 ; DISABLE Meas_source2,c1 ; DISABLE MARKER_X1Y1_SRC,CH1 ; DISABLE MARKER_X2Y2_SRC,CH1 ; DISABLE View_Source,CH1 ; DISABLE Upper_source,CH1 ; DISABLE Lower_source,CH1 ; DISABLE FFT_Source,CH1 ; END IF ; END SELECT; STORE Plug_in1; GET PROBE_CH1; ! as this is unchanged during reset GET SENS_CH1; GET Min_sens_ch1; GET Max_sens_ch1; GET OFFSET_CH1; ! I have added this - it is plug-in and probe dependent , check it out GET COUPLING_CH1 ; IF PANELMODE THEN ; FETCH Plug_In1 ; GOSUB Get_Offset_Ranges ; FETCH Plug_In1 ; GOSUB Get_Trigger_Ranges ; END IF ; END ACTIONS; ACTIONS Get_Plug_in2; OUTPUT STRING ":MODEL? PLUG2"; ENTER CHARSTRING FORMAT K; FETCH CHARSTRING; FETCH 1; FETCH 5; substr; STORE CHARSTRING; FETCH 2 ; SELECT CHARSTRING; CASE "54711"; STORE SLOT_11A ; FETCH (Plug_in2)HP54711A; DISABLE COUPLING_CH2,DC,LF1_50,LF1,LF2 ; DONTCARE COUPLING_CH2; DONTCARE BWLIMIT_CH2; DONTCARE CALOUT_CH2 ; GET TRIG_11A_PROBE ; CASE "54712"; STORE SLOT_12A ; FETCH (Plug_in2)HP54712A; DISABLE COUPLING_CH2,DC,LF1,LF2 ; DONTCARE BWLIMIT_CH2; DONTCARE CALOUT_CH2 ; DONTCARE SENS_711A_CH2; CASE "54713"; STORE SLOT_13A ; FETCH (Plug_in2)HP54713A; DISABLE COUPLING_CH2,LF1_50 ; DONTCARE CALOUT_CH2 ; DONTCARE SENS_711A_CH2; CASE "54721"; STORE SLOT_21A ; FETCH (Plug_in2)HP54721A; DISABLE COUPLING_CH2,DC,LF1,LF2 ; DONTCARE BWLIMIT_CH2; DONTCARE SENS_711A_CH2; GET TRIG_21A_PROBE ; CASE ELSE; DROP ; FETCH (Plug_in2)EMPTY; IF LIVEMODE THEN ; DISABLE CHANNEL CH2; DONTCARE SENS_CH2; DONTCARE PROBE_CH2; DISABLE Fn1_operand1,Channel2 ; DISABLE Fn1_operand2,Channel2 ; DISABLE Fn2_operand1,Channel2 ; DISABLE Fn2_operand2,Channel2 ; DISABLE Meas_source,c2 ; DISABLE Meas_source2,c2 ; DISABLE MARKER_X1Y1_SRC,CH2 ; DISABLE MARKER_X2Y2_SRC,CH2 ; DISABLE View_Source,CH2 ; DISABLE Upper_source,CH2 ; DISABLE Lower_source,CH2 ; DISABLE FFT_Source,CH2 ; END IF ; END SELECT; STORE Plug_in2; GET PROBE_CH2; GET SENS_CH2; GET Min_sens_ch2; GET Max_sens_ch2; GET OFFSET_CH2; ! I have added this - it is plug-in and probe dependent , check it out GET COUPLING_CH2 ; IF PANELMODE THEN ; FETCH Plug_In2 ; GOSUB Get_Offset_Ranges ; FETCH Plug_In2 ; GOSUB Get_Trigger_Ranges ; END IF ; END ACTIONS; ACTIONS Get_Plug_in3; OUTPUT STRING ":MODEL? PLUG3"; ENTER CHARSTRING FORMAT K; FETCH CHARSTRING; FETCH 1; FETCH 5; substr; STORE CHARSTRING; FETCH 3 ; SELECT CHARSTRING; CASE "54711"; STORE SLOT_11A ; FETCH (Plug_in3)HP54711A; DISABLE COUPLING_CH3,DC,LF1_50,LF1,LF2 ; DONTCARE COUPLING_CH3; DONTCARE BWLIMIT_CH3; DONTCARE CALOUT_CH3 ; GET TRIG_11A_PROBE ; CASE "54712"; STORE SLOT_12A ; FETCH (Plug_in3)HP54712A; DISABLE COUPLING_CH3,DC,LF1,LF2 ; DONTCARE BWLIMIT_CH3; DONTCARE CALOUT_CH3 ; DONTCARE SENS_711A_CH3; CASE "54713"; STORE SLOT_13A ; FETCH (Plug_in3)HP54713A; DISABLE COUPLING_CH3,LF1_50 ; DONTCARE CALOUT_CH3 ; DONTCARE SENS_711A_CH3; CASE "54721"; STORE SLOT_21A ; FETCH (Plug_in3)HP54721A; DISABLE COUPLING_CH3,DC,LF1,LF2 ; DONTCARE BWLIMIT_CH3; DONTCARE SENS_711A_CH3; GET TRIG_21A_PROBE ; CASE ELSE; DROP ; FETCH (Plug_in3)EMPTY; IF LIVEMODE THEN ; DISABLE CHANNEL CH3; DONTCARE SENS_CH3; DONTCARE PROBE_CH3; DISABLE Fn1_operand1,Channel3 ; DISABLE Fn1_operand2,Channel3 ; DISABLE Fn2_operand1,Channel3 ; DISABLE Fn2_operand2,Channel3 ; DISABLE Meas_source,c3 ; DISABLE Meas_source2,c3 ; DISABLE MARKER_X1Y1_SRC,CH3 ; DISABLE MARKER_X2Y2_SRC,CH3 ; DISABLE View_Source,CH3 ; DISABLE Upper_source,CH3 ; DISABLE Lower_source,CH3 ; DISABLE FFT_Source,CH3 ; END IF ; END SELECT; STORE Plug_in3; GET PROBE_CH3; GET SENS_CH3; GET Min_sens_ch3; GET Max_sens_ch3; GET OFFSET_CH3; ! I have added this - it is plug-in and probe dependent , check it out GET COUPLING_CH3 ; IF PANELMODE THEN ; FETCH Plug_In3 ; GOSUB Get_Offset_Ranges ; FETCH Plug_In3 ; GOSUB Get_Trigger_Ranges ; END IF ; END ACTIONS; ACTIONS Get_Plug_in4; OUTPUT STRING ":MODEL? PLUG4"; ENTER CHARSTRING FORMAT K; FETCH CHARSTRING; FETCH 1; FETCH 5; substr; STORE CHARSTRING; FETCH 4 ; SELECT CHARSTRING; CASE "54711"; STORE SLOT_11A ; FETCH (Plug_in4)HP54711A; DISABLE COUPLING_CH4,DC,LF1_50,LF1,LF2 ; DONTCARE COUPLING_CH4; DONTCARE BWLIMIT_CH4; DONTCARE CALOUT_CH4 ; GET TRIG_11A_PROBE ; CASE "54712"; STORE SLOT_12A ; FETCH (Plug_in4)HP54712A; DISABLE COUPLING_CH4,DC,LF1,LF2 ; DONTCARE BWLIMIT_CH4; DONTCARE CALOUT_CH4 ; DONTCARE SENS_711A_CH4; CASE "54713"; STORE SLOT_13A ; FETCH (Plug_in4)HP54713A; DISABLE COUPLING_CH4,LF1_50 ; DONTCARE CALOUT_CH4 ; DONTCARE SENS_711A_CH4; CASE "54721"; STORE SLOT_21A ; FETCH (Plug_in4)HP54721A; DISABLE COUPLING_CH4,DC,LF1,LF2 ; DONTCARE BWLIMIT_CH4; DONTCARE SENS_711A_CH3; GET TRIG_21A_PROBE ; CASE ELSE; DROP ; FETCH (Plug_in4)EMPTY; IF LIVEMODE THEN ; DISABLE CHANNEL CH4; DONTCARE SENS_CH4; DONTCARE PROBE_CH4; DISABLE Fn1_operand1,Channel4 ; DISABLE Fn1_operand2,Channel4 ; DISABLE Fn2_operand1,Channel4 ; DISABLE Fn2_operand2,Channel4 ; DISABLE Meas_source,c4 ; DISABLE Meas_source2,c4 ; DISABLE MARKER_X1Y1_SRC,CH4 ; DISABLE MARKER_X2Y2_SRC,CH4 ; DISABLE View_Source,CH4 ; DISABLE Upper_source,CH4 ; DISABLE Lower_source,CH4 ; DISABLE FFT_Source,CH4 ; END IF ; END SELECT; STORE Plug_in4; GET PROBE_CH4; GET SENS_CH4; GET Min_sens_ch4; GET Max_sens_ch4; GET OFFSET_CH4; ! I have added this - it is plug-in and probe dependent , check it out GET COUPLING_CH4 ; IF PANELMODE THEN ; FETCH Plug_In4 ; GOSUB Get_Offset_Ranges ; FETCH Plug_In4 ; GOSUB Get_Trigger_Ranges ; END IF ; END ACTIONS; ACTIONS Get_Mainframe; OUTPUT STRING ":MODEL? FRAME"; ENTER CHARSTRING FORMAT K; FETCH CHARSTRING; FETCH STRING "54710"; POS; IF STACK THEN; FETCH (Mainframe)HP54710A; ELSE; FETCH (Mainframe)HP54720A; END IF; STORE Mainframe; END ACTIONS; ACTIONS Get_First_Plug_In ; IF Plug_In1 THEN ; FETCH 1 ; STORE First_Plug_In ; FETCH 1 ; DUP ; STORE VIEW_CH1 ; STORE VIEW_WF_CH1 ; OUTPUT STRING ":MEAS:SOURCE CHAN1,CHAN1;"; ELSE ; IF Plug_In2 THEN ; FETCH 2 ; STORE First_Plug_In ; FETCH 1 ; DUP ; STORE VIEW_CH2 ; STORE VIEW_WF_CH2 ; OUTPUT STRING ":MEAS:SOURCE CHAN2,CHAN2;"; ELSE ; IF Plug_In3 THEN ; FETCH 3 ; STORE First_Plug_In ; FETCH 1 ; DUP ; STORE VIEW_CH3 ; STORE VIEW_WF_CH3 ; OUTPUT STRING ":MEAS:SOURCE CHAN3,CHAN3;"; ELSE ; IF Plug_In4 THEN ; FETCH 4 ; STORE First_Plug_In ; FETCH 1 ; DUP ; STORE VIEW_CH4 ; STORE VIEW_WF_CH4 ; OUTPUT STRING ":MEAS:SOURCE CHAN4,CHAN4;"; ELSE ; FETCH 0 ; STORE First_Plug_In ; END IF ; END IF ; END IF ; END IF ; END ACTIONS ; actions set_model; GOSUB Enable_all_disabled_comps ; GOSUB Disable_Limit_Source ; DISABLE Plug_in2,dum22 ; DISABLE Plug_in3,dum22 ; DISABLE Plug_in4,dum22 ; IF LIVEMODE THEN ; GET Mainframe; GET Plug_in1; GET Plug_in2; GET Plug_in3; GET Plug_in4; GET First_Plug_In; !SET Num_points; GOSUB Fix_Trigger_Inputs ; GOSUB Fix_Max_Record_Length ; GOSUB Fix_Function_Operands ; GOSUB Fix_Meas_Sources ; GOSUB Fix_Marker_Sources ; GOSUB Fix_FFT_Source ; ELSE ; FETCH (Mainframe)HP54720A; STORE Mainframe ; FETCH (Plug_In1)EMPTY ; STORE Plug_In1 ; FETCH (Plug_In2)EMPTY ; STORE Plug_In2 ; FETCH (Plug_In3)EMPTY ; STORE Plug_In3 ; FETCH (Plug_In4)EMPTY ; STORE Plug_In4 ; FETCH 1 ; STORE First_Plug_In ; END IF ; end actions; ACTIONS Check_version ; if livemode then ; output string ";*IDN?" ; enter charstring format 'K' ; fetch charstring;fetch 24;fetch 255;substr; !get rid of leading chars. dup; fetch ","; pos; fetch 1; add; fetch 255; substr; val; !we now have the revision number fetch 3.0; GE; !is the revision > 3.00 if stack then ; else ; fetch 1 ; store stop_flag ; end if ; end if ; END ACTIONS ; component stop_flag ; type integer ; initial 0 ; end component ; actions flash_warning ; show flash_warning ; end actions ; ACTIONS Enable_all_disabled_comps ; ENABLE Trigger_mode,EDGE,GLITCH,PATTERN,STATE,DEVENTS,DTIME ; ENABLE Edge_trigger_source,CH1,CH2,CH3,CH4 ; ENABLE Glitch_trigger_source,CH1,CH2,CH3,CH4 ; ENABLE Devent_arm_source,CH1,CH2,CH3,CH4 ; ENABLE Devent_trigger_source,CH1,CH2,CH3,CH4 ; ENABLE Devent_event_source,CH1,CH2,CH3,CH4 ; ENABLE Dtime_arm_source,CH1,CH2,CH3,CH4 ; ENABLE Dtime_trigger_source,CH1,CH2,CH3,CH4 ; ENABLE State_trigger_source,CH1,CH2,CH3,CH4 ; ENABLE Coupling_CH1,DC,DC50,LF1_50,LF1,LF2 ; ENABLE Coupling_CH2,DC,DC50,LF1_50,LF1,LF2 ; ENABLE Coupling_CH3,DC,DC50,LF1_50,LF1,LF2 ; ENABLE Coupling_CH4,DC,DC50,LF1_50,LF1,LF2 ; ENABLE Channel,CH1,CH2,CH3,CH4; ENABLE Fn1_operand1,Channel1, Channel2, Channel3, Channel4,WM1,WM2,WM3,WM4,CONST ; ENABLE Fn1_operand2,Channel1, Channel2, Channel3, Channel4,WM1,WM2,WM3,WM4,CONST ; ENABLE Fn2_operand1,Channel1, Channel2, Channel3, Channel4,Func1,WM1,WM2,WM3,WM4,CONST; ENABLE Fn2_operand2,Channel1, Channel2, Channel3, Channel4,Func1,WM1,WM2,WM3,WM4,CONST; ENABLE Meas_source,c1,c2,c3,c4,fn1,fn2,wm1,wm2,wm3,wm4 ; ENABLE Meas_source2,c1,c2,c3,c4,fn1,fn2,wm1,wm2,wm3,wm4 ; ENABLE Marker_X1Y1_src,CH1,CH2,CH3,CH4,FN1,FN2,WM1,WM2,WM3,WM4 ; ENABLE Marker_X2Y2_src,CH1,CH2,CH3,CH4,FN1,FN2,WM1,WM2,WM3,WM4 ; ENABLE View_Source,CH1,CH2,CH3,CH4 ; ENABLE Upper_source,CH1,CH2,CH3,CH4 ; ENABLE Lower_source,CH1,CH2,CH3,CH4 ; ENABLE FFT_Source,CH1,CH2,CH3,CH4 ; VALIDATE COUPLING_CH1; VALIDATE BWLIMIT_CH1 ; VALIDATE CALOUT_CH1 ; VALIDATE SENS_711A_CH1; VALIDATE SENS_CH1 ; VALIDATE PROBE_CH1 ; VALIDATE COUPLING_CH2; VALIDATE BWLIMIT_CH2 ; VALIDATE CALOUT_CH2 ; VALIDATE SENS_711A_CH2; VALIDATE SENS_CH2 ; VALIDATE PROBE_CH2 ; VALIDATE COUPLING_CH3; VALIDATE BWLIMIT_CH3 ; VALIDATE CALOUT_CH3 ; VALIDATE SENS_711A_CH3; VALIDATE SENS_CH3 ; VALIDATE PROBE_CH3 ; VALIDATE COUPLING_CH4; VALIDATE BWLIMIT_CH4 ; VALIDATE CALOUT_CH4 ; VALIDATE SENS_711A_CH4; VALIDATE SENS_CH4 ; VALIDATE PROBE_CH4 ; DISABLE UNITS_CH1_DISP,VOLT,AMP,WATT,UNKN ; DISABLE UNITS_CH2_DISP,VOLT,AMP,WATT,UNKN ; DISABLE UNITS_CH3_DISP,VOLT,AMP,WATT,UNKN ; DISABLE UNITS_CH4_DISP,VOLT,AMP,WATT,UNKN ; DISABLE UNITS_FN1_DISP,VOLT,AMP,WATT,UNKN,DB ; DISABLE UNITS_FN2_DISP,VOLT,AMP,WATT,UNKN,DB ; DISABLE MEAS_DISP_UNITS,VOLT,AMP,WATT,UNKN,DB ; DISABLE MARKER_DISP_UNITS_1,VOLT,AMP,WATT,UNKN,DB ; DISABLE MARKER_DISP_UNITS_2,VOLT,AMP,WATT,UNKN,DB ; DISABLE TRIGGER_LEVEL_UNITS,VOLT,AMP,WATT,UNKN ; DISABLE DEVENTS_ARM_UNITS,VOLT,AMP,WATT,UNKN ; DISABLE DEVENTS_TRIGGER_UNITS,VOLT,AMP,WATT,UNKN ; DISABLE DEVENTS_EVENT_UNITS,VOLT,AMP,WATT,UNKN ; DISABLE DTIME_ARM_UNITS,VOLT,AMP,WATT,UNKN ; DISABLE DTIME_TRIGGER_UNITS,VOLT,AMP,WATT,UNKN ; DISABLE Fn1_X_Axis_Units,s,Hz ; DISABLE Fn2_X_Axis_Units,s,Hz ; DISABLE Mrkr1_X_Axis_Units,s,Hz ; DISABLE Mrkr2_X_Axis_Units,s,Hz ; DISABLE WM1_X_Axis_Units,s,Hz ; DISABLE WM2_X_Axis_Units,s,Hz ; DISABLE WM3_X_Axis_Units,s,Hz ; DISABLE WM4_X_Axis_Units,s,Hz ; END ACTIONS ; COMPONENT Demo_Freq notsaved; type continuous; initial 1000; END COMPONENT; COMPONENT Demo_Phase notsaved; type continuous; initial 0; END COMPONENT; COMPONENT Acq_Comp_State ; TYPE DISCRETE ; VALUES OFF,ON ; INITIAL INVALID; COUPLED VIEW_CH1,VIEW_WF_CH1,VIEW_CH2,VIEW_WF_CH2, VIEW_CH3,VIEW_WF_CH3,VIEW_CH4,VIEW_WF_CH4, ACQ_TYPE ; SET ACTIONS ; OUTPUT STRING ":ACQ:COMP:STAT "; OUTPUT DEFAULT TABLE "OFF","ON" ; END ACTIONS ; GET ACTIONS ; OUTPUT STRING ":ACQ:COMP:STAT?" ; ENTER DEFAULT FORMAT K ; END ACTIONS ; END COMPONENT ; ! ========================================================= ! PANEL ELEMENTS ! ========================================================= PANEL ROOT; POSITION 0,0; SIZE 428,213; PANEL CRT; POSITION 0,47; SIZE 214,166; !FOREGROUND (255,255,255),100; XY WF_DATA; POSITION 5,23; SIZE 204,138; SCALE -5,5,-4,4; GRATICULE XY_GRAT1; FOREGROUND (148,139,123) 100; ! Beige Gray TRACE WF_CH1[1:WF_SIZE_CH1]; STATE VIEW_WF_CH1; !connect connect_state; connect connect_dots ; FOREGROUND (255,255,0),100; SCALE X_SCALE_LEFT_CH1,X_SCALE_RIGHT_CH1,VMIN_CH1,VMAX_CH1; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_CH1,VMAX_CH1; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_CH1,VMAX_CH1; END MARKER; END TRACE; TRACE WF_CH2[1:WF_SIZE_CH2]; STATE VIEW_WF_CH2; !connect connect_state; connect connect_dots ; FOREGROUND (0,200,50),100; SCALE X_SCALE_LEFT_CH2,X_SCALE_RIGHT_CH2,VMIN_CH2,VMAX_CH2; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_CH2,VMAX_CH2; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_CH2,VMAX_CH2; END MARKER; END TRACE; TRACE WF_CH3[1:WF_SIZE_CH3]; STATE VIEW_WF_CH3; !connect connect_state; connect connect_dots ; FOREGROUND (120,184,210),100; SCALE X_SCALE_LEFT_CH3,X_SCALE_RIGHT_CH3,VMIN_CH3,VMAX_CH3; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_CH3,VMAX_CH3; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_CH3,VMAX_CH3; END MARKER; END TRACE; TRACE WF_CH4[1:WF_SIZE_CH4]; STATE VIEW_WF_CH4; !connect connect_state; connect connect_dots ; FOREGROUND (255,0,255),100; SCALE X_SCALE_LEFT_CH4,X_SCALE_RIGHT_CH4,VMIN_CH4,VMAX_CH4; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_CH4,VMAX_CH4; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_CH4,VMAX_CH4; END MARKER; END TRACE; TRACE WF_FUNC1[1:WF_SIZE_FUNC1]; STATE FN1_DISPLAY; FOREGROUND (255,255,0),100; !yellow SCALE X_SCALE_LEFT_FUNC1,X_SCALE_RIGHT_FUNC1,VMIN_FN1,VMAX_FN1; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_FN1,VMAX_FN1; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_FN1,VMAX_FN1; END MARKER; END TRACE; TRACE WF_FUNC2[1:WF_SIZE_FUNC2]; STATE FN2_DISPLAY; FOREGROUND (0,200,50),100; !Rich green SCALE X_SCALE_LEFT_FUNC2,X_SCALE_RIGHT_FUNC2,VMIN_FN2,VMAX_FN2; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_FN2,VMAX_FN2; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_FN2,VMAX_FN2; END MARKER; END TRACE; TRACE WF_WM1[1:WF_SIZE_WM1]; STATE VIEW_WF_WM1; FOREGROUND (0,255,255),100; !Cyan SCALE X_SCALE_LEFT_WM1,X_SCALE_RIGHT_WM1,VMIN_WM1,VMAX_WM1; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_WM1,VMAX_WM1; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_WM1,VMAX_WM1; END MARKER; END TRACE; TRACE WF_WM2[1:WF_SIZE_WM2]; STATE VIEW_WF_WM2; FOREGROUND (0,255,255),100; !Cyan SCALE X_SCALE_LEFT_WM2,X_SCALE_RIGHT_WM2,VMIN_WM2,VMAX_WM2; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_WM2,VMAX_WM2; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_WM2,VMAX_WM2; END MARKER; END TRACE; TRACE WF_WM3[1:WF_SIZE_WM3]; STATE VIEW_WF_WM3; FOREGROUND (0,255,255),100; !Cyan SCALE X_SCALE_LEFT_WM3,X_SCALE_RIGHT_WM3,VMIN_WM3,VMAX_WM3; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_WM3,VMAX_WM3; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_WM3,VMAX_WM3; END MARKER; END TRACE; TRACE WF_WM4[1:WF_SIZE_WM4]; STATE VIEW_WF_WM4; FOREGROUND (0,255,255),100; !Cyan SCALE X_SCALE_LEFT_WM4,X_SCALE_RIGHT_WM4,VMIN_WM4,VMAX_WM4; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_WM4,VMAX_WM4; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_WM4,VMAX_WM4; END MARKER; END TRACE ; TRACE WF_FFT[1:WF_SIZE_FFT]; STATE FFT_Display ; !connect connect_state; connect connect_dots ; FOREGROUND (120,184,210),100; SCALE X_SCALE_LEFT_FFT,X_SCALE_RIGHT_FFT,VMIN_FFT,VMAX_FFT; MARKER MARKER_X1_POS,MARKER_Y1_POS ; TYPE POINT; FOREGROUND (230,30,30),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_FFT,VMAX_FFT; END MARKER; MARKER MARKER_X2_POS,MARKER_Y2_POS ; TYPE POINT; FOREGROUND (120,184,210),100; STATE MARKER_STATE_WAV ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_FFT,VMAX_FFT; END MARKER; END TRACE; ! V/T Markers MARKER MARKER_X1_POS ; TYPE VERTICAL; FOREGROUND (230,30,30),100; STATE MARKER_STATE_VER ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_MSMT1,VMAX_MSMT1; END MARKER; MARKER MARKER_X2_POS ; TYPE VERTICAL ; !FOREGROUND (230,30,30),100; FOREGROUND (120,184,210),100; state MARKER_STATE_VER ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_MSMT2,VMAX_MSMT2; END MARKER; MARKER MARKER_Y1_POS ; TYPE HORIZONTAL ; FOREGROUND (230,30,30),100; state MARKER_STATE_HOR ; SCALE MARKER_X1_MIN,MARKER_X1_MAX,VMIN_MSMT1,VMAX_MSMT1; END MARKER; MARKER MARKER_Y2_POS ; TYPE HORIZONTAL ; !FOREGROUND (230,30,30),100; FOREGROUND (120,184,210),100; state MARKER_STATE_HOR ; SCALE MARKER_X2_MIN,MARKER_X2_MAX,VMIN_MSMT2,VMAX_MSMT2; END MARKER; END XY; TOGGLE VIEW_CH1; POSITION 5,0; SIZE 46,19; LABEL "CH1","CH1"; FOREGROUND (255,255,0),100; BACKGROUND (105,95,80),0; STYLE "HIGHLIGHT"; END TOGGLE; TOGGLE VIEW_CH2; POSITION 58,0; SIZE 46,19; LABEL "CH2","CH2"; FOREGROUND (0,200,50),100; BACKGROUND (105,95,80),0; STYLE "HIGHLIGHT"; END TOGGLE; TOGGLE VIEW_CH3; POSITION 111,0; SIZE 46,19; LABEL "CH3","CH3"; FOREGROUND (120,184,210),100; BACKGROUND (105,95,80),0; STYLE "HIGHLIGHT"; END TOGGLE; TOGGLE VIEW_CH4; POSITION 164,0; SIZE 46,19; LABEL "CH4","CH4"; FOREGROUND (255,0,255),100; BACKGROUND (105,95,80),0; STYLE "HIGHLIGHT"; END TOGGLE; END PANEL; BUTTON DIGITIZE; POSITION 5,25; SIZE 77,19; LABEL "Digitize"; background (0,130,70) 0; END BUTTON; PANEL No_Trigger; POSITION 4,24; SIZE 119,21; BACKGROUND (255,255,0) 0; BUTTON DIGITIZE; POSITION 1,1; SIZE 31,19; LABEL "Dig"; background (0,130,70) 0; END BUTTON; TEXT 36,1 "NotTrig'd"; END PANEL; BUTTON AUTOSCALE; POSITION 124,25; SIZE 86,19; LABEL "Autoscale"; background (0,130,70) 0; END BUTTON; BUTTON SINGLE; POSITION 5,3; SIZE 64,19; LABEL "Single"; background (0,130,70) 0; END BUTTON; BUTTON STOP; POSITION 76,3; SIZE 63,19; LABEL "Stop"; background (230,30,30) 0; END BUTTON; BUTTON RUN; POSITION 146,3; SIZE 64,19; LABEL "Run"; background (0,130,70) 0; END BUTTON; BUTTON RESET; POSITION 220,188; SIZE 54,19; BACKGROUND (0,130,70), 0; LABEL "Reset"; END BUTTON; DISCRETE SUBSYSTEM; POSITION 286,188; SIZE 136,19; BACKGROUND (75,0,240), 0; LABEL "Main Panel", "Timebase Panel","Channel Panel","Trigger Panel","Trigger N", "Wfm Math Panel","Measure Panel", "Measure DEF","Limit Test","Markers Panel","ACQ Panel", "Waveform Panel","FFT Panel","Display Panel", "W/F Memory","MISC Panel", "Status Panel", "About Panel"; END DISCRETE; PANEL Flash_warning ; POSITION 0,0 ; SIZE 428, 213 ; Text 90,140 "Please upgrade your firmware" ; Text 90,110 " version to 3.00 or above " ; Text 90,80 " for driver compatibility " ; END PANEL ; ! ========================= ! CONTROL PANELS ! ========================= PANEL CONTROLS; POSITION 214,0; SIZE 214,183; !POSITION 214,0; !SIZE 214,213; FOREGROUND (255,255,255),100; ! ========================= ! RESET & MAIN MENU ! ========================= !BUTTON RESET; ! POSITION 6,188; ! SIZE 54,19; ! BACKGROUND (0,130,70), 0; ! LABEL "Reset"; !END BUTTON; !DISCRETE SUBSYSTEM; ! POSITION 72,188; ! SIZE 136,19; ! BACKGROUND (75,0,240), 0; ! ! LABEL "Main Panel", "Timebase Panel","Channel Panel","Trigger Panel", ! "Wfm Math Panel","Measure Panel", "Measure DEF","Markers Panel", ! "Waveform Panel","Display Panel", "MISC Panel", "Status Panel", "About Panel"; ! !END DISCRETE; ! ================================ ! SUBPANEL: SYSTEM UTILITIES ! ================================ PANEL STANDARD; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 5,157 "Timebase"; CONTINUOUS TIME_SENS; POSITION 115,157; SIZE 75,19; FORMAT "5 DIGITS"; STEP LOG 3,1; END CONTINUOUS; button disp_temp; position 190,157; size 20,19; background (105,95,80),0; label "s/"; end button; text 5,130,"Sweep Mode"; TOGGLE Sweep_mode; POSITION 115,128; SIZE 95,19; LABEL "Free Run","TRIG'ed" ; END TOGGLE ; text 77,95,"SENS"; text 155,95,"Probe"; TEXT 5,69 "CH1"; CONTINUOUS SENS_CH1; POSITION 50,69; SIZE 70,19; FORMAT "4 DIGITS"; STEP LOG 3,1; END CONTINUOUS; DISCRETE UNITS_CH1_DISP ; position 120,69; size 20,19; background (105,95,80),0; label "V/","A/","W/","U/" ; end DISCRETE ; CONTINUOUS PROBE_CH1; POSITION 145,69; SIZE 65,19; FORMAT "4 DIGITS"; END CONTINUOUS ; TEXT 5,47 "CH2"; CONTINUOUS SENS_CH2; POSITION 50,47; SIZE 70,19; FORMAT "4 DIGITS"; STEP LOG 3,1; END CONTINUOUS; DISCRETE UNITS_CH2_DISP; position 120,47; size 20,19; background (105,95,80),0; label "V/","A/","W/","U/" ; end DISCRETE; CONTINUOUS PROBE_CH2; POSITION 145,47; SIZE 65,19; FORMAT "4 DIGITS"; END CONTINUOUS ; TEXT 5,25 "CH3"; CONTINUOUS SENS_CH3; POSITION 50,25; SIZE 70,19; FORMAT "4 DIGITS"; STEP LOG 3,1; END CONTINUOUS; DISCRETE UNITS_CH3_DISP; position 120,25; size 20,19; background (105,95,80),0; label "V/","A/","W/","U/" ; end DISCRETE; CONTINUOUS PROBE_CH3; POSITION 145,25; SIZE 65,19; FORMAT "4 DIGITS"; END CONTINUOUS ; TEXT 5,3 "CH4"; CONTINUOUS SENS_CH4; POSITION 50,3; SIZE 70,19; FORMAT "4 DIGITS"; STEP LOG 3,1; END CONTINUOUS; DISCRETE UNITS_CH4_DISP; position 120,3; size 20,19; background (105,95,80),0; label "V/","A/","W/","U/" ; end DISCRETE; CONTINUOUS PROBE_CH4; POSITION 145,3; SIZE 65,19; FORMAT "4 DIGITS"; END CONTINUOUS ; END PANEL; ! SYSTEM SUBSYSTEM ! ========================= ! SUBPANEL: WAVEFORM ! ========================= PANEL WAVEFORM_SUBSYSTEM; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 5,162 "Source" ; DISCRETE View_Source ; POSITION 90,162; SIZE 120,19; LABEL "CH1","CH2","CH3","CH4","FUNC1","FUNC2","FFT","WMEM1","WMEM2","WMEM3","WMEM4"; END DISCRETE ; TEXT 5,140 "Wave Type"; DISPLAY WF_TYPE; POSITION 90,140; SIZE 120,19; END DISPLAY; TEXT 5,118,"MIN Count"; DISPLAY HIT_COUNT; POSITION 90,118; SIZE 120,19; END DISPLAY; TEXT 5,96,"% COMP"; DISPLAY Time_Buckt; POSITION 90,96; SIZE 120,19; END DISPLAY; TEXT 5,72,"Points"; DISPLAY Wav_points; POSITION 90,72; SIZE 120,19; END DISPLAY; END PANEL ; ! of WAVEFORM_SUBSYSTEM ! ========================= ! SUBPANEL: FFT ! ========================= PANEL FFT_SUBSYSTEM ; POSITION 0,0; SIZE 214,183; PANEL FFT_SCR1 ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 5,160 "Display" ; TOGGLE FFT_Display ; POSITION 110,160; SIZE 100,19; LABEL "Off","On" ; END TOGGLE; TEXT 5,138 "Source" ; DISCRETE FFT_Source ; POSITION 110,138; SIZE 100,19; LABEL "CH1","CH2","CH3","CH4","FUNC1","FUNC2","WMEM1","WMEM2","WMEM3","WMEM4","CONS"; END DISCRETE ; TEXT 5,116 "Magnify" ; TOGGLE FFT_Magnify; POSITION 110,116; SIZE 100,19; LABEL "Off","On"; UPDATE ACTIONS; SELECT FFT_Magnify; CASE OFF; HIDE FFT_Magnify_On ; SHOW FFT_Magnify_Off; CASE ON; HIDE FFT_Magnify_Off; SHOW FFT_Magnify_On; END SELECT; END ACTIONS; END TOGGLE; PANEL FFT_Magnify_On ; POSITION 1,72 ; SIZE 213,44 ; TEXT 5,22 "MAG Span" ; CONTINUOUS FFT_Mspan; POSITION 110,22; SIZE 80,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,22; size 20,19; background (105,95,80),0; label "Hz"; end button; TEXT 5,0 "Center FREQ" ; CONTINUOUS FFT_Center_Freq; POSITION 110,0; SIZE 80,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,0; size 20,19; background (105,95,80),0; label "Hz"; end button; END PANEL ; PANEL FFT_Magnify_Off ; POSITION 1,72 ; SIZE 213,44 ; TEXT 5,22 "Span" ; CONTINUOUS FFT_Span; POSITION 110,22; SIZE 80,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,22; size 20,19; background (105,95,80),0; label "Hz"; end button; TEXT 5,0 "Resolution" ; CONTINUOUS FFT_Resolution; POSITION 110,0; SIZE 80,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,0; size 20,19; background (105,95,80),0; label "Hz"; end button; END PANEL ; TEXT 5,50 "Window" ; DISCRETE FFT_Window; POSITION 110,50; SIZE 100,19; LABEL "Rect","Hanning","Flattop" ; END DISCRETE; button More; position 70,18; size 72,19; BACKGROUND (75,0,240), 0; label "More"; end button; END PANEL ; PANEL FFT_SCR2 ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 5,110 "FFT Scale" ; CONTINUOUS FFT_SENS ; POSITION 110,110; SIZE 70,19; FORMAT "5 DIGITS"; STEP LOG 3,1 ; END CONTINUOUS; button disp_temp; position 180,110; size 30,19; background (105,95,80),0; label "dB/"; end button; TEXT 5,80 "FFT Offset" ; CONTINUOUS FFT_OFFSET; POSITION 110,80; SIZE 80,19; FORMAT "5 DIGITS"; STEP 0.2 ; END CONTINUOUS; button disp_temp; position 190,80; size 20,19; background (105,95,80),0; label "dB"; end button; TEXT 5,50 "STORE >"; button FFT_store_Wm1; position 75,50; size 31,19; background (0,130,70) 0; label "WM1"; end button; button FFT_store_Wm2; position 110,50; size 31,19; background (0,130,70) 0; label "WM2"; end button; button FFT_store_Wm3; position 145,50; size 31,19; background (0,130,70) 0; label "WM3"; end button; button FFT_store_Wm4; position 180,50; size 31,19; background (0,130,70) 0; label "WM4"; end button; button Return; position 70,18; size 72,19; BACKGROUND (75,0,240), 0; label "Return"; end button; END PANEL ; END PANEL ; ! ========================= ! SUBPANEL: DISPLAY ! ========================= PANEL DISPLAY_SUBSYSTEM; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 5,162,"PERSIST"; DISCRETE PERSIST ; POSITION 90,162 ; SIZE 60,19; LABEL "MIN","INF","VAR"; END DISCRETE; CONTINUOUS PERSIST_VALUE; POSITION 150,162; SIZE 45,19; FORMAT "3 DIGITS"; END CONTINUOUS; button disp_temp; position 195,162; size 15,19; background (105,95,80),0; label "s"; end button; TEXT 5,140,"Screen"; TOGGLE NUM_SCREENS; POSITION 90,140; SIZE 120,19; LABEL "Single","Dual"; END TOGGLE; TOGGLE UPPER_LOWER; POSITION 5,118; SIZE 80,19; LABEL "Upper","Lower"; UPDATE ACTIONS ; SELECT UPPER_LOWER ; CASE UPPER ; HIDE LOWER_GRAPH ; SHOW UPPER_GRAPH ; CASE LOWER ; SHOW LOWER_GRAPH ; HIDE UPPER_GRAPH ; END SELECT ; END ACTIONS ; END TOGGLE; PANEL UPPER_GRAPH ; POSITION 90,118 ; SIZE 120, 22 ; DISCRETE Upper_Source ; POSITION 0,0; SIZE 120,19; LABEL "CH1","CH2","CH3","CH4","FUNC1","FUNC2","FFT","WMEM1","WMEM2","WMEM3","WMEM4"; END DISCRETE ; END PANEL ; PANEL LOWER_GRAPH ; POSITION 90,118 ; SIZE 120, 22 ; DISCRETE Lower_Source ; POSITION 0,0; SIZE 120,19; LABEL "CH1","CH2","CH3","CH4","FUNC1","FUNC2","FFT","WMEM1","WMEM2","WMEM3","WMEM4"; END DISCRETE ; END PANEL ; TEXT 5,96 "Graticule"; TOGGLE XY_GRATICULE; POSITION 90,96; SIZE 120,19; LABEL "Grid","Frame"; END TOGGLE; TEXT 5,74 "DISP Mode" ; DISCRETE Connect_dots; POSITION 90,74; SIZE 120,19; LABEL "Fast","CNT Dots","High Res"; END DISCRETE; PANEL DISPLAY_MEM_CONTROLS; POSITION 5,0; SIZE 202,70; BUTTON MERGE_PM1; POSITION 5,48; SIZE 100,19; LABEL "Merge"; background (0,130,70) 0; END BUTTON; BUTTON erase_PM1; POSITION 110,48; SIZE 100,19; LABEL "Erase"; background (0,130,70) 0; END BUTTON; BUTTON download_PM1; POSITION 5,26; SIZE 100,19; LABEL "Download"; background (0,130,70) 0; END BUTTON; BUTTON upload_PM1; POSITION 110,26; SIZE 100,19; LABEL "Upload"; background (0,130,70) 0; END BUTTON; END PANEL; END PANEL; ! DISPLAY_SUBSYSTEM ! ========================= ! SUBPANEL: WAVEFORM ! ========================= PANEL WMEMORY_SUBSYSTEM; POSITION 0,0; SIZE 214,183; PANEL WMEMORY_SCR1 ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 10,150 "WMEMORY 1"; TOGGLE VIEW_WF_WM1; POSITION 100,150; SIZE 32,19; FOREGROUND (0,255,255),100; BACKGROUND (105,95,80),0; STYLE "HIGHLIGHT"; LABEL "Off","On" ; END TOGGLE; DISPLAY SOURCE_WM1; POSITION 136,150; SIZE 74,19; END DISPLAY; TEXT 10,120 "WMEMORY 2"; TOGGLE VIEW_WF_WM2; POSITION 100,120; SIZE 32,19; FOREGROUND (0,255,255),100; BACKGROUND (105,95,80),0; STYLE "HIGHLIGHT"; LABEL "Off","On" ; END TOGGLE; DISPLAY SOURCE_WM2; POSITION 136,120; SIZE 74,19; END DISPLAY; TEXT 10,90 "WMEMORY 3"; TOGGLE VIEW_WF_WM3; POSITION 100,90; SIZE 32,19; FOREGROUND (0,255,255),100; BACKGROUND (105,95,80),0; STYLE "HIGHLIGHT"; LABEL "Off","On" ; END TOGGLE; DISPLAY SOURCE_WM3; POSITION 136,90; SIZE 74,19; END DISPLAY; TEXT 10,60 "WMEMORY 4"; TOGGLE VIEW_WF_WM4; POSITION 100,60; SIZE 32,19; FOREGROUND (0,255,255),100; BACKGROUND (105,95,80),0; STYLE "HIGHLIGHT"; LABEL "Off","On" ; END TOGGLE; DISPLAY SOURCE_WM4; POSITION 136,60; SIZE 74,19; END DISPLAY; PANEL WMEMORY_MORE ; POSITION 5,18 ; SIZE 185, 22 ; button More; position 0,0; size 185,19; BACKGROUND (75,0,240), 0; label "To Memory Scaling.."; end button; END PANEL ; DISCRETE WAVEMEM ; POSITION 191,19 ; SIZE 20,19 ; BACKGROUND (75,0,240), 0; LABEL "m1","m2","m3","m4" ; UPDATE ACTIONS ; HIDE WMEMORY_MORE ; HIDE WMEMORY_SCR2_WM1 ;HIDE WMEMORY_SCR2_WM2 ; HIDE WMEMORY_SCR2_WM3 ;HIDE WMEMORY_SCR2_WM4 ; SELECT WAVEMEM ; CASE WM1 ; IF VIEW_WF_WM1 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM1 ; END IF ; CASE WM2 ; IF VIEW_WF_WM2 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM2 ; END IF ; CASE WM3 ; IF VIEW_WF_WM3 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM3 ; END IF ; CASE WM4 ; IF VIEW_WF_WM4 THEN ; SHOW WMEMORY_MORE ; SHOW WMEMORY_SCR2_WM4 ; END IF ; END SELECT ; END ACTIONS ; END DISCRETE ; END PANEL ; ! of WMEMORY_SCR1 PANEL WMEMORY_SCR2 ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; PANEL WMEMORY_SCR2_WM1 ; POSITION 1,20 ; SIZE 213,162 ; TEXT 5,140 "Y Scale" ; CONTINUOUS WM1_SENS ; POSITION 110,140; SIZE 70,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_WM1_DISP ; position 180,140; size 30,19; background (105,95,80),0; label "V/","A/","W/","U/","dB/" ; end DISCRETE; TEXT 5,110 "Y Offset" ; CONTINUOUS WM1_OFFSET ; POSITION 110,110; SIZE 80,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_WM1_DISP ; position 190,110; size 20,19; background (105,95,80),0; label "V","A","W","U","dB" ; END DISCRETE; TEXT 5,80 "X Scale" ; CONTINUOUS WM1_TIME_SENS ; POSITION 110,80; SIZE 70,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE WM1_X_Axis_Units ; position 180,80; size 30,19; background (105,95,80),0; label "s/","Hz/" ; END DISCRETE; TEXT 5,50 "X Position" ; CONTINUOUS WM1_TIME_DELAY ; POSITION 110,50; SIZE 80,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE WM1_X_Axis_Units ; position 190,50; size 20,19; background (105,95,80),0; label "s","Hz" ; END DISCRETE; TEXT "Waveform Memory 1" ; POSITION 5,10 ; FOREGROUND (0,255,255),100; END TEXT ; END PANEL ; PANEL WMEMORY_SCR2_WM2 ; POSITION 1,20 ; SIZE 213,162 ; TEXT 5,140 "Y Scale" ; CONTINUOUS WM2_SENS ; POSITION 110,140; SIZE 70,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_WM2_DISP ; position 180,140; size 30,19; background (105,95,80),0; label "V/","A/","W/","U/","dB/" ; end DISCRETE; TEXT 5,110 "Y Offset" ; CONTINUOUS WM2_OFFSET ; POSITION 110,110; SIZE 80,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_WM2_DISP ; position 190,110; size 20,19; background (105,95,80),0; label "V","A","W","U","dB" ; END DISCRETE; TEXT 5,80 "X Scale" ; CONTINUOUS WM2_TIME_SENS ; POSITION 110,80; SIZE 70,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE WM2_X_Axis_Units ; position 180,80; size 30,19; background (105,95,80),0; label "s/","Hz/" ; END DISCRETE; TEXT 5,50 "X Position" ; CONTINUOUS WM2_TIME_DELAY ; POSITION 110,50; SIZE 80,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE WM2_X_Axis_Units ; position 190,50; size 20,19; background (105,95,80),0; label "s","Hz" ; END DISCRETE; TEXT "Waveform Memory 2" ; POSITION 5,10 ; FOREGROUND (0,255,255),100; END TEXT ; END PANEL ; PANEL WMEMORY_SCR2_WM3 ; POSITION 1,20 ; SIZE 213,162 ; TEXT 5,140 "Y Scale" ; CONTINUOUS WM3_SENS ; POSITION 110,140; SIZE 70,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_WM3_DISP ; position 180,140; size 30,19; background (105,95,80),0; label "V/","A/","W/","U/","dB/" ; end DISCRETE; TEXT 5,110 "Y Offset" ; CONTINUOUS WM3_OFFSET ; POSITION 110,110; SIZE 80,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_WM3_DISP ; position 190,110; size 20,19; background (105,95,80),0; label "V","A","W","U","dB" ; END DISCRETE; TEXT 5,80 "X Scale" ; CONTINUOUS WM3_TIME_SENS ; POSITION 110,80; SIZE 70,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE WM3_X_Axis_Units ; position 180,80; size 30,19; background (105,95,80),0; label "s/","Hz/" ; END DISCRETE; TEXT 5,50 "X Position" ; CONTINUOUS WM3_TIME_DELAY ; POSITION 110,50; SIZE 80,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE WM3_X_Axis_Units ; position 190,50; size 20,19; background (105,95,80),0; label "s","Hz" ; END DISCRETE; TEXT "Waveform Memory 3" ; POSITION 5,10 ; FOREGROUND (0,255,255),100; END TEXT ; END PANEL ; PANEL WMEMORY_SCR2_WM4 ; POSITION 1,20 ; SIZE 213,162 ; TEXT 5,140 "Y Scale" ; CONTINUOUS WM4_SENS ; POSITION 110,140; SIZE 70,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_WM4_DISP ; position 180,140; size 30,19; background (105,95,80),0; label "V/","A/","W/","U/","dB/" ; end DISCRETE; TEXT 5,110 "Y Offset" ; CONTINUOUS WM4_OFFSET ; POSITION 110,110; SIZE 80,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_WM4_DISP ; position 190,110; size 20,19; background (105,95,80),0; label "V","A","W","U","dB" ; END DISCRETE; TEXT 5,80 "X Scale" ; CONTINUOUS WM4_TIME_SENS ; POSITION 110,80; SIZE 70,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE WM4_X_Axis_Units ; position 180,80; size 30,19; background (105,95,80),0; label "s/","Hz/" ; END DISCRETE; TEXT 5,50 "X Position" ; CONTINUOUS WM4_TIME_DELAY ; POSITION 110,50; SIZE 80,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE WM4_X_Axis_Units ; position 190,50; size 30,19; background (105,95,80),0; label "s","Hz" ; END DISCRETE; TEXT "Waveform Memory 4" ; POSITION 5,10 ; FOREGROUND (0,255,255),100; END TEXT ; END PANEL ; button Return; position 70,0; size 72,19; BACKGROUND (75,0,240), 0; label "Return"; end button; END PANEL ; ! of WMEMORY_SCR2 END PANEL; ! WMEMORY_SUBSYSTEM ! ========================= ! SUBPANEL: TRIGGER ! ========================= PANEL TRIGGER_SUBSYSTEM; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; PANEL TRIGGER_SCR1 ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; text 5,158,"Sweep"; TOGGLE Sweep_mode; POSITION 90,158; SIZE 120,19; LABEL "Free Run","TRIG'ed" ; END TOGGLE ; TEXT 5,128 "Mode"; DISCRETE TRIGGER_MODE; POSITION 90,128; SIZE 120,19; LABEL "Edge","Glitch","Pattern","State","DEL Events","DEL Time"; END DISCRETE; TEXT 5,98 "Holdoff"; CONTINUOUS TRIGGER_HOLDOFF; POSITION 90,98; SIZE 105,19; FORMAT "4 DIGITS"; !STEP LOG 3,1; END CONTINUOUS; button disp_temp; position 195,98; size 15,19; background (105,95,80),0; label "s"; end button; TEXT 5,68 "Hystersis" ; DISCRETE TRIGGER_HYSTERSIS; POSITION 90,68; SIZE 120,19; LABEL "Noise REJ","Normal","HI Sens"; END DISCRETE; button digitize_imm; position 5,38 ; !!5,5; size 205,19; background (0,130,70) 0; label "Digitize (No wait)"; end button; button More; position 70,8; size 72,19; BACKGROUND (75,0,240), 0; label "More"; end button; END PANEL ; ! of TRIGGER_SCR1 ; PANEL TRIGGER_SCR2 ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; BUTTON Return ; POSITION 70,5 ; SIZE 82,19 ; LABEL "Return" ; BACKGROUND (75,0,240)0 ; END BUTTON ; PANEL EDGE_MODE; POSITION 1,25; ! 5,5 SIZE 212,145; ! 204,145 !FOREGROUND (255,255,255),100; TEXT 5,100 "Source"; DISCRETE EDGE_TRIGGER_SOURCE; POSITION 85,100; SIZE 125,19; LABEL "CH1","CH2","CH3","CH4"; END DISCRETE; TEXT 5,70 "Slope" ; TOGGLE EDGE_TRIGGER_SLOPE; POSITION 85,70; SIZE 125,19; LABEL "Negative","Positive"; END TOGGLE; TEXT 5,40 "Level"; CONTINUOUS EDGE_TRIGGER_LEVEL; POSITION 85,40; SIZE 110,19; FORMAT "4 DIGITS"; STEP TRIGGER_INCR; END CONTINUOUS; DISCRETE TRIGGER_LEVEL_UNITS ; position 195,40 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; END PANEL; PANEL GLITCH_MODE; POSITION 1,25; SIZE 212,145; !FOREGROUND (255,255,255),100; TEXT 5,125 "Mode" ; TOGGLE GLITCH_TRIGGER_GTLT ; POSITION 85,125; SIZE 125,19; LABEL "glitch <","glitch >"; END TOGGLE; TEXT 5,100 "Source"; DISCRETE GLITCH_TRIGGER_SOURCE; POSITION 85,100; SIZE 125,19; LABEL "CH1","CH2","CH3","CH4"; END DISCRETE; TEXT 5,75 "Polarity" ; TOGGLE GLITCH_TRIGGER_SLOPE; POSITION 85,75; SIZE 125,19; LABEL "Negative","Positive"; END TOGGLE; TEXT 5,50 "Level"; CONTINUOUS GLITCH_TRIGGER_LEVEL; POSITION 85,50; SIZE 110,19; FORMAT "4 DIGITS"; STEP TRIGGER_INCR; END CONTINUOUS; DISCRETE TRIGGER_LEVEL_UNITS ; position 195,50 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; TEXT 5,25 "Width"; CONTINUOUS GLITCH_TRIGGER_WIDTH; POSITION 85,25; SIZE 110,19; FORMAT "4 DIGITS"; END CONTINUOUS; button disp_temp; position 195,25; size 15,19; background (105,95,80),0; label "s"; end button; END PANEL ; PANEL PATTERN_MODE; POSITION 1,25; SIZE 212,145; !FOREGROUND (255,255,255),100; TOGGLE PATTERN_DISPLAY; POSITION 62,120; SIZE 80,19; LABEL "Logic","Levels"; UPDATE ACTIONS; SELECT PATTERN_DISPLAY; CASE LOGIC; HIDE PATTERN_MODE,PATTERN_LEVELS; SHOW PATTERN_MODE,PATTERN_LOGIC; CASE LEVELS; HIDE PATTERN_MODE,PATTERN_LOGIC; SHOW PATTERN_MODE,PATTERN_LEVELS; END SELECT; END ACTIONS; END TOGGLE; PANEL PATTERN_LOGIC; POSITION 0,0; SIZE 214,120; TEXT 12,100 "Ch1"; TEXT 60,100 "Ch2"; TEXT 108,100 "CH3"; TEXT 156,100 "CH4"; DISCRETE PATTERN_LOGIC_CH1; POSITION 10,80; SIZE 36,19; END DISCRETE; DISCRETE PATTERN_LOGIC_CH2; POSITION 58,80; SIZE 36,19; END DISCRETE; DISCRETE PATTERN_LOGIC_CH3; POSITION 106,80; SIZE 36,19; END DISCRETE; DISCRETE PATTERN_LOGIC_CH4; POSITION 154,80; SIZE 36,19; END DISCRETE; DISCRETE PATTERN_TRIGGER_COND; POSITION 10,52; SIZE 180,19; LABEL "When Entered","When Exited", "Present More Than","Present Less Than","Present Between"; UPDATE ACTIONS; HIDE PATTERN_MODE, MORETHAN; HIDE PATTERN_MODE, LESSTHAN; HIDE PATTERN_MODE, BETWEEN; SELECT PATTERN_TRIGGER_COND; CASE ENTERED; CASE EXITED; CASE MORETHAN; SHOW PATTERN_MODE, MORETHAN; CASE LESSTHAN; SHOW PATTERN_MODE, LESSTHAN; CASE BETWEEN; SHOW PATTERN_MODE, BETWEEN; END SELECT; END ACTIONS; END DISCRETE; PANEL MORETHAN; POSITION 10,30; SIZE 184,22; CONTINUOUS PATTERN_PRESENT_MORETHAN; POSITION 0,0; SIZE 165,19; FORMAT "4 DIGITS"; !STEP LOG 3,1; END CONTINUOUS; button disp_temp; position 165,0; size 15,19; background (105,95,80),0 ; label "s"; end button; END PANEL; PANEL LESSTHAN; POSITION 10,30; SIZE 184,22; CONTINUOUS PATTERN_PRESENT_LESSTHAN; POSITION 0,0; SIZE 165,19; FORMAT "4 DIGITS"; !STEP LOG 3,1; END CONTINUOUS; button disp_temp; position 165,0; size 15,19; background (105,95,80),0 ; label "s"; end button; END PANEL; PANEL BETWEEN; POSITION 10,30; SIZE 184,22; CONTINUOUS PATTERN_PRESENT_START; POSITION 0,0; SIZE 73,19; FORMAT "4 DIGITS"; !STEP LOG 3,1; END CONTINUOUS; button disp_temp; position 73,0; size 15,19; background (105,95,80),0 ; label "s"; end button; CONTINUOUS PATTERN_PRESENT_STOP; POSITION 92,0; SIZE 73,19; FORMAT "4 DIGITS"; !STEP LOG 3,1; END CONTINUOUS; button disp_temp; position 165,0; size 15,19; background (105,95,80),0 ; label "s"; end button; END PANEL; END PANEL; ! PATTERN_LOGIC PANEL PATTERN_LEVELS; POSITION 1,0; SIZE 212,120; TEXT 10,86 "CH1 Level"; CONTINUOUS TRIGGER_LEVEL_CH1; POSITION 100,86; SIZE 95,19; FORMAT "4 DIGITS"; STEP SENS_INCR_CH1; END CONTINUOUS; DISCRETE UNITS_CH1_DISP ; position 195,86 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; TEXT 10,64 "CH2 Level"; CONTINUOUS TRIGGER_LEVEL_CH2; POSITION 100,64; SIZE 95,19; FORMAT "4 DIGITS"; STEP SENS_INCR_CH2; END CONTINUOUS; DISCRETE UNITS_CH2_DISP ; position 195,64 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; TEXT 10,42 "CH3 Level"; CONTINUOUS TRIGGER_LEVEL_CH3; POSITION 100,42; SIZE 95,19; FORMAT "4 DIGITS"; STEP SENS_INCR_CH3; END CONTINUOUS; DISCRETE UNITS_CH3_DISP ; position 195,42 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; TEXT 10,20 "CH4 Level"; CONTINUOUS TRIGGER_LEVEL_CH4; POSITION 100,20; SIZE 95,19; FORMAT "4 DIGITS"; STEP SENS_INCR_CH4; END CONTINUOUS; DISCRETE UNITS_CH4_DISP ; position 195,20 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; END PANEL; ! PATTERN_LEVELS END PANEL; ! PATTERN_MODE PANEL STATE_MODE; POSITION 1,25; SIZE 212,145; !FOREGROUND (255,255,255),100; TEXT 10,120, "Clock"; DISCRETE STATE_TRIGGER_SOURCE; POSITION 60,120; SIZE 40,19; LABEL "Ch1","Ch2","Ch3","Ch4"; UPDATE ACTIONS; HIDE STATE_MODE, WHEN_CLOCK_CH1; HIDE STATE_MODE, WHEN_CLOCK_CH2; HIDE STATE_MODE, WHEN_CLOCK_CH3; HIDE STATE_MODE, WHEN_CLOCK_CH4; SELECT STATE_TRIGGER_SOURCE; CASE CH1; SHOW STATE_MODE, WHEN_CLOCK_CH1; CASE CH2; SHOW STATE_MODE, WHEN_CLOCK_CH2; CASE CH3; SHOW STATE_MODE, WHEN_CLOCK_CH3; CASE CH4; SHOW STATE_MODE, WHEN_CLOCK_CH4; END SELECT; END ACTIONS; END DISCRETE; TEXT 12,98 "CH1"; TEXT 60,98 "CH2"; TEXT 108,98 "CH3"; TEXT 156,98 "CH4"; PANEL WHEN_CLOCK_CH1; POSITION 10,78; SIZE 184,22; TOGGLE STATE_TRIGGER_SLOPE; POSITION 0,0; SIZE 36,19; LABEL "H>L","L>H"; END TOGGLE; DISCRETE STATE_LOGIC_CH2; POSITION 48,0; SIZE 36,19; END DISCRETE; DISCRETE STATE_LOGIC_CH3; POSITION 96,0; SIZE 36,19; END DISCRETE; DISCRETE STATE_LOGIC_CH4; POSITION 144,0; SIZE 36,19; END DISCRETE; END PANEL; PANEL WHEN_CLOCK_CH2; POSITION 10,78; SIZE 184,22; DISCRETE STATE_LOGIC_CH1; POSITION 0,0; SIZE 36,19; END DISCRETE; TOGGLE STATE_TRIGGER_SLOPE; POSITION 48,0; SIZE 36,19; LABEL "H>L","L>H"; END TOGGLE; DISCRETE STATE_LOGIC_CH3; POSITION 96,0; SIZE 36,19; END DISCRETE; DISCRETE STATE_LOGIC_CH4; POSITION 144,0; SIZE 36,19; END DISCRETE; END PANEL; PANEL WHEN_CLOCK_CH3; POSITION 10,78; SIZE 184,22; DISCRETE STATE_LOGIC_CH1; POSITION 0,0; SIZE 36,19; END DISCRETE; DISCRETE STATE_LOGIC_CH2; POSITION 48,0; SIZE 36,19; END DISCRETE; TOGGLE STATE_TRIGGER_SLOPE; POSITION 96,0; SIZE 36,19; LABEL "H>L","L>H"; END TOGGLE; DISCRETE STATE_LOGIC_CH4; POSITION 144,0; SIZE 36,19; END DISCRETE; END PANEL; PANEL WHEN_CLOCK_CH4; POSITION 10,78; SIZE 184,22; DISCRETE STATE_LOGIC_CH1; POSITION 0,0; SIZE 36,19; END DISCRETE; DISCRETE STATE_LOGIC_CH2; POSITION 48,0; SIZE 36,19; END DISCRETE; DISCRETE STATE_LOGIC_CH3; POSITION 96,0; SIZE 36,19; END DISCRETE; TOGGLE STATE_TRIGGER_SLOPE; POSITION 144,0; SIZE 36,19; LABEL "H>L","L>H"; END TOGGLE; END PANEL; TOGGLE STATE_TRIGGER_COND; POSITION 10,54; SIZE 180,19; LABEL "When Not Present","When Present"; END TOGGLE; TEXT 10,27 "Level"; CONTINUOUS STATE_TRIGGER_LEVEL; POSITION 85,27; SIZE 90,19; FORMAT "4 DIGITS"; STEP TRIGGER_INCR; END CONTINUOUS; DISCRETE TRIGGER_LEVEL_UNITS ; position 175,27 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; ! BUTTON TRIGGER_CENTER; ! POSITION 120,27; ! SIZE 70,19; ! LABEL "Center"; ! END BUTTON; END PANEL; PANEL DEVENT_MODE; POSITION 1,25; SIZE 212,156; !FOREGROUND (255,255,255),100; PANEL DEVENT_SCR1 ; POSITION 0,0; SIZE 212,156; !FOREGROUND (255,255,255),100; TEXT 5,136 "ARM SRC"; DISCRETE DEVENT_ARM_SOURCE; POSITION 85,136; SIZE 125,19; LABEL "CH1","CH2","CH3","CH4"; END DISCRETE; TEXT 5,113 "ARM SLPE" ; TOGGLE DEVENT_ARM_SLOPE; POSITION 85,113; SIZE 125,19; LABEL "Negative","Positive"; END TOGGLE; TEXT 5,90 "ARM LVL"; CONTINUOUS DEVENT_ARM_LEVEL; POSITION 85,90; SIZE 110,19; FORMAT "4 DIGITS"; STEP TRIGGER_INCR; END CONTINUOUS; DISCRETE DEVENTS_ARM_UNITS ; position 195,90 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; TEXT 5,67 "TRIG SRC"; DISCRETE DEVENT_TRIGGER_SOURCE; POSITION 85,67; SIZE 125,19; LABEL "CH1","CH2","CH3","CH4"; END DISCRETE; TEXT 5,44 "TRIG SLPE" ; TOGGLE DEVENT_TRIGGER_SLOPE; POSITION 85,44; SIZE 125,19; LABEL "Negative","Positive"; END TOGGLE; TEXT 5,21 "TRIG LVL"; CONTINUOUS DEVENT_TRIGGER_LEVEL; POSITION 85,21; SIZE 110,19; FORMAT "4 DIGITS"; STEP TRIGGER_INCR; END CONTINUOUS; DISCRETE DEVENTS_TRIGGER_UNITS ; position 195,21 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; button More1; position 75,0; size 72,19; BACKGROUND (75,0,240), 0; label "More"; end button; END PANEL ; ! of DEVENT_SCR1 PANEL DEVENT_SCR2 ; POSITION 0,0; SIZE 212,145; !FOREGROUND (255,255,255),100; TEXT 5,120 "EVT SRC"; DISCRETE DEVENT_EVENT_SOURCE; POSITION 85,120; SIZE 125,19; LABEL "CH1","CH2","CH3","CH4"; END DISCRETE; TEXT 5,100 "EVT DEL"; CONTINUOUS DEVENT_EVENT_DELAY; POSITION 85,100; SIZE 110,19; FORMAT "4 DIGITS"; END CONTINUOUS; button disp_temp; position 195,100; size 15,19; background (105,95,80),0; label "s"; end button; TEXT 5,80 "EVT SLPE" ; TOGGLE DEVENT_EVENT_SLOPE; POSITION 85,80; SIZE 125,19; LABEL "Negative","Positive"; END TOGGLE; TEXT 5,60 "EVT LVL"; CONTINUOUS DEVENT_EVENT_LEVEL; POSITION 85,60; SIZE 110,19; FORMAT "4 DIGITS"; STEP TRIGGER_INCR; END CONTINUOUS; DISCRETE DEVENTS_EVENT_UNITS ; position 195,60 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; END PANEL ; ! of DEVENT_SCR2 END PANEL ; PANEL DTIME_MODE; POSITION 1,25; SIZE 212,156; !FOREGROUND (255,255,255),100; TEXT 5,136 "ARM SRC"; DISCRETE DTIME_ARM_SOURCE; POSITION 85,136; SIZE 125,19; LABEL "CH1","CH2","CH3","CH4"; END DISCRETE; TEXT 5,113 "ARM SLPE" ; TOGGLE DTIME_ARM_SLOPE; POSITION 85,113; SIZE 125,19; LABEL "Negative","Positive"; END TOGGLE; TEXT 5,90 "ARM LVL"; CONTINUOUS DTIME_ARM_LEVEL; POSITION 85,90; SIZE 110,19; FORMAT "4 DIGITS"; STEP TRIGGER_INCR; END CONTINUOUS; DISCRETE DTIME_ARM_UNITS ; position 195,90 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; TEXT 5,67 "DTIME DEL"; CONTINUOUS DTIME_TRIGGER_DELAY; POSITION 85,67; SIZE 110,19; FORMAT "4 DIGITS"; END CONTINUOUS; button disp_temp; position 195,67; size 15,19; background (105,95,80),0; label "s"; end button; TEXT 5,44 "TRIG SRC"; DISCRETE DTIME_TRIGGER_SOURCE; POSITION 85,44; SIZE 125,19; LABEL "CH1","CH2","CH3","CH4"; END DISCRETE; TEXT 5,21 "TRIG SLPE" ; TOGGLE DTIME_TRIGGER_SLOPE; POSITION 85,21; SIZE 125,19; LABEL "Negative","Positive"; END TOGGLE; TEXT 5,0 "TRIG LVL"; CONTINUOUS DTIME_TRIGGER_LEVEL; POSITION 85,0; SIZE 110,19; FORMAT "4 DIGITS"; STEP TRIGGER_INCR; END CONTINUOUS; DISCRETE DTIME_TRIGGER_UNITS ; position 195,0 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; END PANEL ; END PANEL ; ! of TRIGGER_SCR2 END PANEL; ! TRIGGER_SUBSYSTEM ! ========================= ! SUBPANEL: TIMEBASE ! ========================= PANEL TRIGGER_N_SUBSYSTEM; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; PANEL TRIGGER_N_11A ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 10,154 "HP 54711A - EXT TRIG" ; TEXT 10,114 "Probe ATTN"; CONTINUOUS TRIG_11A_PROBE ; POSITION 90,114; SIZE 80,19; FORMAT "6 DIGITS"; END CONTINUOUS ; DISCRETE TRIG_11A_PROBE_UNITS ; POSITION 172,114 ; SIZE 30,19 ; LABEL "RAT","DEC" ; END DISCRETE ; TEXT 10,74 "BW Limit" ; TOGGLE TRIG_11A_BWL ; POSITION 90,74 ; SIZE 112,19 ; LABEL "OFF","ON" ; END TOGGLE ; button TO_TRIG_21A; position 75,34; size 72,19; BACKGROUND (75,0,240), 0; label "To 21A"; end button; button TO_TRIG_22A; position 75,4; size 72,19; BACKGROUND (75,0,240), 0; label "To 22A"; end button; END PANEL ; !of TRIGGER_N_11A PANEL TRIGGER_N_21A ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 10,154 "HP 54721A - EXT TRIG" ; TEXT 10,114 "Probe ATTN"; CONTINUOUS TRIG_21A_PROBE ; POSITION 90,114 ; SIZE 80,19; FORMAT "6 DIGITS"; END CONTINUOUS ; DISCRETE TRIG_21A_PROBE_UNITS ; POSITION 172,114 ; SIZE 30,19 ; LABEL "RAT","DEC" ; END DISCRETE ; button TO_TRIG_11A; position 75,34; size 72,19; BACKGROUND (75,0,240), 0; label "To 11A"; end button; button TO_TRIG_22A; position 75,4; size 72,19; BACKGROUND (75,0,240), 0; label "To 22A"; end button; END PANEL ; !of TRIGGER_N_21A PANEL TRIGGER_N_22A ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 10,154 "HP 54722A - EXT TRIG" ; TEXT 10,124 "Probe ATTN"; CONTINUOUS TRIG_22A_PROBE_1 ; POSITION 90,124; SIZE 80,19; FORMAT "6 DIGITS"; END CONTINUOUS ; DISCRETE TRIG_22A_PROBE_UNITS ; POSITION 172,124 ; SIZE 30,19 ; LABEL "RAT","DEC" ; END DISCRETE ; CONTINUOUS TRIG_22A_PROBE_2 ; POSITION 90,94; SIZE 80,19; FORMAT "6 DIGITS"; END CONTINUOUS ; DISCRETE TRIG_22A_PROBE_UNITS ; POSITION 172,94 ; SIZE 30,19 ; LABEL "RAT","DEC" ; END DISCRETE ; button TO_TRIG_11A; position 75,34; size 72,19; BACKGROUND (75,0,240), 0; label "To 11A"; end button; button TO_TRIG_21A; position 75,4; size 72,19; BACKGROUND (75,0,240), 0; label "To 21A"; end button; END PANEL ; !of TRIGGER_N_22A END PANEL ; ! of TRIGGER_N_SUBSTSTEM ! ========================= ! SUBPANEL: TIMEBASE ! ========================= PANEL TIMEBASE_SUBSYSTEM; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; PANEL STD_TIMEBASE_CONTROLS; POSITION 5,82; SIZE 202,96; FOREGROUND (255,255,255),100; TEXT 5,71,"Scale"; CONTINUOUS TIME_SENS; POSITION 115,71; SIZE 65,19; FORMAT "4 DIGITS"; STEP LOG 3,1; END CONTINUOUS; button disp_temp; position 180,71; size 20,19; background (105,95,80),0; label "s/"; end button; TEXT 5,49, "Position"; CONTINUOUS TIME_DELAY; POSITION 115,49; SIZE 70,19; FORMAT "5 DIGITS"; STEP TIME_INCR ; END CONTINUOUS; button disp_temp; position 185,49; size 15,19; background (105,95,80),0; label "s"; end button; TEXT 5,5,"Reference"; DISCRETE TIME_REF; POSITION 115,5; SIZE 85,19; LABEL "Left","Center","Right"; END DISCRETE ; TEXT 5,27 "Sweep Mode"; TOGGLE Sweep_mode; POSITION 115,27; SIZE 85,19; LABEL "Free Run","TRIG'ed"; END TOGGLE ; END PANEL ; TEXT 15,62 "View" ; TOGGLE Time_Wind_Stat ; POSITION 75,60; SIZE 120,19 ; LABEL "Main","Window"; UPDATE ACTIONS; SELECT Time_Wind_Stat ; CASE MAIN ; HIDE TIMEBASE_SUBSYSTEM,WND_TIMEBASE_CONTROLS; CASE WIND ; SHOW TIMEBASE_SUBSYSTEM,WND_TIMEBASE_CONTROLS; END SELECT; END ACTIONS; END TOGGLE ; PANEL WND_TIMEBASE_CONTROLS; POSITION 5,5; SIZE 202,52; FOREGROUND (255,255,255),100; TEXT 5,30 "Scale" ; CONTINUOUS Time_Wind_Sens ; POSITION 115,28; SIZE 65,19; FORMAT "4 DIGITS"; !STEP TIME_INCR; STEP LOG 3,1 ; END CONTINUOUS; button disp_temp; position 180,28; size 20,19; background (105,95,80),0; label "s/"; end button; TEXT 5,10 "Position"; CONTINUOUS Time_Wind_Delay ; POSITION 115,8; SIZE 70,19; FORMAT "4 DIGITS"; STEP TIME_INCR; END CONTINUOUS ; button disp_temp; position 185,8; size 15,19; background (105,95,80),0; label "s"; end button; END PANEL ; END PANEL; ! TIMEBASE_SUBSYSTEM ! ========================= ! SUBPANEL: CHANNEL ! ========================= PANEL CHANNEL_SUBSYSTEM; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; PANEL CH1; POSITION 1,1; SIZE 212,181; PANEL CH1_SCR1 ; POSITION 1,1; SIZE 212,181; DISCRETE CHANNEL; POSITION 144,159; SIZE 60,19; LABEL "","Ch 1","Ch 2","Ch 3","Ch 4"; BACKGROUND (75,0,240), 0; END DISCRETE; DISPLAY Plug_in1; POSITION 5,159; SIZE 80,19; END DISPLAY; TEXT 5,136 "Coupling"; DISCRETE COUPLING_CH1; POSITION 90,136; SIZE 112,19; ! SIZE 50,19; LABEL "DC 1 MOHM","DC 50 OHM","AC >34kHz","AC 1MOHM,90Hz","AC 1MOHM,450Hz" ; END DISCRETE; TEXT 5,114 "Probe ATT"; CONTINUOUS PROBE_CH1; POSITION 90,114 ; SIZE 80,19; FORMAT "6 DIGITS"; END CONTINUOUS ; DISCRETE PROBE_UNITS_CH1 ; POSITION 172,114 ; SIZE 30,19 ; LABEL "RAT","DEC" ; END DISCRETE ; TEXT 5,92 "SENS"; CONTINUOUS SENS_CH1; POSITION 90,92; SIZE 90,19; FORMAT "5 DIGITS"; STEP LOG 3,1; END CONTINUOUS; DISCRETE UNITS_CH1_DISP ; position 182, 92; size 20,19; background (105,95,80),0; label "V/","A/","W/","U/" ; end DISCRETE; TEXT 5,70 "Offset"; CONTINUOUS OFFSET_CH1; POSITION 90,70; SIZE 97,19; FORMAT "5 DIGITS"; STEP OFFSET_INCR_CH1 ; END CONTINUOUS; DISCRETE UNITS_CH1_DISP ; position 187,70; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE; button More; position 10,4; size 72,19; BACKGROUND (75,0,240), 0; label "More"; end button; PANEL STORE_WF_CH1; POSITION 5,26; SIZE 202,22; TEXT 0,0 "Store WM"; BUTTON STORE_CH1_WM1; POSITION 85,0; SIZE 25,19; LABEL "M1"; END BUTTON; BUTTON STORE_CH1_WM2; POSITION 114,0; SIZE 25,19; LABEL "M2"; END BUTTON; BUTTON STORE_CH1_WM3; POSITION 143,0; SIZE 25,19; LABEL "M3"; END BUTTON; BUTTON STORE_CH1_WM4; POSITION 172,0; SIZE 25,19; LABEL "M4"; END BUTTON; END PANEL; ! of STORE_WF_CH1 END PANEL ; ! of CH1_SCR1 PANEL CH1_SCR2 ; POSITION 1,1; SIZE 212,181; TEXT 5,158 "Skew" ; CONTINUOUS SKEW_CH1; POSITION 90,158; SIZE 97,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 187,158; size 15,19; background (105,95,80),0; label "s"; end button; TEXT 5,136 "Units"; DISCRETE UNITS_CH1; POSITION 90,136; SIZE 112,19; ! SIZE 50,19; LABEL "Volts","Amps","Watts","Unknown" ; END DISCRETE; TEXT 5,114 "Units ATT" ; CONTINUOUS UNITS_ATT_CH1; POSITION 90,114; SIZE 112,19; FORMAT "5 DIGITS"; STEP 0.01 ; END CONTINUOUS; TEXT 5,92 "Units OFF" ; CONTINUOUS UNITS_OFF_CH1; POSITION 90,92; SIZE 112,19; FORMAT "5 DIGITS"; STEP 1E-3 ; END CONTINUOUS; TEXT 5,70 "BW 713A"; TOGGLE BWLIMIT_CH1; POSITION 90,70; SIZE 112,19; LABEL "Off","On"; END TOGGLE; TEXT 5,48 "721A Cal" ; TOGGLE CALOUT_CH1; POSITION 90,48; SIZE 112,19; LABEL "Off","On"; END TOGGLE; TEXT 5,26 "711A Sens" ; TOGGLE SENS_711A_CH1; POSITION 90,26; SIZE 112,19; LABEL "Max","Def"; END TOGGLE; BUTTON Return ; POSITION 10,4 ; SIZE 82,19 ; LABEL "Return" ; BACKGROUND (75,0,240)0 ; END BUTTON ; END PANEL ; END PANEL; ! CH1 PANEL CH2; POSITION 1,1; SIZE 212,181; PANEL CH2_SCR1 ; POSITION 1,1; SIZE 212,181; DISPLAY Plug_in2; POSITION 5,159; SIZE 80,19; END DISPLAY; DISCRETE CHANNEL; POSITION 144,159; SIZE 60,19; LABEL "","Ch 1","Ch 2","Ch 3","Ch 4"; BACKGROUND (75,0,240), 0; END DISCRETE; TEXT 5,136 "Coupling"; DISCRETE COUPLING_CH2; POSITION 90,136; ! SIZE 50,19; ! LABEL "DC","DCF","AC"; SIZE 112,19; ! SIZE 50,19; LABEL "DC 1MOHM","DC 50 OHM","AC >34kHz","AC 1MOHM,90Hz","AC 1MOHM,450Hz" ; END DISCRETE; TEXT 5,114 "Probe ATT"; CONTINUOUS PROBE_CH2; POSITION 90,114; SIZE 80,19; FORMAT "6 DIGITS"; END CONTINUOUS ; DISCRETE PROBE_UNITS_CH2 ; POSITION 172,114 ; SIZE 30,19 ; LABEL "RAT","DEC" ; END DISCRETE ; TEXT 5,92,"SENS"; CONTINUOUS SENS_CH2; POSITION 90, 92; SIZE 90,19; FORMAT "5 DIGITS"; STEP LOG 3,1; END CONTINUOUS; DISCRETE UNITS_CH2_DISP ; position 182, 92; size 20,19; background (105,95,80),0; label "V/","A/","W/","U/" ; end DISCRETE; TEXT 5,70 "Offset"; CONTINUOUS OFFSET_CH2; POSITION 90,70; SIZE 97,19; FORMAT "5 DIGITS"; STEP OFFSET_INCR_CH2 ; END CONTINUOUS; DISCRETE UNITS_CH2_DISP; position 187,70; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; button More; position 10,4; size 72,19; BACKGROUND (75,0,240), 0; label "More"; end button; PANEL STORE_WF_CH2; POSITION 5,26; SIZE 202,22; TEXT 0,0 "Store WM"; BUTTON STORE_CH2_WM1; POSITION 85,0; SIZE 25,19; LABEL "M1"; END BUTTON; BUTTON STORE_CH2_WM2; POSITION 114,0; SIZE 25,19; LABEL "M2"; END BUTTON; BUTTON STORE_CH2_WM3; POSITION 143,0; SIZE 25,19; LABEL "M3"; END BUTTON; BUTTON STORE_CH2_WM4; POSITION 172,0; SIZE 25,19; LABEL "M4"; END BUTTON; END PANEL; ! of STORE_WF_CH2 END PANEL ; ! of CH2_SCR1 PANEL CH2_SCR2 ; POSITION 1,1; SIZE 212,181; TEXT 5,158 "Skew" ; CONTINUOUS SKEW_CH2; POSITION 90,158; SIZE 97,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 187,158; size 15,19; background (105,95,80),0; label "s"; end button; TEXT 5,136 "Units"; DISCRETE UNITS_CH2; POSITION 90,136; SIZE 112,19; ! SIZE 50,19; LABEL "Volts","Amps","Watts","Unknown" ; END DISCRETE; TEXT 5,114 "Units ATT" ; CONTINUOUS UNITS_ATT_CH2; POSITION 90,114; SIZE 112,19; FORMAT "5 DIGITS"; STEP 0.01 ; END CONTINUOUS; TEXT 5,92 "Units OFF" ; CONTINUOUS UNITS_OFF_CH2; POSITION 90,92; SIZE 112,19; FORMAT "5 DIGITS"; STEP 1E-3 ; END CONTINUOUS; TEXT 5,70 "BW 713A"; TOGGLE BWLIMIT_CH2; POSITION 90,70; SIZE 112,19; LABEL "Off","On"; END TOGGLE; TEXT 5,48 "721A Cal" ; TOGGLE CALOUT_CH2; POSITION 90,48; SIZE 112,19; LABEL "Off","On"; END TOGGLE; TEXT 5,26 "711A Sens" ; TOGGLE SENS_711A_CH2; POSITION 90,26; SIZE 112,19; LABEL "Max","Def"; END TOGGLE; BUTTON Return ; POSITION 10,4 ; SIZE 82,19 ; LABEL "Return" ; BACKGROUND (75,0,240)0 ; END BUTTON ; END PANEL ; ! of CH2_SCR2 END PANEL; ! CH2 PANEL CH3; POSITION 1,1; SIZE 212,181; PANEL CH3_SCR1 ; POSITION 1,1; SIZE 212,181; DISPLAY Plug_in3; POSITION 5,159; SIZE 80,19; END DISPLAY; DISCRETE CHANNEL; POSITION 144,159; SIZE 60,19; LABEL "","Ch 1","Ch 2","Ch 3","Ch 4"; BACKGROUND (75,0,240), 0; END DISCRETE; TEXT 5,136 "Coupling"; DISCRETE COUPLING_CH3; POSITION 90,136; ! SIZE 50,19; ! LABEL "DC","DCF","AC","ACL"; SIZE 112,19; ! SIZE 50,19; LABEL "DC 1 MOHM","DC 50 OHM","AC >34kHz","AC 1MOHM,90Hz","AC 1MOHM,450Hz" ; END DISCRETE; TEXT 5,114 "Probe ATT"; CONTINUOUS PROBE_CH3; POSITION 90,114; SIZE 80,19; FORMAT "6 DIGITS"; END CONTINUOUS ; DISCRETE PROBE_UNITS_CH3 ; POSITION 172,114 ; SIZE 30,19 ; LABEL "RAT","DEC" ; END DISCRETE ; TEXT 5,92,"SENS"; CONTINUOUS SENS_CH3; POSITION 90, 92; SIZE 90,19; FORMAT "5 DIGITS"; STEP LOG 3,1; END CONTINUOUS ; DISCRETE UNITS_CH3_DISP ; position 182, 92; size 20,19; background (105,95,80),0; label "V/","A/","W/","U/" ; end DISCRETE ; TEXT 5,70,"Offset"; CONTINUOUS OFFSET_CH3; POSITION 90,70; SIZE 97,19; FORMAT "5 DIGITS"; STEP OFFSET_INCR_CH3 ; END CONTINUOUS; DISCRETE UNITS_CH3_DISP ; position 187,70; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE; button More; position 10,4; size 72,19; BACKGROUND (75,0,240), 0; label "More"; end button; PANEL STORE_WF_CH3; POSITION 5,26; SIZE 202,22; TEXT 0,0 "Store WM"; BUTTON STORE_CH3_WM1; POSITION 85,0; SIZE 25,19; LABEL "M1"; END BUTTON; BUTTON STORE_CH3_WM2; POSITION 114,0; SIZE 25,19; LABEL "M2"; END BUTTON; BUTTON STORE_CH3_WM3; POSITION 143,0; SIZE 25,19; LABEL "M3"; END BUTTON; BUTTON STORE_CH3_WM4; POSITION 172,0; SIZE 25,19; LABEL "M4"; END BUTTON; END PANEL; ! of STORE WF_CH3 END PANEL ; ! of CH3_SCR1 PANEL CH3_SCR2 ; POSITION 1,1; SIZE 212,181; TEXT 5,158 "Skew" ; CONTINUOUS SKEW_CH3; POSITION 90,158; SIZE 97,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 187,158; size 15,19; background (105,95,80),0; label "s"; end button; TEXT 5,136 "Units"; DISCRETE UNITS_CH3; POSITION 90,136; SIZE 112,19; ! SIZE 50,19; LABEL "Volts","Amps","Watts","Unknown" ; END DISCRETE; TEXT 5,114 "Units ATT" ; CONTINUOUS UNITS_ATT_CH3; POSITION 90,114; SIZE 112,19; FORMAT "5 DIGITS"; STEP 0.01 ; END CONTINUOUS; TEXT 5,92 "Units OFF" ; CONTINUOUS UNITS_OFF_CH3; POSITION 90,92; SIZE 112,19; FORMAT "5 DIGITS"; STEP 1E-3 ; END CONTINUOUS; TEXT 5,70 "BW 713A"; TOGGLE BWLIMIT_CH3; POSITION 90,70; SIZE 112,19; LABEL "Off","On"; END TOGGLE; TEXT 5,48 "721A Cal" ; TOGGLE CALOUT_CH3; POSITION 90,48; SIZE 112,19; LABEL "Off","On"; END TOGGLE; TEXT 5,26 "711A Sens" ; TOGGLE SENS_711A_CH3; POSITION 90,26; SIZE 112,19; LABEL "Max","Def"; END TOGGLE; BUTTON Return ; POSITION 10,4 ; SIZE 82,19 ; LABEL "Return" ; BACKGROUND (75,0,240)0 ; END BUTTON ; END PANEL ; ! of CH3_SCR2 END PANEL; ! CH3 PANEL CH4; POSITION 1,1; SIZE 212,181; PANEL CH4_SCR1 ; POSITION 1,1; SIZE 212,181; DISCRETE CHANNEL; POSITION 144,159; SIZE 60,19; LABEL "","Ch 1","Ch 2","Ch 3","Ch 4"; BACKGROUND (75,0,240), 0; END DISCRETE; DISPLAY Plug_in4; POSITION 5,159; SIZE 80,19; END DISPLAY; TEXT 5,136 "Coupling"; DISCRETE COUPLING_CH4; POSITION 90,136; ! SIZE 50,19; ! LABEL "DC","DCF","AC","ACL"; SIZE 112,19; ! SIZE 50,19; LABEL "DC 1MOHM","DC 50 OHM","AC >34kHz","AC 1MOHM,90Hz","AC 1MOHM,450Hz" ; END DISCRETE; TEXT 5,114,"Probe ATT"; CONTINUOUS PROBE_CH4; POSITION 90,114; SIZE 80,19; FORMAT "6 DIGITS"; END CONTINUOUS ; DISCRETE PROBE_UNITS_CH4 ; POSITION 172,114 ; SIZE 30,19 ; LABEL "RAT","DEC" ; END DISCRETE ; TEXT 5,92,"SENS"; CONTINUOUS SENS_CH4; POSITION 90, 92; SIZE 90,19; FORMAT "5 DIGITS"; STEP LOG 3,1; END CONTINUOUS ; DISCRETE UNITS_CH4_DISP ; position 182, 92; size 20,19; background (105,95,80),0; label "V/","A/","W/","U/" ; end DISCRETE ; TEXT 5,70,"Offset"; CONTINUOUS OFFSET_CH4; POSITION 90,70; SIZE 97,19; FORMAT "5 DIGITS"; STEP OFFSET_INCR_CH4 ; END CONTINUOUS; DISCRETE UNITS_CH4_DISP ; position 187,70 ; size 15,19; background (105,95,80),0; label "V","A","W","U" ; end DISCRETE ; button More; position 10,4; size 72,19; BACKGROUND (75,0,240), 0; label "More"; end button; PANEL STORE_WF_CH4; POSITION 5,26; SIZE 202,22; TEXT 5,0 "Store WM"; BUTTON STORE_CH4_WM1; POSITION 85,0; SIZE 25,19; LABEL "M1"; END BUTTON; BUTTON STORE_CH4_WM2; POSITION 114,0; SIZE 25,19; LABEL "M2"; END BUTTON; BUTTON STORE_CH4_WM3; POSITION 143,0; SIZE 25,19; LABEL "M3"; END BUTTON; BUTTON STORE_CH4_WM4; POSITION 172,0; SIZE 25,19; LABEL "M4"; END BUTTON; END PANEL; !of STORE_WF_CH4 END PANEL ; !of CH4_SCR1 PANEL CH4_SCR2 ; POSITION 1,1; SIZE 212,181; TEXT 5,158 "Skew" ; CONTINUOUS SKEW_CH4; POSITION 90,158; SIZE 97,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 187,158; size 15,19; background (105,95,80),0; label "s"; end button; TEXT 5,136 "Units"; DISCRETE UNITS_CH4; POSITION 90,136; SIZE 112,19; ! SIZE 50,19; LABEL "Volts","Amps","Watts","Unknown" ; END DISCRETE; TEXT 5,114 "Units ATT" ; CONTINUOUS UNITS_ATT_CH4; POSITION 90,114; SIZE 112,19; FORMAT "5 DIGITS"; STEP 0.01 ; END CONTINUOUS; TEXT 5,92 "Units OFF" ; CONTINUOUS UNITS_OFF_CH4; POSITION 90,92; SIZE 112,19; FORMAT "5 DIGITS"; STEP 1E-3 ; END CONTINUOUS; TEXT 5,70 "BW 713A"; TOGGLE BWLIMIT_CH4; POSITION 90,70; SIZE 112,19; LABEL "Off","On"; END TOGGLE; TEXT 5,48 "721A Cal" ; TOGGLE CALOUT_CH4; POSITION 90,48; SIZE 112,19; LABEL "Off","On"; END TOGGLE; TEXT 5,26 "711A Sens" ; TOGGLE SENS_711A_CH4; POSITION 90,26; SIZE 112,19; LABEL "Max","Def"; END TOGGLE; BUTTON Return ; POSITION 10,4 ; SIZE 82,19 ; LABEL "Return" ; BACKGROUND (75,0,240)0 ; END BUTTON ; END PANEL ; ! of CH4_SCR2 END PANEL; ! CH4 END PANEL; ! CHANNEL_SUBSYSTEM ! ========================= ! SUBPANEL: MATH ! ========================= PANEL Math_subsystem; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TOGGLE Function; POSITION 40,155; SIZE 130,19; BACKGROUND (75,0,240)0 ; LABEL "Function 1","Function 2"; END TOGGLE; PANEL Function1; POSITION 1,1; SIZE 213,153; PANEL Function1_scr1; POSITION 0,0; SIZE 213,153; DISCRETE Fn1_operand1; POSITION 5,130; SIZE 60,19; LABEL "Chan 1","Chan 2","Chan 3","Chan 4", "Mem 1","Mem 2","Mem 3","Mem 4","Const."; END DISCRETE; DISCRETE Function1; POSITION 72,130; SIZE 70,19; LABEL "+","-","*","/","Invert","INT","DIFF", "MAX","MIN","MAG","Versus","FFT Mag"; END DISCRETE; PANEL Fn1_constant_text ; POSITION 0,105 ; SIZE 85,19 ; Text 5,0 "Constant " ; END PANEL ; PANEL Fn1_constant_1 ; POSITION 85,105 ; SIZE 60, 19 ; TEXT 0,0 "1"; INPUT Fn1_Constant1 ; !POSITION 95,105 ; POSITION 10,0 ; SIZE 50,19 ; FORMAT "5 DIGITS" ; END INPUT ; END PANEL ; PANEL Fn1_operand_panel; !POSITION 145,105 ; POSITION 145,130; SIZE 69,19; !SIZE 69,45 ; DISCRETE Fn1_operand2; POSITION 5,0; SIZE 60,19; LABEL "Chan 1","Chan 2","Chan 3","Chan 4", "Mem 1","Mem 2","Mem 3","Mem 4","Const."; END DISCRETE; END PANEL ; PANEL Fn1_constant_2 ; POSITION 145,105 ; SIZE 69,19 ; TEXT 4,0 "2" ; INPUT Fn1_Constant2 ; POSITION 14,0 ; SIZE 50,19 ; FORMAT "5 DIGITS" ; END INPUT ; END PANEL; ! of Fn1_operand_panel PANEL Fn1_FFTfn_panel; POSITION 145,130; SIZE 69,45; TOGGLE Fn1_FFT_show; POSITION 5,0; SIZE 60,19; LABEL "NORMAL","FFT Ctl"; BACKGROUND (75,0,240), 0; END TOGGLE; END PANEL; ! of Fn1_FFTFn_panel PANEL FN1_Norm_ctrls; POSITION 0,0 ; SIZE 213,102 ; TEXT 5,80,"Display"; TOGGLE Fn1_display; POSITION 110,80; SIZE 100,19; LABEL "Off","On"; END TOGGLE; TEXT 5,55,"Scale"; CONTINUOUS Fn1_range; POSITION 110,55; SIZE 70,19; FORMAT "5 DIGITS"; END CONTINUOUS; DISCRETE UNITS_FN1_DISP ; position 180,55; size 30,19; background (105,95,80),0; LABEL "V/","A/","W/","U/","dB/" ; end DISCRETE; !button disp_temp; ! position 190, 55; ! size 20,19; ! background (105,95,80),0; ! label "V/"; !end button; TEXT 5,30,"Offset"; CONTINUOUS Fn1_offset; POSITION 110,30; SIZE 80,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_FN1_DISP ; position 190,30; size 20,19; background (105,95,80),0; LABEL "V","A","W","U","dB" ; end DISCRETE; !button disp_temp; ! position 195,30; ! size 15,19; ! background (105,95,80),0; ! label "V"; !end button; BUTTON Define_function1; POSITION 0,5; SIZE 170,19; background (0,130,70) 0; LABEL "Define Function 1"; END BUTTON; button More; position 172,5 ; size 38,19; BACKGROUND (75,0,240), 0; label "More"; end button; END PANEL ; ! of FN1_Norm_ctrls PANEL FFT1_Controls ; POSITION 0,0 ; SIZE 213,128 ; TEXT 5,104 "Magnify" ; TOGGLE FFT1_Magnify; POSITION 110,104; SIZE 100,19; LABEL "Off","On"; UPDATE ACTIONS; SELECT FFT1_Magnify; CASE OFF; HIDE FFT1_Magnify_On ; SHOW FFT1_Magnify_Off; CASE ON; HIDE FFT1_Magnify_Off; SHOW FFT1_Magnify_On; END SELECT; END ACTIONS; END TOGGLE; PANEL FFT1_Magnify_On ; POSITION 1,50 ; SIZE 213,54 ; TEXT 5,30 "MAG Span" ; CONTINUOUS FFT1_Mspan; POSITION 110,30; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,30; size 20,19; background (105,95,80),0; label "Hz"; end button; TEXT 5,5 "Center FREQ" ; CONTINUOUS FFT1_Center_Freq; POSITION 110,5; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,5; size 20,19; background (105,95,80),0; label "Hz"; end button; END PANEL ; PANEL FFT1_Magnify_Off ; POSITION 1,50 ; SIZE 213,54 ; TEXT 5,30 "Span" ; CONTINUOUS FFT1_Span; POSITION 110,30; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,30; size 20,19; background (105,95,80),0; label "Hz"; end button; TEXT 5,5 "Resolution" ; CONTINUOUS FFT1_Resolution; POSITION 110,5; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,5; size 20,19; background (105,95,80),0; label "Hz"; end button; END PANEL ; TEXT 5,25 "Window" ; DISCRETE FFT1_Window; POSITION 110,25; SIZE 100,19; LABEL "Rect","Hanning","Flattop" ; END DISCRETE; END PANEL ; END PANEL ; ! of Function1_scr1 PANEL Function1_scr2; POSITION 0,0; SIZE 213,153; TEXT 5,130 "HOZ TRACK" ; TOGGLE Fn1_hoz_tracking; POSITION 100,130; SIZE 110,19; LABEL "Tsource","Manual"; END TOGGLE; TEXT 5,105 "HOZ POS" ; CONTINUOUS Fn1_hoz_pos; POSITION 100,105; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; DISCRETE FN1_X_AXIS_UNITS ; position 185,105; size 25,19; background (105,95,80),0; LABEL "s","Hz" ; end DISCRETE; !button disp_temp; ! position 195, 105; ! size 15,19; ! background (105,95,80),0; ! label "s"; !end button; TEXT 5,80 "HOZ Scale" ; CONTINUOUS Fn1_hoz_range; POSITION 100,80; SIZE 80,19; FORMAT "5 DIGITS"; END CONTINUOUS; DISCRETE FN1_X_AXIS_UNITS ; position 180,80; size 30,19; background (105,95,80),0; LABEL "s/","Hz/" ; end DISCRETE; !button disp_temp; ! position 190, 80; ! size 20,19; ! background (105,95,80),0; ! label "s/"; !end button; TEXT 5,55 "VER TRACK" ; TOGGLE Fn1_ver_tracking; POSITION 100,55; SIZE 110,19; LABEL "Tsource","Manual"; END TOGGLE; BUTTON Return ; POSITION 128,5 ; SIZE 82,19 ; LABEL "Return" ; BACKGROUND (75,0,240)0 ; END BUTTON ; TEXT 5,27 "STORE >"; button Fn1_store_Wm1; position 75,27; size 31,19; background (0,130,70) 0; label "WM1"; end button; button Fn1_store_Wm2; position 110,27; size 31,19; background (0,130,70) 0; label "WM2"; end button; button Fn1_store_Wm3; position 145,27; size 31,19; background (0,130,70) 0; label "WM3"; end button; button Fn1_store_Wm4; position 180,27; size 31,19; background (0,130,70) 0; label "WM4"; end button; END PANEL; ! of Function1_scr2 END PANEL ; ! of Function1 PANEL Function2; POSITION 1,1; SIZE 213,153; PANEL Function2_scr1; POSITION 0,0; SIZE 213,153; DISCRETE Fn2_operand1; POSITION 5,130; SIZE 60,19; LABEL "Chan 1","Chan 2","Chan 3","Chan 4","Func 1", "Mem 1","Mem 2","Mem 3","Mem 4","Const." ; END DISCRETE; DISCRETE Function2; POSITION 72,130; SIZE 70,19; LABEL "+","-","*","/","Invert","INT","DIFF","MAX","MIN", "MAG","Versus","FFT Mag"; END DISCRETE; PANEL Fn2_constant_text ; POSITION 0,105 ; SIZE 85,19 ; Text 5,0 "Constant " ; END PANEL ; PANEL Fn2_constant_1 ; POSITION 85,105 ; SIZE 60, 19 ; TEXT 0,0 "1"; INPUT Fn2_Constant1 ; !POSITION 95,105 ; POSITION 10,0 ; SIZE 50,19 ; FORMAT "5 DIGITS" ; END INPUT ; END PANEL ; PANEL Fn2_operand_panel; POSITION 145,105 ; !POSITION 145,130; !SIZE 69,19; SIZE 69,45 ; DISCRETE Fn2_operand2; POSITION 5,25; SIZE 60,19; LABEL "Chan 1","Chan 2","Chan 3","Chan 4","Func 1", "Mem 1","Mem 2","Mem 3","Mem 4","Const." ; END DISCRETE; END PANEL ; ! of Fn2_operand_panel PANEL Fn2_constant_2 ; POSITION 145,105 ; SIZE 69,19 ; TEXT 4,0 "2" ; INPUT Fn2_Constant2 ; POSITION 14,0 ; SIZE 50,19 ; FORMAT "5 DIGITS" ; END INPUT ; END PANEL; ! of Fn2_constant_2 PANEL Fn2_FFTfn_panel; POSITION 145,130; SIZE 69,45; TOGGLE Fn2_FFT_show; POSITION 5,0; SIZE 60,19; LABEL "NORMAL","FFT Ctl"; background (0,130,70) 0; END TOGGLE; END PANEL; ! of Fn2_FFTFn_panel PANEL FN2_Norm_ctrls; POSITION 0,0 ; SIZE 213,102 ; TEXT 5,80,"Display"; TOGGLE Fn2_display; POSITION 110,80; SIZE 100,19; LABEL "Off","On"; END TOGGLE; TEXT 5,55,"Scale"; CONTINUOUS Fn2_range; POSITION 110,55; SIZE 70,19; FORMAT "5DIGITS"; END CONTINUOUS; DISCRETE UNITS_FN2_DISP ; position 180,55; size 30,19; background (105,95,80),0; LABEL "V/","A/","W/","U/","dB/" ; end DISCRETE; !button disp_temp; ! position 190,55; ! size 20,19; ! background (105,95,80),0; ! label "V/"; !end button; TEXT 5,30,"Offset"; CONTINUOUS Fn2_offset; POSITION 110,30; SIZE 75,19; FORMAT "5 DIGITS"; STEP 1E-18 ; END CONTINUOUS; DISCRETE UNITS_FN2_DISP ; position 185,30; size 25,19; background (105,95,80),0; LABEL "V","A","W","U","dB" ; end DISCRETE; !button disp_temp; ! position 195,30; ! size 15,19; ! background (105,95,80),0; ! label "V"; !end button; BUTTON Define_function2; POSITION 0,5; SIZE 170,19; background (0,130,70) 0; LABEL "Define Function 2"; END BUTTON; button More; position 172,5 ; size 38,19; BACKGROUND (75,0,240), 0; label "More"; end button; END PANEL ; ! of FN2_Norm_ctrls PANEL FFT2_Controls ; POSITION 0,0 ; SIZE 213,128 ; TEXT 5,104 "Magnify" ; TOGGLE FFT2_Magnify; POSITION 110,104; SIZE 100,19; LABEL "Off","On"; UPDATE ACTIONS; SELECT FFT2_Magnify; CASE OFF; HIDE FFT2_Magnify_On ; SHOW FFT2_Magnify_Off; CASE ON; HIDE FFT2_Magnify_Off; SHOW FFT2_Magnify_On; END SELECT; END ACTIONS; END TOGGLE; PANEL FFT2_Magnify_On ; POSITION 1,50 ; SIZE 213,54 ; TEXT 5,30 "MAG Span" ; CONTINUOUS FFT2_Mspan; POSITION 110,30; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,30; size 20,19; background (105,95,80),0; label "Hz"; end button; TEXT 5,5 "Center FREQ" ; CONTINUOUS FFT2_Center_Freq; POSITION 110,5; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,5; size 20,19; background (105,95,80),0; label "Hz"; end button; END PANEL ; PANEL FFT2_Magnify_Off ; POSITION 1,50 ; SIZE 213,54 ; TEXT 5,30 "Span" ; CONTINUOUS FFT2_Span; POSITION 110,30; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,30; size 20,19; background (105,95,80),0; label "Hz"; end button; TEXT 5,5 "Resolution" ; CONTINUOUS FFT2_Resolution; POSITION 110,5; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 190,5; size 20,19; background (105,95,80),0; label "Hz"; end button; END PANEL ; TEXT 5,25 "Window" ; DISCRETE FFT2_Window; POSITION 110,25; SIZE 100,19; LABEL "Rect","Hanning","Flattop" ; END DISCRETE; TEXT 5,1 "What about Scale and Offset?" ; END PANEL ; ! of FFT2_Controls END PANEL ; ! of Function2_scr1 PANEL Function2_scr2; POSITION 0,0; SIZE 213,153; TEXT 5,130 "HOZ TRACK" ; TOGGLE Fn2_hoz_tracking; POSITION 100,130; SIZE 100,19; LABEL "Tsource","Manual"; END TOGGLE; TEXT 5,105 "HOZ POS" ; CONTINUOUS Fn2_hoz_pos; POSITION 100,105; SIZE 85,19; FORMAT "5 DIGITS"; END CONTINUOUS; DISCRETE FN2_X_AXIS_UNITS ; position 185,105; size 25,19; background (105,95,80),0; LABEL "s","Hz" ; end DISCRETE; !button disp_temp; ! position 190, 105 ; ! size 20,19 ; ! background (105,95,80),0; ! label "s"; !end button; TEXT 5,80 "HOZ Scale" ; CONTINUOUS Fn2_hoz_range; POSITION 100,80; SIZE 80,19; FORMAT "5 DIGITS"; END CONTINUOUS; DISCRETE FN2_X_AXIS_UNITS ; position 180,80; size 30,19; background (105,95,80),0; LABEL "s/","Hz/" ; end DISCRETE; !button disp_temp; ! position 195,80 ; ! size 15,19 ; ! background (105,95,80),0; ! label "s/"; !end button; TEXT 5,55 "VER TRACK" ; TOGGLE Fn2_ver_tracking; POSITION 100,55; SIZE 110,19; LABEL "Tsource","Manual"; END TOGGLE; BUTTON Return ; POSITION 128,5 ; SIZE 82,19 ; LABEL "Return" ; BACKGROUND (75,0,240)0 ; END BUTTON ; TEXT 5,27 "STORE >"; button Fn2_store_Wm1; position 75,27; size 31,19; background (0,130,70) 0; label "WM1"; end button; button Fn2_store_Wm2; position 110,27; size 31,19; background (0,130,70) 0; label "WM2"; end button; button Fn2_store_Wm3; position 145,27; size 31,19; background (0,130,70) 0; label "WM3"; end button; button Fn2_store_Wm4; position 180,27; size 31,19; background (0,130,70) 0; label "WM4"; end button; END PANEL ; ! of Function2_scr2 END PANEL; ! of Function2 END PANEL; ! of MATH_SUBSYSTEM ! ========================= ! SUBPANEL: MEASURE ! ========================= PANEL MEASURE_SUBSYSTEM; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; panel meas_main; position 1,1; size 212,181; text 5,156 ,"MEAS SRCS" ; discrete meas_source; position 90,156; size 60,19; label "Chan 1","Chan 2","Chan 3","Chan 4","Func 1","Func 2","FFT ", "Mem 1","Mem 2" "Mem 3","Mem 4"; end discrete; discrete meas_source2 ; position 150,156; size 60,19; label "Chan 1","Chan 2","Chan 3","Chan 4","Func 1","Func 2","FFT ", "Mem 1","Mem 2" "Mem 3","Mem 4"; end discrete; !TEXT 5,100,"Precision"; !TOGGLE Meas_precision; ! POSITION 110,100; ! SIZE 100,19; ! LABEL "Coarse","Fine"; !END TOGGLE; TEXT 5,134, "MEAS Mode " ; TOGGLE meas_cont_stat ; position 90,134; size 120,19; background (150,110,75) 0; label "CONT OFF","CONT ON"; end TOGGLE ; TEXT 5,112, "STAT" ; TOGGLE meas_statistics ; position 90,112; size 40,19; label "OFF","ON"; end TOGGLE ; discrete meas_meas_type ; position 130,112; size 80,19; label "Current","Minimum","Maximum","Mean","Std. Dev" ; end discrete; button meas_results ; position 5,90; size 205,19; background (0,130,70) 0; label "Get CONT Results" ; end button; button meas_scratch ; position 5,68; size 205,19; background (0,130,70) 0; label "Scratch MEAS" ; end button; !button meas_all; ! position 5,46; ! size 205,19; ! background (0,130,70) 0; ! label "Measure ALL"; ! HIT ACTIONS ; ! IF PANELMODE THEN ; ! NOTIFY "To be implemented" ; ! END IF ; ! END ACTIONS ; !end button; button meas_show_vmeas; position 5,24; size 100,19; BACKGROUND (75,0,240)0 ; label "VOLT MEAS"; end button; button meas_show_tmeas; position 110,24; size 100,19; BACKGROUND (75,0,240)0 ; label "Time MEAS"; end button; button meas_show_fmeas; position 50,2 ; size 100,19; BACKGROUND (75,0,240)0 ; label "FFT MEAS"; end button; end panel; ! end panel meas_main panel meas_vmeas; position 1,1; size 212,181; text 5,155,"V AMPL"; display meas_v_amplitude; position 75,155; size 120,19; format "8 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS; position 195,155; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE; text 5,130,"V p-p"; display meas_v_pp; position 75,130; size 120,19; format "8 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS; position 195,130; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE ; text 5,105,"V RMS"; display meas_v_rms; position 75,105; size 120,19; format "8 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS; position 195,105; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE ; text 5,80,"V MAX"; display meas_v_max; position 75,80; size 120,19; format "8 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS ; position 195,80; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE ; text 5,55,"V MIN"; display meas_v_min; position 75,55; size 120,19; format "8 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS ; position 195,55; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE; button meas_show_vmeas_more; position 5,30; size 100,19; BACKGROUND (75,0,240)0 ; label "More VOLT"; end button; button meas_show_fmeas; position 110,30; size 100,19; BACKGROUND (75,0,240)0 ; label "FFT MEAS"; end button; button meas_show_tmeas; position 5,3; size 100,19; BACKGROUND (75,0,240)0 ; label "Time MEAS"; end button; button meas_show_main; position 110,3; size 100,19; BACKGROUND (75,0,240)0 ; label "MEAS Main"; end button; end panel; ! end panel meas_vmeas panel meas_vmeas_more; position 1,1; size 212,181; text 5,156,"V Top"; display meas_v_top; position 95,156; size 100,19; format "5 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS; position 195,156; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE ; text 5,134,"V Base"; display meas_v_base; position 95,134; size 100,19; format "5 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS ; position 195,134; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE ; TEXT 5,112,"Preshoot"; DISPLAY Meas_v_preshoot; POSITION 95,112; SIZE 100,19; FORMAT "5 DIGITS"; STYLE "NOENGR" ; END DISPLAY; button disp_temp ; position 195,112; size 15,19; background (105,95,80),0; label "%"; end button ; TEXT 5,90,"Overshoot"; DISPLAY Meas_v_overshoot; POSITION 95,90; SIZE 100,19; FORMAT "5 DIGITS"; STYLE "NOENGR" ; END DISPLAY; button disp_temp ; position 195,90; size 15,19; background (105,95,80),0; label "%"; end button; TEXT 5,68,"V Lower"; DISPLAY Meas_v_lower; POSITION 95,68; SIZE 100,19; FORMAT "5 DIGITS"; END DISPLAY; DISCRETE MEAS_DISP_UNITS; position 195,68; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE ; TEXT 5,46,"V Upper"; DISPLAY Meas_v_upper; POSITION 95,46; SIZE 100,19; FORMAT "5 DIGITS"; END DISPLAY; DISCRETE MEAS_DISP_UNITS; position 195,46; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE; TEXT 5,24,"V Mid"; DISPLAY Meas_v_mid; POSITION 95,24; SIZE 100,19; FORMAT "5 DIGITS"; END DISPLAY; DISCRETE MEAS_DISP_UNITS; position 195,24; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE ; BUTTON meas_show_vmeas_more1 ; POSITION 5,2; SIZE 102,19; BACKGROUND (75,0,240)0 ; LABEL "More"; END BUTTON; BUTTON Meas_show_vmeas; POSITION 108,2; SIZE 102,19; BACKGROUND (75,0,240)0 ; LABEL "Return"; END BUTTON; END PANEL; ! of meas_vmeas_more panel meas_vmeas_more1; position 1,1; size 212,181; text 5,150,"RMS PARAM" ; discrete meas_v_rms_period ; position 95,150; size 80,19; label "Cycle","Display" ; end discrete; discrete meas_v_rms_acdc ; position 175,150; size 40,19; label "AC","DC" ; end discrete; text 5,128,"V RMS"; display meas_v_rms; position 75,128; size 120,19; format "8 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS ; position 195,128; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE ; text 5,106,"AVER PARAM" ; discrete meas_v_aver_period ; position 95,106; size 80,19; label "Cycle","Display" ; end discrete; text 5,84,"V AVG"; display meas_v_aver; position 75,84; size 120,19; format "8 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS ; position 195,84; size 15,19; background (105,95,80),0; label "V","A","W","U","dB" ; end DISCRETE ; text 5,62,"V Time"; CONTINUOUS meas_v_time_sec; POSITION 75,62; SIZE 50,19; FORMAT "5 DIGITS"; END CONTINUOUS; button disp_temp; position 125,62; size 15,19; background (105,95,80),0; label "s"; end button; display meas_v_time; position 140,62; size 55,19; format "6 DIGITS"; end display; DISCRETE MEAS_DISP_UNITS ; position 195,62; size 15,19; background (105,95,80),0; label "V","A","W","U","dB" ; end DISCRETE ; BUTTON Meas_show_vmeas_more ; POSITION 108,2; SIZE 102,19; BACKGROUND (75,0,240)0 ; LABEL "Return"; END BUTTON; end panel ; ! of meas_show_vmeas_more1 panel meas_tmeas; position 1,1; size 212,181; text 5,157,"Frequency"; display meas_t_freq; position 100,157; size 85,19; format "4 DIGITS"; end display; button disp_temp; position 185,157; size 25,19; background (105,95,80),0; label "Hz"; end button; text 5,135,"Period"; display meas_t_period; position 100,135; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 195,135; size 15,19; background (105,95,80),0; label "s"; end button; text 5,113,"Duty Cycle"; display meas_t_duty; position 100,113; size 110,19; format "6 DIGITS"; end display; text 5,91,"POS Width"; display meas_t_pwid; position 100,91; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 195,91; size 15,19; background (105,95,80),0; label "s"; end button; text 5,69,"NEG Width"; display meas_t_nwid; position 100,69; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 195,69; size 15,19; background (105,95,80),0; label "s"; end button; text 5,47,"DEL Time"; display meas_delta; position 100,47; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 195,47; size 15,19; background (105,95,80),0; label "s"; end button; button meas_show_tmeas_more ; position 5,25; size 100,19; BACKGROUND (75,0,240)0 ; label "More"; end button; button meas_show_fmeas; position 110,25; size 100,19; BACKGROUND (75,0,240)0 ; label "FFT MEAS"; end button; button meas_show_vmeas; position 5,3; size 100,19; BACKGROUND (75,0,240)0 ; label "VOLT MEAS"; end button; button meas_show_main; position 110,3; size 100,19; BACKGROUND (75,0,240)0 ; label "MEAS Main"; end button; end panel; ! end panel meas_tmeas panel meas_tmeas_more ; position 1,1; size 212,181; text 5,157,"Rise Time"; display meas_t_rtime; position 100,157; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 195,157; size 15,19; background (105,95,80),0; label "s"; end button; text 5,135,"Fall Time"; display meas_t_ftime; position 100,135; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 195,135; size 15,19; background (105,95,80),0; label "s"; end button; text 5,113,"T Max"; display meas_t_tmax; position 100,113; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 195,113; size 15,19; background (105,95,80),0; label "s"; end button; text 5,91,"T Min"; display meas_t_tmin; position 100,91; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 195,91; size 15,19; background (105,95,80),0; label "s"; end button; text 5,69 "Search For" ; CONTINUOUS meas_t_volt; POSITION 100,69; SIZE 95,19; FORMAT "5 DIGITS"; END CONTINUOUS; DISCRETE MEAS_DISP_UNITS; position 195,69; size 15,19; background (105,95,80),0; label "V","A","W","U","dB"; end DISCRETE; discrete meas_t_slope ; position 100,47; size 20,19; label "+","-" ; end discrete; continuous meas_t_occur ; position 120,47; size 90,19; FORMAT "5 DIGITS" ; end continuous; text 5,25,"T Volt"; display meas_t_tvolt; position 100,25; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 195,25; size 15,19; background (105,95,80),0; label "s"; end button; button meas_show_tmeas; position 5,3; size 100,19; BACKGROUND (75,0,240)0 ; label "Return"; end button; end panel ; ! of meas_tmeas_more panel meas_fmeas; position 1,1; size 212,181; text 5,157,"FFT Freq"; display meas_fft_freq ; position 95,157; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 190,157; size 20,19; background (105,95,80),0; label "Hz"; end button; text 5,135,"FFT Magn."; display meas_fft_magn ; position 95,135; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 190,135; size 20,19; background (105,95,80),0; label "dB"; end button; text 5,113,"DEL Freq"; display meas_fft_dfreq ; position 95,113; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 190,113; size 20,19; background (105,95,80),0; label "Hz"; end button; text 5,91,"DEL Magn."; display meas_fft_dmagn; position 95,91; size 95,19; format "5 DIGITS"; end display; button disp_temp; position 190,91; size 20,19; background (105,95,80),0; label "dB"; end button; text 5,69 "Peak 1" ; CONTINUOUS meas_fft_peak1; POSITION 60,69; SIZE 68,19; FORMAT "5 DIGITS"; END CONTINUOUS; text 132,69 "2 " ; CONTINUOUS meas_fft_peak2; POSITION 142,69; SIZE 68,19; FORMAT "5 DIGITS"; END CONTINUOUS; text 5,47 "Threshold" ; CONTINUOUS meas_peak_thresh; POSITION 95,47; SIZE 95,19; FORMAT "5 DIGITS"; STEP 0.1 ; END CONTINUOUS; button disp_temp; position 190,47; size 20,19; background (105,95,80),0; label "dB"; end button; button meas_show_main; position 110,25; size 100,19; BACKGROUND (75,0,240)0 ; label "MEAS Main"; end button; button meas_show_vmeas; position 5,3; size 100,19; BACKGROUND (75,0,240)0 ; label "VOLT MEAS"; end button; button meas_show_tmeas; position 110,3; size 100,19; BACKGROUND (75,0,240)0 ; label "TIME MEAS"; end button; end panel ; ! of meas_fmeas END PANEL; ! MEASURE_SUBSYSTEM !=============================== ! SUBPANEL: MEAS DEF SUBSYSTEM !=============================== PANEL MEASDEF_SUBSYSTEM ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; panel measdef_main ; position 0,0; size 214,183; FOREGROUND (255,255,255),100; button measdef_show_delta ; position 5,120; size 205,19; BACKGROUND (75,0,240)0 ; label "To Delta Defs"; end button; button measdef_show_thr ; position 5,90; size 205,19; BACKGROUND (75,0,240)0 ; label "To Threshold Defs"; end button; button measdef_show_tbase ; position 5,60; size 205,19; BACKGROUND (75,0,240)0 ; label "To Topbase Defs"; end button; end panel ; ! of measdef_main panel measdef_delta ; position 0,0; size 214,183; FOREGROUND (255,255,255),100; TEXT 5,156 "STRT DIRN" ; discrete meas_delta_strtedge_dirn ; position 95,156; size 115,19; label "Rising","Falling","Either"; end discrete; TEXT 5,134 "STRT NUM" ; continuous meas_delta_strtedge_num ; position 95,134; size 115,19; FORMAT "5 DIGITS" ; end continuous; TEXT 5,112 "STRT POS" ; discrete meas_delta_strtedge_pos ; position 95,112; size 115,19; label "Upper","Middle","Lower"; end discrete; TEXT 5,90 "STOP DIRN" ; discrete meas_delta_stopedge_dirn ; position 95,90; size 115,19; label "Rising","Falling","Either"; end discrete; TEXT 5,68 "STOP NUM" ; continuous meas_delta_stopedge_num ; position 95,68; size 115,19; FORMAT "5 DIGITS" ; end continuous; TEXT 5,46 "STOP POS" ; discrete meas_delta_stopedge_pos ; position 95,46; size 115,19; label "Upper","Middle","Lower"; end discrete; button meas_set_delta_def ; position 5,24; size 205,19; background (0,130,70) 0; label "Set Delta Definitions"; end button; button measdef_show_main ; position 5,2; size 205,19; BACKGROUND (75,0,240)0 ; label "Return"; end button; end panel ; ! of measdef_delta panel measdef_thr ; position 0,0 ; size 214,183 ; FOREGROUND (255,255,255),100; TEXT 5,156 "THR UNITS" ; discrete meas_thr_units ; position 95,156; size 115,19; label "Percent","Volts"; end discrete; PANEL measdef_thr_pct ; position 1,70 ; size 212, 70 ; TEXT 5,48 "UPP PCT" ; continuous meas_thr_upp_pct ; position 95,48; size 115,19; FORMAT "5 DIGITS" ; end continuous; TEXT 5,26 "MID PCT" ; continuous meas_thr_mid_pct ; position 95,26; size 115,19; FORMAT "5 DIGITS" ; end continuous; TEXT 5,2 "LOW PCT" ; continuous meas_thr_low_pct ; position 95,2; size 115,19; FORMAT "5 DIGITS" ; end continuous; END PANEL ; PANEL measdef_thr_volts ; position 1,70 ; size 212,70 ; TEXT 5,48 "UPP VOLTS" ; continuous meas_thr_upp_volts ; position 95,48; size 115,19; FORMAT "5 DIGITS" ; end continuous; TEXT 5,26 "MID VOLTS" ; continuous meas_thr_mid_volts ; position 95,26; size 115,19; FORMAT "5 DIGITS" ; end continuous; TEXT 5,2 "LOW VOLTS" ; continuous meas_thr_low_volts ; position 95,2; size 115,19; FORMAT "5 DIGITS" ; end continuous; END PANEL ; button meas_thr_std ; position 5,46; size 205,19; background (0,130,70) 0; label "Set Standard"; end button; button meas_set_thr_def ; position 5,24; size 205,19; background (0,130,70) 0; label "Set Threshold Defs"; end button; button measdef_show_main ; position 5,2; size 205,19; BACKGROUND (75,0,240)0 ; label "Return"; end button; end panel ; ! of measdef_thr panel measdef_tbase ; position 0,0 ; size 214,183 ; FOREGROUND (255,255,255),100; TEXT 5,120 "TOP VOLTS" ; continuous meas_tbase_tvolts ; position 95,120; size 115,19; FORMAT "5 DIGITS" ; end continuous; TEXT 5,90 "BASE VOLTS" ; continuous meas_tbase_bvolts ; position 95,90; size 115,19; FORMAT "5 DIGITS" ; end continuous; button meas_tbase_std ; position 5,46; size 205,19; background (0,130,70) 0; label "Set Standard"; end button; button meas_set_tbase_def ; position 5,24; size 205,19; background (0,130,70) 0; label "Set Topbase Defs"; end button; button measdef_show_main ; position 5,2; size 205,19; BACKGROUND (75,0,240)0 ; label "Return"; end button; end panel ; ! of measdef_tbase END PANEL ; ! of measdef_subsystem !=============================== ! SUBPANEL: LIMIT SUBSYSTEM !=============================== PANEL LIMIT_SUBSYSTEM ; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TOGGLE Limit_Stat; POSITION 5,158; SIZE 80,19; LABEL "Off","On"; END TOGGLE; DISCRETE Limit_Source; POSITION 90,158; SIZE 40,19; LABEL "None","1","2","3","4" ; UPDATE ACTIONS ; SELECT Limit_Source ; CASE NONE ; HIDE Limit_Source_1 ; Hide Limit_Results_1 ; HIDE Limit_UL_1 ; HIDE Limit_Source_2 ; Hide Limit_Results_2 ; HIDE Limit_UL_2 ; HIDE Limit_Source_3 ; Hide Limit_Results_3 ; HIDE Limit_UL_3 ; HIDE Limit_Source_4 ; Hide Limit_Results_4 ; HIDE Limit_UL_4 ; HIDE Limit_Cond_1 ; HIDE Limit_Cond_2 ; HIDE Limit_Cond_3 ; HIDE Limit_Cond_4 ; CASE ONE ; SHOW Limit_Source_1 ; SHOW Limit_Results_1 ; SHOW Limit_UL_1 ; HIDE Limit_Source_2 ; Hide Limit_Results_2 ; HIDE Limit_UL_2 ; HIDE Limit_Source_3 ; Hide Limit_Results_3 ; HIDE Limit_UL_3 ; HIDE Limit_Source_4 ; Hide Limit_Results_4 ; HIDE Limit_UL_4 ; SHOW Limit_Cond_1 ; HIDE Limit_Cond_2 ; HIDE Limit_Cond_3 ; HIDE Limit_Cond_4 ; CASE TWO ; HIDE Limit_Source_1 ; Hide Limit_Results_1 ; HIDE Limit_UL_1 ; SHOW Limit_Source_2 ; SHOW Limit_Results_2 ; SHOW Limit_UL_2 ; HIDE Limit_Source_3 ; Hide Limit_Results_3 ; HIDE Limit_UL_3 ; HIDE Limit_Source_4 ; Hide Limit_Results_4 ; HIDE Limit_UL_4 ; HIDE Limit_Cond_1 ; SHOW Limit_Cond_2 ; HIDE Limit_Cond_3 ; HIDE Limit_Cond_4 ; CASE THREE; HIDE Limit_Source_1 ; Hide Limit_Results_1 ; HIDE Limit_UL_1 ; HIDE Limit_Source_2 ; Hide Limit_Results_2 ; HIDE Limit_UL_2 ; SHOW Limit_Source_3 ; SHOW Limit_Results_3 ; SHOW Limit_UL_3 ; HIDE Limit_Source_4 ; Hide Limit_Results_4 ; HIDE Limit_UL_4 ; HIDE Limit_Cond_1 ; HIDE Limit_Cond_2 ; SHOW Limit_Cond_3 ; HIDE Limit_Cond_4 ; CASE FOUR ; HIDE Limit_Source_1 ; Hide Limit_Results_1 ; HIDE Limit_UL_1 ; HIDE Limit_Source_2 ; Hide Limit_Results_2 ; HIDE Limit_UL_2 ; HIDE Limit_Source_3 ; Hide Limit_Results_3 ; HIDE Limit_UL_3 ; SHOW Limit_Source_4 ; SHOW Limit_Results_4 ; SHOW Limit_UL_4 ; HIDE Limit_Cond_1 ; HIDE Limit_Cond_2 ; HIDE Limit_Cond_3 ; SHOW Limit_Cond_4 ; END SELECT ; END ACTIONS ; END DISCRETE; PANEL Limit_Source_1 ; POSITION 132,158 ; SIZE 78,22 ; DISCRETE Meas_param1 ; POSITION 0,0 ; SIZE 78,19 ; !FOREGROUND (238,150,0),100 ; FOREGROUND (0,0,0),0 ; BACKGROUND (220,211,184)0 ; Label "","V amptd","V p-p","Preshoot","Overshoot", "V rms","V max","V Min", "V top", "V base","V avg", "V lower", "V upper", "V middle", "V time", "Frequency", "Period", "Duty Cycle", "+ width", "- width", "Rise" , "Fall", "T max", "T min", "T volt","DEL Time", "FFT freq", "FFT mag", "FFT DEL Freq", "FFT DEL mag"; ! all measurements END DISCRETE ; END PANEL ; PANEL Limit_Source_2 ; POSITION 132,158 ; SIZE 78,22 ; DISCRETE Meas_param2 ; POSITION 0,0 ; SIZE 78,19 ; !FOREGROUND (238,150,0),100 ; FOREGROUND (0,0,0),0 ; BACKGROUND (220,211,184)0 ; Label "","V amptd","V p-p","Preshoot","Overshoot", "V rms","V max","V Min", "V top", "V base","V avg", "V lower", "V upper", "V middle", "V time", "Frequency", "Period", "Duty Cycle", "+ width", "- width", "Rise" , "Fall", "T max", "T min", "T volt","DEL Time", "FFT freq", "FFT mag", "FFT DEL Freq", "FFT DEL mag"; ! all measurements END DISCRETE ; END PANEL ; PANEL Limit_Source_3 ; POSITION 132,158 ; SIZE 78,22 ; DISCRETE Meas_param3 ; POSITION 0,0 ; SIZE 78,19 ; !FOREGROUND (238,150,0),100 ; FOREGROUND (0,0,0),0 ; BACKGROUND (220,211,184)0 ; Label "","V amptd","V p-p","Preshoot","Overshoot", "V rms","V max","V Min", "V top", "V base","V avg", "V lower", "V upper", "V middle", "V time", "Frequency", "Period", "Duty Cycle", "+ width", "- width", "Rise" , "Fall", "T max", "T min", "T volt","DEL Time", "FFT freq", "FFT mag", "FFT DEL Freq", "FFT DEL mag"; ! all measurements END DISCRETE ; END PANEL ; PANEL Limit_Source_4 ; POSITION 132,158 ; SIZE 78,22 ; DISCRETE Meas_param4 ; POSITION 0,0 ; SIZE 78,19 ; !FOREGROUND (238,150,0),100 ; FOREGROUND (0,0,0),0 ; BACKGROUND (220,211,184)0 ; Label "","V amptd","V p-p","Preshoot","Overshoot", "V rms","V max","V Min", "V top", "V base","V avg", "V lower", "V upper", "V middle", "V time", "Frequency", "Period", "Duty Cycle", "+ width", "- width", "Rise" , "Fall", "T max", "T min", "T volt","DEL Time", "FFT freq", "FFT mag", "FFT DEL Freq", "FFT DEL mag"; ! all measurements END DISCRETE ; END PANEL ; PANEL Limit_Cond_1 ; POSITION 1,114 ; SIZE 213,44 ; TEXT 5,22,"Fail When"; DISCRETE Limit_Failc_1; POSITION 90,22; SIZE 120,19; LABEL "Inside","Outside","Always","Never" ; END DISCRETE; TEXT 5,0,"MNF"; DISCRETE Limit_Mnf_1; POSITION 90,0; SIZE 120,19; LABEL "Fail","Pass","Ignore" ; END DISCRETE; END PANEL ; PANEL Limit_Cond_2 ; POSITION 1,114 ; SIZE 213,44 ; TEXT 5,22,"Fail When"; DISCRETE Limit_Failc_2; POSITION 90,22; SIZE 120,19; LABEL "Inside","Outside","Always","Never" ; END DISCRETE; TEXT 5,0,"MNF"; DISCRETE Limit_Mnf_2; POSITION 90,0; SIZE 120,19; LABEL "Fail","Pass","Ignore" ; END DISCRETE; END PANEL ; PANEL Limit_Cond_3 ; POSITION 1,114 ; SIZE 213,44 ; TEXT 5,22,"Fail When"; DISCRETE Limit_Failc_3; POSITION 90,22; SIZE 120,19; LABEL "Inside","Outside","Always","Never" ; END DISCRETE; TEXT 5,0,"MNF"; DISCRETE Limit_Mnf_3; POSITION 90,0; SIZE 120,19; LABEL "Fail","Pass","Ignore" ; END DISCRETE; END PANEL ; PANEL Limit_Cond_4 ; POSITION 1,114 ; SIZE 213,44 ; TEXT 5,22,"Fail When"; DISCRETE Limit_Failc_4; POSITION 90,22; SIZE 120,19; LABEL "Inside","Outside","Always","Never" ; END DISCRETE; TEXT 5,0,"MNF"; DISCRETE Limit_Mnf_4; POSITION 90,0; SIZE 120,19; LABEL "Fail","Pass","Ignore" ; END DISCRETE; END PANEL ; TEXT 5,92,"Run"; DISCRETE Limit_Run; POSITION 76,92; SIZE 60,19; LABEL "Ever","# Fail","# Wav" ; UPDATE ACTIONS ; SELECT Limit_Run ; CASE FOR ; HIDE Limit_Total_Fail ; HIDE Limit_Max_Waveform ; CASE FAIL ;SHOW Limit_Total_Fail ; HIDE Limit_Max_Waveform ; CASE WAV ; HIDE Limit_Total_Fail ; SHOW Limit_Max_Waveform ; END SELECT ; END ACTIONS ; END DISCRETE; PANEL Limit_Total_Fail ; POSITION 142,92 ; SIZE 68,22 ; CONTINUOUS Total_Fail ; POSITION 0,0; SIZE 68,19; FORMAT "7 DIGITS"; STEP 1 ; END CONTINUOUS; END PANEL ; PANEL Limit_Max_Waveform ; POSITION 142,92 ; SIZE 68,22 ; CONTINUOUS Max_Waveform ; POSITION 0,0; SIZE 68,19; FORMAT "7 DIGITS"; STEP 1 ; END CONTINUOUS; END PANEL ; PANEL Limit_UL_1 ; POSITION 1,70; SIZE 213,22 ; TEXT 5,0 "UL" ; CONTINUOUS Limit_Ulimit_1 ; POSITION 25,0 ; SIZE 78,19 ; FORMAT "7 DIGITS" ; STEP 1E-18 ; END CONTINUOUS ; TEXT 108,0 "LL" ; CONTINUOUS Limit_Llimit_1 ; POSITION 133,0 ; SIZE 78,19 ; FORMAT "5 DIGITS" ; END CONTINUOUS ; END PANEL ; PANEL Limit_UL_2 ; POSITION 1,70; SIZE 213,22 ; TEXT 5,0 "UL" ; CONTINUOUS Limit_Ulimit_2 ; POSITION 25,0 ; SIZE 78,19 ; FORMAT "7 DIGITS" ; STEP 1E-18 ; END CONTINUOUS ; TEXT 108,0 "LL" ; CONTINUOUS Limit_Llimit_2 ; POSITION 133,0 ; SIZE 78,19 ; FORMAT "5 DIGITS" ; END CONTINUOUS ; END PANEL ; PANEL Limit_UL_3 ; POSITION 1,70; SIZE 213,22 ; TEXT 5,0 "UL" ; CONTINUOUS Limit_Ulimit_3 ; POSITION 25,0 ; SIZE 78,19 ; FORMAT "7 DIGITS" ; STEP 1E-18 ; END CONTINUOUS ; TEXT 108,0 "LL" ; CONTINUOUS Limit_Llimit_3 ; POSITION 133,0 ; SIZE 78,19 ; FORMAT "5 DIGITS" ; END CONTINUOUS ; END PANEL ; PANEL Limit_UL_4 ; POSITION 1,70; SIZE 213,22 ; TEXT 5,0 "UL" ; CONTINUOUS Limit_Ulimit_4 ; POSITION 25,0 ; SIZE 78,19 ; FORMAT "7 DIGITS" ; STEP 1E-18 ; END CONTINUOUS ; TEXT 108,0 "LL" ; CONTINUOUS Limit_Llimit_4 ; POSITION 133,0 ; SIZE 78,19 ; FORMAT "5 DIGITS" ; END CONTINUOUS ; END PANEL ; button Get_Limit_Results ; position 5,46; size 205,19; background (0,130,70) 0; label "Get Limit Results" ; end button; TEXT 5,26 " Fail Total Status" ; PANEL Limit_Results_1 ; POSITION 1,1; SIZE 213,22 ; DISPLAY Limit_fail_1 ; POSITION 0,0; SIZE 68,19; FORMAT "5 DIGITS"; END DISPLAY; DISPLAY Limit_total_1 ; POSITION 70,0; SIZE 68,19; FORMAT "5 DIGITS"; END DISPLAY; DISCRETE Limit_status_1 ; POSITION 140,0; SIZE 68,19; LABEL "Pass","F-High","F-Low","F-Inside","F-Other" ; END DISCRETE; END PANEL ; PANEL Limit_Results_2 ; POSITION 1,1; SIZE 213,22 ; DISPLAY Limit_fail_2 ; POSITION 0,0; SIZE 68,19; FORMAT "5 DIGITS"; END DISPLAY; DISPLAY Limit_total_2 ; POSITION 70,0; SIZE 68,19; FORMAT "5 DIGITS"; END DISPLAY; DISCRETE Limit_status_2 ; POSITION 140,0; SIZE 68,19; LABEL "Pass","F-High","F-Low","F-Inside","F-Other" ; END DISCRETE; END PANEL ; PANEL Limit_Results_3 ; POSITION 1,1; SIZE 213,22 ; DISPLAY Limit_fail_3 ; POSITION 0,0; SIZE 68,19; FORMAT "5 DIGITS"; END DISPLAY; DISPLAY Limit_total_3 ; POSITION 70,0; SIZE 68,19; FORMAT "5 DIGITS"; END DISPLAY; DISCRETE Limit_status_3 ; POSITION 140,0; SIZE 68,19; LABEL "Pass","F-High","F-Low","F-Inside","F-Other" ; END DISCRETE ; END PANEL ; PANEL Limit_Results_4 ; POSITION 1,1; SIZE 213,22 ; DISPLAY Limit_fail_4 ; POSITION 0,0; SIZE 68,19; FORMAT "5 DIGITS"; END DISPLAY; DISPLAY Limit_total_4 ; POSITION 70,0; SIZE 68,19; FORMAT "5 DIGITS"; END DISPLAY; DISCRETE Limit_status_4 ; POSITION 140,0; SIZE 68,19; LABEL "Pass","F-High","F-Low","F-Inside","F-Other" ; END DISCRETE; END PANEL ; END PANEL ; ! ========================= ! SUBPANEL: MARKERS ! ========================= PANEL MARKER_SUBSYSTEM; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 5,158,"Mode"; DISCRETE MARKER_MODE; POSITION 50,158; SIZE 85,19; LABEL "Off","Manual","Waveform","MEAS"; END DISCRETE; TEXT 140,158,"Read"; TOGGLE MARKER_READOUT; POSITION 180,158; SIZE 30,19; LABEL "Off","On"; END TOGGLE; TEXT 5,136,"X1Y1"; DISCRETE MARKER_X1Y1_SRC; POSITION 45,136; SIZE 60,19; label "Chan 1","Chan 2","Chan 3","Chan 4","Func 1","Func 2","FFT ", "Mem 1","Mem 2" "Mem 3","Mem 4"; END DISCRETE; TEXT 110,136,"X2Y2"; DISCRETE MARKER_X2Y2_SRC; POSITION 150,136; SIZE 60,19; label "Chan 1","Chan 2","Chan 3","Chan 4","Func 1","Func 2","FFT ", "Mem 1","Mem 2" "Mem 3","Mem 4"; END DISCRETE; TEXT "X1(+)" ; POSITION 5,114 ; FOREGROUND (230,30,30),100; END TEXT ; button t1_prev; position 70,114; size 25,19; background (0,130,70) 0; label "<<"; end button; CONTINUOUS MARKER_X1_POS; POSITION 95,114; SIZE 65,19; FORMAT "4 DIGITS"; END CONTINUOUS; button t1_next; position 160,114; size 25,19; background (0,130,70) 0; label ">>"; end button; !button disp_temp; ! position 195,114; ! size 15,19; ! background (105,95,80),0; ! label "s"; !end button; DISCRETE Mrkr1_X_AXIS_UNITS ; position 185,114; size 25,19; background (105,95,80),0; LABEL "s","Hz" ; end DISCRETE; TEXT "X2(X)" ; POSITION 5,92 ; FOREGROUND (120,184,210),100; END TEXT ; button t2_prev; position 70,92; size 25,19; background (0,130,70) 0; label "<<"; end button; CONTINUOUS MARKER_X2_POS; POSITION 95,92; SIZE 65,19; FORMAT "4 DIGITS"; END CONTINUOUS; button t2_next; position 160,92; size 25,19; background (0,130,70) 0; label ">>"; end button; !button disp_temp; ! position 195,92; ! size 15,19; ! background (105,95,80),0; ! label "s"; !end button; DISCRETE Mrkr2_X_AXIS_UNITS ; position 185,92; size 25,19; background (105,95,80),0; LABEL "s","Hz" ; end DISCRETE; TEXT 5,70 "X Delta"; DISPLAY MARKER_TDELTA; POSITION 70,70; SIZE 115,19; FORMAT "7 DIGITS"; END DISPLAY; !button disp_temp; ! position 185,70; ! size 25,19; ! background (105,95,80),0; ! label "s"; !end button; DISCRETE Mrkr1_X_AXIS_UNITS ; position 185,70; size 25,19; background (105,95,80),0; LABEL "s","Hz" ; end DISCRETE; TEXT "Y1" ; POSITION 5,48 ; FOREGROUND (230,30,30),100; END TEXT ; button v1_prev; position 70,48; size 25,19; background (0,130,70) 0; label "<<"; end button; CONTINUOUS MARKER_Y1_POS; POSITION 95,48; SIZE 65,19; FORMAT "4 DIGITS"; END CONTINUOUS; button v1_next; position 160,48; size 25,19; background (0,130,70) 0; label ">>"; end button; DISCRETE MARKER_DISP_UNITS_1 ; position 185,48; size 25,19; background (105,95,80),0; LABEL "V","A","W","U","dB" ; end DISCRETE; TEXT "Y2" ; POSITION 5,26 ; FOREGROUND (120,184,210),100; END TEXT ; button v2_prev; position 70,26; size 25,19; background (0,130,70) 0; label "<<"; end button; CONTINUOUS MARKER_Y2_POS; POSITION 95,26; SIZE 65,19; FORMAT "4 DIGITS"; END CONTINUOUS; button v2_next; position 160,26; size 25,19; background (0,130,70) 0; label ">>"; end button; DISCRETE MARKER_DISP_UNITS_2 ; position 185,26; size 25,19; background (105,95,80),0; LABEL "V","A","W","U","dB" ; end DISCRETE; TEXT 5,4 "Y Delta"; DISPLAY MARKER_VDELTA; POSITION 70,4; SIZE 115,19; FORMAT "7 DIGITS"; END DISPLAY; DISCRETE MARKER_DISP_UNITS_1 ; position 185,4; size 25,19; background (105,95,80),0; LABEL "V","A","W","U","dB" ; end DISCRETE; END PANEL; ! of MARKER SUBSYSTEM ! ========================= ! SUBPANEL: WAVEFORM ! ========================= PANEL ACQUISITION_SUBSYSTEM; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 5,156,"ACQ Mode" ; TOGGLE Acq_mode; POSITION 90,156; SIZE 120,19; LABEL "Real Time","EQT Time"; END TOGGLE; TEXT 5,134,"Waveform"; DISCRETE ACQ_TYPE; POSITION 90,134; SIZE 120,19; LABEL "Normal","Raw","Interpolate","Average"; END DISCRETE; TEXT 5,112 "COMP"; CONTINUOUS COMPLETION; POSITION 90,112; SIZE 105,19; style "NOENGR"; FORMAT "DDDD"; END CONTINUOUS; button disp_temp; position 195,112; size 15,19; background (105,95,80),0; label "%"; end button; TEXT 5,90,"WAV PTS"; button NUM_POINTS_AUTO; position 90,90; size 50,19; background (0,130,70),0; label "Auto"; end button; CONTINUOUS NUM_POINTS; POSITION 140,90; SIZE 70,19; style "NOENGR"; FORMAT "6 DIGITS"; END CONTINUOUS ; PANEL ACQUISITION_EQVTMODE ; POSITION 4,0; SIZE 210,88; TEXT 1,68,"Count" ; CONTINUOUS Acq_count; POSITION 86,68; SIZE 120,19; style "NOENGR"; FORMAT "6 DIGITS"; END CONTINUOUS ; TEXT 1,46 "State"; DISCRETE Acq_Comp_State ; POSITION 86,46; SIZE 120,19; LABEL "OFF","ON"; END DISCRETE; END PANEL ; PANEL ACQUISITION_REALMODE ; POSITION 4,0; SIZE 210,88; TEXT 1,68,"SAM Rate"; button Acq_srate_auto; position 86,68; size 50,19; background (0,130,70),0; label "Auto"; end button; CONTINUOUS Acq_srate; POSITION 136,68; SIZE 70,19; style "NOENGR"; FORMAT "6 DIGITS"; END CONTINUOUS ; TEXT 1,46,"INT"; TOGGLE Acq_int_stat; POSITION 86,46; SIZE 120,19; LABEL "OFF","ON"; END TOGGLE; TEXT 1,24,"BW Limit"; TOGGLE Acq_bwlimit; POSITION 86,24; SIZE 120,19; LABEL "OFF","ON"; END TOGGLE; END PANEL ; END PANEL; ! ACQUISITION_SUBSYSTEM ! ========================= ! SUBPANEL: MISC ! ========================= PANEL MISC; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; END PANEL ; ! ========================= ! SUBPANEL: STATUS ! ========================= PANEL STATUS_PANEL; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; TEXT 80,160 "Status Enable" ; text 5,138,"Event"; display stat_evnt_evr; position 70,138; size 70,19; end display; continuous stat_evnt_enr; position 140,138; size 70,19; format 'DDD' ; style 'NOENGR' ; end continuous; text 5,116,"SPoll"; display stat_stb; position 70,116; size 70,19; end display; continuous stat_sre; position 140,116; size 70,19; format 'DDD'; style 'NOENGR' ; end continuous; text 5,94,"Self Test"; display stat_self_test; position 85,94; size 125,19; end display; text 5,72, "Error"; display stat_err; position 85,72; size 125,19; format "5 DIGITS" ; end display; display stat_err_str; position 5,50; size 205,19; end display; TEXT 5,28 "Id"; DISPLAY SERIAL_NUM ; POSITION 85,28; SIZE 125,19; END DISPLAY; button stat_opc; position 5,5; size 45,19; background (0,130,70) 0; label "OPC"; end button; !text 70,5, "OPC?"; !display stat_opcv; ! position 115,5; ! size 25,19; !end display; button stat_cls; position 85,5; size 45,19; background (0,130,70) 0; label "CLS" ; end button; button stat_wai; position 165,5; size 45,19; background (0,130,70) 0; label "WAI"; end button; END PANEL; ! Status panel; ! ========================= ! SUBPANEL: ABOUT ... ! ========================= PANEL ABOUT_PANEL; POSITION 0,0; SIZE 214,183; FOREGROUND (255,255,255),100; DISPLAY Mainframe; POSITION 36,140; SIZE 150,29; FONT 15,25; END DISPLAY; TEXT 5,120 "Digitizing Oscilloscope"; TEXT 30,89 "Revision A.00.06"; TEXT 49,60 "Copyright (C)"; TEXT 23,43 "Hewlett-Packard Co."; TEXT 50,26 "1992 - 1995"; END PANEL; END PANEL; ! CONTROLS END PANEL; ! ROOT