News:

  • October 16, 2026, 09:52:54 AM

Login with username, password and session length

Author Topic: BRX Counter and Timer ACC are not retentive  (Read 12033 times)

steve66

  • Newbie
  • *
  • Posts: 4
BRX Counter and Timer ACC are not retentive
« on: October 14, 2021, 07:40:06 PM »
I'm having an issue with the BRX.  All my timers and counters are set to retentive in the mem config and in the heap.  All my program structures are set to retentive too.
This issue even happens in my Main program (also retentive).
The CNT.acc or T.acc do not reset on a power cycle, but they all do reset to zero ONLY when it is switched to program mode by switching PLC to Stop mode, or doing a program update that requires to switch to program mode, or by selecting program mode in the PLC mode select.
All other retentive coils/MCs/Ds/Ns/Vs are all unaffected.   It is only the timer/CNT accumulated values.
I am running Designer 2.8.3
PLC OS 2.8.6 (also has same issues on 2.8.4)
Booter 1.0.10
FPGA 1.15
Harware 8A 4A 6A

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: BRX Counter and Timer ACC are not retentive
« Reply #1 on: October 14, 2021, 07:50:24 PM »
What you're describing sounds like the result of the termination behavior (Help Topic DMD0192). Have you tried the global timer/counter?

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: BRX Counter and Timer ACC are not retentive
« Reply #2 on: October 15, 2021, 04:41:01 PM »
I'm having an issue with the BRX.  All my timers and counters are set to retentive in the mem config and in the heap.  All my program structures are set to retentive too.
This issue even happens in my Main program (also retentive).
The CNT.acc or T.acc do not reset on a power cycle, but they all do reset to zero ONLY when it is switched to program mode by switching PLC to Stop mode, or doing a program update that requires to switch to program mode, or by selecting program mode in the PLC mode select.
All other retentive coils/MCs/Ds/Ns/Vs are all unaffected.   It is only the timer/CNT accumulated values.
I am running Designer 2.8.3
PLC OS 2.8.6 (also has same issues on 2.8.4)
Booter 1.0.10
FPGA 1.15
Harware 8A 4A 6A

I'm not sure what you are complaining about. You say "BRX Counter and Timer ACC are not retentive", but then you say they "do no reset on a power cycle". What are you expecting? Are you wanting them to reset to zero on a power cycle? Or are you wanting them to not reset to zero with the mode switch change?
There are two types of people in the world; those that can extrapolate from incomplete data sets.

steve66

  • Newbie
  • *
  • Posts: 4
Re: BRX Counter and Timer ACC are not retentive
« Reply #3 on: October 15, 2021, 05:36:43 PM »
Further to the comments.  I do not want them to reset to zero ever unless the reset rung is true.
I also have some more information...
I haven't ever experienced the the counters or timers resetting to zero, when set as retentive, when in stop/program mode in all my years programming until recently.  I thought maybe I was missing something.
I just tested an older DM with 2.7.4 OS and everything acts as expected where the acc of the counters (set as retentive) maintains it's value during a power cycle or switch to program mode.
I then updated the OS to 2.8.4 and bang all of a sudden the acc values always reset to zero on a switch to program mode, but not on a power cycle.

So... I'm not missing anything and this is obviously a firmware glitch.

I thought it was just BRX thing as we've only just started switching to the BRX and they are all running the 2.8.4 OS.  But as I've discovered it's across the DM platform affecting the H2DM1E also when upgraded to the 2.8.x OS

Is this supposed to be a new "feature"?  because in my opinion it is anything but.

I can obviously start using the UDCG counters but it will require changing a mass amount of PLC programs and an insane amount of work just because of upgrading to the latest version.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: BRX Counter and Timer ACC are not retentive
« Reply #4 on: October 15, 2021, 05:45:47 PM »
Further to the comments.  I do not want them to reset to zero ever unless the reset rung is true.
I also have some more information...
I haven't ever experienced the the counters or timers resetting to zero, when set as retentive, when in stop/program mode in all my years programming until recently.  I thought maybe I was missing something.
I just tested an older DM with 2.7.4 OS and everything acts as expected where the acc of the counters (set as retentive) maintains it's value during a power cycle or switch to program mode.
I then updated the OS to 2.8.4 and bang all of a sudden the acc values always reset to zero on a switch to program mode, but not on a power cycle.

So... I'm not missing anything and this is obviously a firmware glitch.

I thought it was just BRX thing as we've only just started switching to the BRX and they are all running the 2.8.4 OS.  But as I've discovered it's across the DM platform affecting the H2DM1E also when upgraded to the 2.8.x OS

Is this supposed to be a new "feature"?  because in my opinion it is anything but.

I can obviously start using the UDCG counters but it will require changing a mass amount of PLC programs and an insane amount of work just because of upgrading to the latest version.

The current behavior is not a bug, the previous behavior was indeterminate for certain conditions and has been resolved.

To make program block behavior consistent through all programs, we added termination to $Main on transition to stop mode. It resolved a handful of other issues, but did have the side effect of altering timer and counter behavior. We could look at making $Main termination optional on stop. I don't immediately know if that would cause any issues, but I'm happy to look into it.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

steve66

  • Newbie
  • *
  • Posts: 4
Re: BRX Counter and Timer ACC are not retentive
« Reply #5 on: October 15, 2021, 08:32:55 PM »
Well this is actually good to know that it will be this way moving forward. It?s just unfortunate that this was not noted in the release notes as this can have unbeknownst major consequences.

I will be changing all my counters to UDCG as they are throughout the main and additional program structures.

Thanks for all your feedback.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: BRX Counter and Timer ACC are not retentive
« Reply #6 on: October 15, 2021, 09:08:50 PM »
Well this is actually good to know that it will be this way moving forward. It?s just unfortunate that this was not noted in the release notes as this can have unbeknownst major consequences.

I will be changing all my counters to UDCG as they are throughout the main and additional program structures.

Thanks for all your feedback.

It had nothing to do with timers and counters specifically, it is termination logic, which should be in the release notes. We actually changed $Main to match everything else, so the only thing impacted was $Main. You shouldn't need to change any other program.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO