Add CanBus support
Moderators: TomKerekes, dynomotion
Add CanBus support
Hello,
Any chance to add canbus communication protocol to kflop?
Regards
Albert
Any chance to add canbus communication protocol to kflop?
Regards
Albert
- TomKerekes
- Posts: 2868
- Joined: Mon Dec 04, 2017 1:49 am
Re: Add CanBus support
Hi Albert,
That would probably be difficult. I think the CAN Bus uses special 11-bit/29-bit data frames. The UART on KFLOP is fixed at 10-bits.
What would you intend to use it for?
That would probably be difficult. I think the CAN Bus uses special 11-bit/29-bit data frames. The UART on KFLOP is fixed at 10-bits.
What would you intend to use it for?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Add CanBus support
Hi Tom
I know this is an old post but is it possible the Kogna could support can bus? A lot of small robotics motors with integral drives and gearing are becoming available, such as used in cobots and robot dogs, mostly with can bus... Some motors do do have modbus option, but I haven't explored that yet, though I have seen the example c program...
I know this is an old post but is it possible the Kogna could support can bus? A lot of small robotics motors with integral drives and gearing are becoming available, such as used in cobots and robot dogs, mostly with can bus... Some motors do do have modbus option, but I haven't explored that yet, though I have seen the example c program...
- TomKerekes
- Posts: 2868
- Joined: Mon Dec 04, 2017 1:49 am
Re: Add CanBus support
Hi Gerald,
It seems Can Bus is very specialized with longer data frames, collision detection, CRC, NRZ with bit stuffing, etc.
Kogna has significant space available in its FPGA so I suppose a controller could be implemented.
Here is one on Github:
https://github.com/keesj/can-hdl/tree/master
Here is a LVTTL to CAN Bus Transceiver chip.
https://www.ti.com/product/TCAN3403-Q1
Do you have a specific motor Drive in mind and its protocol?
If you were willing to do debugging/scoping we might look into it.
It seems Can Bus is very specialized with longer data frames, collision detection, CRC, NRZ with bit stuffing, etc.
Kogna has significant space available in its FPGA so I suppose a controller could be implemented.
Here is one on Github:
https://github.com/keesj/can-hdl/tree/master
Here is a LVTTL to CAN Bus Transceiver chip.
https://www.ti.com/product/TCAN3403-Q1
Do you have a specific motor Drive in mind and its protocol?
If you were willing to do debugging/scoping we might look into it.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Add CanBus support
Hi thanks
I'm looking at a few options, some have can bus, some mod bus. Which would be easier to implement? I have not experience with any of these bus controls, so I'm not sure how motor specific the coding would need to be?
However, I'm interested in taking advantage of the absolute encoders in these devices, ie. using it to retain position after shut down for example.
This is an example with pricing... at present AUD $597. (add %134 or some other random increase for USA !!!)
https://www.alibaba.com/product-detail/ ... 34128.html
With EtherCAT, CANopen, Modbus communication protocols.
Position,Speed, Current loop PID adjustable in real-time.
Built-in ± 10V analog input.
Pulse and direction, I/O, RS485,
External encoder and STO interface,
Looks like this is the company that actually makes the gears...
https://www.laifual-drive.com/product/l ... eries.html
Also there are also a bunch of options from o-drive which could be looked at.. but only can-bus. They make some motors integrated with planetary gears, not so precise maybe, but good enough for robot dogs etc..
https://odriverobotics.com/
I'm looking at a few options, some have can bus, some mod bus. Which would be easier to implement? I have not experience with any of these bus controls, so I'm not sure how motor specific the coding would need to be?
However, I'm interested in taking advantage of the absolute encoders in these devices, ie. using it to retain position after shut down for example.
This is an example with pricing... at present AUD $597. (add %134 or some other random increase for USA !!!)
https://www.alibaba.com/product-detail/ ... 34128.html
With EtherCAT, CANopen, Modbus communication protocols.
Position,Speed, Current loop PID adjustable in real-time.
Built-in ± 10V analog input.
Pulse and direction, I/O, RS485,
External encoder and STO interface,
Looks like this is the company that actually makes the gears...
https://www.laifual-drive.com/product/l ... eries.html
Also there are also a bunch of options from o-drive which could be looked at.. but only can-bus. They make some motors integrated with planetary gears, not so precise maybe, but good enough for robot dogs etc..
https://odriverobotics.com/
- TomKerekes
- Posts: 2868
- Joined: Mon Dec 04, 2017 1:49 am
Re: Add CanBus support
Wow very impressive.
But its not clear how modbus or can bus would do smooth coordinated motion. Normally the communication time is relatively long. So its not clear how something like a command of "go here" every few milliseconds would work. I don't see any specification on the can bus or modbus commands format or commands available. It seems they support Step/Direction or +/-10V analog.
But its not clear how modbus or can bus would do smooth coordinated motion. Normally the communication time is relatively long. So its not clear how something like a command of "go here" every few milliseconds would work. I don't see any specification on the can bus or modbus commands format or commands available. It seems they support Step/Direction or +/-10V analog.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Add CanBus support
Can and Modbus aren't much use for coordinated motion, or at least fast coordinated motion.
I ran the numbers for Modbus a while ago, and IIRC even at 112kbps, with 3 drives you were running over 10ms cycle time.
Actually, just dug out my notes. Leadshine list a single message cycle time of 3.08ms at 112kpbs, however each drive takes more than one message, so on a 3 axis machine, refresh time is going to be around 20ms, assuming two messages per drive.
CanOpen is something I've not tried, but a quick search turns up AMCs guide ( https://www.a-m-c.com/experience/techno ... n/canopen/ ) where it mentions that although it's capable of a 1khz update time, typical response time is 130ms.
EtherCAT on the other hand, is very much a realtime option, and is something I would really love to use (The ability to simply use network cables, and connect IO directly to drives is very appealing!), but the controller options are limited. I have a set of EtherCAT steppers, and have experimented with it, but the controller options have meant I've never implemented it on anything.
I ran the numbers for Modbus a while ago, and IIRC even at 112kbps, with 3 drives you were running over 10ms cycle time.
Actually, just dug out my notes. Leadshine list a single message cycle time of 3.08ms at 112kpbs, however each drive takes more than one message, so on a 3 axis machine, refresh time is going to be around 20ms, assuming two messages per drive.
CanOpen is something I've not tried, but a quick search turns up AMCs guide ( https://www.a-m-c.com/experience/techno ... n/canopen/ ) where it mentions that although it's capable of a 1khz update time, typical response time is 130ms.
EtherCAT on the other hand, is very much a realtime option, and is something I would really love to use (The ability to simply use network cables, and connect IO directly to drives is very appealing!), but the controller options are limited. I have a set of EtherCAT steppers, and have experimented with it, but the controller options have meant I've never implemented it on anything.
Re: Add CanBus support
Interesting. I had wondered about update rates. So sounds like canbus or modbus could only be used with limitations.
And the more axes the slower the update?
Re those specific Laifual motors Tom, I have contacted the manufacturer for detail on the protocols. At present, they support with Canopen and Ethercat. They sent me a manual which describes how to use a Beckhoff Twincat Controller with their software to setup and do basic stuff with the motor. Not sure if the low level info is available?
Potentially Ethercat sounds good, but how to connect when there is no ethernet?
Perhaps use a serial link from kflop/kogna to a processor which communicates with the ethernet link? Or might it need a commercial interface unit?
And the more axes the slower the update?
Re those specific Laifual motors Tom, I have contacted the manufacturer for detail on the protocols. At present, they support with Canopen and Ethercat. They sent me a manual which describes how to use a Beckhoff Twincat Controller with their software to setup and do basic stuff with the motor. Not sure if the low level info is available?
Potentially Ethercat sounds good, but how to connect when there is no ethernet?
Perhaps use a serial link from kflop/kogna to a processor which communicates with the ethernet link? Or might it need a commercial interface unit?
Re: Add CanBus support
With Modbus and CAN, the more devices, the slower the refresh, as each device needs addressed individually from the master.
They're protocols that are more suited for long distance control, in things like production lines where highly precise timing isn't required.
They're protocols that are more suited for long distance control, in things like production lines where highly precise timing isn't required.
Re: Add CanBus support
It is sounding like EtherCat is the only option - unfortunately needs an ethernet connection. 
So external translator would be needed... is there anything existing that could be put to use?
So external translator would be needed... is there anything existing that could be put to use?