How Master Scripts and Auto Scripts Interact
How Master Scripts and Auto Scripts Interact
NOTE: With the advent of the Sequence Wizard, creating auto scripts is unnecessary. We include the discussion pages concerning auto scripts for the sake of completeness, and instead, recommend you use the Sequence Wizard for automated experiments.
A master script calls auto scripts using the LaunchWait() function. Suppose you put the following line in a master script:
if (LaunchWait(“AUTO CORROSION POTENTIAL.EXP”,”CORPOT.SET”,”SETUP1″,”AUTOCPOT.DTA”,1,3) eq FALSE)
return
LaunchWait() starts the script AUTO CORROSION POTENTIAL.EXP and passes it the following information:
SetupFile | CORPOT.SET |
SetupName | SETUP1 |
OutputFile | AUTOCPOT.DTA |
PstatNo | 1 |
MuxChannel | 3 |
The script AUTO CORROSION POTENTIAL.EXP does the following:
- It first creates a runner window.
- It then opens CORPOT.SET and loads the parameters from SETUP1. This is where you normally see the Setup dialog box.
- Next it opens the output data file, AUTOCPOT.DTA and acquires use of the hardware, Pstat1 and Mux1.
- It then performs the corrosion potential test on channel 3 of Mux1.
- Finally, it closes everything and ends. Upon ending, it returns a status value to the LaunchWait() function in the master script (which has been waiting).
The master script can determine if AUTO CORROSION POTENTIAL.EXP ran OK by testing LaunchWait()’s return value. In the example above, the master script terminates if AUTO CORROSION POTENTIAL.EXP didn’t run correctly for any reason.
Comments are closed.