I have three inputs; Speed1, Speed2, Speed3. These inputs can be selected through interactive graphics on an HMI. Currently I can select all three speeds by clicking all three buttons. However, I want to make it so that when one speed is selected, the other speed is unselected.
I currently have an error system in place where if two or more speeds are selected, the corresponding multi-speed binary output will not occur. However, I can still select two or more speeds on the HMI interface, something I would like to avoid.
This will depend on the capabilities of your HMI.
When I have a situation like this, I usually use a button that can set a fixed value to a WORD variable and then create 3 buttons, each one writing a different and fixed value to the same variable when pressed, this avoids having inconsistency in the states:
So I can use a comparison block (=) in the PLC:
If you need to show which button is activated, there are HMIs that can link the state of an image or button to WORD type variables as well, or you can use a Bit activated by the comparator itself and use it as an indicator for the button (for example, as a bit for each status ... W0.00 / W0.01 / W0.02).
If you need to use toggle buttons that set bits (like W0.01), at the beginning of the program you can use the rising edge (Right click > Differentiate > UP) and then reset the state of the other buttons, and only after that apply the speed according to the state of the button.
This will only work if there is no other way to trigger these bits than through the HMI, or else you will need to study other ways of blocking.