Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RBPLC on December 27, 2020, 12:15:52 AM
-
I'm attempting to use a SG with a TIMEPROP inside of it. I'm also using a SGSET/SGRST in another stage to control this stage. Apparently the TIMEPROP uses some form of latch. I noticed that when I call the SGRST from the other stage, the output of the TIMEPROP "hangs" on (the same as if it were a latch). Is there a "clean" way to disable the SG with the TIMEPROP from another stage and have it turn off the outputs from the TIMEPROP at the same time?
Edit: It looks like one way to do this is to make a dummy variable for the TIMEPROP output and use that output as a NO into an OUT coil for the desired bit that I'm trying to control.
-
I'm attempting to use a SG with a TIMEPROP inside of it. I'm also using a SGSET/SGRST in another stage to control this stage. Apparently the TIMEPROP uses some form of latch. I noticed that when I call the SGRST from the other stage, the output of the TIMEPROP "hangs" on (the same as if it were a latch). Is there a "clean" way to disable the SG with the TIMEPROP from another stage and have it turn off the outputs from the TIMEPROP at the same time?
Edit: It looks like one way to do this is to make a dummy variable for the TIMEPROP output and use that output as a NO into an OUT coil for the desired bit that I'm trying to control.
TIMEPROP in a stage definitely has the potential for trouble. I would put it above the first stage and drive with an intermediate bit via OUT instruction in the stage.
-
What's the possibility of having an instruction that disables not only OUT within a stage but also SET and any other function with latching type behavior?
-
What's the possibility of having an instruction that disables not only OUT within a stage but also SET and any other function with latching type behavior?
That's really the only difference between OUT and SET.
As for TIMEPROP, I think the terminator logic isn't correct. It should be cleaning it up, and it doesn't. Easy fix.
-
"That's really the only difference between OUT and SET."
I don't understand what this means.
It would be nice to have an instruction that would force all "output" type instructions in a stage to their off state. At current time OUT's are turned off and SET's are left in whatever state they're currently in when a SGRST is used. This is a good action for a majority of applications I suspect. The addition of a separate instruction that would RST all latches and force all outputs to zero (and potentially set Words and Reals to zero) would allow a separate stage to act as a supervisory stage and disallow all output actions associated with words and bits within a slave stage in the event that the supervisory stage "turned off/overrode" all of the output bits/words. Also, having a HALT type instruction that would do they same would be useful for the same reasons.
-
I don't understand what this means.
An OUT and SET are internally very similar. One significant difference is the termination logic, which is what shuts off outputs when stages or code blocks end.
If there are specific instructions which are not terminating as intended, we can easily change that. TIMEPROP was not, but really should be. Easy fix. A generalized instruction that affects the behavior of other instructions is simply not feasible.
-
It would be nice to have an instruction that would force all "output" type instructions in a stage to their off state.
SET doesn't have an "off state"; it can only do two things, set and don't set. Sometimes that's the behavior you want and that's why SET & RST exist. If you don't want that, use an OUT. And it's not just in stage, those instructions are for different things in general ladder too.
-
It would be nice to have an instruction that would force all "output" type instructions in a stage to their off state.
SET doesn't have an "off state"; it can only do two things, set and don't set. Sometimes that's the behavior you want and that's why SET & RST exist. If you don't want that, use an OUT. And it's not just in stage, those instructions are for different things in general ladder too.
Precisely correct.