IRIN – the wait argument in the IRIN command not working in simulator.

hookset

New Member
I am using the following code in the simulator and cannot get the IRIN command to behave as expected. As I follow the logic' the IRIN command should wait for 5 sec (no IR input) then jump to the timeout section and turn on B.1 for 3 sec. But instead it immediately jumps to the IF lines. Is this just in the simulator? Trying to learn the limitation of the simulator.

#picaxe 08m2
; Receiver

main:
irin [5000,timeout],C.3,b0 ;wait for new signal
if b0 = 1 then swon1 ;switch on 2
if b0 = 4 then swoff1 ;switch off 2
goto main
swon1:
high B.2
goto main

swoff1:
low B.2
goto main

timeout:
high B.1
pause 3000
low B.1
goto main
 

hippy

Technical Support
Staff member
This is a simulation issue. The 'pop-up remote' stays until you press a key and simulation only continues when that is done.

To simulate a timeout; for PE5 press the "simulate timeout" button". For PE6, either press the "Esc" keyboard key, or right-click over the remote and select the "Simulate Timeout" option.

Added : You are perhaps describing the operation when the IRIN command isn't being simulated. That does seem to be as you describe in both PE5 and PE6. Enabling simulation of IRIN and doing the above will allow timeout and key press to be simulated.
 
Last edited:

hookset

New Member
This is a simulation issue. The 'pop-up remote' stays until you press a key and simulation only continues when that is done.

To simulate a timeout; for PE5 press the "simulate timeout" button". For PE6, either press the "Esc" keyboard key, or right-click over the remote and select the "Simulate Timeout" option.

Added : You are perhaps describing the operation when the IRIN command isn't being simulated. That does seem to be as you describe in both PE5 and PE6. Enabling simulation of IRIN and doing the above will allow timeout and key press to be simulated.
Thanks again for your help.
One little check box in the options menu did the trick.
 
Top