News:

  • June 28, 2026, 01:44:09 AM

Login with username, password and session length

Author Topic: Stage stopped -- but why?  (Read 10233 times)

Watermark_JS

  • Sr. Member
  • ****
  • Posts: 53
Stage stopped -- but why?
« on: September 16, 2024, 02:57:24 PM »
Scenario:
In $Main, I have this rung:
Code: [Select]
STR ST2
RUN OutHand_PmppH

Program OutHand_PmppH begins with:
Code: [Select]
SG OutHand_PmppH.S0
When I connected to the processor (while responding to a report of incorrect system behavior,) I found S0 not running.  The program OutHand_PmppH.RanThisScan bit was being set and there are no instructions (JMP, SGDIVRG, JMPI, SGRST, or SGRSTR) in any of the ladder that should cause S0 to be reset.

After 1/2-hour of proving to myself that there was nothing actively resetting S0, I dropped the PLC to Stop and then put in back in Run.  Everything started working normally (S0 stayed running) and has been fine, since.

Is there anything else I should have done to troubleshoot this or should I chalk it up to cosmic ray bit-flipping?
If you don't make mistakes, you aren't doing anything.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Stage stopped -- but why?
« Reply #1 on: September 16, 2024, 03:21:25 PM »
Any HALT instructions?
Any EXIT instructions?

Any Asynchronous instructions in S0 w/JMP OnSuccess or OnError?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Stage stopped -- but why?
« Reply #2 on: September 16, 2024, 03:24:20 PM »
STR ST2 // $Off
RUN
will not RUN

Did you mean
STR ST1  // $On
RUN
?

Watermark_JS

  • Sr. Member
  • ****
  • Posts: 53
Re: Stage stopped -- but why?
« Reply #3 on: September 16, 2024, 03:29:46 PM »
Franji1,

No HALT or EXIT instructions anywhere.

S0 just starts other stages if they are needed (depending on equipment/system configuration) conditions are met, so nothing async.

Yes, I did mean ST1 // $On.  Sorry for the typo... ::)

The program has been running for a couple of years and I've never seen this issue.
« Last Edit: September 16, 2024, 03:34:34 PM by Watermark_JS »
If you don't make mistakes, you aren't doing anything.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Stage stopped -- but why?
« Reply #4 on: September 16, 2024, 04:42:48 PM »
Could be a corruption of some kind

Do you do any MEMCOPY's of structures or STRINGs?

For Raw/Scaled analog data blocks, make sure your RX block size matches your WX block size, and your RY block size matches your WY block size (scaled/raw analog in's match, scaled/raw analog out's match)