News:

  • September 28, 2026, 09:20:48 AM

Login with username, password and session length

Author Topic: Using output coils set in a previous stage  (Read 9437 times)

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Using output coils set in a previous stage
« on: June 18, 2019, 04:38:06 PM »
Hi. I'm struggling with a facet of stage programming and I could use some assistance please.

The docs for stage programming say "All output coils used in a stage will be automatically turned off on the scan immediately following the scan in which the Jump to Stage and Jump to Multiple Stages (SGDIVRG) instructions are executed". With this being the case, how do I set bits in a stage, and then use them in a later stage if they're just going to be switched off when I leave the stage in which they're set?

[Insert confused emoticon here...]

Andrew.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Using output coils set in a previous stage
« Reply #1 on: June 18, 2019, 07:11:00 PM »
You can use them as OUTs in as many stages as you want. If you jump back from a later stage to earlier, and both have OUTs to the same element, it will glitch the output for one scan, but as long as jumps are forward, it will not.

 Alternatively, you can use SET and RST, which are not automatically shut off.
"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

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Using output coils set in a previous stage
« Reply #2 on: June 18, 2019, 07:41:12 PM »
Gotcha. Thanks Bob.

Am I right in assuming that success/fail bits from async processes are treated as SET commands and therefore don't get reset across stage changes?

Andrew.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Using output coils set in a previous stage
« Reply #3 on: June 18, 2019, 09:16:55 PM »
Gotcha. Thanks Bob.

Am I right in assuming that success/fail bits from async processes are treated as SET commands and therefore don't get reset across stage changes?

Andrew.

Correct.
"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