Andres Rodriguez
New Member
On the attached program, when it reaches line 205 (almost the end), I get the following message and execution stops.
Variable not Found (Update_Var_Array)
Variable not Found (Update_Var_Array)
Code:
#picaxe 28x1
'#com 4
'Variables
Symbol RXIN =W0
Symbol DLYin=W2
Symbol Dly = b6
Symbol M=b4
Symbol N=b5
Symbol R=b7
Symbol Dty=W10
Pause 5000
'Pins
Symbol RX_IN= Input0
let dirsc = %11110010
let pinsc = %00000000
`SetInt %00000100,%00000100
Main:
Dly=30
Pulsin 0,1,RXIN
if RXIN>150 then goto Show
Goto landing
Show:
For R=0 to 5
Pulsin 0,1,RXIN
if RXIN>150 then goto Forw
High PortC 2
Forw:
Pulsin 0,1,RXIN
if RXIN>150 then goto Forw1
Goto landing
Forw1:
let pinsc=%00000010
pause Dly
let pins=%00000000
M=%10000000
for N=0 to 7
let pins=M
M=M/2
pause Dly
Next N
let pinsc=%00000000
let pins=%00000000
pause DLY
let pinsc=%10000000
Pause Dly
let pinsc=%01000000
Pause Dly
let pinsc=%00100010
Pause Dly
let pinsc=%00000000
pause Dly
let pinsc=%00000010
Next R
Pause 20
DLY=DLY+5
For R=0 to 5
Forback:
Pulsin 0,1,RXIN
if RXIN>150 then goto Forback1
Goto landing
Forback1:
'let dirsc=%11110010
pause Dly
let pins=%00000000
M=%10000000
let pinsc=%00000010
for N=0 to 7
let pins=M
M=M/2
pause Dly
Next N
let pins=%00000000
let pinsc=%10000000
Pause Dly
let pinsc=%01000000
Pause Dly
let pinsc=%00100010
Pause Dly
let pinsc=%00000000
Pause Dly
Pause Dly
let pinsc=%00100010
pause Dly
let pinsc=%01000000
pause Dly
pause Dly
let pinsc=%10000010
pause Dly
let pinsc=%00000000
pause Dly
M=%00000001
For N=0 to 7
let pins=M
M=M*2
pause Dly
Next N
let pinsc=%00000010
Next R
Pause 20
Dly=51
For R=0 to 10
Fromcent:
Pulsin 0,1,RXIN
if RXIN>150 then goto Fromcent1
Goto landing
Fromcent1:
Let pinsc=%00000010
Pause Dly
let pinsc=%00000000
let pins=%00000100
Pause Dly
let pins=%00000010
Pause Dly
let pins=%00000001
Pause Dly
let pins=%00100000
let pinsc=%10000000
Pause Dly
let pins= %01000000
let pinsc=%01000010
Pause Dly
let pins=%10000000
let pinsc=%00100000
pause Dly
let pinsc=%00000000
let pins=%00000000
Pause Dly
let pins= %10000000
let pinsc=%00100000
Pause Dly
let pins= %01000000
let pinsc=%01000010
Pause Dly
let pins=%00100000
let pinsc=%10000010
Pause Dly
let pins=%00010001
let pinsc=%00000000
Pause Dly
let pins=%00001010
Pause Dly
let pins=%00000100
'Dly=Dly-5 min 15
Pause Dly
let pinsc=%00000010
Dly=Dly-1
Next R
Dly=30
Pause 20
Goto Main
For R=0 to 5
LANDING:
let pinsc=%00010010
pause Dly
let pins=%00000000
M=%10000000
for N=0 to 7
let pins=M
M=M/2
pause Dly
Next N
let pinsc=%00010000
let pins=%00000000
pause DLY
let pinsc=%10010000
Pause Dly
let pinsc=%01010000
Pause Dly
let pinsc=%00110010
Pause Dly
let pinsc=%00010000
pause Dly
let pinsc=%00010010
Next R [B][COLOR="Red"]'THIS IS LINE 205[/COLOR][/B]
Pause 20
Pulsin 0,1,RXIN
if RXIN>150 then goto Main
Goto Landing