Ethercat HAL driver

More
14 Jul 2014 13:30 #48751 by lincnc
Replied by lincnc on topic Ethercat HAL driver
Hi,

I've tried Roschi's steps but still there is the same error running on the screen. Error documentation says that error F581 indicates that "The PDI has no access rights to the ESC eeprom", could some part of IgH Ethercat Master prohibits the slave from accessing it's EEPROM memory? If yes, how can I disable that?


Thank you.

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

More
14 Jul 2014 16:45 - 14 Jul 2014 16:47 #48760 by roschi
Replied by roschi on topic Ethercat HAL driver
Hi "lincnc",

please describe excatly at which time the error comes up.

1. Unplug cable
2. restart ethercat master, close all lcnc, even stop or be sure that '/etc/init.d/realtime stop'
3. reboot drive
4. plug cable
5. test for the drive with "ethercat slaves" (soe_write won't work as far as i know forthat drives)
--> Is up to this Point a Problem/error?

Problem could be that Beckhoff components have fixed PDO's so you can't configure them (configure them means write Access to EEPROM)
keyword "config_pdo=true" in XML file.

By the way SoE drives will work without problems because the Mailbox communication is only nessesary for configuration.
(The drives I use: Bosch Rexroth have only SoE up to now --> configure them with Rexroth Software via EoE or TwinCAT)

Regards Andreas
Last edit: 14 Jul 2014 16:47 by roschi.

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

More
15 Jul 2014 17:14 #48803 by lincnc
Replied by lincnc on topic Ethercat HAL driver
Hi, my name is Ivan, sorry for the bad username.

Because of the unexplainable error we've got with the AX5xxx driver, we've switched to Lenze 94xxx HighLine drives which impelement the CoE protocol. However, I still have some problems with these drives too.

The Lenze 94xx HighLine drive is configurated to work with CiA 402 and it's tested with TwinCAT.

Here is the XML description file for Lenze 94xxx HighLane exported from TwinCAT:

File Attachment:

File Name: Lenze.xml
File Size:65 KB


Here is the XML file used for the EtherCAT HAL Driver:

File Attachment:

File Name: ethercat_c...7-15.xml
File Size:1 KB


I start the driver with these commands:

(from ~/linuxcnc-dev/scripts)
. ./rip-environment
halcmd loadrt threads name1=master period1=2000000(value taken from the xml file)
halcmd loadusr -W lcec_conf ethercat_config_n.xml
halcmd loadrt lcec
halcmd addf lcec.read-all master
halcmd addf lcec.write-all master
halcmd start

Everything seems to go fine, the "ethercat slave -v" command shows that the drive is in OP state and no error flag is present. However, when I use the "halcmd show" command, none of the pin values seems to correspond with the "real" drive values. For example, I can read the Actual Position with the "ethercat upload" command but hal's Actual Position pin stays at 0. At first sight it seems that there is no communication between HAL driver and the drive itself.
BUT, when i use the "ethercat download" command to change objects like Control Word, Target Position, Mode of operation or any other, the command is issued without an error but the value is not written. After using "ethercat download" for specific index and subindex (object) and then checking the change with "ethercat upload" I can see that the value of the object is not changed although there wasn't an error issuing "ethercat download" command.
If I read the CiA 402's error object (index: 0x603F subindex: 00) it's value is 0x1000, which according to Lenze's manual means that "An error has occurred in the controller (system fault, fault, trouble, or warning)". Which doesn't seem to appear while testing it with TwinCAT.
I tried restarting the drive but the error is stil present.

Any help would be appreciated,
thank you in advance.
Attachments:

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

More
15 Jul 2014 22:45 #48810 by roschi
Replied by roschi on topic Ethercat HAL driver
Hi Ivan,

so now this is another issue. --> Lenze drives, CoE, CiA402 drive Profile.

Based on your provided informations I can not see any mistake.
So my advise is to go step by step.
Perhaps see the Video first

approx. begin at 4:00

- don't use any HAL, LCNC modules, application
- Try to get the drive running only via the "ethercat" commandline tool (like in my Video)
- set op mode to x6060 to Cylic Velocity Mode
- set target velocity to value gt 0
- start Operation via state machine value x6040; see docs on Cia 402

Perhaps an issue with HAL Driver could be the alias address. I have this Problem when i use Beckhoff EK1100 and 2 MOdules + 4 drives
--> HAL Driver from Sachsa has hard coded alias adress 0 for all slaves. (see lcec.c near line 200)
In the XML file only the bus Position is configured.

Regards Andreas
The following user(s) said Thank You: Nico2017

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

More
16 Jul 2014 15:25 - 16 Jul 2014 20:58 #48834 by lincnc
Replied by lincnc on topic Ethercat HAL driver
Roschi,

I really don't understand how are you achieving to rotate the motor with the drive(the slave) being in PREOP state, I think that Lenze drivers won't allow any movement until the drive is in OP state.

Now I notice that after issuing the procedure in my last post the drive goes to OP state but dmesg shows a lot of unmatched and skipped datagrams, I guess that's connected with the DC sync. Do you have any ideas what could be wrong with the DcConf in the xml configuration file?

I noticed that in PREOP state I can change some objects like 0x55AF but I can't change the Mode of Operation (0x6060) object, the Control Word (0x6040), Target Position object etc. The strange think is that dmesg doesn't show any error while issuing the "ethercat download" command.

UPDATE 1:

I changed the hard coded (lcec.c line:201) alias address from 0 to 1001(according to Lenze's manual) and recompiled everything. Now, the executing of "halcmd loadrt lcec" fails and dmesg says:
 EtherCAT: Requesting master 0...
[24062.569235] EtherCAT: Successfully requested master 0.
[24062.569396] EtherCAT ERROR 0 0:0: PDO entry 0x6040:00 is not mapped.
[24062.569400] LCEC: master 0 PDO entry registration failed
[24062.569402] EtherCAT 0: Releasing master...
[24062.569406] EtherCAT 0: Released.

The key error " EtherCAT ERROR 0 0:0: PDO entry 0x6040:00 is not mapped. " is issued by the "ecrt_master_slave_config(..)" function.

Do you have any ideas?


UPDATE 2:

I googled similar problem : link .
It says that if "Enable notLRW: yes" two separate domains should be used. Issuing "ethercat slaves -v" confirms that in my case this is true (Enable notLRW:yes), so I guess I should write my own driver or does anyone have idea how to modify Sascha's one to use two separate domains, one for input and another one for output?

Thank you very much.
Last edit: 16 Jul 2014 20:58 by lincnc.
The following user(s) said Thank You: Nico2017

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

More
16 Jul 2014 22:22 #48846 by roschi
Replied by roschi on topic Ethercat HAL driver

I really don't understand how are you achieving to rotate the motor with the drive(the slave) being in PREOP state, I think that Lenze drivers won't allow any movement until the drive is in OP state.


OP state means cylic data transfer for the field bus. For basic test the first steps can be done via commandline tool ethercat --> No cylic transfer. In case of ESTUN Drive and Indra Drive you can get the drive running because the state machine of the drive (power on, enable amps,...) is controled over drive-controlword. The state of the bus is a different state machine. In case of LENZE I don't have any experinces so it seems this won't work for them.

So you need a running and configured bus transfer.

The topic about the alias: If you connect the drive to the master which alias address is shown by ethercat slaves? 1001, 0 or another number?

LRW topic: Ok I aggree if the drive has notLRW:yes the solution is using different domains (knowledge from google, I have no experinces)
That means programm a driver for Lenze :blink: . --> combine code lcec.c (request master, domain creation, pdo reg) and lcec_stmds5k.c (as an example, pdo entries, read/write functions, init/export hal pins,....)

XML config file: DC sync0shift is limited to special values the values depend on the drive/slave. As far as I see in the Lenze XML the only value is "0" or disable DC.
The following user(s) said Thank You: Nico2017

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

More
17 Jul 2014 16:10 #48867 by lincnc
Replied by lincnc on topic Ethercat HAL driver
Okay,

here is another important update for the Lenze drive case.

I tried using this xml file:

File Attachment:

File Name: ethercat_c...novo.xml
File Size:1 KB


And this is the old xml file:

File Attachment:

File Name: ethercat_c...7-17.xml
File Size:1 KB


As one can see, I just removed the "out" sync manager PDO's from the old xml file, and it worked properly.

The problem is, I "lost" the information about Status Word, Mode Of Operation Display and Actual Position. All of these PDO's can be properly read with the "ethercat upload" command.
I wondered if I can start another HAL EtherCAT Driver instance using xml file only with sync manager for "in" PDO's . I'll try that soon and I'll post my results here.
Attachments:

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

More
12 Aug 2014 14:17 #49740 by cgc
Replied by cgc on topic Ethercat HAL driver
Hello,
I have running a system with EtherCat and CANopen servos.
I have used the EK1100 + EL6751 for CANopen and Berger-Lahr CPD17 servos. (Schneider Lexium 05)
To create the CANopen initial commands I have used the Beckhoff TwinCat 3 software.
I have configured my hardware in TwinCat3 and copied the CoE commands for the ethercat_conf.xml.
The servos has fix PDOs with a size of 48 bits, first 16 bits is the command register last 32 bits the (target)position.
But lcec has only 32 single bits or s32 or u32.
I have changed lcec_conf.c (line 990) and lcec_generic.h (line 24) to 48 single bits. This is my interface to hal.
Then, I have written a small comp to convert the 48 single bits to command register and (target)position.
Also, the servos needs a rising edge for each new position command.
In the comp, I have use a togglebit for each cycle, this is my rising edge for the new position command.
In the appendix, the files for a (laser)system with 2 axis, or a lathe.
The following user(s) said Thank You: serdigi

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

More
13 Aug 2014 14:47 - 13 Aug 2014 16:17 #49794 by cgc
Replied by cgc on topic Ethercat HAL driver
Hello,
here the files for a 3 axis system

Frank


Last edit: 13 Aug 2014 16:17 by cgc.
The following user(s) said Thank You: serdigi

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

More
27 Aug 2014 20:15 - 27 Aug 2014 20:23 #50341 by bigalex
Replied by bigalex on topic Ethercat HAL driver
Hi Frank.
In this case are you using the EtherCAT EK1100 as a gateway for the servoamps ?
This is interesting because there is not a CanOpen driver for LCNC (or I don't know if it exist onestly) but in your applcation you are "routing" the motion commands via the EtherCAT driver to the CanOpen servoamps.
Please let me know if I'm wrong.

Regards

Alex
Last edit: 27 Aug 2014 20:23 by bigalex.

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

Time to create page: 0.202 seconds
Powered by Kunena Forum