Ethercat auto configurator.

More
1 year 11 months ago #314750 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 :
Code:
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.



 

Please Log in to join the conversation.

More
1 year 11 months ago #314751 by tommylight
Pinned.
Thank you.

Please Log in to join the conversation.

More
1 year 11 months ago #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!!!

Please Log in to join the conversation.

More
1 year 11 months ago #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.
 

Attachment not found



I think we can also modify the linuxcnc-ethercat source to automate the .conf process.

Please Log in to join the conversation.

More
1 year 11 months ago #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.

Attachment not found

Please Log in to join the conversation.

More
1 year 11 months ago #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.

Please Log in to join the conversation.

More
1 year 11 months ago #315200 by tommylight
To much time with Blender? :)
I foresee a lot of happy people, thanks to you.

Please Log in to join the conversation.

More
1 year 11 months ago #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.

Please Log in to join the conversation.

More
1 year 11 months ago #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 to join the conversation.

More
1 year 11 months ago #315296 by Grotius
Replied by Grotius on topic Ethercat auto configurator.


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

Attachment not found

Please Log in to join the conversation.

Time to create page: 0.106 seconds
Powered by Kunena Forum