...
POST No. 2407283
There is no status packet!
2019-02-04 03:11:01 14231039

Hi,


I'm using opencm 904 and the extended board to control XM430-w350. I downloaded the example of workbench: BPS_change, but it cannot even to ping, it says "There is no status packet!", but it successfully initialize the motor baud rate to 1000000. as for other examples, at least they can initialize and ping.


Can anyone explain why? I really appreciate it.

2019-02-04 03:11:01
14231039
2019-02-04 03:16:16 Heran Shen

Here is the code, I did exactly the same for to initialize and ping the motor in all sketches, but in this one, it failed.



#include <DynamixelWorkbench.h>


#if defined(__OPENCM904__)

  #define DEVICE_NAME "3" //Dynamixel on Serial3(USART3)  <-OpenCM 485EXP

#elif defined(__OPENCR__)

  #define DEVICE_NAME ""

#endif   


#define BAUDRATE  1000000

#define DXL_ID 1

#define NEW_BAUDRATE 57600


DynamixelWorkbench dxl_wb;


void setup() 

{

  Serial.begin(57600);

  while(!Serial); // Wait for Opening Serial Monitor


  const char *log;

  bool result = false;


  uint8_t dxl_id = DXL_ID;

  uint32_t new_baud_rate = NEW_BAUDRATE;

  uint16_t model_number = 0;


  result = dxl_wb.init(DEVICE_NAME, BAUDRATE, &log);

  if (result == false)

  {

    Serial.println(log);

    Serial.println("Failed to init");

  }

  else

  {

    Serial.print("Succeeded to init : ");

    Serial.println(BAUDRATE);  

  }


  result = dxl_wb.ping(dxl_id, &model_number, &log);

  if (result == false)

  {

    Serial.println(log);

    Serial.println("Failed to ping");

  }

  else

  {

    Serial.println("Succeeded to ping");

    Serial.print("id : ");

    Serial.print(dxl_id);

    Serial.print(" model_number : ");

    Serial.println(model_number);

  }

  result = dxl_wb.changeBaudrate(dxl_id, new_baud_rate, &log);

  if (result == false)

  {

    Serial.println(log);

    return;

  }

  else

  {

    Serial.println(log);

  }


  return;

}


void loop() 

{


}

2019-02-04 03:16:16
14231039
2019-02-07 14:24:24 Will Son

Hi,


The default baudrate for XM430-W350 is 57600.

Once this example is successfully run, it'll change the baudrate to 1000000.

Therefore, you cannot successfully run this example again unless you manually change the baudrate back to 57600.

If you want to run it again, you can also modify the source code as below.


#define BAUDRATE  57600

#define DXL_ID 1

#define NEW_BAUDRATE 1000000

2019-02-07 14:24:24
willson
Reply
웹에디터 시작 웹 에디터 끝