Results 1 to 5 of 5

Thread: RC100 data packets

  1. RC100 data packets

    Hi everyone,

    I'm trying to run the CM-530 by sending commands from teensy 3.2 , I am generaly using the RC100 communication packets described in robotis manual but I can't get all the buttons values to work. The problem is I can't understand exactly how to structure the low and high byte part of the data. Is there any way I can see the values being send from the RC100 or if you know how to convert the buttons value for example U + 4 = 129 => to communication data format in hex.

    Thanks.

  2. #2
    Join Date
    May 2016
    Location
    White Plains, NY
    Posts
    124
    Images
    1
    Rep Power
    16

    Re: RC100 data packets

    Can you show me more details? I think you want ( hi-value << 8 ) | Low-value, but I may be misinterpreting your question

  3. #3

    Re: RC100 data packets

    Sorry I did not see this question back then... Also not sure if you are still up here. Would have suggested to take this up on either PJRC forum and/or Robotis forum.

    Awhile ago when I was playing with that controller. I had a simple sketch:
    Code:
    uint8_t input_line[20];
    uint8_t input_count = 0;
    uint32_t last_packet;
    
    void setup() {
      Serial.begin(115200);
      Serial2.begin(57600);
      pinMode(BOARD_LED_PIN, OUTPUT);
      last_packet = millis();
    }
    
    void loop() {
      if (Serial.available()) {
        Serial2.print((char)Serial.read());//send data coming from USB to Serial2
      }
    
      if (Serial2.available()) {
        input_count = 0;
        uint32_t delta_time_between_packets = millis() - last_packet;
        last_packet = millis();
        uint32_t time_first_byte = last_packet;
        uint32_t time_last_input = last_packet;
    
        while (((millis() - time_last_input) < 15) && (input_count < 6)) {
          if (Serial2.available()) {
            input_line[input_count++] = Serial2.read();
            toggleLED();
            time_last_input = millis();
          }
        }
        uint32_t delta_time_packet = millis() - time_first_byte;
        Serial.print(delta_time_between_packets, DEC);
        Serial.print(" ");
        Serial.print(delta_time_packet, DEC);
        Serial.print(": ");
        for (uint8_t i = 0; i < input_count; i++) {
          Serial.print(input_line[i], HEX);
          Serial.print(" ");
        }
        Serial.print(": ");
        for (uint8_t i = 0; i < input_count; i++) {
          if ((input_line[i] >= ' ') && (input_line[i] <= '|'))
            Serial.print((char)input_line[i]);
          else
            Serial.print(".");
        }
        Serial.println();
      }
    }
    That I played with to get an idea of what the controller sent. Don't remember exactly what the data was... But running a simple sketch with that on T3.2 you should be pretty simple to emulate.

    If you look at their documentation: https://emanual.robotis.com/docs/en/...cation/rc-100/

    You will see in Section 9: that U+4 would compute to the data being sent: as 129 (U=1 + 4=128).
    So 129 in hex is: 0x81 So Data_L = 0x81 and Data_H = 0

    So packet (Section 10) should probably be something like: FF 55 81 7E 00 FF

  4. Re: RC100 data packets

    Hi,
    For example R + 4 which in data is 8 + 128 = 136 then i convert it to hex => 88 so the data packet should be 0xFF 0x55 0x88 and what about the last bits? . Another thing I don't undestand is ~ represents Inverse (1’s Complement) ?


    So packet (Section 10) should probably be something like: FF 55 81 7E 00 FF
    That's the thing i'm not sure what values and how to construct last 3 bits. I know that the value converted to hex must go after [FF] [55] [HERE] but what about [~Data_L] [DATA_H ] [~DATA_H] ?


    I will play around with that sketch when I have time. Very useful.


    Thanks.

  5. #5

    Re: RC100 data packets

    ~ is the C/C++ bitwise-not operator. Yes, this is "1's complement"

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Question(s) Dynamixels AX-12A on OpenCM 9.04 + OpenCM 485: how to send instruction packets
    By Daisuke71 in forum DYNAMIXEL & Robot Actuators
    Replies: 5
    Last Post: 05-21-2019, 06:44 PM
  2. Question(s) MX-64AR not responding to instruction packets
    By kammce in forum DYNAMIXEL & Robot Actuators
    Replies: 7
    Last Post: 04-02-2015, 11:40 AM
  3. Question(s) Data Center?
    By Ruskie in forum Software and Programming
    Replies: 3
    Last Post: 03-28-2012, 09:46 PM
  4. Question(s) Getting Data In !
    By flybythemoon in forum Arbotix, Microcontrollers, Arduino
    Replies: 8
    Last Post: 06-20-2008, 07:37 AM

Posting Permissions

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