News:

  • September 29, 2026, 09:31:16 PM

Login with username, password and session length

Author Topic: One Shot Event is Re-Enabling  (Read 8405 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
One Shot Event is Re-Enabling
« on: August 01, 2019, 12:50:54 PM »
I have some code that alerts me of a fault.  The rung is quite simple.  Any of 4 inputs can be triggered (these are received via Modbus RTU), and a one shot to S22 with an email instruction.  That jumps to S23 to email when system returns back to normal state.  It seems to be randomly re-triggering the S22 email.  I have put together a trend view to see where the bump is coming from, but can't pinpoint it.  Not in trend view, but the program stays running continually.  Also can be seen as S23 stays on continually.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: One Shot Event is Re-Enabling
« Reply #1 on: August 01, 2019, 01:14:41 PM »
Stick an INC D999 (or whatever) below your SET S22 to see if the SGSET is firing.

If D999 is not incrementing every time the email is being sent, then you have a rogue JMP or SGSET or SGCONVERG or ? to S22.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: One Shot Event is Re-Enabling
« Reply #2 on: August 01, 2019, 01:16:11 PM »
OR is this rung that drives the SGSET in a Stage or a code-block that is EXITed or HALTed?

If that is true, the edge bit states are CLEARED whenever you JMP out of a SG or exit a code-block that has any edge contacts or edge-triggered box input legs.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: One Shot Event is Re-Enabling
« Reply #3 on: August 13, 2019, 10:09:00 AM »
But also, if Rung 20 is in a Stage that gets enabled, then if any one of the inputs to that rung happen to be ON when it gets enabled, then it will artificially generate an edge and perform the SGSET S22. So, every time it is enabled (after being disabled), and one of the inputs are ON, it will do the SGSET.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: One Shot Event is Re-Enabling
« Reply #4 on: August 15, 2019, 08:17:32 AM »
Thanks for the assistance.  Turns out it was something in a prior stage that was causing the rung with the oneshot to be bumped.  Sorry for the silly question, I really thought I had eliminated the obvious before asking.