1 Attachment(s)
Raise and Lower a Table with 2 Contact Closures, 2 Button on a Keypad, and the R/L
Attached is a sample file programmed with the functionality described below.
We first defined both CCOs, a Table Up CCO and a Table Down CCO as maintained, not momentary, as it would work better for this application.
We then defined two similar sequences, “Close Table Up” and “Close Table Down”. On the first step of Close Table Up, we open the “Table Down” CCO (if it is already open, it will stay open), and in a .25sec delay, we close the Table Up CCO. We move to the next step in 10 seconds for testing purposes, you would have 2 minutes here. The next step is the Stop Sequence step, which just opens both CCOs. The Close Table Down sequence is the same, but closes the Table Down CCO in a .25 second delay and opens the Table Up CCO.
We then have a keypad with two conditional buttons, a Table Up and a Table Down button. The Table Up button first checks if the Table Down CCO is open. If it is, it will run the sequence Close Table Up. If the Table Down CCO is closed, it will open the Table Down CCO (it will stop the table from lowering). You can then press the button again and the table will begin to raise. The Table Down button has the same style programming as Table Up, just inverts table Up with table Down.
For the raise and lower button, we have created a variable called “Table Button Pressed” with default state “False” and other state “True”. On any action on the Table Up or Table Down buttons, we include this variable and set it to the True state. On any other button on the keypad, we have set this variable to false. The raise and lower buttons are going to be single variable buttons. Under the False state, the buttons will work as a master raise and lower. Under the True state, the lower button will work as a dual action. On the press on tab, the Table Down CCO will be closed after a .25 second delay, and the Table Up CCO will be open. On the release tab, both Table Up and Table Down are set to Open. The raise button will be the same, but closing the Table UP CCO and opening the Table Down CCO on the Press on tab.