News:

  • July 27, 2026, 06:41:44 AM

Login with username, password and session length

Author Topic: Stage Programming  (Read 5973 times)

PLCwannabe

  • Hero Member
  • *****
  • Posts: 208
Stage Programming
« on: January 12, 2022, 09:27:26 PM »
I need to set up a program with multiple stages with each new stage needing to calculate with values that were just calculated in the previous stage. Are the results in stages updated immediately, before the next stage starts?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3835
    • Host Engineering
Re: Stage Programming
« Reply #1 on: January 12, 2022, 09:48:16 PM »
All logic in an active/enabled stage run every scan until it is disabled, either via JMP, a SGRST.  So if the stage is active, it will continue to be "calculated" just like all logic.

Realize there are instructions like Timers and Out coils that have termination logic, so those timers will reset and out coils will reset when you JMP out of stages that have those in them - but you used the word "calculate" - not OUT coil, so you are fine.

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: Stage Programming
« Reply #2 on: January 13, 2022, 09:48:31 AM »
Stages are not subroutines.  They are program segments that are enabled/disabled by a master bit and run inline as they are entered into the program regardless of the bit number.  If the bit, let's say S0 for example, is true then the stage will run.  If it is false the stage will execute termination behavior the first time after the transition and then be inactive until the bit goes true again.