News:

  • August 23, 2026, 09:21:06 AM

Login with username, password and session length

Author Topic: High Speed Counter Reset looses data  (Read 6113 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
High Speed Counter Reset looses data
« on: June 11, 2018, 03:12:42 PM »
I have a high speed counter, $FlowMeter.  In my counter reset logic, Using both a MATH command, and a COPY, I copy the the $FlowMeter.Acc to registers, and then reset the counter.  Usually this works successfully.  Sometimes it does not, it will copy a 0 to the registers, as if the counter was reset before the the copy occurred.

Please see attached screenshot of logic.  Can someone point me in the right direction?  What am I doing wrong here?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: High Speed Counter Reset looses data
« Reply #1 on: June 11, 2018, 04:16:19 PM »
Don't know of any reason why that would fail. Make sure nothing else is writing the register and make sure the reset logic is only being invoked one time. Other than that, I'm not sure.
"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

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: High Speed Counter Reset looses data
« Reply #2 on: June 13, 2018, 12:45:38 PM »
Try moving your SGRST's before the JMP. See if that makes a difference. I got caught a few times not having things in the "right" order.