tidwellc87
Member
Newb here learning on Unity Pro XL.
I'm working on a Modicon M580 program (in function block) and I'm trying to ensure that an integer variable is unique (for equipment priority when in auto mode). I have a set of four integers '0-3'. They can be set by operator request at the HMI, and also by some other logic that automatically increases the variable when the associated equipment goes from a running status to off so that the priority is continually rotated.
I'm trying to come up with some logic to ensure that each of these four variables are always unique. I don't ever want any of them to be equal. Any ideas on how this might be accomplished?
I'm working on a Modicon M580 program (in function block) and I'm trying to ensure that an integer variable is unique (for equipment priority when in auto mode). I have a set of four integers '0-3'. They can be set by operator request at the HMI, and also by some other logic that automatically increases the variable when the associated equipment goes from a running status to off so that the priority is continually rotated.
I'm trying to come up with some logic to ensure that each of these four variables are always unique. I don't ever want any of them to be equal. Any ideas on how this might be accomplished?