thelittlesthobo
New Member
Hello
For the following section of code, I am getting syntax error with the arrow pointing to the number '1'. I suspect it will also do it to 2,3,4 & 5.
symbol fault(1) = b1
^
symbol fault(2) = b2
symbol fault(3) = b3
symbol fault(4) = b4
symbol fault(5) = b5
I want to use these locations to store 5 faults (Numbered 1-10) from another device. I am using a for loop after this to store the faults to each location.
for fault = 1 to 5 ;Loop for DTCs 1-5
let b0 = 1 ;Set b0(fault) to 1
pulsin pulse,0,w13 ;Measure low pulses & store @ w13
if w13 > 400 then ;If low pulse is greater than 400, gosub faultcount
let temp = 0 ;Set temp to 0
gosub faultcount ;Goto sub routine to count pulses
endif ;End IF statement
fault(b0) = temp ;Assign temp value to fault(b0)
inc b0 ;Increment bo(fault)
next counter ;Increment loop
goto results ;Loops finished, goto results
Can anyone tell me why I am getting the syntax error or even if there is an easier way.
Many thanks
Rob
For the following section of code, I am getting syntax error with the arrow pointing to the number '1'. I suspect it will also do it to 2,3,4 & 5.
symbol fault(1) = b1
^
symbol fault(2) = b2
symbol fault(3) = b3
symbol fault(4) = b4
symbol fault(5) = b5
I want to use these locations to store 5 faults (Numbered 1-10) from another device. I am using a for loop after this to store the faults to each location.
for fault = 1 to 5 ;Loop for DTCs 1-5
let b0 = 1 ;Set b0(fault) to 1
pulsin pulse,0,w13 ;Measure low pulses & store @ w13
if w13 > 400 then ;If low pulse is greater than 400, gosub faultcount
let temp = 0 ;Set temp to 0
gosub faultcount ;Goto sub routine to count pulses
endif ;End IF statement
fault(b0) = temp ;Assign temp value to fault(b0)
inc b0 ;Increment bo(fault)
next counter ;Increment loop
goto results ;Loops finished, goto results
Can anyone tell me why I am getting the syntax error or even if there is an easier way.
Many thanks
Rob