Thanks . since the START END loop is the same all the time, how to distinguish between a cold start and that normal looping?CAI_Support said:Some user put a 2 seconds delay after START, then put a label warmup there, before END, they added
goto warmup
Efried said:Thanks . since the START END loop is the same all the time, how to distinguish between a cold start and that normal looping?
thanks
start
delay 5000
loop:
do stuff
goto loop
end
In my case I set a flag the first time through the loop. WebContol sets VARS and RAM to 0 at power up. If is is 0 you know this is the first time though the loop, then set it to some other value.Efried said:since the START END loop is the same all the time, how to distinguish between a cold start and that normal looping?
Oops sorry about that, meant debounce.CAI_Support said:Could you please elaborate in detail how to " denounce the status flag"?
The mailing logic I understood but not the AND logic with the branch. What do you mean by test it directly. Is my CZ TSn BADSENSOR not good? Apparently it fires always.Tschmidt said:Also, I'm also a little vague about exactly when the zero flag gets set, so I tend to test it directly. If I was more experienced with WebControl I could probably write tighter code.
/tom
Not sure I understand your question.Efried said:The mailing logic I understood but not the AND logic with the branch. What do you mean by test it directly. Is my CZ TSn BADSENSOR not good? Apparently it fires always.
Thanks - I forgot those instruction can do an immediate test of a variable in addition to checking the zero flag status from previous operation.CAI_Support said:BNZ, BZ, CNZ, and CZ require to have two parameters, the first is the value to check, the second is where to branch.