Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Controls Guy on April 04, 2022, 03:57:49 PM

Title: Conditionally omitting scan of part of a program
Post by: Controls Guy 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.
Title: Re: Conditionally omitting scan of part of a program
Post by: Controls Guy 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.
Title: Re: Conditionally omitting scan of part of a program
Post by: franji1 on April 04, 2022, 05:04:18 PM
Yup.  ENDC