2
\$\begingroup\$

I need to issue position setpoint commands to a servo drive 50 times/sec. The drive will be responsible for closing the PID loop, etc, while the motion controller I'm developing will handle generating the setpoints to follow a custom trajectory.

I have the option of using Modbus TCP to communicate with the drive but worry that latency issues may arise when sending setpoints so frequently. Is Modbus suitable for such an application or should I consider another protocol such as CANopen? Or do I need to rethink my approach all together?

\$\endgroup\$
2
  • \$\begingroup\$ Recommend looking into EtherCat / ProfiNet \$\endgroup\$ Commented Feb 1 at 14:17
  • \$\begingroup\$ Also, if you link the drive you want to use? \$\endgroup\$ Commented Feb 1 at 14:27

2 Answers 2

3
\$\begingroup\$

TCP/IP based systems are not real-time systems. There are no guarantees that packets will arrive in a timely manner, or at all. Therefore it is considered unsuitable for real-time control. As for the original Modbus, it is very dated and people stopped phasing it out in favour for either for Profibus (nowadays dated too) or CAN in the 1990s.

CANopen would work fine, as would a less complex CAN protocol. CAN is pretty much 100% real-time deterministic. CANopen also has the handy PDO SYNC mechanism, where a node can sent out a message to be used as a low resolution synchronization mechanism, if you have multiple nodes that need to change their outputs at the same time.

\$\endgroup\$
10
  • \$\begingroup\$ I suspected that may be the case. How would CAN fare if we were to send the position, say, 1000/sec? Are there any PLC motion modules that implement motion control in this way (i.e. generate the setpoint on the PLC side, and transmit to drive)? \$\endgroup\$
    – 19172281
    Commented Feb 1 at 12:51
  • 1
    \$\begingroup\$ @19172281 Timing considerations mostly depends on how many nodes that send on the bus simultaneously. Once per 10ms or once per 100ms is standard. You could go faster still, but then you have to do the homework and calculate how long it takes to send the frame itself. If sending at 1m periods then the frame transmission time in itself needs to be taken in account. As for what PLC modules there are, I have no idea since I only work with microcontrollers. PLC in themselves tend to be sluggish. What kind of object are you controlling? \$\endgroup\$
    – Lundin
    Commented Feb 1 at 12:56
  • \$\begingroup\$ I'm controlling 6 servo linear actuators that drive a Stewart platform. Smooth motion (high setpoint generation frequency) is essential which is why is why I wanted to get an understanding of the limitations of Modbus, CAN, etc. I imagine 50hz would be sufficient. \$\endgroup\$
    – 19172281
    Commented Feb 1 at 13:09
  • \$\begingroup\$ @19172281 In that case you'll most definitely want to use a sync mechanism as mentioned in this answer, to ensure that each actuator is moving at the same time as the rest of them. \$\endgroup\$
    – Lundin
    Commented Feb 1 at 14:45
  • 1
    \$\begingroup\$ @MrGerber Around year 2007 I was involved in a project developing a Profibus DP product. Back then, Profibus DP had maybe 40-50% of this whole pie chart and Modbus something like 10% perhaps. The Profibus DP product sold nicely when it was new, but nowadays we sell a trinkle of a few units per year. These are rapidly dying technologies and good riddance. The only reason it stayed alive well past the best-before date is becaues Siemens were always pushing for Profibus. (Which in turn is the only reason for Profinet at all existing as well.) We only need two buses: CAN based and Ethernet based. \$\endgroup\$
    – Lundin
    Commented Feb 9 at 7:43
3
\$\begingroup\$

Have a look at the CiA 402 specification. It's a widely adopted (at least in Europe) standard for drives and motion control.

We've implemented several CANopen and EtherCAT servo drives using the CiA 402 device profile. Depending on the CAN bus length (which is a limiting factor for the maximum baudrate) and number of nodes, you'd be able to achieve update rates between 100 Hz and 1 kHz.

Higher update rates are achievable when using EtherCAT. It's a ethernet based real-time fieldbus. But quite a bit more complex. If CANopen suffices, I'd stick to that.

Are there any PLC motion modules that implement motion control in this way (i.e. generate the setpoint on the PLC side, and transmit to drive)?

Some of our customers use CODESYS Softmotion (CANopen and EtherCAT) or TwinCAT (EtherCAT).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.