Welcome

You are about to discover the PC-DMIS user community.

Join us now to get access to all our awesome features. Once registered and logged in, you will be able to create topics, post replies, give reputation to your fellow members, get your own private messenger, and so, so much more.

Already a registered member but you forgot your password? Click Here!


+ Reply to Thread + Post New Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 23

Thread: Runtime script with inexplicable results...
  • Share This Thread!
    • Share on Facebook
    1. #11
      PC-DMIS demi-Guru vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se has a reputation beyond repute vpt.se's Avatar
      Join Date
      Feb 2007
      Location
      Sweden
      Posts
      1,693

      Default

      Quote Originally Posted by cmmguy View Post
      Do you need to know the runtime in the PCDMIS porngram itself?
      PC-DMIS 2o1o MR1

    2. #12
      Ultra Senior Member Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute
      Join Date
      Nov 2008
      Location
      Connecticut
      Posts
      763

      Default

      I was hoping everyone would be mature about this unfortunate misspelling.

    3. #13

      Default

      I din’t know if to hijack this thread or start my own, but this is what I use to try and keep track of the lenght each program runs. It is in Hrs, Mins, Secs. Although I don’t think hrs has ever been anything above zero.

      This goes in the beginning of the program.
      ASSIGN/STARTTIME=INT(SYSTEMTIME("HH") * 3600) + INT(SYSTEMTIME("mm") * 60) + INT(SYSTEMTIME("ss"))


      This goes in the end of the program.
      Code:
      ASSIGN/TOTALTIME=(INT(SYSTEMTIME("HH") * 3600) + INT(SYSTEMTIME("mm") * 60) + INT(SYSTEMTIME("ss")) - STARTTIME) / 60
                  COMMENT/REPT,"RUN TIME = "+TOTALTIME+" MINUTES"
      This little code will place the actual run time in the report. If it means anything to anyone, If not I’ll just crawl back to my corner lol.

    4. #14

      Default

      No offense but all this? It sounds to me that somebody has too much timer in their hands.

    5. #15
      Ultra Senior Member Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute
      Join Date
      Nov 2008
      Location
      Connecticut
      Posts
      763

      Default

      Quote Originally Posted by hertangel View Post
      No offense but all this? It sounds to me that somebody has too much timer in their hands.
      Unintended pun? Hilarious.

    6. #16
      Ultra Senior Member Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute
      Join Date
      Nov 2008
      Location
      Connecticut
      Posts
      763

      Default

      Ok, some more testing, and some more errors. Using Integer gives me an overflow error when it goes to grab the TIMER number from the computer. This does not happen in excel. I have yet to try to shorten the Timer number using Clng first, then assign it to an integer.

      I put parentheses all around my functions, just in case. I had a part run through midnight on Friday and guess what? It's a negative number now! Ex. The start of the program was 86000 seconds from midnight. The end of the program was 1000 seconds from midnight on the next day. The correct calculation would be a runtime of 1400 seconds.

      Previously this would have given me the result of 87000 seconds. Now it gives -85000 as the result.

      So, continuing forward, I will try to get this working with integers, and test it then. Thanks for the help guys.

    7. #17

      Default

      Somebody has too much time in there hands by doing all this, I am lucky to get my break over lunch, I have to eat and run parts at the same time.

    8. #18
      Ultra Senior Member Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute
      Join Date
      Nov 2008
      Location
      Connecticut
      Posts
      763

      Default

      I worked a split shift for a year to pull this together. Now about to implement a web-based frontend for PC-DMIS. All of it has been well worth it.

    9. #19

      Default

      Quote Originally Posted by nightrider View Post
      Code:

      Sub Main()

      Dim BeforeTime As String
      BeforeTime = Timer
      BeforeTime = CLng(BeforeTime)

      End Sub


      Sub Main()

      Dim Aftertime As String
      Aftertime = Timer
      Aftertime = CLng(Aftertime)
      Dim RunTime As String

      If Aftertime < BeforeTime Then
      RunTime = (86400 - BeforeTime) + Aftertime
      Else
      RunTime = Aftertime - BeforeTime
      End If

      End Sub

      I've always had to place brackets around the complete formula err for:

      RunTime = ((86400 - BeforeTime) + Aftertime)

      However I'm using 3.5MR2
      How do you place this in program for it to function properly. I tried and just wont do what I want it to. I am working in 4.1

      DEA Gamma 1102 v4.1 cad++

    10. #20
      Ultra Senior Member Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute Chally72 has a reputation beyond repute
      Join Date
      Nov 2008
      Location
      Connecticut
      Posts
      763

      Default

      This code is used in a VB script that runs at the end of my program. It requires use of the Basic script editor and a decent knowledge of variables and scripting to write.

      What exactly are you trying to do? Perhaps there is a simpler way to do what you want.

    + Reply to Thread

    Similar Threads

    1. Runtime Error!
      By Gary Fitzgerald in forum PC-DMIS for CMMs
      Replies: 3
      Last Post: 11-13-2008, 04:35 PM
    2. RUNTIME Calculation
      By CMMer in forum PC-DMIS for CMMs
      Replies: 1
      Last Post: 08-29-2008, 11:21 AM
    3. Starrett Runtime error
      By David at Global in forum PC-DMIS for CMMs
      Replies: 12
      Last Post: 08-05-2008, 09:25 PM
    4. Runtime in Report
      By CMMBFCO in forum PC-DMIS for CMMs
      Replies: 6
      Last Post: 07-29-2008, 08:33 AM
    5. Runtime error
      By why me in forum PC-DMIS for CMMs
      Replies: 18
      Last Post: 05-08-2007, 11:36 AM

    Bookmarks