Thanks for your reply. I think I found a solution for this. I’ve been using the following nodes succesfully sofar;
- ‘Mechanical-Switch’ node represent rocker-switches (no momentary switches)
- ‘Pulse on true’-node
- ‘Any pulse’-node
- Some flip-flops
- Some delay-nodes
The mechanical switches outputs are tied to the ‘pulse on true’ nodes. Each pulse-node is connected to one of the pulse-inputs of the ‘select’-node and to a ‘Any’-pulse node. The node connected to the ‘Select’-node passes through the value (Xn) that’s tied to the corresponding pulse-connection (Sn) and puts that value on the output-pin. This pin is connected to the ‘Char’-input pin of the ‘Accumulate-string’-node. Further, the output-pin of the ‘Any’-pulse node is connected to the ‘push’-pin of the ‘Accumulate-string’-node. So whenever one switch is set to High, the corresponding value will be put in the ‘Accumulate-string’-node (you have to put the ASCII-code of the desired character in the ‘Select’-node, because the ‘Accumulate-string’-requires this, so “1” is 49d). The string that appears at the ‘STR’-pin of this node, will be compared with a string which contains the switch-sequence (for example “312”). If these strings are equal, a ‘Pulse-on-true’-node will fire and cause a flipflop to go high, which can be used to output a signal to energise a relay or something.
Anyway, images say more than a thousand words, so look at attached image. You can see above configuration for just 3 switches. I’ve also added a structure that resets the ‘Accumulate-String’-node when one of the swiches is put back to Low or when the accumulated string is not equal to the ‘code’-string. I tried using the ‘FULL’-connection of the ‘Accumulated-String’-node to determine if all switches are High, but it only pulses when a fourth switch/character (which doesn’t exist) is tried to push into the node, so I had to add a ‘Count’-node to do this. I know, the entire structure may not be as lean as possible, but it works for me now.