-
- Posts: 6
- Joined: Tue Nov 15, 2005 11:22 pm
If you know of a Chemstation SIG or user forum, I would be delighted to hear from you. Agilent provides very little support for the macro language and for data export, and I would like to share information with other users.
Name flowinj
runtime = 1.5
Lmin = 200
Lrange = 400
specPath$ = ObjHdrText$(_Config[1],DADataPath)
specFile$ = ObjHdrText$(_Config[1],DADataFile)
open specPath$ + specFile$ + "\spec3d.csv" for output as #7
loadspectra ,,,spec3d
Tnum = datarows(spec3d[1])
Lnum = datacols(spec3d[1])
line$=","
for index = 1 to Lnum
line$ = line$ + val$(Lmin + (index*Lrange/Lnum)) + "," !load wavelengths into first row of file spec3d.csv for 200 to 600 nm bandwidth
next index
print #7, line$
!loads data into subsequent rows of file spec3d.csv
for Tindex = 1 to tnum
print "Exporting 3D UV data, timepoint ", Tindex, " of ", Tnum, " to ", specPath$ + specFile$ + "\spec3d.csv"
line$ = val$(runtime*Tindex/Tnum) + "," !sets first column to time in minutes for 1.5 minute runtime
for Lindex = 1 to lnum
line$ = line$+val$(data(spec3d[1], Tindex, Lindex)) + ","
next lindex
print #7, line$
next tindex
print "Finished exporting 3D UV data to ", specPath$ + specFile$ + "\spec3d.csv"
close #7
delreg spec3d
remove flowinj
endmacro
flowinj