How to get number of samples from sequence with macro ?

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

2 posts Page 1 of 1
Hi!

I make a monitoring program to MSD Chamstation and Chamstation and i need to numbers of samples from the sequence table with macro when post-seq is run, but i dont know how get it and i dont find in documentations.
Can you help to me ?
For Chemstation (newer versions), you can find the value in the _SEQUENCE register. So for example:

numOfSamples = TabHdrVal(_SEQUENCE[1], "SeqTable1", "NumberOfRows")

As for MSD Chemstation (assuming an older version?), it's a little trickier since there doesn't seem to be a variable directly associated with the currently loaded sequence. One trick would be to directly access the SAMPLELOGTABLE data. In fact, there is a macro you can find and modified (called something like GetNumLines). Technically, you could do something like the following (pulled from mentioned macro; you can view the documentation or the macro itself for more details)

SAMPLELOGTABLE POSITION, "-1" !last line in seq. becomes pending line
SAMPLELOGTABLE ADVANCE !move by one
SAMPLELOGTABLE GETENTRY !get values for current entry
VARLOCK OFF
If (_runtype = -1) Then
_NUMLINES = _SEQLINE - 1
Else
_NUMLINES = _SEQLINE
EndIf
If (_SEQLINE = 349) Then !has to do with maxlines
SAMPLELOGTABLE ADVANCE
SAMPLELOGTABLE GETENTRY
If (_runtype <> -1) Then
_NUMLINES = _NUMLINES + 1
EndIf
EndIf
SAMPLELOGTABLE POSITION, "1"
VARLOCK ON

You may need to modify depending at what point you want to get this data (for example if it's resuming or something like that).
2 posts Page 1 of 1

Who is online

In total there are 7 users online :: 0 registered, 0 hidden and 7 guests (based on users active over the past 5 minutes)
Most users ever online was 599 on Tue Sep 18, 2018 9:27 am

Users browsing this forum: No registered users and 7 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, Environmental, (Bio)Pharmaceutical, Bioclinical, Liquid Chromatography, Gas Chromatography and Mass Spectrometry.

Liquid Chromatography

Gas Chromatography

Mass Spectrometry