Hi, everyone,
I'm new for Karel language and I got a problem when I tried to modify system variable $SGSCH1 in KL editor of RobotGuide 8.3.
Now I need to change it to $SGSCH2 because we want to test welding by gun2. Then I press 'build' button and I got syntax error which remind me $SGSCH2 need to be defined before this use. How and where could I define this variable in program
IF intError = 0 THEN
--Set thickness var
$SGSCH1[intPrsSch].$THICKNESS = (intThick/ 10)
--CHECK FOR DRY CYCLE----
IF(DIN[12] = ON)THEN
$SGSCH1[intPrsSch].$THICKNESS = 0
$SGGUN1.$SETUP.$TC_ENB = FALSE
ENDIF
--Write Thickness to R[31]
SET_REAL_REG(31,( intThick / 10),STATUS)
--If write R[31] failed, set error
IF STATUS <> 0 THEN
intError = 10
ENDIF
从我的 iPhone 发送,使用 Tapatalk