ChemStation_Macro_Notes

advertisement
ChemStation Macro Notes
Show = lists all macros
setverbose(1)
[0,1,2,3]
logging(1)
[0-7] 0 = off
ListMessages on !opens a box to list code debug messages (p97)
logging 7, "F:\data\temp\log1.log"
setverbose 3
ClearLogBook
!===============================================================================
Name TestReport
! example showing how to quantify a given data file using the currently loaded
! quant method, and print the results to a text file
! works -- JBB 20101003
! page numbers refer to 1995_Macro_Programming_Guide.pdf
!===============================================================================
Parameter filepath$
errorCode = 0
on error goto ErrorHandler
!File _Datapath$ + FileName$ !(p79) FileName$ = Default.D if seq not running
DelObj ChromRes[1]
DelObj SignalReg ! clears previous results
File filepath$ ! loads data file (p79)
LoadSignal, "A", , SignalReg
IntegrateObj SignalReg !(p83)
IdentifyPeaks SignalReg,, _DAMethod[1], ChromRes[1]
QuantifyPeaks ChromRes[1], _DAMethod
! see ChromRes register description on pp161-163
Open "F:\Data\Temp\Report.txt" for output as #3 !(p63)
print #3, filepath$
NoOfCompounds = TabHdrVal(ChromRes[1], "compound", "NumberOfRows") !(p51)
for i = 1
name$
amt =
print
next i
to NoOfCompounds
= TabText$(ChromRes[1], "compound", i, "name") !(pp53, p280)
TabVal(ChromRes[1], "compound", i, "amount") !(p299)
#3, name$, "
", amt
ErrorHandler:
close #3
EndMacro
!===============================================================================
!===============================================================================
EI2 programming notes -- EnvironicsInterface version 2
anticipates next sample -- purges gas lines before Chemstation goes ready
must test whether this works with partial sequences (p168)
find the sample name for sequence line 1 using the Chemstation macro function
print TabText$(_sequence[1], "SeqTable1", 1, "SampleName") !(pp 53, 341)
find current sequence line and injection number
print _SeqIndex, " ", _Replicate ! (p145)
find number of replicate injections for sequence line 1
print TabVal(_sequence[1], "SeqTable1", 1, "InjVial")
!===============================================================================
MenuQuantify
same as clicking menu/report/print report
TLB_SwitchDATask
TLB_SwitchDATask
TLB_SwitchDATask
these change
Calib
Integ
Signal
tabs in Data Analysis window
SwitchViewWithPreChecking TOP
goes to "Method and Run Control"
SwitchViewWithPreChecking DA
goes to "Data Analysis"
SwitchViewWithPreChecking RPTLAYOUT
goes to "Report Layout"
LoadFiles_FromNavTable 0,3,0,0
loads the file thats highlighted in the nav table
Loadfile "D:\chemstation\0509-65D\001B0201.D"
Name JBB2
Loadfile "D:\chemstation\0509-65D\001B0201.D"
MenuQuantify
EndMacro
macro "jbb2.mac",go
User Contributed Software
Agilent user contributed librar
http://www.chem.agilent.com/cag/main.html
username:
password:
jamesbbeach@earthlink.net
regular+01
macdebug.exe
macropad.exe
Download