.Bob. (Customer) asked a question.

BRX instructions and programs stop firing.

With Do-more 2.8.3 and a BX-DM1E-18ER3 running OS 2.8.6, I have recently seen apparent anomalies with timers (the .DONE stops firing) and Programs (the STAGE's within the Program stop firing.)

 

I have a basic TMR followed by a .DONE. This logic has been working without issue as expected for over a year. Other sections of the program were changed, but not these rows. At some point the TMR stopped working. The timer fires and exceeds its designated time, but the .DONE is never triggered. I reloaded DoMore. Cycled the PLC Mode between Program and Run. Still no joy. The ultimate fix was to delete that TMR instruction and then add a new TMR in its place. This has happened twice over the last six months or so.

 

Today, a PROGRAM acted similarly. Main is running a Program with an ST1. The program status is ON (highlighted.) However, Stage S0 is not On. I again reloaded Do-more. Recycled the PLC Mode. No joy. The ultimate fix was to delete the Run line for this program in Main and wrote that to the PLC. Mode was recycled (which confirmed the program status as now being OFF. The Main Run command for the Program was then recreated followed by a new write to the PLC. It then started working. The Program's S0 stage was immediately On.

 

I am not sure how to even search for such failures on this forum. Has anyone seen anything similar?


  • RBPLC (Customer)

    "Stage S0 is not On"

     

    What is in S0? Are there instructions in that stage to cause it to jump out of S0?

  • .Bob. (Customer)

    There is logic in S0 that will cause it to JMP. However, S0 never fired so subsequent stages never fired.

    • RBPLC (Customer)

      Can you post your Progam? It initially sounds as though there's termination logic happening that is causing unexpected behavior.

  • .Bob. (Customer)

    Here is the first stage. It cannot be a code issue, though. The "fix" was to delete the RUN for this PROGRAM in MAIN, SAVE, PUBLISH, then recreate the exact same RUN PROGRAM in MAIN and rePUBLISH. In both instances, the PROGRAM was highlighted in DoMore showing it fired. However, no Stages were highlighted.

     

    nutr

    Expand Post
    • RBPLC (Customer)

      Is it possible there is a JMP to a stage that is no longer present in the Program? This would potentially produce the described behavior. Are there any warnings when downloading the program to the controller?

      • HOST_franji1 (HOST Engineering)

        @RBPLC FYI, this is definitely permitted (Program Check will issue a warning/message) and actually useful under certain SFC coding patterns, specifically a SGCONVRG waiting for a set of parallel stage sequences to reach their end and converge into a new common path. The end stage of some of those parallel paths have no logic to them, it's just there for the flagging of the SGCONVRG set of SG bit inputs - so no need to actually burn ladder memory with a bunch of empty stages. HOWEVER, I do like to burn the Ladder Memory in that situation for the sole purpose of the Project Browser code-block status - it shows SG Stage instruction status, showing you where each parallel path is currently sitting. By actually having the SG instruction in this scenario, you get better status feedback of your SFC state.

        Expand Post
      • HOST_franji1 (HOST Engineering)

        Oh, and Ignoring this specific Program Check "rule" violation is encouraged - where it's NOT an accident of JMPing to a non-existent SG block. So I would definitely NOT ignore that rule Globally or at a Project or even Code-Block level, but definitely at the specific JMP Rung level (you may accidentally do it at another rung in the same code-block, and need to be made aware of that faux pas)

        Expand Post
    • Bolt (Customer)

      I think the problem of having to remove the ST1, RUN Program rung in your $Main was that the RUN instruction is edge triggered. It ran once, so it wouldn't run again. It possibly stopped running due to some changes (run-time edits) to your program that in inadvertently put it in a "unnoticed" SG that was keeping it parked there.

       

      You can always right click a Program or Stage in the Project Browser and Run or Halt the Program or Disable/Enable the Stage in the Debug Code-Block sub menu.

      Expand Post
  • .Bob. (Customer)

    There are 24 Stages and over 100 rungs on this PROGRAM. Some changes were being made earlier, so it is possible a Stage was removed that was not referenced for a short period. I did not see any error messages. But assuming that was the case, and the invalid JMP was corrected, would DoMore restart at S0 when the MODE was toggled? Or are you saying that if a referenced Stage is missing the Program will not run at all?

     

    Any thoughts on the TMR anomaly?

    Expand Post
    • HOST_franji1 (HOST Engineering)

      Data View does a good job of showing the active stages of a PROGRAM, especially ones that have no logic to them. Just type the name of the program (no need to blow out all 128 stage bits).

       

      You should have gotten Program Check Warning W201

       

      Below is a simple example of SG S0 JMPing to non-existent SG S1

      [Warning] $Main@2(#2) W201 "$Main.S1" parameter in "JMP - Jump To Stage" does not exist as a corresponding parameter in any Stage primary instruction)

       

      image

      Expand Post