Is P-Series has multi clear function like X-Series & MX-Series in Dynamixel SDK?

Hi,

My P-Series working on expended position mode , servos can turn more than 1 circle, and X-Series & MX-Series has clearMultiTurn() function in Dynamixel SDK to reset position to 1 circle value.

I wanna reset P-Series position data in expend position mode.
Now my way is turn off servo torque and change operating to position mode then change back to reset position value, but it’s not smart way and too danguarious.

So is this function probaly support P-Series in future ?

thanks

The ClearMultiTurn() function supports all 2.0 protocol DYNAMIXEL actuators, including DYNAMIXEL P series.

Hi Jonathon

Thanks your reply.

But I test ClearMultiTurn() in H42-20-S300-R it’s always not work, I get the error message.

[RxPacketError] Hardware error occurred. Check the error at Control Table (Hardware Error Status)!

Here is my test code, I set H42 to position 0 & position 910635 (this value may turn 1.5 circle), using ClearMultiTurn() after turn to position 910635 then turn back to positon 0, if this success, present position value must reset position 910635 to 1 circle’s value, then turn 0.5 circle to position 0, not turn back 1.5 circle to position 0.

# !/usr/bin/env python

# DYNAMIXEL PRO H42-20-S300-R
# Model Number : 51201 (H42-20-S300-R(A))
# Firmware Version : 13
# ID : 1
# BaurRate : 57600

from dynamixel_sdk import *

port = PortHandler('COM15')

packet = PacketHandler(2.0)

if port.openPort():
    print("port open")

port.setBaudRate(57600)

# change to position mode & reset position value
packet.write1ByteTxRx(port, 1, 11, 3)

# change to extendend position mode
packet.write1ByteTxRx(port, 1, 11, 4)

# torque on
packet.write1ByteTxRx(port, 1, 512, 1)

# move to position 0
packet.write4ByteTxRx(port, 1, 564, 0)
while 1:
    pos, result, error = packet.read4ByteTxRx(port, 1, 580)
    print(pos)
    if pos == 0:
        break

# move to position 910635
packet.write4ByteTxRx(port, 1, 564, 910635)
while 1:
    pos, result, error = packet.read4ByteTxRx(port, 1, 580)
    print(pos)
    if pos == 910635:
        break

time.sleep(1)

# clear multiturn function & show present position
result, error = packet.clearMultiTurn(port, 1)
print("%s" % packet.getTxRxResult(result))
print("%s" % packet.getRxPacketError(error))

pos, result, error = packet.read4ByteTxRx(port, 1, 580)
print(pos)

# move to position 0
packet.write4ByteTxRx(port, 1, 564, 0)
while 1:
    pos, result, error = packet.read4ByteTxRx(port, 1, 580)
    print(pos)
    if pos == 0:
        break

# torque off
packet.write1ByteTxRx(port, 1, 512, 0)```

You indicated that you are receiving the following error:

[RxPacketError] Hardware error occurred. Check the error at Control Table (Hardware Error Status)!

When you get this error, what is the value of the Hardware Error Status (518) control table item? That may help us to determine what is going wrong here.

Oh, I think the error :

[RxPacketError] Hardware error occurred. Check the error at Control Table (Hardware Error Status)!

is cause my voltage using 12V, I changed to 24V, error no show.
Then I run test code again
ClearMultiTurn() call back error :

[RxPacketError] Undefined instruction or incorrect instruction!

So I using Dynamixel Wizard 2.0 Packet Tool to check detail infomation

Send clear() instruction, status return

0x02 : Instruiction

clear status

Then send read() address 518, status return

0x00 : No Error

read status