pgguy_007
Member
Happy New Years all!
I am working on a project where wood is pressurized with a treating agent for several hours. The pressure for each cycle has to be charted and printed to be attached to each "load".
I have no problem with this, but now they would like to be able to recall "historical" charts.
I was able to use macros to start and stop my datalog model so its active only during the cycle, and at the start I also use the datalogfilenewname command to give each datalog file a name like "charge#" where # is equal to the current charge number (a tag in the PLC).
There are now datalog files for each charge, and I am able to call them up by comparing the charge# with the currentfilenumber of the datalog, but this ONLY works if the computer isnt restarted. When that happens, datalog creates an "extra" log file and the file numbering that trending uses to "pull up" the correct datalog file to display on the trend is of course wrong.
My question is: has anyone been able to find a way to call up a datalog file in a trend using file name, instead of using the CurrentFile command to call up a file by offset number?
Something in VBA code perhaps that can look up a file name and assign a file offset based on that instead???
Thank you for any help on this one. Its really got my head scratching.
I am working on a project where wood is pressurized with a treating agent for several hours. The pressure for each cycle has to be charted and printed to be attached to each "load".
I have no problem with this, but now they would like to be able to recall "historical" charts.
I was able to use macros to start and stop my datalog model so its active only during the cycle, and at the start I also use the datalogfilenewname command to give each datalog file a name like "charge#" where # is equal to the current charge number (a tag in the PLC).
There are now datalog files for each charge, and I am able to call them up by comparing the charge# with the currentfilenumber of the datalog, but this ONLY works if the computer isnt restarted. When that happens, datalog creates an "extra" log file and the file numbering that trending uses to "pull up" the correct datalog file to display on the trend is of course wrong.
My question is: has anyone been able to find a way to call up a datalog file in a trend using file name, instead of using the CurrentFile command to call up a file by offset number?
Something in VBA code perhaps that can look up a file name and assign a file offset based on that instead???
Thank you for any help on this one. Its really got my head scratching.