You don't need to use the count command or procedures - what you should use is the timer - this is supported by all M2, X1 and X2 parts.
This is example code for the M2 PICAXEs:
Code:
symbol timeout = 120 'Set timeout in seconds
symbol presscounter = b4 'Variable to hold number of button presses
symbol inputpin = pinC.1 'The pin the button is connected to
symbol outputpin = C.0 'The pin the LED is connected to (down to ground)
do
if inputpin = 1 then 'Use 1 for a button connected to Vdd, use 0 for a button connected to Vss
inc presscounter
do : loop until inputpin = 0
time = 0
if presscounter = 3 then
high outputpin
pause 2000
low outputpin
presscounter = 0
end if
end if
if time > timeout then
presscounter = 0
end if
loop
This is an example for X1 and X2 PICAXEs:
Code:
symbol timeout = 120 'Set timeout in seconds
symbol presscounter = b4 'Variable to hold number of button presses
symbol inputpin = pinC.1 'The pin the button is connected to
symbol outputpin = C.0 'The pin the LED is connected to (down to ground)
settimer t1s_4
do
if inputpin = 1 then 'Use 1 for a button connected to Vdd, use 0 for a button connected to Vss
inc presscounter
do : loop until inputpin = 0
timer = 0
if presscounter = 3 then
high outputpin
pause 2000
low outputpin
presscounter = 0
end if
end if
if timer > timeout then
presscounter = 0
end if
loop
Both these pieces of code have been tested in the simulator and work.
If you
must do this in Logicator, the conversion is pretty simple - the loop at the very end is simply a long line back to the start, an if command is the decision cell and the commands that make a variable equal something else (e.g. timer = 0) use the express cell.