Custom EtherCAT device
- RDA
- Offline
- Premium Member
Less
More
- Posts: 134
- Thank you received: 36
27 May 2023 20:35 #272285
by RDA
Replied by RDA on topic Custom EtherCAT device
This sounds interesting. I searched through digikey for stuff in stock but I wasn't able to find anything. Would you mind linking to a product?they have c2000 dev boards starting at $49, with ethercat onboard and a entire rtos library with encoder i2c etc for those boards.
check mouser and digikey
look at the launchxl boards they are designed specifically for robotics motor control etc.
Please Log in or Create an account to join the conversation.
- RDA
- Offline
- Premium Member
Less
More
- Posts: 134
- Thank you received: 36
27 May 2023 20:41 #272286
by RDA
Replied by RDA on topic Custom EtherCAT device
These are 2 different things, communicating with an ethercat slave controller from a mcu and checking a state of an input through the ethercat bus. These should not be mixed together. As even using example the LAN9252 or the Asix/TI chips would perform very differently. One is just a chip that handles the ethercat layer and you need to access through SPI and the 2 other have the ethercat layer and MCU's in the same chip.
Im sure the LAN9252 is also very fast if bootstrapped to IO mode, but its probably the slowest from all if you pair it with a MCU.
Im sure the LAN9252 is also very fast if bootstrapped to IO mode, but its probably the slowest from all if you pair it with a MCU.
The following user(s) said Thank You: Tady
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17859
- Thank you received: 4766
27 May 2023 22:48 - 27 May 2023 23:03 #272294
by PCW
Replied by PCW on topic Custom EtherCAT device
In any case the process data transfer time should not be terribly
significant relative to a normal servo thread time even with a LAN9252/53.
In SPI mode and 50 MHz clock you get about 6 MB/s transfer
so only about 16 usec for 100 bytes in indexed mode
This drops to 4 usec in QSPI mode and 2.5 usec in 16 bit bus mode
significant relative to a normal servo thread time even with a LAN9252/53.
In SPI mode and 50 MHz clock you get about 6 MB/s transfer
so only about 16 usec for 100 bytes in indexed mode
This drops to 4 usec in QSPI mode and 2.5 usec in 16 bit bus mode
Last edit: 27 May 2023 23:03 by PCW. Reason: wrong 16 bit bus timing
The following user(s) said Thank You: Tady, RDA
Please Log in or Create an account to join the conversation.
- Tady
- Offline
- Premium Member
Less
More
- Posts: 104
- Thank you received: 11
30 May 2023 08:12 #272484
by Tady
Replied by Tady on topic Custom EtherCAT device
Yea I'm aware of that. I would really just like to bring the SPI transfers down to under 1ms, so the data is "as fresh as possible". The LAN chip does all the Ethercat specufic stuff for us and it is fast. I checked with wireshark and there is no siginifican delay between packets. They get returned very fast, so that works
Please Log in or Create an account to join the conversation.
- rmu
- Offline
- Elite Member
Less
More
- Posts: 277
- Thank you received: 100
30 May 2023 08:27 #272485
by rmu
Replied by rmu on topic Custom EtherCAT device
you sure you are not messing up ms und µs somewhere? 6MB/s is 4 full (1500bytes) ethernet frames per millisecond.
Please Log in or Create an account to join the conversation.
- Tady
- Offline
- Premium Member
Less
More
- Posts: 104
- Thank you received: 11
30 May 2023 18:00 #272511
by Tady
Replied by Tady on topic Custom EtherCAT device
Yes I'm sure. I used a timer to measure in microseconds and I got about 1560. Like I said the library is very basic. And it does writes for every byte. Currently I'm using HAL in STM32Cube IDE and those SPI calls are a little bloated. For now I'm trying to interface with an Analog servo driver from SanyoDenki, so I'm not working on optimizations right now
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 687
- Thank you received: 123
30 May 2023 21:09 #272520
by smc.collins
Replied by smc.collins on topic Custom EtherCAT device
I didn't get a chance to review all the specifications, but here is A launchxl board, this should chop the forrest a bit for you
www.digikey.com/en/products/detail/texas...CHXL-F28069M/5138373
www.digikey.com/en/products/detail/texas...CHXL-F28069M/5138373
Please Log in or Create an account to join the conversation.
- RDA
- Offline
- Premium Member
Less
More
- Posts: 134
- Thank you received: 36
31 May 2023 10:07 #272542
by RDA
Replied by RDA on topic Custom EtherCAT device
Thanks, as far as I can see the TMS320F28069 does not have ethercat. It only has the standard stuff like uart, spi, can..
The ones I was able to dig seem to be out of stock.
Its always nice to know there are options.
The ones I was able to dig seem to be out of stock.
Its always nice to know there are options.
Please Log in or Create an account to join the conversation.
- Tady
- Offline
- Premium Member
Less
More
- Posts: 104
- Thank you received: 11
10 Jun 2023 08:01 #273259
by Tady
Replied by Tady on topic Custom EtherCAT device
Non of the MCU has EtherCAT support via hardware you always need to use an ASIC. Tipically it connects via SPI or QSPI. With an Application Specific Integrated Circuit you can use the MCU for exchanging the data with the master and soing other stuff whil minimizing latency and jitter on the bus itself. Because the ASIC is responsible to recieve the packets on one port and while extracting data it also forwards the packet to the output port for the next slave.
I succesfully made the slave and interfaced it with an analog servo.
I setup the machine so one turn of the motor represents 4mm of movement eith this I achived 14m/min speed vith 0.1mm error while moving. This was dons only with FF1 and P tunning. If I spet more time on this I could lower the error. The movement is smooth without any problems
I succesfully made the slave and interfaced it with an analog servo.
I setup the machine so one turn of the motor represents 4mm of movement eith this I achived 14m/min speed vith 0.1mm error while moving. This was dons only with FF1 and P tunning. If I spet more time on this I could lower the error. The movement is smooth without any problems
Please Log in or Create an account to join the conversation.
- rft
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 6
13 Jun 2023 17:25 #273499
by rft
Replied by rft on topic Custom EtherCAT device
would it be possible to use the EtherCAT LAN9252 without a MCU and have the I/O directly at the chip like in the Datasheet "Digital I/O Mode"?
This would provide 16 very fast I/O at minimal cost. (10$ for the chip, maybe 20$ for the PCB and other components)
There is also the very similar LAN9254 with 32 I/O pins, for a 12$ per chip.
Directly output the Step/Dir signal from the LAN chip into the stepper drivers (obviously some opto-couplers and such in between).
I think this would be a elegant solution, as all the software would be on the LCNC side and no additional latency added.
This would provide 16 very fast I/O at minimal cost. (10$ for the chip, maybe 20$ for the PCB and other components)
There is also the very similar LAN9254 with 32 I/O pins, for a 12$ per chip.
Directly output the Step/Dir signal from the LAN chip into the stepper drivers (obviously some opto-couplers and such in between).
I think this would be a elegant solution, as all the software would be on the LCNC side and no additional latency added.
Please Log in or Create an account to join the conversation.
Time to create page: 0.088 seconds