Lab Exercise: Macro Writing
Writing and Executing a Macro
155
Writing and Executing a Macro
During this first exercise, you will simply follow the directions to create and
execute a simple macro.
1) Minimize the ChemStation. From the Start button, select All Programs then
Accessories, and Notepad.
2) Type in the following simple macro:
Name Class
File “c:\chem32\1\data\demo\005-0101.d”
If RegSize(ChromReg)>0 then
DelReg ChromReg
Endif
LoadSignal dad,a,,ChromReg
IntegrateObj ChromReg
SetWinTitle 1, "Class Chromatograms"
Draw 2, ChromReg
EndMacro
3) Under the File menu, select Save As. Save the file as a text document
c:\chem32\core\class.mac.
Note: Your path statements may be different than the example depending on
the drive used for Chem32 and the instrument number.
4) Minimize Notepad and restore the ChemStation.
5) Now, set error detection. On the command line type:
ListMessages On
Question:
What are other ways you can debug a macro?
____________________________________________________
6) To test the macro, type on the command line:
Commentaires sur ces manuels