Advertisement

extract and save baseline values

Discussions about chromatography data systems, LIMS, controllers, computer issues and related topics.

6 posts Page 1 of 1
Dear all,

I would like to save the value of the baseline signal from a chromatogram at a given interval. Is there any possible way of getting this information with Chemstation (A.09.xx)?

I wasn't able to see any function already included in the software for this purpose.

I thank you in advance for your help.
youc ould define this as a noise range (in Data Analysis, Report menu, System suitability) and use the performance report, see if that gives you the values you are looking for.
Where can I buy the kit they use in CSI?
Alba,

The following macro was posted by me earlier for a request for the raw data to be made available in csv format. It was written to handle multiple signals. It may help you extract the data that you require.

Name csvfile

Local cols,runtime,signal,i,j

for j=1 to RegSize(Chromreg)
cols=DataCols (Chromreg[j])

Open "C:\temp\Signal"+Val$(j)+".csv" For Output as #5

Print "Saving C:\temp\Signal"+Val$(j)+".csv"

For i=1 To cols
runtime=Data (Chromreg[j],0,i)
signal=Data (Chromreg[j],1,i)
print#5,runtime,",",signal
Next i

Close#5
next j

Print "Finished"
endmacro


Gasman
Dear GasMan,

thank you very much for the macro, it works!

I would like to ask you if there is any possibility of loading chromatograms automatically. I would like to obtain this kind of .csv files for a set of .D files that I have already in my PC.

I'm trying to program this task but maybe someone else has already done that.

Is it possible to include the macro as a post-run hook to obtain .csv files once after each analysis?

Thanks in advance for the help!
I think if you put GasMan's macro in the Deuser.mac file within the method you are using. Make it look like this in the deuser.mac file:

macro "csvfile.mac", go

NOTE: the "csvfile.mac" part is assuming you have the macro named this exactly and it is placed in the Chemstation default folder (in MSDchemstation it's MSDChem\msexe\). Otherwise you can point to the file using the file path: "C:\XXXChemstation\XX\csvfile.mac"

the deuser.mac is run after every method run. I think this should be the same for your version of Chemstation.
~Ty~
Dear all,

I have been trying to program a macro to obtain .csv of the signals for a set of .D files. I have used the macro form Gasman.

However, I have still some problems. I was able to program it with a simple structure of the files, that is:

For example:

C:\Temp\Run1.D
C:\Temp\Run2.D
C:\Temp\Run3.D

Code: Select all


Name MYCSVALL

Local cols,runtime,signal,i,j,k

!************************************
! Create the file with the list

! I couldn't do it like this (I don't know why...):
!ListDir$ = "dir>" + "c:\Temp\list.txt" + " /A:D /B"
!ExecNoWait ListDir$ !Execute a command "ListDir$" in cmd.exe

! I do it with a .bat file saved in \CORE

ChDir "c:\HPCHEM\CORE"
ExecNoWait ListDir.bat

!!!!!! Contents of the .bat file
!!!!!! cd c:\Temp 
!!!!!! dir>list.txt /A:D /B

!************************************
! Commands to set CWD as the one where the files are

Open "ListDir.bat" For Input as #4
Input Using #4, "L", FilesDir$ ! Entire line read into string
FilesDir$ = FilesDir$[4:len(FilesDir$)]
ChDir FilesDir$
Close #4

!************************************
! Commands to find the total number of .D files in the directory

Queue$ = FindFile$(GetCWD$() + "\*.D",,",")
TotalFiles = 1
Repeat
	Queue$ = Queue$[Instr(Queue$,",") + 1:len(Queue$)]
	TotalFiles = TotalFiles + 1
Until (Instr(Queue$,",") = 0)

!************************************
        Open "list.txt" For Input as #5
	For k = 1 to TotalFiles
		Input Using #5, "L", FileName$ ! Entire line read into string	
		!Print FileName$		
		File FileName$
		LoadSignal ,"A",, ChromReg
		FileNameSignal$ = "c:\Temp\" + FileName$ + "\Signal"
		!Print FileNameSignal$
		For j=1 to RegSize(Chromreg)
  			cols=DataCols (Chromreg[j])
  			Open FileNameSignal$ + Val$(j)+".csv" For Output as #6
  			Print "Saving " + FileNameSignal$ + Val$(j) + ".csv"
  			For i=1 To cols
    				runtime = Data (Chromreg[j],0,i)
    				signal = Data (Chromreg[j],1,i)
    				print#6,runtime,",",signal
  			Next i
  			Close#6
		Next j
		DelReg ChromReg
	Next k
        Close #5

Print "Finished"

EndMacro

But I would like to get similar results for files structure like this one (e.g.):

C:\Temp\120516\Run1.D
C:\Temp\120516\Run2.D
C:\Temp\120516\Run3.D
C:\Temp\120517\Run1.D
C:\Temp\120517\Run2.D
C:\Temp\120517\Run3.D
C:\Temp\120518\Run1.D
C:\Temp\120518\Run2.D
C:\Temp\120518\Run3.D

I feel I'm fighting against a simple problem but I don't know how to solve it with Chemstation language. Could anyone help me? The main idea is that I want to dig into several directories...

Thanks in advance for your help.
6 posts Page 1 of 1

Who is online

In total there are 181 users online :: 0 registered, 0 hidden and 181 guests (based on users active over the past 5 minutes)
Most users ever online was 5108 on Wed Nov 05, 2025 8:51 pm

Users browsing this forum: No registered users and 181 guests

Latest Blog Posts from Separation Science

Separation Science offers free learning from the experts covering methods, applications, webinars, eSeminars, videos, tutorials for users of liquid chromatography, gas chromatography, mass spectrometry, sample preparation and related analytical techniques.

Subscribe to our eNewsletter with daily, weekly or monthly updates: Food & Beverage, Environmental, (Bio)Pharmaceutical, Bioclinical, Liquid Chromatography, Gas Chromatography and Mass Spectrometry.

Liquid Chromatography

Gas Chromatography

Mass Spectrometry