Hi All.
Sorry my first post is not is so pathetic but I am having trouble in resetting a Var value back to zero.
I am using the flow chart method to get this test code
main:
let dirsC = 1
Cell_7_8:
write varA, 0
Cell_7_12:
if pinC.3=0 then
goto Cell_10_12
end if
stop
Cell_10_12:
inc varA
if varA >= 5 then
goto Cell_7_8
end if
goto Cell_7_12
The count up loop runs through Cell_7_12 adding 1 to VarA each time. When the count gets to =>5 it then runs back to Cell_7_8 where I am trying to reset VarA back to zero using the write command.
No matter what I try, I cannot get VarA back to zero.
Please can anyone let me know where I am going wrong?
Sorry my first post is not is so pathetic but I am having trouble in resetting a Var value back to zero.
I am using the flow chart method to get this test code
main:
let dirsC = 1
Cell_7_8:
write varA, 0
Cell_7_12:
if pinC.3=0 then
goto Cell_10_12
end if
stop
Cell_10_12:
inc varA
if varA >= 5 then
goto Cell_7_8
end if
goto Cell_7_12
The count up loop runs through Cell_7_12 adding 1 to VarA each time. When the count gets to =>5 it then runs back to Cell_7_8 where I am trying to reset VarA back to zero using the write command.
No matter what I try, I cannot get VarA back to zero.
Please can anyone let me know where I am going wrong?