-
- Posts: 8
- Joined: Mon Feb 02, 2009 2:58 am
The following two files should go in the Chem32/Core folder
Name the following code shutdown.mac
Name Shutdown
Local MethPath$, RunMeth$, ShutDwnMeth$
MethPath$ = "C:\Chem32\1\METHODS\"
RunMeth$ = "HTSDBFFAPMACH_V3_PROPISTD.M"
ShutDwnMeth$ = "SHUTDOWN.M"
!Check For Online Status: Only call shutdown from Online Chemstation
If _OFFLINE=1
DelHook "PostSeq", "Shutdown"
Stop
Else
!Check System Variables to get current loaded method and sequence
If _MethFile$ = "COLUMNBURNOFF.M" and _SeqFile$ = "BURNOFF.S"
!Load Method to Run Samples after Burnoff cycle
LoadMethod MethPath$,RunMeth$
ExecHook "LoadMethod"
Else
!Load Shutdown Method after running any other method
LoadMethod MethPath$,ShutDwnMeth$
ExecHook "LoadMethod"
EndIf
EndIf
EndMacro
The following lines should go in the USER.MAC file (in the same directory as above)
!Loads Macros when Chenstation is initialized
Macro SHUTDOWN.MAC
!Runs Macro when Sequence and all post processing/reporting is complete
SetHook "PostSeq", "Shutdown"
By declaring a set of variables for each shutdown condition and chaining together more if statements you can easily manage all your shutdown conditions for your lab within one macro. Of course we can make this more complicated my adding timed events, running specific sequences, etc... but this should provide everyone with a nice alternative to the other available strategies.
Let me know if anyone has any questions or needs any modifications to this or any other macros. My email is josh.brewer76@yahoo.com
