wolram
Oct14-05, 09:16 AM
Please can any one see an error.
'################################################# #############################
'Start Position: The Sted-E-Man needs a strat sequence to set the legs in the
'correct position. Unless the servo positions are known, the feet could clash
'on first start-up or reset and cause damage to the walker.
'################################################# #############################
Dim Left_Hip As New oServo 'Left hip servo set
Dim Right_Hip As New oServo 'Right hip servo set
Dim Right_Foot As New oServo 'Right foot servo set
Dim Left_Foot As New oServo 'Left foot servo set
'************************************************* *****************************
Sub Main()
'################################################# ##############
'This is the first routine that is entered on start up or reset.
'################################################# ##############
Left_Hip.IOLine = 14 'Left Hip servo IOLine
Left_Hip.Center = 27 'Center position
Left_Hip.Operate = CVTrue 'Servo object turns on
Right_Hip.IOLine = 12 'Right Hip servo IOLine
Right_Hip.Center = 27 'Center position
Right_Hip.Operate = CVTrue 'Servo object turns on
Right_Foot.IOLine = 10 'Right foot servo IOLine
Right_Foot.Center = 30 'Center position
Right_Foot.Operate = CVTrue 'Servo object turns on
Left_Foot.IOLine = 8 'Left foot servo IOLine
Left_Foot.Center = 28 'Center position
'Left_Foot.Operate = CVTrue 'Servo oject turns on
Call Start_Pos 'Call the start position for all servos
oopic.delay = 300 '3 second delay for Sted-E-Man positioning
End Sub
'************************************************* *****************************
Sub Start_Pos()
'################################################# ###############
'A routine to set the start position is needed otherwise the
'Sted-E-Man's feet could clash damaging the robot.
'################################################# ###############
Right_Foot.Value = 0 'Move Right Foot outwards full
oopic.delay = 200 '2 second delay
Left_Foot.Operate = CVTrue 'Servo oject turns on
Left_Foot.value = 56 'Move Left Foot outwards full
oopic.delay = 200 '2 second delay
Left_Hip.Value = 27 'Move the Hip servos to start
oopic.delay = 200 '2 second delay
Right_hip.Value = 10 'position
oopic.delay = 200 '2 second delay
'Right_Foot.Value = 30 'Move Right foot to start position
'Left_Foot.Value = 28 'Move left foot to start position
End Sub
'************************************************* *************
'################################################# #############################
'Start Position: The Sted-E-Man needs a strat sequence to set the legs in the
'correct position. Unless the servo positions are known, the feet could clash
'on first start-up or reset and cause damage to the walker.
'################################################# #############################
Dim Left_Hip As New oServo 'Left hip servo set
Dim Right_Hip As New oServo 'Right hip servo set
Dim Right_Foot As New oServo 'Right foot servo set
Dim Left_Foot As New oServo 'Left foot servo set
'************************************************* *****************************
Sub Main()
'################################################# ##############
'This is the first routine that is entered on start up or reset.
'################################################# ##############
Left_Hip.IOLine = 14 'Left Hip servo IOLine
Left_Hip.Center = 27 'Center position
Left_Hip.Operate = CVTrue 'Servo object turns on
Right_Hip.IOLine = 12 'Right Hip servo IOLine
Right_Hip.Center = 27 'Center position
Right_Hip.Operate = CVTrue 'Servo object turns on
Right_Foot.IOLine = 10 'Right foot servo IOLine
Right_Foot.Center = 30 'Center position
Right_Foot.Operate = CVTrue 'Servo object turns on
Left_Foot.IOLine = 8 'Left foot servo IOLine
Left_Foot.Center = 28 'Center position
'Left_Foot.Operate = CVTrue 'Servo oject turns on
Call Start_Pos 'Call the start position for all servos
oopic.delay = 300 '3 second delay for Sted-E-Man positioning
End Sub
'************************************************* *****************************
Sub Start_Pos()
'################################################# ###############
'A routine to set the start position is needed otherwise the
'Sted-E-Man's feet could clash damaging the robot.
'################################################# ###############
Right_Foot.Value = 0 'Move Right Foot outwards full
oopic.delay = 200 '2 second delay
Left_Foot.Operate = CVTrue 'Servo oject turns on
Left_Foot.value = 56 'Move Left Foot outwards full
oopic.delay = 200 '2 second delay
Left_Hip.Value = 27 'Move the Hip servos to start
oopic.delay = 200 '2 second delay
Right_hip.Value = 10 'position
oopic.delay = 200 '2 second delay
'Right_Foot.Value = 30 'Move Right foot to start position
'Left_Foot.Value = 28 'Move left foot to start position
End Sub
'************************************************* *************