Ethercat HAL driver

More
12 years 1 week ago - 12 years 1 week ago #52188 by roschi
Replied by roschi on topic Ethercat HAL driver
Hi,

pavel7890 wrote: Can you Roshi please redeploy HAL and XML files? Those URLs you posted earlier are not valid anymore. Thanks.

Sorry for that. Please find them here roschi.eu/retrofit/ Use: roschi_cnc.hal and ethercat_config_n.xml for starting.

pavel7890 wrote: LinuxCNC controls drive via positioning command every 1ms. How is maintained motor acceleration during that cycle? There is just adaptive acceleration calculated from position control with cyclic command setup on Indradrive?

My advise is to disable adaptive acc. in the indradrive setup. As mentioned if you use NC-driven-mode => cyclic position (and optional speed, torque) comanded values are sent over EtherCAT (or other field bus) the internal jerk and acceleration limit is ignored. There are only a maximum motor speed limit watched and maximum current. The Master --> NC, LinuxCNC has to ensure to give position values which can be reached with the maximum speed and maximum torque --> Settings in the *.ini file for each axis.

In the next days I can post the parameter files from indra drive. Especially the settings for the state-controlword are relevant for drive-based-homing. This is the method I prefer (Home switch = over travel switch and connected directly to the drive). But It is also possible or might be easier to use the standard NC based homing --> LinuxCNC controls the position during homing and the switches have to be connected to LinuxCNC.

Regards
Andreas
Last edit: 12 years 1 week ago by roschi.
The following user(s) said Thank You: pavel7890, Nico2017
More
12 years 1 week ago - 12 years 1 week ago #52191 by pavel7890
Replied by pavel7890 on topic Ethercat HAL driver
Hello,

thank you for files and reply.

As I have MSK servos with multiturn encoders, so my plan is to use homing as you presented with Estun drive = given absolute position from drives.

In case of Error or Warning message in Indradrives. Is there a possibility to post them to LinuxCNC and reset them?
Last edit: 12 years 1 week ago by pavel7890.
More
12 years 1 week ago #52199 by roschi
Replied by roschi on topic Ethercat HAL driver
Hi,

In case of Error or Warning message in Indradrives. Is there a possibility to post them to LinuxCNC and reset them?

Yes reseting is possible. Use the so called signal control word (German: Signalsteuerwort) in the Indradrive sertup which is/can be cyclic exchanged between Master/Slave. (see also 'signalcontrol" in the EtherCAT XML file)
This control word has 16 bits. Each bit can be configured individual via the IndraDrive configuration (drop down menu for each bit in IndraWorks Software).
If there is a drive error e.g. because a over travel switch is reached this or all other error can be reseted via the drive command 'C4600 reset'. This command can be linked to a bit in the signal control word. A rise from 0 to 1 will trigger the linked command.
So just connect the corresbonding bit in the HAL file (e.g. lcec.0.1.signalcontrol-05) to a push button in the pyvcp named e.g. Clear/Reset drive. (You can trigger all drives parralel; One button for all drives)

About posting the message to EtherCAT Master I have no knowledge. Perhaps the error number can be written. See/Search IndraDrive help for configurable Parameters/Values for cyclic exchange. (signal status word only exchanges bits like signal control word)
That there is a error on the drive is indicated via: --> lcec.0.0.drivestatus-13 => axis.0.amp-fault-in for example

I hope that gives some help.

Pavel maybe you can desrcibe your System Succes story later?

Regards Andreas
The following user(s) said Thank You: Nico2017
More
12 years 1 week ago - 12 years 1 week ago #52323 by nylon7
Replied by nylon7 on topic Ethercat HAL driver
1st Download ethercat master from IgH
2nd Untar the file: tar xvfj ethercat-1.5.2.tar.bz2
3rd download debian folder from sittner
4th copy debian folder (3rd step) to /ethercat-1.5.2/ (2nd step)
5th sittner instructions:
#cd ethercat-1.5.2
# cd debian
# ./configure -a
# cd ..
# dpkg-checkbuilddeps (and install missing deps)
# dpkg-buildpackage
6th # sudo dpkg -i ethercat_1.5.2-1_i386.deb
7th edit /etc/default/ethercat with your configuration (in the file there are useful comments)
8th # sudo update-ethercat-config
9th # sudo dpkg -i ethercat-dev_1.5.2-1_i386.deb
10th restart the machine to get the driver loaded at start. After that you can execute # ethercat master in terminal

I follow these steps above, and the there is no error..

and then ...

Install linuxcnc with lcec

I download this source

so.....

this Makefile is OK(hal/drivers/ethercat/lcec_el5151.o \) and homing.c is OK
Code:
cd src In the source directory, build LinuxCNC: ./autogen.sh (this builds the configure script) ./configure make clean make sudo make setuid

ethercat master

Master0
Phase: Idle
Active: no
Slaves: 2
Ethernet devices:
Main: 00:22:15:5f:ab:92 (attached)
Link: UP
Tx frames: 866671
Tx bytes: 52019500
Rx frames: 866670
Rx bytes: 52019440
Tx errors: 0
Tx frame rate [1/s]: 250 250 250
Tx rate [KByte/s]: 14.6 14.6 14.6
Rx frame rate [1/s]: 250 250 250
Rx rate [KByte/s]: 14.6 14.6 14.6
Common:
Tx frames: 866671
Tx bytes: 52019500
Rx frames: 866670
Rx bytes: 52019440
Lost frames: 0
Tx frame rate [1/s]: 250 250 250
Tx rate [KByte/s]: 14.6 14.6 14.6
Rx frame rate [1/s]: 250 250 250
Rx rate [KByte/s]: 14.6 14.6 14.6
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Distributed clocks:
Reference clock: Slave 0
Application time: 0
2000-01-01 00:00:00.000000000

ethercat slaves

0 1001:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 1001:1 PREOP + EL2521 1K. Pulse Train Ausgang


message is correct

But

dmesg message error

[ 3034.246141] lcec: Unknown symbol lcec_el5101_init
[ 4598.452856] LCEC: lcec_conf is not loaded


So, how should I do to solve the problems..

thanks
Last edit: 12 years 1 week ago by nylon7.
More
12 years 1 week ago - 12 years 1 week ago #52330 by cgc
Replied by cgc on topic Ethercat HAL driver
Hello,
you forgot this:

"3rd modify /src/makefile due to there is a mistake inside:
cec.cec.
they have forgotten: hal/drivers/ethercat/lcec_el5101.o \
between hal/drivers/ethercat/lcec_el41x2.o \ and hal/drivers/ethercat/lcec_el5151.o \
"

Frank
Last edit: 12 years 1 week ago by cgc.
The following user(s) said Thank You: nylon7
More
12 years 1 week ago #52348 by nylon7
Replied by nylon7 on topic Ethercat HAL driver
I follow this Tutorial file& user cgc

Now

ethercat slaves

0 1001:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 1001:1 PREOP + EL2521 1K. Pulse Train Ausgang


halcmd: loadusr -W lcec_conf ./el2521.xml

<stdin>:1: execv(lcec_conf): No such file or directory
<stdin>:1: lcec_conf exited without becoming ready


So, how should I do to solve the problems..

thanks
Time to create page: 0.589 seconds
Powered by Kunena Forum