Ethercat auto configurator.

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
18 Nov 2024 12:46 #314750 by Grotius
Ethercat auto configurator. was created by Grotius
Hi Guys,

This file is a program for auto configuration for ethercat devices.

It don't need a .xml config file to setup your linuxcnc ethercat environment.

It uses a sligtly modified ethercat-master source code to retrieve a digital "$ ethercat xml".
And has a bug fix for inconsistent alias nr's.

This source code an be integrated to a linuxcnc component quite easely.
Therefore may be there are volunteers to do this.

As i tested this on the following bus configuration with succes, it's not tested to config servo's etc.
If i had a ethercat servo here, i would sure test it right away.

Example output :
Starting EtherCAT master 1.5.2  done
init example 0.
init ethercat start.
Print ethercat devices and retrieve device data vector.
No alias given, alias -

pdo entry registration:

         Name:EL2124 4K. Dig. Ausgang 5V, 20mA
         Slave Alias: 0
         Position: 1
         Vendor ID: 2
         Product Code: #x084c3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL2124 4K. Dig. Ausgang 5V, 20mA
         Slave Alias: 0
         Position: 2
         Vendor ID: 2
         Product Code: #x084c3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL2124 4K. Dig. Ausgang 5V, 20mA
         Slave Alias: 0
         Position: 3
         Vendor ID: 2
         Product Code: #x084c3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL1004 4K. Dig. Eingang 24V, 3ms
         Slave Alias: 0
         Position: 4
         Vendor ID: 2
         Product Code: #x03ec3052
         PDO Entry Index: #x6000
         PDO Entry Subindex: 1

         Name:EL2794 4K. Dig. Ausgang 24V AC/DC, 2A, kurzschlussfest
         Slave Alias: 0
         Position: 5
         Vendor ID: 2
         Product Code: #x0aea3052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL2808 8K. Dig. Ausgang 24V, 0.5A
         Slave Alias: 0
         Position: 6
         Vendor ID: 2
         Product Code: #x0af83052
         PDO Entry Index: #x7000
         PDO Entry Subindex: 1

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3101
         PDO Entry Subindex: 1

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3101
         PDO Entry Subindex: 2

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3102
         PDO Entry Subindex: 1

         Name:EL3162 2K. Ana. Eingang 0-10V
         Slave Alias: 0
         Position: 7
         Vendor ID: 2
         Product Code: #x0c5a3052
         PDO Entry Index: #x3102
         PDO Entry Subindex: 2

         Name: empty
         Slave Alias: 0
         Position: 0
         Vendor ID: 0
         Product Code: #x00000000
         PDO Entry Index: #x0000
         PDO Entry Subindex: 0

halpin names:

         EL2124_1_0_0_IN_BOOL
         EL2124_1_1_0_IN_BOOL
         EL2124_1_2_0_IN_BOOL
         EL2124_1_3_0_IN_BOOL
         EL2124_2_0_0_IN_BOOL
         EL2124_2_1_0_IN_BOOL
         EL2124_2_2_0_IN_BOOL
         EL2124_2_3_0_IN_BOOL
         EL2124_3_0_0_IN_BOOL
         EL2124_3_1_0_IN_BOOL
         EL2124_3_2_0_IN_BOOL
         EL2124_3_3_0_IN_BOOL
         EL1004_4_0_0_OUT_BOOL
         EL1004_4_1_0_OUT_BOOL
         EL1004_4_2_0_OUT_BOOL
         EL1004_4_3_0_OUT_BOOL
         EL2794_5_0_0_IN_BOOL
         EL2794_5_1_0_IN_BOOL
         EL2794_5_2_0_IN_BOOL
         EL2794_5_3_0_IN_BOOL
         EL2808_6_0_0_IN_BOOL
         EL2808_6_1_0_IN_BOOL
         EL2808_6_2_0_IN_BOOL
         EL2808_6_3_0_IN_BOOL
         EL2808_6_4_0_IN_BOOL
         EL2808_6_5_0_IN_BOOL
         EL2808_6_6_0_IN_BOOL
         EL2808_6_7_0_IN_BOOL
         EL3162_7_0_0_OUT_UINT
         EL3162_7_0_1_OUT_UINT
         EL3162_7_1_0_OUT_UINT
         EL3162_7_1_1_OUT_UINT

PDO entry registration ok.
Master ok.
domain1_pd ok.
init ethercat succes.



 
The following user(s) said Thank You: tommylight, besriworld, CORBETT, sharp_reaper, Rabin, 7strideR

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
18 Nov 2024 13:03 #314751 by tommylight
Replied by tommylight on topic Ethercat auto configurator.
Pinned.
Thank you.
The following user(s) said Thank You: besriworld

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

More
18 Nov 2024 21:50 #314804 by CORBETT
Replied by CORBETT on topic Ethercat auto configurator.
Grotius,

Nice work...  As always, glad to see you and the other main players still here working on things.  Awesome!!!
The following user(s) said Thank You: tommylight, besriworld, Grotius

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
19 Nov 2024 14:34 #314847 by Grotius
Replied by Grotius on topic Ethercat auto configurator.
Hi,

To create a program like twincat for linux i made a little example,
how we can do this.

Here  is a little project that show's the ethercat configuration.
It dynamicly add's button's, labels and checkboxes.

It includes reading and writing a few value types. But can be expanded
to read & write more ethercat data types.

This works nice.
 

I think we can also modify the linuxcnc-ethercat source to automate the .conf process.
Attachments:
The following user(s) said Thank You: tommylight, bkt, 7strideR, T-Roller

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
19 Nov 2024 21:30 #314876 by Grotius
Replied by Grotius on topic Ethercat auto configurator.
Hi,

Maybe we can add a node configurator.

This then can be used to simulate the ethercat devices, by adding controls, like buttons, etc. for interaction.
And eventually it could be used as a plc controller, when adding logic just as classicladder.

It seems beckhoff has twincat for linux, running on debian. But it is not open source.
Did they write the ethercat master for linux themselfves?
They say in linux you can run multiple instances of twincat.

Attachments:

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
24 Nov 2024 22:38 #315192 by Grotius
Replied by Grotius on topic Ethercat auto configurator.
Hi guys,

Related to the previous post, where i was struggeling with a node library for too long time.

I had to make a choice what to do.

1. Just don't use the qtnodeeditor lib.
2. Don't use node structure's.
3. Try to create your own lib.

Choosed nr.3.

It took a few day's to figur out how the qt grapics widget works. And how to display qt widget in it.
Then made a solution for creating a simple setup for input, output ports and their widgets.

In the end, the result surprised me.

This is a test video, that loads a few input and output ports, and widgets attached to the port.
Then you can connect the output ports with the input ports. Data flow will stream then from output to input.

This whole idea can be used to format several big and complicated projects, like :

1. rtapi multi threading on several cpu's.
2. super imposed interpreters, running on multiple threads.
3. cnc machine interpreter to machine axis layout. Like connecting ABC, UWV axis.
4. Ethercat bus simulator on real hardware.
5. Plc
6 Classic ladder

User can just create .ui based widgets. This is easy to design. Each .ui widget then may have multiple input or output ports.
The logic is then done by the .ui class, wich conttains also the .h and .cpp files.

Let me know what you think, this is just an example :


Greetings.
The following user(s) said Thank You: tommylight, onceloved, Rabin

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
24 Nov 2024 23:13 #315200 by tommylight
Replied by tommylight on topic Ethercat auto configurator.
To much time with Blender? :)
I foresee a lot of happy people, thanks to you.
The following user(s) said Thank You: Grotius

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
24 Nov 2024 23:24 #315202 by Grotius
Replied by Grotius on topic Ethercat auto configurator.
Hi Tommy,

Thanks.

No blender is used so far !

What you see are original qt widgets.

I foresee a lot of happy people, thanks to you.
Maybe. Hahah.
A lot off people are also happy with you, including me.
But most won't see the source code as we are hosted on codeberg.
This is a non profit organisation from Berlin Germany.

The source code so far:
codeberg.org/skynet/nodelib#readme
 
Good night all folkes.
The following user(s) said Thank You: tommylight, onceloved

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
26 Nov 2024 11:33 #315288 by Grotius
Replied by Grotius on topic Ethercat auto configurator.


Node video sofware :


Node video hardware:
youtube.com/shorts/kOSrcHN5y7o

The ethercat auto configurator app is now able to perform logical operations. Like a plc.
Made a example timer widget. That sends pulses to the ethercat output ports.
The pulse has a high- and low time.

There is a easy way to create your own logical widgets. Creating a new widget cost's about 15 minutes of your presious time.
There is a QCustomWidget example widget that shows you how to do it.

We can use all kind of widget's here.

Project source

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
26 Nov 2024 13:40 - 26 Nov 2024 13:48 #315296 by Grotius
Replied by Grotius on topic Ethercat auto configurator.


Added a scope widget. Maybe add cool widgets. Have seen flight simulator widgets 

Attachments:
Last edit: 26 Nov 2024 13:48 by Grotius.
The following user(s) said Thank You: tommylight, bkt, endian, T-Roller

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

Time to create page: 0.120 seconds
Powered by Kunena Forum