Results 1 to 6 of 6

Thread: What does the registerRead() command do?

  1. Question What does the registerRead() command do?

    I'm building some interface software between Processing and the ArmLink firmware and have sleuthed out what most everything does, but I can't figure out the registerRead() command. It appears to read the analog pins, but there's a separate command for that elsewhere.

    Here's my modified code:

    int readRegister() {
      int regIdCurrent = 0;
      int regNumCurrent = 0;
      int regLengthCurrent = 0;
      int regValCurrent = 0;
      // 0x81 = get register command
      sendPacket(regIdCurrent, regNumCurrent, regLengthCurrent, 0, 0, 0, 0, 0, 0x81);
      byte[] returnPacket = readFromArmFast(5);
      byte[] registerBytes = { returnPacket[3], returnPacket[2] };
      int registerVal   = bytesToInt(registerBytes);
    Help? And thanks!

  2. #2

    Re: What does the registerRead() command do?

    This sends a command to a particular destination to read back the register value.
    However, you're not telling us which arm, and which servos, you're using, so I can't tell any more than that from your question.
    Assuming this is trying to talk to Dynamixel servos, you'll want to fill in an ID of a servo in the arm for regIdCurrent, and the value/length of a particular servo register in regNumCurrent and regLengthCurrent.

    Dynamixel documents their servo registers here:

  3. Re: What does the registerRead() command do?

    Thanks, jwatte – I guess I wasn't clear. I don't know what a "register" is in this context, or why you would get info from it.

  4. #4

    Re: What does the registerRead() command do?

    I assume that the firmware reads the registers from the Dynamixel servos.
    The Dynamixel servo manuals I pointed at, document what all the registers are, which should give an idea as for why you might want to read them back.

    Examples of registers values available in Dynamixel servos include:
    - actual position
    - desired (target) position
    - moving velocity
    - temperature of motor
    - voltage seen by servo

    If you don't need to know any of this information, then you don't need to read back any registers.

  5. Re: What does the registerRead() command do?

    Thanks – they don't refer to them as registers in those documents, so I wanted to be sure that was right.

    Looking at the ones for the AX motors, if I wanted to get the temperature (for example), I need:

    • ID of my motor
    • Register number (which would be the address, right?) of 43 or 0x2B
    • Register length – is this the number of bytes expected back?

    Does that sound right?

  6. #6

    Re: What does the registerRead() command do?

    I haven't used that library, but that sounds right to me!
    The "present temperature" register (0x2B on AX-12) is one byte.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question(s) Arbotix FTDI command problem
    By sarendt in forum Software and Programming
    Replies: 2
    Last Post: 03-14-2011, 01:19 PM
  2. Question(s) HELP!!! How to send command to SSC-32 from ATmega 32 using CodeVision
    By gonzo in forum Software and Programming
    Replies: 10
    Last Post: 01-06-2011, 12:36 PM
  3. rc command airsoft guns
    By matterest in forum Mech Warfare
    Replies: 8
    Last Post: 01-22-2010, 08:20 PM
  4. News/Announcement Bioloid Command Line Utility
    By JonHylands in forum Robotics General Discussion
    Replies: 4
    Last Post: 01-10-2010, 05:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts