So I've got to track CMM "up time", below is the code I came up with. It just pulls some info into variables and then writes them to a .csv file. Issue is sometimes it writes the LASTEXECUTIONTIME and sometimes it doesn't. Is it an issue with my code or and issues with the demon?
It will record the "program name", date and time every time it runs but it misses the execution time sometimes.
ASSIGN/V1="DEMO_PROGRAM" + ","
ASSIGN/V2=LASTEXECUTIONTIME() + ","
ASSIGN/V3=GETPROGRAMINFO("DATE") + ","
ASSIGN/V4=GETPROGRAMINFO("TIME")
ASSIGN/V5=V1 + V2 + V3 + V4
FPTR =FILE/OPEN,C:\Users\Public\Desktop\CMM Reports\CMMUtil.csv,APPEND
FILE/WRITELINE,FPTR,V5
FILE/CLOSE,FPTR,KEEP
It will record the "program name", date and time every time it runs but it misses the execution time sometimes.
ASSIGN/V1="DEMO_PROGRAM" + ","
ASSIGN/V2=LASTEXECUTIONTIME() + ","
ASSIGN/V3=GETPROGRAMINFO("DATE") + ","
ASSIGN/V4=GETPROGRAMINFO("TIME")
ASSIGN/V5=V1 + V2 + V3 + V4
FPTR =FILE/OPEN,C:\Users\Public\Desktop\CMM Reports\CMMUtil.csv,APPEND
FILE/WRITELINE,FPTR,V5
FILE/CLOSE,FPTR,KEEP
Comment