Don’t you want to count from 1 to 1023? What is the “add 280” for?
If-else-COND needs a boolean fed to it. A number COULD be used, but is NOT what you want in this case. Zero would be interpreted as false. Since count starts at 0 and you add 280 to it, the output of ‘add’ will never be 0, so this if-else will always output the if-else-T value (which you have hard-coded to 1).
You are trying to print values from 0 to 1023, so you should be feeding the output of count to your print-VAL pin. This should provide count with start/stop:
To stop counting at 1023 gets a bit more complicated. First, you need to know when count is greater or equal to 1023 (you could just check for equal, but it is “safer” to check for greater or equal; 1022.999999999999 and 1023.000000000001 will “look” equal to 1023, but are not). This information will be needed “higher” in the program, so you will need a ‘defer’ node to “loop” back.
Connecting a wire back “up” the program can get messy, so I am going to add ‘bus’ nodes. These can be thought of as “hidden” wires (i.e. wires running behind your circuit board that you can’t see). Bus nodes with the same Label are all connected. Multiple ‘to-bus’ nodes cannot have the name (you can’t have multiple inputs to a single wire), but you can have multiple ‘from-bus’ nodes with the same name.
Looking at the new nodes below the ‘count’ node, MAX becomes TRUE when count is greater or equal to 1023. If we feed ‘not’ MAX into the ‘gate’ feeding ‘flip-flop’, the ‘flip-flop’ will only change if count is NOT 1023 (we quit turning count on/off if we are at MAX).
If we feed MAX to flip-flop-RST, we are connecting a boolean to a pulse pin. We could add a pulse-on-true node to convert, but that is implied…a boolean “pulses” when it changes to TRUE, so the extra node is not needed. This turns off the flip-flop when count reaches 1023, so we quit counting.
In order to reset count when button is pressed after we reach max, we need to pulse count-RST. Here I have used a second ‘gate’ node that only passes data when MAX is TRUE (we are at max count), so a button press after we reach MAX will reset the counter. This will NOT start counting immediately; connecting the second ‘gate’ output to flip-flop-SET would cause it to immediately start counting on reset.