Code Monkey home page Code Monkey logo

Comments (6)

LegacyMecha avatar LegacyMecha commented on May 28, 2024 1

I've been dealing with 20+ Dynamixels on Teensy 4.0 too and works great without Sync Read. Maybe possible that your RX serial buffer is getting overflowed? If you don't read the incoming data fast enough, just a few Dynamixel's data will fill it up fast. Just a thought. Also, try higher baud rate (2mb+) and set the Dynamixels "Reply Delay" to 20us (value of 10), instead of the default 500us (250).

Consider if you are at 2mb baud rate, you can still command one by one and be pretty fast, probably send 30 commands in less than 10ms maybe (haven't done the actually calculation, just an estimate) if you set the "Reply Delay" down to 20us.

I also only send commands to Dynamixels that have updated data to send.

Just some ideas. Hope it helps.

from dynamixel2arduino.

ROBOTIS-Will avatar ROBOTIS-Will commented on May 28, 2024

Hi @drachezoil ,
I'm not sure how you connected DYNAMIXEL to Teensy, but it could be the timing issue of your direction switching.
DYNAMIXEL is asynchronous communication that can only listens or speak at a time.
Also, if you are using TTL(3pin) DYNAMIXEL, please note that DYNAMIXEL uses 5V level TTL signal.
3.3V may be just enough for High level, but cannot guarantee its stability.
Thank you.

from dynamixel2arduino.

drachezoil avatar drachezoil commented on May 28, 2024

Hi Will,
Completely forgot that for sure.
But I don't think it's the problème.
I a using rs485 communication, no 3.3v problem.
For example if I sync read the hardware error item on 30 dynamixel every 10s, that works for 5-6 time at the beginning then little by little only one dynamixel give me answers.
Is that an half duplex asynchronous communication problem? In this case sync read shouldn't exist because more than one slave will always collide no?
When you do a sync read each servo have 10ms(timeout) to answer before the next one start emitting? In this case I could increase the timeout to make sure each of them have enough time to answer but that mean we definitely need a non blocking answer pulling

from dynamixel2arduino.

ROBOTIS-Will avatar ROBOTIS-Will commented on May 28, 2024

Hi,
Based on an assumption that you are correctly following the hardware specification of RS-485 communication, when sync read instruction is transmitted, each DYNAMIXEL responds to the controller on their turn and it doesn't take 10ms, but much faster.
The controller has to properly collect all the message from each DYNAMIXEL until the end(or timeout) to transmit the next packet (because it is asynchronous).
If you have devices to visualize these signal (such as logic analyzer or oscilloscope), you might be able to see where the communication error occurs.
Thank you.

from dynamixel2arduino.

drachezoil avatar drachezoil commented on May 28, 2024

I don't have any logic analyzer yet, soon.
In the meantime I decided to read the error only when I don't do any critical task with a normal readfromcontroltable.
I have an other question, do we get a status packet back of each dynamixel when we do a syncwrite?
If yes I could pull the error flag(alert bit) to then check only the ones that may have a problem.
What will be the best solution for that?
From what I understand on the syncWrite function you call this line:
p_port_->write(p_packet_buf_, info_tx_packet_.generated_packet_length);
is that waiting for any answer or just transmitting and not receiving?

from dynamixel2arduino.

ROBOTIS-Will avatar ROBOTIS-Will commented on May 28, 2024

Unlike write instruction, syncWrite does not collect response packet as DYNAMIXELs do not return status packets when receiving the syncWrite instruction.
The timeout in the write() function is to prevent holding the tx buffer if there's an error.

from dynamixel2arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.