hexagon logo

PC-DMIS Activity Log?

Not sure if this is possible or not but my supervisor wants to know if there is any way PC-DMIS can generate an activity log indicating which programs have been run and when they were executed, as well as if they were aborted for some reason. Any thoughts anyone. If it involves scripting I'm not sure that my skills are up to that but I am willing to try. Thanks in advance for any suggestions.
Parents
  • I enter data going into a CSV files.

    At the beginning of the program, I have data going into a CSV that tells me what program ran, at what time, and what date.

    
    ASSIGN/SYSDAT1=SYSTEMDATE("MMMM dd yyyy")
                ASSIGN/SYSTIM1=SYSTEMTIME("HH:mm:ss")
                ASSIGN/FILEHDR=STR(GETTEXT(191,1,{FILEHEDR}))
    START_LOG  =FILE/OPEN,M:\Quality\CMM BACKUP-RECORDS ARCHIVE\CMM LOG\CMM One\CMM ONE Program Start Up Log.csv,APPEND
                FILE/WRITELINE,START_LOG,SYSDAT1+","+SYSTIM1+","+FILEHDR+"
                FILE/CLOSE,START_LOG,KEEP
                ASSIGN/STARTTIME=(INT(SYSTEMTIME("HH")*3600)+INT(SYSTEMTIME("mm")*60)+INT(SYSTEMTIME("ss")))/60
    


    Then at the end of the program, I have data going into another CSV that gives me data which tells me Date, Time, Program Name, Program Runtime, and specific data from the form I have operators fill out:

    
    ASSIGN/SYSDAT=SYSTEMDATE("MMMM dd yyyy")
                ASSIGN/SYSTIM=SYSTEMTIME("HH:mm:ss")
                ASSIGN/ENDTIME=(INT(SYSTEMTIME("HH")*3600)+INT(SYSTEMTIME("mm")*60)+INT(SYSTEMTIME("ss")))/60
                ASSIGN/PROGRUN=ENDTIME-STARTTIME
    END_LOG    =FILE/OPEN,M:\Quality\CMM BACKUP-RECORDS ARCHIVE\CMM LOG\CMM One\CMM ONE Program Run Log.csv,APPEND
                FILE/WRITELINE,END_LOG,SYSDAT+","+SYSTIM+","+SYSTIM1+","+PROGRUN+","+FILEHDR+","+FORM2+","+FORM3+","+FORM1+"
                FILE/CLOSE,END_LOG,KEEP
    
    
  • The way I want the CSV to look is to have all the data in the same row, under specified columns. I like it clean.

    I did have it where I had the code at the end of the program, but there were some times where third shift crashed the CMM. I would come in and everything is off, and nobody had an answer. If I have all the coding at the end of the program and it crashed mid-program, I have no data. This way, right at the beginning of the program before anything moves, the START_LOG will tell me what program started, and close the file right away within milliseconds, so if it were to crash, I know exactly what time and what program was trying to run. It is easier to then track the person to figure out the problem.

    The end code is used mainly to collect CMM usage for my boss and the upper management.
Reply
  • The way I want the CSV to look is to have all the data in the same row, under specified columns. I like it clean.

    I did have it where I had the code at the end of the program, but there were some times where third shift crashed the CMM. I would come in and everything is off, and nobody had an answer. If I have all the coding at the end of the program and it crashed mid-program, I have no data. This way, right at the beginning of the program before anything moves, the START_LOG will tell me what program started, and close the file right away within milliseconds, so if it were to crash, I know exactly what time and what program was trying to run. It is easier to then track the person to figure out the problem.

    The end code is used mainly to collect CMM usage for my boss and the upper management.
Children
No Data