-
- Posts: 2
- Joined: Tue Mar 05, 2013 12:01 pm
The task would be to extract the chromatograms of a complete sequence (all available signals as we often monitor at 210, 280, and maybe additional wavelengths) from an HPLC system (ChemStation B.04.03) and write them to .csv files for further processing (with appropriate file and sequence name).
I'm stuck at the moment switching from one sample to the next one and I hope that someone can help me (especially with the LoadSignal command, I can't figure it out just using the manual and maybe this would be the possibility to loop through the samples)
The macro I have so far is:
Name csvfile5 !Command for starting the macro
!This would be the place to insert a loop of some kind to loop through the sequence
!Define Local Variables
Local cols,runtime,signal,i,j
!How many objects are there in the Working Register
for j=1 to RegSize(Chromreg) !Loop through all Objects in the Register Chromreg
cols=DataCols (Chromreg[j])
Open "C:\temp\" + _SeqFile$ +"-" + DADATAFILE$ + "Signal"+Val$(j)+".csv" For Output as #5 !Defining Output File
Print "Saving C:\temp\" + _SeqFile$ +"-" + DADATAFILE$ + " Signal" + Val$(j) + ".csv" !Just writing that it works
For i=1 To cols !Building up the .csv File
runtime=Data (Chromreg[j],0,i)
signal=Data (Chromreg[j],1,i)
print#5,runtime,";",signal
Next i
Close#5 !Close the Output File
next j
!If there is a command for the next sample, this would be the place
Print "Finished"
endmacro
Well, it runs nice if I select my sample and start the macro (it then writes .csv for this one sample). Now I suspect there has to be some Object containing all samples (some kind of sequence object) where i could loop through this sequence object just the same as through the different signals.
Or maybe there is a predefined macro to go to the next sample (as there is a button which does exacly this in the batch processing window).
If any one could help that would be very very great.
(and please no links to any commercially or freely available software to decode .D files, if there is any possibility to solve this through a macro this would be better)
Many thanks in advance
Peter
