Reputation: 9
I had an problem regarding design of EVM machine. Once the button is pressed a vote must be counted. So for that a counter is needed how to create that?
Upvotes: 0
Views: 131
Reputation: 2996
Without knowing more about your project, I'd use a WHILE loop with an EVENT Structure. The Event Structure waits for a Value Change event on the button. On a change of a button, the corresponding value in the shift register is increased by 1 and displayed.
The snippet is missing the initialization of the indicators, since they are updated on the first click, only.
Upvotes: 1