by skycruiser » Thu May 12, 2011 6:00 pm
            
            
                    
                by skycruiser
Thu May 12, 2011 6:00 pm
            
            
            I'm a beginner as far as Robonova 1 is concerned.So do help me if you can.I can very well program the C3024 controller on my robonova thru my laptop(programming process is seen clearly on oscilloscope).I'm using a USB to serial converter cable.
But when I write a program to send a byte on serial cable by command ETX and then trying to recieve a byte from my laptop(by command ERX),  I don't see any activity(even on the oscilloscope) and the program reaches the end(Depicted by Music command).Please guide me.It would help if someone could give a program which transmits and receives a byte on serial cable for 3024 controller.My program is pasted below:
PTP SETON 				
PTP ALLON				
'TEMPO 230
'MUSIC "C"
DIM I AS BYTE
DIM A AS BYTE
'== 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
SPEED 5
'MUSIC "E"
'== motor power on  =============================
MOTOR G24	
GOSUB standard_pose
DELAY 1000
'================================================
MAIN:    	
	I = "1"
	ETX 9600, I
	A = "1"
MUSIC "CC"
Retry:
ERX 9600, A, Retry
	GOTO MAIN
'================================================
standard_pose:
	MOVE G6A,100,  76, 145,  93, 100, 100 
	MOVE G6D,100,  76, 145,  93, 100, 100  
	MOVE G6B,100,  30,  80, 100, 100, 100
	MOVE G6C,100,  30,  80, 100, 100, 100
	WAIT
	
	RETURN
'================================================
            I'm a beginner as far as Robonova 1 is concerned.So do help me if you can.I can very well program the C3024 controller on my robonova thru my laptop(programming process is seen clearly on oscilloscope).I'm using a USB to serial converter cable.
But when I write a program to send a byte on serial cable by command ETX and then trying to recieve a byte from my laptop(by command ERX),  I don't see any activity(even on the oscilloscope) and the program reaches the end(Depicted by Music command).Please guide me.It would help if someone could give a program which transmits and receives a byte on serial cable for 3024 controller.My program is pasted below:
PTP SETON 				
PTP ALLON				
'TEMPO 230
'MUSIC "C"
DIM I AS BYTE
DIM A AS BYTE
'== 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
SPEED 5
'MUSIC "E"
'== motor power on  =============================
MOTOR G24	
GOSUB standard_pose
DELAY 1000
'================================================
MAIN:    	
	I = "1"
	ETX 9600, I
	A = "1"
MUSIC "CC"
Retry:
ERX 9600, A, Retry
	GOTO MAIN
'================================================
standard_pose:
	MOVE G6A,100,  76, 145,  93, 100, 100 
	MOVE G6D,100,  76, 145,  93, 100, 100  
	MOVE G6B,100,  30,  80, 100, 100, 100
	MOVE G6C,100,  30,  80, 100, 100, 100
	WAIT
	
	RETURN
'================================================