Page 2 of 2
Re: MSD chemstation macro report help PLEASE!!!
Posted: Mon Nov 07, 2016 8:57 pm
by chemstation
Yes ldnewsample should have been ldnewfile.
I think you need to do a flow chart of your processes, so that you can visualise what you need to do on a macro conceptual scale, before you do the coding. And then filling in each of the boxes at little more each time until it is time to code.
if you haven't done a flow chart before, box descriptions can be found at
http://www.programiz.com/article/flowchart-programming
An a free online flowchart make can be found at
http://www.programiz.com/article/flowchart-programming
which is much easier than the plastic template ruler that I first used.
Re: MSD chemstation macro report help PLEASE!!!
Posted: Tue Nov 08, 2016 3:31 pm
by bagee
So when I run this now in data analysis, it does not load the file stored in the ini file but a pop-up window comes up to select and load a sample. It then prints whatever sample is open already then also prints the sample you select from the file selection window.
I've looked in the help file and it does not provide a clear explanation of how to getini and setini commands work.
Re: MSD chemstation macro report help PLEASE!!!
Posted: Tue Nov 08, 2016 8:36 pm
by James_Ball
Not sure about the popup box but with the original idea you were using, you would need the blank run by one method, which put the blank file name into the ini file, then use a different method to process the sample so it would pickup the blank info from the ini file generated by the first method. If you try to use the same method for both the blank and sample, you end up adding the sample name to the ini file when you run the method a second time on the sample, overwriting the blank information you already put in there.
Re: MSD chemstation macro report help PLEASE!!!
Posted: Tue Nov 08, 2016 8:57 pm
by bagee
So actually it is two methods and I checked the ini file in the blank method and the correct info is there as it does not get overwritten as the sample method is different.
I'm running the methods in data analysis to test it and when I do run the sample method it does what I described above. I just can't get the file to open that saved to the ini file when running the sample method. It is not overwritten, just won't load what's saved in that ini file.
Maybe that command is wrong? ldnewfile?
Re: MSD chemstation macro report help PLEASE!!!
Posted: Wed Nov 09, 2016 11:38 pm
by bagee
Anyone???
Re: MSD chemstation macro report help PLEASE!!!
Posted: Thu Nov 10, 2016 10:28 am
by chemstation
Where is the flowchart?
Re: MSD chemstation macro report help PLEASE!!!
Posted: Sat Nov 12, 2016 5:22 pm
by bagee
The links you sent me for the flowchart are the same. Not sure if that was an error.
I'm not trying to get you to do it for me, I just want to be able to make it work. I thought I had it with the stack variables as it did work but only in offline but this is not suitable for our work. Just frustrated.
Maybe you can explain what each line means as I know what I want to do, it just is loading the file selection window when running the second macro.
This works to store the blank file path and file name into the ini file. I get that and it works perfectly.
name Add_Blank_Sample_Info
local inifile$,inisect$,i - local variables
inifile$=_METHPATH$+_METHFILE$+"\method.ini" - path and name for file being saved
inisect$="SequenceBlank" - not sure the purpose of this??
i=setinistring(inifile$,inisect$,"DataPath",_datapath$) - puts path in datapath$
i=setinistring(inifile$,inisect$,"DataFile",_datafile$) - puts file in datafile$
GETSCALARS POINT,,R0 - gets chromatogram for R0
i=setinistring(inifile$,inisect$,"YMax",Yhigh) - i dont really need this but get it
return
Then this code will load the blank file and was supposed to store it into the backgnd strings below but it does not work as it opens the file selection window in offline. I have no idea why or where that is coming from.
local inifile$,inisect$,I,Backgnd_File$,Backgnd_Path$,ScaleY - local variables established
inifile$=_METHPATH$+_METHFILE$+"\method.ini" - ini file location
inisect$="SequenceBlank" - dont get this again
Backgnd_File$ = GETINISTRING$(inifile$,inisect$,"DataFile") - puts datafile into backgnd$
Backgnd_Path$ = GETINISTRING$(inifile$,inisect$,"DataPath") - puts path into bckgndpath$
ScaleY= GETINISTRING$(inifile$,inisect$,"YMax") - dont need this
Ive tried ldnewfile backgnd_file$ and backgnd_path$ and the file command and both do the same thing that is loading the sample selection window.
I just want to understand why it is not loading what is stored in the inifile created above and why it opens the file selection window.
Hope anyone can help.
Re: MSD chemstation macro report help PLEASE!!!
Posted: Mon Nov 14, 2016 11:41 am
by chemstation
Are you aware of the Tools -> DoList functionality, that allows a user to select multiple files in an offline DA session, and execute macros.
As I am concerned that your implementation of automation during a sequence, whilst noble, may cause the system to crash, and not acquire data.
Re: MSD chemstation macro report help PLEASE!!!
Posted: Mon Nov 14, 2016 1:50 pm
by bagee
I don't understand. I thought it could be done? I just need to know why it's pulling up the sample selection window and how to load that file stored in the method Ini file.
Re: MSD chemstation macro report help PLEASE!!!
Posted: Wed Nov 16, 2016 2:42 am
by bagee
Anyone?
At this point, if anyone is able to do this for a small amount of cash I'd be willing to pay as I have no other resources now.
Re: MSD chemstation macro report help PLEASE!!!
Posted: Tue Dec 13, 2016 5:12 pm
by zegockie
if you provide contact info we could talk.
Eugene