loading
 
Servo AX dynamixel is not moving
Nurul Fuad from Australia  [13 posts]
1 year
Hi Steven,

Currently, I have problem in connecting AX 12 Dynamixel servo. The servo is being recognized by RR however, when I did some programming to turn servo into certain angle, it did not work.

I use VBS script function.

This is my program that I have made and use the mean intensity value to move the servo.

___________________________________________________________________

'Get servo variables

meanIntensity = GetVariable ("MEAN_INTENSITY")
SetVariable "CENTRE", 512

'Servo rotate according to mean intensity value

if meanIntensity < 126 then

Position_New= CENTRE + 100

end if

SetVariable "Position_New", Position_New

__________________________________________________________________

Questions:

1. What are the possible reasons for the servo is not moving?
2. Do I have to everytime check on the Robotis Dynamixel function before doing any programming coding in VBS script?
3. Does the coding above is correct?

Your help are highly appreciated.

Thanks
Steven Gentner from United States  [1371 posts] 1 year
Nurul,

There are a couple mistakes in the script that you included. I think there might be some confusion with regards to the memory space of the VBScript module and the memory of RR. Since the VBScript runs in its own space it needs to use the Get and Set Variable functions to move data into and out of RR space. Without that setting or getting the information will not move correctly into RR. I think what you want to use is

---------

'Get servo variables

meanIntensity = GetVariable ("MEAN_INTENSITY")

'Servo rotate according to mean intensity value
if meanIntensity < 126 then

Position_New= 512 + 100

else

Position_New= 512 - 100

end if

SetVariable "Position_New", Position_New

---------

since the CENTRE variable is not being set as a VBScript variable. I assume you are using Position_New variable in the Dynamixel module right?

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index