shoelesscraig
Member
Hey guys, been programming for quite some time, but I need a push in the right direction for some (for lack of a better term) "alternating logic".
Basically, I'm displaying alarms on an HMI. The HMI will read a single integer (we'll call it INT1). So if alarm condition 1 is met, then INT1 = 1, if alarm condition 2 is met then INT = 2, and so on. If I have a single alarm, everything works great.
What I need however, is that if I have conditions 1 and 7 met, that INT1 will bounce back and forth between "1" and "7". If condition 22 is then added, then INT1 will add "22" to its rotation. Then of course, as alarms are cleared, they will drop out of the rotation.
I'm sure there's something on this already, but I couldn't find it b/c I'm not sure what to call it! Anybody done this before and have an example they'd be willing to share?
And FYI, b/c of my particular situation, no, I cannot use the built in alarm function on the HMI that would normally do this for you...gotta do it this way.
Basically, I'm displaying alarms on an HMI. The HMI will read a single integer (we'll call it INT1). So if alarm condition 1 is met, then INT1 = 1, if alarm condition 2 is met then INT = 2, and so on. If I have a single alarm, everything works great.
What I need however, is that if I have conditions 1 and 7 met, that INT1 will bounce back and forth between "1" and "7". If condition 22 is then added, then INT1 will add "22" to its rotation. Then of course, as alarms are cleared, they will drop out of the rotation.
I'm sure there's something on this already, but I couldn't find it b/c I'm not sure what to call it! Anybody done this before and have an example they'd be willing to share?
And FYI, b/c of my particular situation, no, I cannot use the built in alarm function on the HMI that would normally do this for you...gotta do it this way.