News:

  • October 13, 2025, 11:35:56 AM

Login with username, password and session length

Author Topic: Conditionally omitting scan of part of a program  (Read 1220 times)

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Conditionally omitting scan of part of a program
« on: April 04, 2022, 03:57:49 PM »
I have a program that is basically continuously enabled.   Based on the state of a relay, I want to skip about 10 rungs at the end of the program (these will skip most of the time).

I don't want to EXIT, because that would require the program to be reenabled, and even though it's continuously enabled, I think RUN needs an edge to restart IIRC (and I can't check the help due to the help issue from my other thread).  I could JUMP to a LABEL, or add something toggling to the RUN, but I was wondering if an ENDC would work, defined as ending this scan of the program while leaving it enabled for next scan.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: Conditionally omitting scan of part of a program
« Reply #1 on: April 04, 2022, 04:08:58 PM »
OK, I still have DMD 2.8 installed and the Help still works in there [shrug], so I looked up the help on ENDC and program termination, and it looks like my assumption is correct; I can do an ENDC and it won't clear the program enable like an EXIT.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: Conditionally omitting scan of part of a program
« Reply #2 on: April 04, 2022, 05:04:18 PM »
Yup.  ENDC