====== Toggle Switch ====== A toggle switch displays the state of a boolean value (on or off), and also gives the operator a widget through which they can change the value. {{ :comfilehmi:toggle_switch:toggle.png?nolink |}} ===== Bit Address ===== The state of the toggle switch can be bound to bit value in a device's memory. {{ :comfilehmi:toggle_switch:toggle1.png?nolink |}} The state can also be simultaneously stored to a variable. {{ :comfilehmi:toggle_switch:toggle2.png?nolink |}} ===== Word Address ===== The state of the toggle switch can be bound to word value in a device's memory. {{ :comfilehmi:toggle_switch:toggleword.png?nolink |}} If you check the specific bit option, you can change the specific bit of the word address to 1 or 0. As in the example below, if the bit number is set to 1, the target is bit 1 of the word address. {{ :comfilehmi:toggle_switch:toggleword1.png?nolink |}} ^ 15 ^ 14 ^ 13 ^ 12 ^ 11 ^ 10 ^ 9 ^ 8 ^ 7 ^ 6 ^ 5 ^ 4 ^ 3 ^ 2 ^ 1 ^ 0 ^ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | {{ :comfilehmi:toggle_switch:bitcontrol2.mp4?1000x500 |}} ===== Internal Variable ===== The state of the toggle switch can be bound to word value in a variable. {{ :comfilehmi:toggle_switch:toggleword2.png?nolink |}} ===== Mutual Exclusion ===== Multiple toggle switches can be bound to the same device address or variable, and when toggled on, will turn all others off. {{ :comfilehmi:toggle_switch:togglemulti.png?nolink |}} {{ :comfilehmi:toggle_switch:togglemulti2.png?nolink |}} {{ :comfilehmi:toggle_switch:togglesim.gif?nolink |}} [[comfilehmi:index#widgets| Back to ComfileHMI]]