Announcement

Collapse
No announcement yet.

TMRAG bug?

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

  • psvail
    started a topic TMRAG bug?

    TMRAG bug?

    I've noticed that I'm losing the persistence of global timers over a power failure. Is that a bug or a feature?

  • psvail
    replied
    Ok, so I set an INC on my RSTT like you suggested and it is not hitting, so my RSTT is not getting called (I've actually got 3 timers and 3 RSTTs). It's definitely on the way up as I have a 5 sec countdown startup timer that lets Designer sync (and the SD to mount) before my main stage starts, but of course, it's intermittent. It clears all 3 timers or none of them. It possibly has to do with FmtTMR, as I use that right away. I havent experimented to isolate.
    Anyway, I'm good ignoring it because it's not a REAL problem for me, but it is annoying and it might be a problem for others (assuming it is real).

    Leave a comment:


  • psvail
    replied
    Huh. Must be me then. Yes, I checked that too. Thanks for experimenting, I'll let you know how I make out.

    Leave a comment:


  • franji1
    replied
    I no longer reset on power-up, and they are not resetting, and their .Acc values are being retained. I presume all your Timers are retentive (they are by default).

    BTW, I am doing the same thing with a TMRA as I am with my TMRAG (T1 and T0 respectively), and they are in-sync, to the millisecond.

    Leave a comment:


  • psvail
    replied
    What happens if you remove the RSTT and cycle power?

    Leave a comment:


  • franji1
    replied
    Originally posted by psvail View Post
    Try pulling the plug, then look at the accumulators after it comes up, of course. I'm on a BRX18e-23, btw.
    They did reset, but that's because my RSTT rungs also reset at power-up ($FirstScan). I put an INC below my RSTT and saw it went from 0 to 1 after power-up (hence I know the RSTT instructions executed, which explains why my TMRs reset).

    Leave a comment:


  • psvail
    replied
    Try pulling the plug, then look at the accumulators after it comes up, of course. I'm on a BRX18e-23, btw.
    Last edited by psvail; 04-16-2019, 04:10 PM.

    Leave a comment:


  • franji1
    replied
    Originally posted by psvail View Post
    Ok, thanks, I'll dig deeper. Not a known bug then?
    No. I'm playing with a TMRAG synchronized with the ST4 (half second on/half second off), and it is accumulating a half second on every second, on the nosey (to the millisecond). 500ms, 1000ms, I am now up to 9m 39.500s, in sync with ST4.

    Leave a comment:


  • psvail
    replied
    Ok, thanks, I'll dig deeper. Not a known bug then?
    Only one RSTT per timer at the end of day, when I roll logs (3 TMRAG's). They're counting on time for clutches and motors. It's also possible I have a race condition, as I log then reset.

    Edit - Strike the race condition - it only happens after power loss. Without PL, code logs and resets just fine.
    Last edited by psvail; 04-16-2019, 03:47 PM.

    Leave a comment:


  • franji1
    replied
    Check the power flow input to your RSTT for that specific T timer, maybe stick an INC on the same rung to help debug it. The INC value should only be different whenever you believe the TMRAG should be resetting.

    Also, if you have more than 1 RSTT to that T timer, definitely stick an INC on all of them.

    Leave a comment:


  • psvail
    replied
    I'm sorry, I was vaguebook posting again... What I'm seeing is that either on the way down or the way up, the accumulators are getting zeroed.
    It would be a neat trick to have it continue counting with no power! Thanks for the recovery trick though, I do that to determine downtime.

    Leave a comment:


  • franji1
    replied
    It does NOT time when power is off, if that's what you are seeing. The calendar clock does keep time (as long as you have a battery), so if you can deal with second resolution (not millisecond), you could write code that uses DST21 (UTC 1970 Epoch value) or DST22 (Local 1970 Epoch value) to evaluate "time".

    Basically store off DST21 when you "start" (say D42), then calculate the "accumulator" in a MATH box and store the accumulator in seconds in D100
    MATH D100 "DST21 - D42"

    Leave a comment:

Working...
X