by tminionman » Mon Feb 18, 2008 10:55 pm
by tminionman
Mon Feb 18, 2008 10:55 pm
Here is the code I'm trying to test with:
DIM B AS INTEGER
DIM A AS INTEGER
'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,1,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0
'== motor start position read ===================
GETMOTORSET G6A,1,1,1,1,1,0
GETMOTORSET G6B,1,1,1,0,0,0
GETMOTORSET G6C,1,1,1,0,0,0
GETMOTORSET G6D,1,1,1,1,1,0
GYROSET G6A,0,1,0,0,0,0
GYROSET G6D,0,1,0,0,0,0
GYRODIR G6A,1,1,1,1,1,1
GYRODIR G6D,0,1,0,0,0,0
GYROSENSE G6A,0,70,0,0,0,0
GYROSENSE G6D,0,70,0,0,0,0
SPEED 5
'== motor power on =============================
MOTOR G24
GOSUB standard_pose
'================================================
MAIN:
'GOSUB transmit_start
GOSUB transmit_data
'GOSUB transmit_done
GOTO MAIN
'================================================
transmit_data:
A=1328
B=PEEK(A)
ETX 57600, B
RETURN
'================================================
standard_pose:
MOVE G6A,100, 80, 145, 93, 100, 100
MOVE G6D,100, 80, 145, 93, 100, 100
MOVE G6B,100, 30, 80, 100, 100, 100
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN
'================================================
The red highlighted text is the statement giving me trouble. I'm running RoboBasic 2.5 (English), and the compile command returns an "[Assign(=)]Can't use integer type" error.
Here is the code I'm trying to test with:
DIM B AS INTEGER
DIM A AS INTEGER
'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,1,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0
'== motor start position read ===================
GETMOTORSET G6A,1,1,1,1,1,0
GETMOTORSET G6B,1,1,1,0,0,0
GETMOTORSET G6C,1,1,1,0,0,0
GETMOTORSET G6D,1,1,1,1,1,0
GYROSET G6A,0,1,0,0,0,0
GYROSET G6D,0,1,0,0,0,0
GYRODIR G6A,1,1,1,1,1,1
GYRODIR G6D,0,1,0,0,0,0
GYROSENSE G6A,0,70,0,0,0,0
GYROSENSE G6D,0,70,0,0,0,0
SPEED 5
'== motor power on =============================
MOTOR G24
GOSUB standard_pose
'================================================
MAIN:
'GOSUB transmit_start
GOSUB transmit_data
'GOSUB transmit_done
GOTO MAIN
'================================================
transmit_data:
A=1328
B=PEEK(A)
ETX 57600, B
RETURN
'================================================
standard_pose:
MOVE G6A,100, 80, 145, 93, 100, 100
MOVE G6D,100, 80, 145, 93, 100, 100
MOVE G6B,100, 30, 80, 100, 100, 100
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN
'================================================
The red highlighted text is the statement giving me trouble. I'm running RoboBasic 2.5 (English), and the compile command returns an "[Assign(=)]Can't use integer type" error.