Custom EtherCAT device

More
19 May 2023 17:47 #271682 by Tady
Custom EtherCAT device was created by Tady
Hello everyone
For hobby purposes I made two EtherCAT salve devices that are built around the LAN9252 and STM32.
The slaves work great in TwinCAT. They make some dummy data and I can toggle some LEDs on the board.
I have a custom XML that describe the slaves but now I would like to know how to create the XML file that LinuxCNC EtherCAT driver needs
How can I make it? Can I use TwinCAT and export the project? 
I'm  a total beginner in EtherCAT so any help is appreciated 
Thank you!

Please Log in or Create an account to join the conversation.

More
19 May 2023 20:02 #271690 by rodw
Replied by rodw on topic Custom EtherCAT device
Thats pretty cool.
Here is an example config for a I/O module without docs
github.com/rodw-au/linuxcnc-cia402/blob/...ercat-conf-diewu.xml
if you type Ethercat slaves and then Ethercat pdos
You should have all the info you need to make a custom xml file for linuxcnc
That's how we created this one

When can I order a version that has an encoder input ? :)
The following user(s) said Thank You: besriworld, Tady

Please Log in or Create an account to join the conversation.

More
19 May 2023 20:09 #271691 by Tady
Replied by Tady on topic Custom EtherCAT device
Are these XML files created by hand or are they exported from a program ( like TwinCAT)?
I based my project from this... I made two of these boards and they work, but the firmware is not from this repo.
github.com/DieBieEngineering/DieBieSlave
Hehe... you need slaves that support encoder input only?
That should not be a problem. The challenge is making one of these boards. This really pushed my limits. Those 0.4x0.2mm caps and resistors really take A LOT of concentration and percision to solder. You really need a heat bed for reflow soldering, flox, solder paste. It took me 10 hours to make one :)
Maybe we need a different design that uses 0805 size resistors and caps :)
The following user(s) said Thank You: besriworld

Please Log in or Create an account to join the conversation.

More
19 May 2023 23:10 #271701 by rodw
Replied by rodw on topic Custom EtherCAT device
Well it could have some simple I/O too. the Cheap chinese I/O boards work well but there are few with  encoder inputs and Beckhoff is expensive!And maybe a 0-10 volt analog input that could handle plasma cutting!

I looked at that project too and had somebody who could do the board design and the manufacture something all in one unit..

You will have to write your own XML by hand using that one as a template. It should not be hard.
The following user(s) said Thank You: Tady

Please Log in or Create an account to join the conversation.

More
20 May 2023 05:23 #271707 by Tady
Replied by Tady on topic Custom EtherCAT device
Encoder input shuldn't be a problem... When I port this code to STM32cube, I can whip up something to test.
The 0-10v input also shuldn't be a problem. The only thing is that for an actual plasma arc measuring, some filtering and galvanic isolation is needed.

Please Log in or Create an account to join the conversation.

More
20 May 2023 10:00 #271727 by rodw
Replied by rodw on topic Custom EtherCAT device
Its not really a big issue to have 0-10v. You can add a THCAD-2 to an encoder input to protect the electronics.
Did you get something done for your xml file? If not, just started with one pin and do it progressively.

Please Log in or Create an account to join the conversation.

More
20 May 2023 11:22 #271734 by Tady
Replied by Tady on topic Custom EtherCAT device
Interesting.. A votage to frequency converter. I fix CNC plasma machines at work and no technology like this is used. Only voltage to voltage isolators. The older machines have an independant height control ( IHT ). And the newer have everything integrated. But the isolators are still the same.
No I didn't try anything out, we have some birthdays this weekend so maybe I can do a little bit in the evening. But still thank you for the example XML
I was looking in the LinuxCNC docs for different data taypes. S32,REAL,.... Is there any oher datatype? S16 or S8,... And unsigned versions?

Please Log in or Create an account to join the conversation.

More
20 May 2023 12:37 #271737 by pippin88
Replied by pippin88 on topic Custom EtherCAT device
I am interested to hear your progress.

I'm also keen for better and cheaper ethercat IO options.

I did just come across www.mikroe.com/ethercat-click for the first time (which I searched LAN9252). Have not come across it before in many searches for the cheapest way to get ethercat / ethercat for MCU

Please Log in or Create an account to join the conversation.

More
20 May 2023 12:50 #271738 by rodw
Replied by rodw on topic Custom EtherCAT device
This is Linuxcnc!

QTplasmac should hold its own against your integrated systems, possibly exceed. The $70 Mesa THCAD2/5/10's  are built for the dirty plasma environment and can handle 500 volt over voltage indefinitely. They are individually calibrated and are connected to an encoder input on a  Mesa card. Linuxcnc converts the frequency in software and controls the torch height internally.
Here is a walkthrough I did

And the cut recovery features


Data types are described in the docs here linuxcnc.org/docs/2.9/html/hal/comp.html
  • TYPE - One of the HAL types: bitsignedunsigned, or float. The old names s32 and u32 may also be used, but signed and unsigned are preferred.
I think the xml uses S32 and and U32


 
The following user(s) said Thank You: Tady

Please Log in or Create an account to join the conversation.

More
20 May 2023 12:57 #271739 by Tady
Replied by Tady on topic Custom EtherCAT device
The ethercat click is the same thing as mine. But this one seems to use only one port.. Ethercat that i have seen uses two so you can dasy chain them together. You could use a switch to connect them, but the default topology is dasy chaining.. Also these slaves don't use any addressing, the physical position in the chain provides the "address"

Please Log in or Create an account to join the conversation.

Time to create page: 0.111 seconds
Powered by Kunena Forum