Ethercat retrofit question

More
02 Oct 2021 14:11 - 02 Oct 2021 14:23 #222017 by Niko
Hi all,
I'm retrofitting a new machine with ethercat servos, spindle and IO . The hardware is a bit different, and I couldn't find drivers for that . It's all Power Automation hardware and a chinese of taiwaneese  spindle drive(not much info for that one ) .
Modules are arranged as follows : MCP220(Operator panel and jog pendant ) -> PASIO IO (Input/output modules) -> PA_MIMA (servo drives for C A X Y and Z in that order ) -> spindle drive . 
I have xml files for the operator panel, IO and servos but couldn't find much for the spindle .
From the previous control software I have the configuration xml (at least it looks like that) .
What I've done so far :
I got the ethercat master running and installed the hal driver .
Today I found the cia402 component (servos are CAN over EtherCAT ) .

I'm not liking the results from dmesg :
[ 2337.932287] EtherCAT: Master driver 1.5.2 unknown
[ 2337.932707] EtherCAT: 1 master waiting for devices.
[ 2337.951816] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 unknown
[ 2337.951837] EtherCAT: Accepting 00:13:95:1C:CC:68 as main device for master 0.
[ 2337.951863] ec_generic: Binding socket to interface 2 (enp3s0).
[ 2337.967041] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 2337.967565] EtherCAT 0: Link state of ecm0 changed to UP.
[ 2337.975331] EtherCAT 0: 8 slave(s) responding on main device.
[ 2337.975340] EtherCAT 0: Slave states on main device: PREOP.
[ 2337.975758] EtherCAT 0: Scanning bus.
[ 2339.606887] EtherCAT WARNING 0-7: SII size exceeds 4096 words (0xffff limiter missing?).
[ 2339.638261] EtherCAT 0: Bus scanning completed in 1660 ms.
[ 2339.638266] EtherCAT 0: Using slave 1 as DC reference clock.
[ 2344.417151] EtherCAT ERROR 0-7: Timeout while waiting for SDO dictionary list response.


A few things I noticed . EtherCat needs to be started manually after a restart . I get quite a few "connection lost" messages after it's started . And as expected lcec_conf does not accept the configuration xml from the previous sotware .

Spindle drive manual :http://www.imaku.com.tw/download/driver_motor/iMaku_AUSTONE%20Servo%20drive%20manual%20V2%207_EN-2017.pdf

File Attachment:

File Name: MCP220_161130.xml
File Size:15 KB

File Attachment:

File Name: PASIO161129.xml
File Size:14 KB

File Attachment:

File Name: PASIO08761...0627.xml
File Size:85 KB

File Attachment:

File Name: PA_MIMA_v1_41_6.xml
File Size:245 KB

File Attachment:

File Name: PASIOECATModules.xml
File Size:160 KB

File Attachment:

File Name: Leaderway5Ax.xml
File Size:189 KB
Attachments:
Last edit: 02 Oct 2021 14:23 by Niko.

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

More
02 Oct 2021 16:03 #222028 by db1981
Replied by db1981 on topic Ethercat retrofit question
hello,

you will have to write drivers for the whole components or set them up with the generic driver in the ethercat_conf.xml. This will be a lot of writing...

Dmesg tells that slave 7 has an problem with the SII Eeprom, unfortunaly etherlabmaster will not work with this device till you have corrected the content of the eeprom. For this an lot of details about the slave are neccesery.
Sadly there are a few manufactures which not spend to much effort to write their eeprom Ethercat standardization conform. Because the most used EC Master in the industry can work without the eeprom content and configure the slaves blind, based on the content of the manufacutres xml file.
Etherlab master can not do this...
The following user(s) said Thank You: Niko

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

More
02 Oct 2021 16:24 - 02 Oct 2021 16:26 #222030 by Niko
Replied by Niko on topic Ethercat retrofit question
Hello and thank you for the quick response .
This may be a dull question but does this count from 0 or 1 ?
If that is slave 8 it's the spindle drive and I had problems recognizing it with the EtherCAT configurator today . What gave me hope was the fact that within that program I saw the IO states of the pasio controller . What should be inside the eeprom ? There are a couple of xml files for technosoft drives, couldn't figure out what for .
The configurator tool finds the vendor id but product number and revision are set to 1 .
Is it possible that one of those xml files should be loaded in the servo drive ?
And for the other servos I hope the cia402 component would work for those .
Last edit: 02 Oct 2021 16:26 by Niko.

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

More
02 Oct 2021 16:35 #222031 by db1981
Replied by db1981 on topic Ethercat retrofit question
you can write the command "ethercat slaves" in terminal, then you get an list about the attached devices.

i think cia402 will work, but before this you will have to code the ethercat / communication side.

you will need an proper xml device description from the manufacuter for the device which is not recognized correctly. then check with twincat that all is full functional, after this you can rewrite the eeprom with twincat.
The following user(s) said Thank You: Niko

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

More
10 Oct 2021 11:16 - 10 Oct 2021 11:17 #222734 by Niko
Replied by Niko on topic Ethercat retrofit question
I'm currently trying to turn just one axis, but am experiencing some annoying errors.
The EC master sees the drive, but when I run this in hal :
loadusr -W /home/leader/linuxcnc/configs/leader_c/ethercat-conf.xml
I get :
/home/leader/linuxcnc/configs/leader_c/ethercat-conf.xml: 2: /home/leader/linuxcnc/configs/leader_c/ethercat-conf.xml: Syntax error: newline unexpected
<stdin>:5: waitpid failed /home/leader/linuxcnc/configs/leader_c/ethercat-conf.xml ethercat-conf
<stdin>:5: /home/leader/linuxcnc/configs/leader_c/ethercat-conf.xml exited without becoming ready
If I remove all newlines from the file the error is different . It returns this :  Syntax error: redirection unexpected


File Attachment:

File Name: ethercat-conf.xml
File Size:1 KB

File Attachment:

File Name: leader.hal
File Size:2 KB


All that is changed in the xml is the vendor ID and product code, now correspond to what I'm seeing as ethercat slaves .
This just has to be something simple .
Before that I had permission denied type errors, but after making the xml executable that went away .
Attachments:
Last edit: 10 Oct 2021 11:17 by Niko.

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

More
10 Oct 2021 12:16 #222743 by db1981
Replied by db1981 on topic Ethercat retrofit question
hello,

you are trying to tell the hal, that it should load your xml file as userspace module. that will not work.....

you have to load the module lcec_conf and it has to parse your xml file.

loadusr -W lcec_conf /home/leader/linuxcnc/configs/leader_c/ethercat-conf.xml

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

More
10 Oct 2021 12:19 #222744 by db1981
Replied by db1981 on topic Ethercat retrofit question
are your shure that the product code , pid, is 00000000?

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

More
10 Oct 2021 12:48 #222746 by Niko
Replied by Niko on topic Ethercat retrofit question
Yes I saw my mistake . Axis is up and running now . Will attempt to move the C axis as there's nothing to hit on it .
Thank you for your quick reply .

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

More
16 Oct 2021 14:25 - 16 Oct 2021 14:29 #223298 by Niko
Replied by Niko on topic Ethercat retrofit question
Some progress today and some new issues .
I'll be using the generic driver to connec the pasio IO module .
What I currently have s this :
From the original XML:
<TxPdo Fixed="1" Mandatory="1" Sm="3">
<Index>#x1a00</Index>
<Name>Module 1 (PASIO 087601).Inputs</Name>
<Entry>
<Index>#x6000</Index>
<SubIndex>1</SubIndex>
<BitLen>1</BitLen>
<Name>DI 0</Name>
<DataType>BOOL</DataType>
</Entry>

To this :
<syncManager idx="0" dir="in">
<pdo idx="1a00">

<pdoEntry idx="6000" subIdx="1" bitLen="1" halPin="pasio-din.b1.1" halType="bit"/>
<pdoEntry idx="6000" subIdx="2" bitLen="1" halPin="pasio-din.b1.2" halType="bit"/>
<pdoEntry idx="6000" subIdx="3" bitLen="1" halPin="pasio-din.b1.3" halType="bit"/>
<pdoEntry idx="6000" subIdx="4" bitLen="1" halPin="pasio-din.b1.4" halType="bit"/>
<pdoEntry idx="6000" subIdx="5" bitLen="1" halPin="pasio-din.b1.5" halType="bit"/>
<pdoEntry idx="6000" subIdx="6" bitLen="1" halPin="pasio-din.b1.6" halType="bit"/>
<pdoEntry idx="6000" subIdx="7" bitLen="1" halPin="pasio-din.b1.7" halType="bit"/>
<pdoEntry idx="6000" subIdx="8" bitLen="1" halPin="pasio-din.b1.8" halType="bit"/>

For every IO block
Pins are created in hal but they don't seem to respond to inputs . There are a few bits of the original XML I'm not too certain how to implement . The file named pasio is from the old system xml file and the current version of my conf.xml . Does it matter the way <syncMaster> lines are introduced ?
What else am I missing ?
Attachments:
Last edit: 16 Oct 2021 14:29 by Niko.

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

More
17 Oct 2021 10:22 #223363 by db1981
Replied by db1981 on topic Ethercat retrofit question
Hello,

does the slave reach ethercat OP state, after linuxcnc start?

if you look in the xml file you have to assing the D ins at 600x... to SM3 and the Douts to SM2. (syncManager idx="x") .

You can check this with the command "ethercat pdos -v -p(slavenumber)"

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

Time to create page: 0.105 seconds
Powered by Kunena Forum