Hello Guest it is June 01, 2025, 12:27:42 AM

Author Topic: Elapsed time is always 0  (Read 109 times)

0 Members and 1 Guest are viewing this topic.

Elapsed time is always 0
« on: May 24, 2025, 03:14:20 AM »
Hello!

I want to log elapsed time, but "elapsed time" dro 814 is always 0. Why is it and how i can get the true elapsed time?

Thanks in advance.

Offline TPS

*
  •  2,585 2,585
Re: Elapsed time is always 0
« Reply #1 on: May 25, 2025, 03:34:08 AM »
i am using StandardDro 14 and it is working here.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Elapsed time is always 0
« Reply #2 on: May 28, 2025, 05:28:46 AM »
I think it is the same as dro 814. My machine is running now, but i am pretty sure it won't work too.

Moreover, GetTimer/SetTimer do not work either.

The manual for these function says:

Quote
Note that this
function works only with the parallel port driver, and support for this function may be
removed without notice in a future release.

Why do you even need parallel port to measure time?? Especially considering the desired time is actually always shown on mach3's first screen.

In case of dro 814 the manual says nothing besides "Elapsed Time".

However i have managed to write my own function to do this:

Code: [Select]
Sub showtime(t)
    ' usage:  setvar(CYCLE_START_TIME_VAR, now); ..... elapsed = datediff("s", getvar(CYCLE_START_TIME_VAR), now); Message showtime(elapsed)
    Dim s As Integer, m As Integer, h As Integer
    m = Int(t / 60)
    h = Int(m / 60)
    s = t Mod 60
    m = m Mod 60
    showtime = h & ":" & Format(m,"00") & ":" & Format(s,"00") ' there is no function to get date as difference of other dates in mach3! and also no function to properly display time intervals larger than 24 hours! and TimeSerial() yields error on numbers greater than 32767!
End Sub

Offline TPS

*
  •  2,585 2,585
Re: Elapsed time is always 0
« Reply #3 on: May 28, 2025, 10:20:58 AM »
as sayed Mach Version R3.043.022 and StandardDro(14) is working here for year's
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Elapsed time is always 0
« Reply #4 on: May 28, 2025, 10:36:02 AM »
Good for you.