Logging the time of measurementprocess

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logging the time of measurementprocess

    Hello!
    Is it possible for the PC-DMIS software to output info to a file of how long the measurement cycle took to complete?

    //Per

  • #2
    Not inherently but there have been a few threads on the topic and how to do it.
    Links to my utilities for PCDMIS

    Comment


    • #3
      Here you go. This is one method I've put together with help from various people here on the forum. The only thing you will need to do create a folder and change the path is the last section of code.



      Code:
      ASSIGN/TM2 = SYSTEMTIME("HH':'mm':'ss")
                  ASSIGN/S2 = RIGHT(TM2,2)
                  ASSIGN/M2 = MID(TM2,3,2)
                  ASSIGN/H2 = LEFT(TM2,2)
                  ASSIGN/H2S_B = (H2)*3600
                  ASSIGN/M2S_B = (M2)*60
                  ASSIGN/TO_SC_2 = (H2S_B)+(M2S_B)+(S2)

      Code:
      COMMENT/DOC,NO,paste at end of program
                  ASSIGN/TM1 = SYSTEMTIME("HH':'mm':'ss")
                  ASSIGN/S1 = RIGHT(TM1,2)
                  ASSIGN/M1 = MID(TM1,3,2)
                  ASSIGN/H1 = LEFT(TM1,2)
                  ASSIGN/H2S_A = (H1)*3600
                  ASSIGN/M2S_A = (M1)*60
                  ASSIGN/TO_SC_1 = (H2S_A)+(M2S_A)+(S1)
                  ASSIGN/EL_SEC = (TO_SC_1)-(TO_SC_2)
                  ASSIGN/EL_MIN = (EL_SEC)/60
      FPTR       =FILE/OPEN,C:\DATA\TIME.TXT,APPEND
                  FILE/WRITE_BLOCK,FPTR,EL_MIN
                  FILE/WRITELINE,FPTR," "
                  FILE/CLOSE,FPTR
      Last edited by dwade; 10-22-2009, 07:34 AM.
      Xcel & MicroVal Pfx & Global 37mr4 thru 2012mr1sp3
      Contura Calypso 5.4

      Lord, keep Your arm around my shoulder and Your hand over my mouth. Amen.

      Comment


      • #4
        Hi Dwade!

        The code works perfect, thank you for that!

        I have another thing that I need in the code you wrote, would it be possible to insert the yyyy/mm/dd and hh:mm and the running program (e.g 1002669.prg) in the beginning of the .txt file before the time measurement? That would completly make my day.

        Best regards,

        Per, Sweden

        Comment


        • #5
          Code:
          ASSIGN/HEADER = "your_program_name_here" + " @ " + TM2 + SYSTEMDATE("dd, MMM yyyy")
          Code:
          FPTR       =FILE/OPEN,C:\DATA\TIME.TXT,APPEND
                      FILE/WRITE_BLOCK,FPTR,HEADER
                      FILE/WRITE_BLOCK,FPTR,EL_MIN
                      FILE/WRITELINE,FPTR," "
                      FILE/CLOSE,FPTR
          Something like that, perhaps?

          It would/should end up something like this in the textfile:

          Code:
          your_program_name_here @ 12:14:33 13, Nov 2009
          <elapsed time displayed here>
          Last edited by vpt.se; 10-22-2009, 01:26 AM.
          PC-DMIS CAD++ 2o19 R1 SP2

          Comment


          • #6
            Originally posted by dwade View Post
            Here you go. This is one method I've put together with help from various people here on the forum. The only thing you will need to do create a folder and change the path is the last section of code


            Code:
            COMMENT/DOC,NO,paste at beginning of program
                        ASSIGN/TM2 = SYSTEMTIME("HH':'mm':'ss")
                        ASSIGN/S2 = RIGHT(TM2,2)
                        ASSIGN/M2 = MID(TM2,3,2)
                        ASSIGN/H2 = LEFT(TM2,2)
                        ASSIGN/H2S_B = (H2)*3600
                        ASSIGN/M2S_B = (M2)*60
                        ASSIGN/TO_SC_2 = (H2S_B)+(M2S_B)+(S2)

            Code:
            COMMENT/DOC,NO,paste at end of program
                        ASSIGN/TM1 = SYSTEMTIME("HH':'mm':'ss")
                        ASSIGN/S1 = RIGHT(TM1,2)
                        ASSIGN/M1 = MID(TM1,3,2)
                        ASSIGN/H1 = LEFT(TM1,2)
                        ASSIGN/H2S_A = (H1)*3600
                        ASSIGN/M2S_A = (M1)*60
                        ASSIGN/TO_SC_1 = (H2S_A)+(M2S_A)+(S1)
                        ASSIGN/EL_SEC = (TO_SC_1)-(TO_SC_2)
                        ASSIGN/EL_MIN = (EL_SEC)/60
            FPTR       =FILE/OPEN,C:\DATA\TIME.TXT,APPEND
                        FILE/WRITE_BLOCK,FPTR,EL_MIN
                        FILE/WRITELINE,FPTR," "
                        FILE/CLOSE,FPTR
            I tried this, but only gives me a .txt file displaying one word "EL_MIN"
            No time at all.
            sigpicIt's corona time!
            737 Xcel Cad++ v2009MR1....SE HABLA ESPAƑOL

            Comment


            • #7
              We've been using this for over a year in all of the current production programs and have not had any problems with it. It appends the text file every time any program is run on the CMM.
              Xcel & MicroVal Pfx & Global 37mr4 thru 2012mr1sp3
              Contura Calypso 5.4

              Lord, keep Your arm around my shoulder and Your hand over my mouth. Amen.

              Comment


              • #8
                Useful and timely since my boss just asked me to do this for utilization times.

                Now, say we have many CMM's using programs that are stored on our network. How would I then be able to take the CMM "name" and add it to that file?

                I'm thinking of having a "name.txt" file on each local drive, but with the local name in it (ex:CMM05). Open and read this file... then what? Assign it as a variable and add it to the header line? How would I go about that part of it?
                PCDMIS 3.7 MR3, 2010

                Comment


                • #9
                  I actually have this file on the hard on each of our CMMs. Then rename the weekly to weekendingXXXXX and keep them for compilation as needed.
                  Xcel & MicroVal Pfx & Global 37mr4 thru 2012mr1sp3
                  Contura Calypso 5.4

                  Lord, keep Your arm around my shoulder and Your hand over my mouth. Amen.

                  Comment

                  Related Topics

                  Collapse

                  Working...
                  X