Easycat and SOEM

In this post, I am sharing a code that I developed for integrating Easycat slaves and Simple Open Ethercat Master (SOEM).

This is still an ongoing project, and thus there are many insufficient parts.

The info about Easycat:

www.bausano.net/

The info about SOEM

https://openethercatsociety.github.io/

The code is attached here

http://youngmok.com/public_data/SOEM.zip

http://youngmok.com/public_data/TestEasyCat.zip

 

The below is the setup pic.

IMG_0099

The below is an execution example.

reneu@reneu-Precision-T1600:~/soem/SOEM/build/test/linux/my_test$ sudo ./my_test eth0
SOEM (Simple Open EtherCAT Master)
Simple test
Starting simple test
ec_init succeeded.
5 slaves found and configured.
Slaves mapped, state to SAFE_OP.

Slave:1
Name:EK1100
Output size: 0bits
Input size: 0bits
State: 18
Delay: 0[ns]
Has DC: 1
Configured address: 1001
Outputs address: 0
Inputs address: 0
FMMUfunc 0:0 1:0 2:0 3:0

Slave:2
Name:EL1014
Output size: 0bits
Input size: 4bits
State: 18
Delay: 0[ns]
Has DC: 1
Configured address: 1002
Outputs address: 0
Inputs address: 8062180
FMMU0 Ls:40 Ll:   1 Lsb:0 Leb:3 Ps:1000 Psb:0 Ty:1 Act:1
FMMUfunc 0:2 1:0 2:0 3:0

Slave:3
Name:EL3102
Output size: 0bits
Input size: 48bits
State: 2
Delay: 0[ns]
Has DC: 1
Configured address: 1003
Outputs address: 0
Inputs address: 8062181
FMMU0 Ls:41 Ll:   6 Lsb:0 Leb:7 Ps:1180 Psb:0 Ty:1 Act:1
FMMUfunc 0:2 1:3 2:0 3:0

Slave:4
Name:EasyCAT 32+32
Output size: 256bits
Input size: 256bits
State: 18
Delay: 0[ns]
Has DC: 1
Configured address: 1004
Outputs address: 8062140
Inputs address: 8062187
FMMU0 Ls:0 Ll:  32 Lsb:0 Leb:7 Ps:1000 Psb:0 Ty:2 Act:1
FMMU1 Ls:47 Ll:  32 Lsb:0 Leb:7 Ps:1200 Psb:0 Ty:1 Act:1
FMMUfunc 0:1 1:2 2:0 3:0

Slave:5
Name:EasyCAT 32+32
Output size: 256bits
Input size: 256bits
State: 18
Delay: 0[ns]
Has DC: 1
Configured address: 1005
Outputs address: 8062160
Inputs address: 80621a7
FMMU0 Ls:20 Ll:  32 Lsb:0 Leb:7 Ps:1000 Psb:0 Ty:2 Act:1
FMMU1 Ls:67 Ll:  32 Lsb:0 Leb:7 Ps:1200 Psb:0 Ty:1 Act:1
FMMUfunc 0:1 1:2 2:0 3:0
Request operational state for all slaves
Operational state reached for all slaves.

0:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d4 d2 db 79 25 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 94
1:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d4 d2 db 79 25 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 94
2:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d3 cf db 79 25 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 94
3:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d3 d1 db 79 25 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 94
4:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d3 d1 db 79 25 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 94
5:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d3 d1 db 79 25 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 94
6:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d4 d1 db 79 25 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 94
7:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d3 d1 dc 79 24 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 90
8:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d3 d1 dc 79 24 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 90
9:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d3 d1 dc 79 24 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 90
10:
O: ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I: d3 d2 dc 79 24 86 ab cd ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 90

Leave a Reply