how to read servo position in visual basic? thx
i know how to move the servo (mscomm.ouput "#3 p1500) etc but how do read the position?
thx in advance
how to read servo position in visual basic? thx
i know how to move the servo (mscomm.ouput "#3 p1500) etc but how do read the position?
thx in advance
I don’t believe you can read position of a servo unless its a special robonova servo. They have position feedback.
thanks for the answer…i just store the starting position in a variable and then move by increasing and decreasing the value…that way i can sort of keep its position…
thx
I think he is using an SSC-32 here. I think the SSC-32 does store the servo position which can be read back, but I may be wrong on this. I don’t have an SSC-32 to play with yet, but am getting one next month.
8-Dale
It does store it in a variable I think, but im not sure the firmware allows you to access it. You could modify the firmware to like dump out the servo positions when you send it a “D” for example but thats too much work. Its easier to create an array in VB of all the positions and update that. You could even create a special function in VB which will update array and send to SSC.
I don’t believe you can read position of a servo unless its a special robonova servo. They have position feedback.
I found this in the SSC-32 manual:
QP
This will return a single byte (in binary format) indicating the pulse width of the selected
servo with a resolution of 10uS. For example, if the pulse width is 1500uS, the returned
byte would be 150 (binary).
Multiple servos may be queried in the same command. The return value will be one byte
per servo. There will be a delay of least 50uS to 5mS before the response is sent.
Typically the response will be started within 100uS.
So, it appears one can read back the servo position from the SSC-32.
8-Dale
Guess you can Still easier, and faster, to have it built into your code.
Guess you can
Still easier, and faster, to have it built into your code.
That is true, but it’s good to know there are options. Sometimes code might get large enough that there is no room for more data to be stored so it is nice that the SSC-32 stores the info and it can be read back.
8-Dale
You may be missing the point. You can read the servo position while it is moving! This is different than just asking the SSC-32 where the servo was last commanded to.
You may be missing the point. You can read the servo position while it is moving!
This is different than just asking the SSC-32 where the servo was last commanded to.
That’s even better!
8-Dale