GithubHelp home page GithubHelp logo

linuxcnc-ethercat's People

Contributors

arvidbrodin avatar dbraun1981 avatar frankbrossette avatar jjrbfi avatar koppi avatar pamxy avatar sittner avatar zultron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linuxcnc-ethercat's Issues

problem with the integration of the ectty.h library

Good morning, if you can help me, I integrated the library using #include "../include/ectty.h" the compilation is correct, but when I start lcec.so I have symbols inflicted in ectty_tx_data, I have to modify the realtime.mk file no ? could you help me with that? thanks.

RTAPI_TASK_PLL_SUPPORT not present

Hi @sittner,

I've just installed new versions. (ec-debianized and hal components).

But when I load lcec with config file that contains refClockSyncCycles="-1" it says that RTAPI_TASK_PLL_SUPPORT not present.
I've just downloaded a fresh linuxcnc 2.7.14 and applied the patch. Configured with ./configure uspace , created the .deb packages and installed like always.

I'm running SMP PREEMPT RT Debian 4.9.168-1+deb9u4 (2019-07-19)

Any idea of what I'm doing bad? Any way to investigate/solve this?

I would really appreciate your help because I'm stuck with this and I'm so hopeful this version solve my syncs problems.

Documentation

I've been compiling a little reference for myself. Figured I'd share here if its of any use to anyone:

LinuxCnc EtherCat (LCEC)

Installing

Setup

  1. Install Realtime Kernel https://gnipsel.com/linuxcnc/uspace/latency.html
  2. Install linuxcnc https://github.com/linuxcnc/linuxcnc
  3. Install igh-ethercat https://gitlab.com/etherlab.org/ethercat/

Install

  1. git clone https://github.com/sittner/linuxcnc-ethercat
  2. cd linuxcnc-ethercat
  3. make
  4. sudo make install

How to Use

lcec_conf is a user space component to configure how the ethercat system is set up. It parses your custom XML file and initializes the configuration.

lcec is the real time component that runs the ethercat procedures.

Example XML

<masters>
  <!-- Typically only one master -->
  <!--    appTimePeriod must match thread period -->
  <!--    refClockSyncCycles ??? -->
  <master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
    <!-- Recommend having a coupler such as the EK1100 Series -->
    <slave idx="0" type="EK1100"/>
    <!-- Some Cards and drivers such as a safety PLC need parameters -->
    <slave idx="1" type="EL6900">
      <modParam name="fsoeSlaveIdx" value="2"/>
      <modParam name="fsoeSlaveIdx" value="4"/>
    </slave>
    <slave idx="2" type="EL1904"/>
    <slave idx="3" type="EL1808"/>
    <!-- Space out safety components, as they generate high heat-->
    <slave idx="4" type="EL2904"/>
    
    <!-- If the driver is not created you can manually make one from the generic driver -->
    <!-- Most of the required information can be obtained by `ethercat cstruct`-->
    
    <!-- VID - Company of the device making it 2 = Beckoff -->
    <!-- PID - Device you are using -->
    <!-- configPDOs - Some devices like an EL6995 bridge allow changing there PDO's from ethercat-->
    <!-- XML Syntax </> is a closing tag, when there is more information, don't close the tag yet-->

    <!-- EP2338 -->
    <slave idx="5" type="generic" vid="0x00000002" pid="0x09224052" configPdos="true">     
      <!-- syncManager 0 is Cyclic Data output from the slave-->
      <syncManager idx="0" dir="out">
        <!-- Process Data Object's -->
	      <pdo idx="0x1600">
          <!-- The Entry is the important part                -->
          <!-- 7XXX typically outputs, 6XXX typically inputs  -->
          <!-- Ethercat Cstruct will show this as             -->
          <!-- ec_pdo_entry_info_t slave_0_pdo_entries[] = {  -->
          <!--     {0x7000, 0x01, 1}, /* Solenoid output */   -->
          <!-- In order this is {idx, subidx, bitLen}         -->
          <!-- halPin must be a unique name                   -->
          <!-- halType can be anything, if the bitLength is 8 -->
          <!-- and halType is bit, you will have 8 pins labeled -->
          <!-- out-0.[0-8]                                     -->
          <pdoEntry idx="0x7000" subIdx="01" bitLen="1" halPin="out-0" halType="bit" />
        </pdo>
        <pdo idx="0x1601">
          <pdoEntry idx="0x7010" subIdx="01" bitLen="1" halPin="out-1" halType="bit" />
        </pdo>
        <pdo idx="0x1602">
          <pdoEntry idx="0x7020" subIdx="01" bitLen="1" halPin="out-2" halType="bit" />
        </pdo>
        <pdo idx="0x1603">
          <pdoEntry idx="0x7030" subIdx="01" bitLen="1" halPin="out-3" halType="bit" />
        </pdo>
        <pdo idx="0x1604">
          <pdoEntry idx="0x7040" subIdx="01" bitLen="1" halPin="out-4" halType="bit" />
        </pdo>
        <pdo idx="0x1605">
          <pdoEntry idx="0x7050" subIdx="01" bitLen="1" halPin="out-5" halType="bit" />
        </pdo>
        <pdo idx="0x1606">
          <pdoEntry idx="0x7060" subIdx="01" bitLen="1" halPin="out-6" halType="bit" />
        </pdo>
        <pdo idx="0x1607">
          <pdoEntry idx="0x7070" subIdx="01" bitLen="1" halPin="out-7" halType="bit" />
        </pdo>
      </syncManager>
      <syncManager idx="1" dir="in">
        <pdo idx="0x1a00">
          <pdoEntry idx="0x6000" subIdx="01" bitLen="1" halPin="in-0" halType="bit" />
        </pdo>
        <pdo idx="0x1a01">
          <pdoEntry idx="0x6010" subIdx="01" bitLen="1" halPin="in-1" halType="bit" />
        </pdo>
        <pdo idx="0x1a02">
          <pdoEntry idx="0x6020" subIdx="01" bitLen="1" halPin="in-2" halType="bit" />
        </pdo>
        <pdo idx="0x1a03">
          <pdoEntry idx="0x6030" subIdx="01" bitLen="1" halPin="in-3" halType="bit" />
        </pdo>
        <pdo idx="0x1a04">
          <pdoEntry idx="0x6040" subIdx="01" bitLen="1" halPin="in-4" halType="bit" />
        </pdo>
        <pdo idx="0x1a05">
          <pdoEntry idx="0x6050" subIdx="01" bitLen="1" halPin="in-5" halType="bit" />
        </pdo>
        <pdo idx="0x1a06">
          <pdoEntry idx="0x6060" subIdx="01" bitLen="1" halPin="in-6" halType="bit" />
        </pdo>
        <pdo idx="0x1a07">
          <pdoEntry idx="0x6070" subIdx="01" bitLen="1" halPin="in-7" halType="bit" />
        </pdo>
      </syncManager>
    <!-- Don't forget to close the tag now-->
    </slave> 
  </master>
</masters>

Testing Code

halrun is a Linuxcnc testing interface that runs light weight linuxcnc to test components.

~: halrun 
halcmd: loadusr lcec_conf ~/test.xml 
halcmd: loadrt lcec
halcmd: loadrt threads name1=my-thread period1=1000000 fp1=1
halcmd: addf lcec.read-all my-thread
halcmd: addf lcec.write-all my-thread
halcmd: start
halcmd: show pins

Line by Line:

  1. In a terminal typing halrun will put you into the hal environment
  2. load the configuration file
  3. load the realtime component
  4. load a thread to run the realtime component
    A) period1 must match the appTimePeriod of the xml file
    B) fp1 is to notate that you need to use floating point numbers
  5. Add your component to the thread.
    A) Read must come before write, or you have unmatched datagrams
  6. Start actually begins the thread processing

Helpful tips:

  • In a separate terminal have dmesg -w open. This will show information from ethercat as it runs
  • ethercat debug [0,1,2] will change the debug level
    • 0 - Standard
    • 1 - Useful Debugging
    • 2 - Shows every datagram - CAUTION will send ALOT of data
  • See Examples in folders.
  • ethercat master will show if its actually online

ImportError: No module named yapps

When I make
It has an error:
wilson@debian:~/linuxcnc-ethercat$ sudo make
[sudo] password for wilson:
Traceback (most recent call last):
File "/usr/bin/comp", line 26, in
from yapps import runtime
ImportError: No module named yapps
configure.mk:32: *** Unable to get modinc path. Stop.
make: *** [config.mk] Error 2

please help me!
thank you!

EL6900 configuration

Good morning, Sittner, if you can help me, I'm using EL6900 with two EL1904 inputs and one EL2904 output as your configuration, I think you should load the program first through TWINCAT3 in EL6090, but it does not work in linuxcnc, you can open your TwinSAFE example - project.xml in TWIN-CAT3 and download it in the EL6900 with no errors in sight, can you give me an orientation on this topic? Thank you.

-I have open TwinSAFE-project.xml and installed on the EL6900
-I have an error in TWINCAT3 led diag4 Communication error in one of the TwinSAFE
groups
-The errors are in the configuration EL1904 and EL2904, how to configure them?
status 0x68
diag 0x85
Up to here it is solved !!!!

now I have to fix the error in linuxcnc,
I have an error registering the PDO.

Error 0xF101: 01 not assigned ...

The6900
El1904
El1904
El2904
SafeOP + Error

error Sync manager watchdog

This is how it works!

error led diag4 error in groups

emc/task/emctaskmain.cc 3087: can't initialize interpreter

Dears
When I run linuxcnc with my config, there is an error appears as following
LINUXCNC - 2.8.0
Machine configuration directory is '/home/tsinglin/linuxcnc/configs/sim.Test_axis_HC_Sample-2'
Machine configuration file is 'cpd17_x.ini'
Starting LinuxCNC...
Found file(REL): ./cpd17_x.hal
emc/task/emctask.cc 411: interp_error: File not open
File not open
emc/task/emctaskmain.cc 3087: can't initialize interpreter
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
Shutting down and cleaning up LinuxCNC...

and here is my .hal config,How can I solve it?

loadusr -W lcec_conf ./ethercat-conf_X.xml
loadrt lcec
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt not count=1

addf lcec.read-all servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf not.0 servo-thread
addf lcec.write-all servo-thread

setp lcec.0.0.ControlWord-1 1
setp lcec.0.0.ControlWord-2 1

#net Xachse_fb lcec.0.0.PositionActualvalue => axis.0.motor-pos-fb
#net Xpos => lcec.0.0.TargetPosition
#net Xachse_AF axis.0.amp-enable-out => lcec.0.0.ControlWord-0
#net Xachse_AF => lcec.0.0.ControlWord-3
#net Xachse_AF => lcec.0.0.ControlWord-5

Thanks & Best Regards
Wade

does the two sentences need to be modified?

in examples/swm-fm45a-io.hal

.......
net coolant-on => lcec.0.D6.dout-0
net spindle-cw <= lcec.0.D6.dout-1
net spindle-ccw <= lcec.0.D6.dout-2
net z-brake => lcec.0.D3.dout-6
......

does the two sentences need to be modified to

......
net spindle-cw => lcec.0.D6.dout-1
net spindle-ccw => lcec.0.D6.dout-2
......
?

./debian/linuxcnc-ethercat/usr/lib/linuxcnc/modules/ directory is not created while running dpkg-buildpackage

Dear Mr. Ittner,

Thank you very much for the great work!

I would like to report a problem which occurs while building the packagage using dpkg-buildpackage command. The problem seems to be related to one of the Makefiles (presumably src/realtime.mk).

After cloning repository and running dpkg-buildpackage, I get the following error:

....
make[3]: Entering directory '/home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/src'
mkdir -p /home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/debian/linuxcnc-ethercat/usr/bin
cp lcec_conf /home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/debian/linuxcnc-ethercat/usr/bin/
make[3]: Leaving directory '/home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/src'
make[3]: Entering directory '/home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/src'
cp lcec.so /home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/debian/linuxcnc-ethercat/usr/lib/linuxcnc/modules/
cp: cannot create regular file '/home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/debian/linuxcnc-ethercat/usr/lib/linuxcnc/modules/': No such file or directory
/usr/share/linuxcnc/Makefile.modinc:104: recipe for target 'install' failed
make[3]: *** [install] Error 1
make[3]: Leaving directory '/home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/src'
Makefile:8: recipe for target 'install' failed
make[2]: *** [install] Error 2
make[2]: Leaving directory '/home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/src'
Makefile:11: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/home/user/src/linuxcnc-ethercat/linuxcnc-ethercat'
dh_auto_install: make -j1 install DESTDIR=/home/user/src/linuxcnc-ethercat/linuxcnc-ethercat/debian/linuxcnc-ethercat AM_UPDATE_INFO_DIR=no returned exit code 2
debian/rules:13: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

It would seem that linuxcnc-ethercat/usr/lib/linuxcnc/modules/ directory is not created during package build.

Unable to make

After downloading the file, Can't make. What's the problem?

igh ethercat driver with beaglebone

i am trying to write a w5500driver with machinekit on beaglebone for ethercat, but in kernel 4.9, the slave can't be found. in kerle 3.8 igh could find the slaves using generic driver.
I saw you have build one encx24j600 with machinekit, which kernel do you use?
can you help me to deal with the device tree and driver?
it took me too much time, Thanks Very very Much!

Truncated 16-bit signed integers?

I'm trying to set up a Delta MS300 VFD with a CMM-EC01 EtherCAT option card. I've got it working save for speed control.

It seems that the speed value sent to the VFD is lacking one of the two bytes of data:

  • EtherCAT PDO entry:
    <pdoEntry idx="6042" subIdx="00" bitLen="16" halPin="target-velocity" halType="s32"/>

  • Debugging:

    > halcmd getp lcec.0.3.target-velocity
    10000
    > ethercat upload -p 3 -t int16 0x6042 0
    0x0027 39
    > python -c 'print(hex(10000))'
    0x2710
    

It looks like the device has been told the speed should be 0x0027 instead of 0x2710, as if >> 8 has been added.

ethercat control slave

How to use linuxcnc to control slave.
I have successfully installed ethercat and detected slave, but I don't know what to do next. Who can share a tutorial with me
thanks
EtherCAT start

Rename project to be LinuxCNC/Machinekit agnostic

We're working on building .deb packages for the Machinekit project's APT package repos.

This might be a big ask, but can this project be renamed to e.g. hal-ethercat so it's clear that it's not only for LinuxCNC?

GitHub is pretty smart: When you rename a repository, links to the old repo name get redirected to the renamed repo. In this case, https://github.com/sittner/linuxcnc-ethercat would redirect to https://github.com/sittner/hal-ethercat in a web browser, and git remotes with the old URL (both https and ssh) will continue to work.

EL6900 Incompatible PDO Mapping

I have an EL6900 hw version 0, software version 3 and the PDO mapping from the code does not match what the device have.

ethercat pdo output:

SM0: PhysAddr 0x1000, DefaultSize  256, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1100, DefaultSize  256, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1200, DefaultSize    2, ControlRegister 0x24, Enable 1
  RxPDO 0x1600 "FSOE RxPDO-Map 001"
    PDO entry 0x7000:01,  8 bit, "FSOE Command"
    PDO entry 0x7001:01,  8 bit, "SubIndex 001"
    PDO entry 0x7000:03, 16 bit, "FSOE CRC 001"
    PDO entry 0x7000:02, 16 bit, "FSOE ConnID"
  RxPDO 0x17f0 "DEVICE RxPDO-Map Standard In Vars"
    PDO entry 0xf201:01,  1 bit, "SubIndex 001"
    PDO entry 0xf201:02,  1 bit, "SubIndex 002"
    PDO entry 0xf201:03,  1 bit, "SubIndex 003"
    PDO entry 0xf201:04,  1 bit, "SubIndex 004"
    PDO entry 0xf201:05,  1 bit, "SubIndex 005"
    PDO entry 0xf201:06,  1 bit, "SubIndex 006"
    PDO entry 0xf201:07,  1 bit, "SubIndex 007"
    PDO entry 0xf201:08,  1 bit, "SubIndex 008"
  RxPDO 0x17ff "DEVICE RxPDO-Map Control"
    PDO entry 0xf200:01, 16 bit, "Control"
SM3: PhysAddr 0x1d00, DefaultSize    2, ControlRegister 0x20, Enable 1
  TxPDO 0x1a00 "FSOE TxPDO-Map 001"
    PDO entry 0x6000:01,  8 bit, "FSOE Command"
    PDO entry 0x6001:01,  8 bit, "SubIndex 001"
    PDO entry 0x6000:03, 16 bit, "FSOE CRC 001"
    PDO entry 0x6000:02, 16 bit, "FSOE ConnID"
  TxPDO 0x1bf0 "DEVICE TxPDO-Map Standard Out Vars"
    PDO entry 0xf101:01,  1 bit, "SubIndex 001"
    PDO entry 0xf101:02,  1 bit, "SubIndex 002"
    PDO entry 0xf101:03,  1 bit, "SubIndex 003"
    PDO entry 0xf101:04,  1 bit, "SubIndex 004"
    PDO entry 0xf101:05,  1 bit, "SubIndex 005"
    PDO entry 0xf101:06,  1 bit, "SubIndex 006"
    PDO entry 0xf101:07,  1 bit, "SubIndex 007"
    PDO entry 0xf101:08,  1 bit, "SubIndex 008"
  TxPDO 0x1bff "DEVICE TxPDO-Map Status"
    PDO entry 0xf100:01,  3 bit, "Safety Project State"
    PDO entry 0x0000:00,  4 bit, "Gap"
    PDO entry 0xf100:08,  1 bit, "Login Active"
    PDO entry 0xf100:09,  1 bit, "Input Size Mismatch"
    PDO entry 0xf100:0a,  1 bit, "Output Size Mismatch"
    PDO entry 0x0000:00,  4 bit, "Gap"
    PDO entry 0x1800:07,  1 bit, ""
    PDO entry 0x1800:09,  1 bit, ""

Code:

  LCEC_PDO_INIT(pdo_entry_regs, slave->index, slave->vid, slave->pid, 0xf100, 0x0f, &hal_data->txpdo_state_os, &hal_data->txpdo_state_bp);
  LCEC_PDO_INIT(pdo_entry_regs, slave->index, slave->vid, slave->pid, 0xf100, 0x10, &hal_data->txpdo_toggle_os, &hal_data->txpdo_toggle_bp);

For some reason, on my device, I have a PDO entry 0x1800:07 and 0x1800:09 rather than the 0xf100:0f and 0xf100:10. The cause me to get the following error when loading it:

Failed to register PDO entry: No such file or directory
LCEC: master 0 PDO entry registration failed

Fixing the offset in the line above fix the issue.

Unexcepted realtime delay on task 0 with period 1000000

Dears
When I run linuxcnc,there is always an error exist as following:

Unexcepted realtime delay on task 0 with period 1000000
This message will only display once per session.
Run the Latency Test and resolve before continuing.
task: main loop took 0.022446 seconds
task: main loop took 0.010904 seconds
task: main loop took 0.011113 seconds
task: main loop took 0.011344 seconds
task: main loop took 0.030612 seconds
Shutting down and cleaning uo LinuxCNC
task: 44863 cycles, min=0.000744, max=0.081036, avg=0.002223, 159 latency excurs
ions (> 10x excepted cycle time of 0.001000s)
Note: Using POSIX realtime

I'm using debian9 with kernel 4.19.132-rt59. and when I run rt-tests, the max jitter is 90us.
The following is my "demsg" printed

what should I do now?


[16733.892777] ravb e6800000.ethernet eth0: Link is Down
[16733.898024] EtherCAT 0: Link state of ecm0 changed to DOWN.
[16733.903653] EtherCAT WARNING 0: 1 datagram TIMED OUT!
[16733.908741] EtherCAT WARNING 0: 19 datagrams UNMATCHED!
[16733.914019] EtherCAT 0: 0 slave(s) responding on main device.
[16741.137057] ravb e6800000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[16741.137876] EtherCAT 0: Link state of ecm0 changed to UP.
[16741.147419] EtherCAT WARNING 0: 1 datagram TIMED OUT!
[16741.362502] EtherCAT 0: 1 slave(s) responding on main device.
[16741.368298] EtherCAT 0: Slave states on main device: INIT.
[16741.374126] EtherCAT 0: Scanning bus.
[16741.577344] EtherCAT 0: Bus scanning completed in 200 ms.
[16741.582790] EtherCAT 0: Using slave 0 as DC reference clock.
[16741.592662] EtherCAT 0: Slave states on main device: PREOP.
[16774.389669] EtherCAT 0: Master thread exited.
[16774.394799] EtherCAT 0: Releasing main device 00:03:82:FE:20:98.
[16774.417715] ec_generic: Unloading.
[16774.444273] EtherCAT: Master module cleaned up.
[16776.520944] EtherCAT: Master driver 1.5.2 unknown
[16776.527372] EtherCAT: 1 master waiting for devices.
[16776.546774] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 unknown
[16776.554641] EtherCAT: Accepting 00:03:82:FE:20:98 as main device for master 0.
[16776.561984] ec_generic: Binding socket to interface 4 (eth0).
[16776.581612] EtherCAT 0: Starting EtherCAT-IDLE thread.
[16776.586977] EtherCAT 0: Link state of ecm0 changed to UP.
[16776.591249] EtherCAT 0: 1 slave(s) responding on main device.
[16776.591259] EtherCAT 0: Slave states on main device: PREOP.
[16776.591672] EtherCAT 0: Scanning bus.
[16776.787515] EtherCAT 0: Bus scanning completed in 196 ms.
[16776.792955] EtherCAT 0: Using slave 0 as DC reference clock.
[16802.516971] EtherCAT: Requesting master 0...
[16802.521311] EtherCAT: Successfully requested master 0.
[16802.528703] EtherCAT 0: Domain0: Logical address 0x00000000, 32 byte, expected working counter 3.
[16802.538527] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 32 byte, type LRW.
[16802.551591] EtherCAT 0: Master thread exited.
[16802.556011] EtherCAT 0: Starting EtherCAT-OP thread.
[16808.125764] EtherCAT WARNING 0-0: Slave did not sync after 5000 ms.
[16808.143958] EtherCAT 0: Domain 0: Working counter changed to 3/3
[16808.143965] .
[16808.272611] EtherCAT 0: Slave states on main device: OP.
[16808.558010] EtherCAT WARNING 0: 14 datagrams UNMATCHED!
[16808.785913] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 7 times.
[16809.145873] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16809.145879] .
[16809.559962] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16809.789905] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16810.149899] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16810.149906] .
[16810.561092] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16810.793900] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16811.153888] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16811.153893] .
[16811.558529] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16811.797899] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16812.157898] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16812.157904] .
[16812.560430] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16812.801898] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16813.161897] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16813.161903] .
[16813.559364] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16813.805913] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16814.165893] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16814.165899] .
[16814.558506] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16814.809893] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16815.169896] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16815.169902] .
[16815.559329] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16815.813904] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16816.173897] EtherCAT 0: Domain 0: 8 working counter changes - now 3/3
[16816.173903] .
[16816.558702] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16816.817906] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16817.177900] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16817.177906] .
[16817.559332] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16817.821892] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16818.181869] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16818.181875] .
[16818.560764] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16818.825894] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16819.185895] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16819.185901] .
[16819.561389] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16819.829911] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16820.189905] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16820.189912] .
[16820.561512] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16820.833898] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16821.193904] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16821.193910] .
[16821.558742] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16821.837914] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16822.197910] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16822.197916] .
[16822.559733] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16822.841897] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16823.201889] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16823.201895] .
[16823.560775] EtherCAT WARNING 0: 36 datagrams UNMATCHED!
[16823.845859] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 18 times.
[16824.205894] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16824.205900] .
[16824.558505] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16824.849895] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16825.209879] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16825.209884] .
[16825.557758] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16825.853896] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16826.213898] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16826.213903] .
[16826.558925] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16826.857870] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16827.217884] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16827.217890] .
[16827.560576] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16827.861900] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16828.221908] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16828.221914] .
[16828.559327] EtherCAT WARNING 0: 36 datagrams UNMATCHED!
[16828.865919] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 18 times.
[16829.225855] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16829.225861] .
[16829.559312] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16829.869906] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16830.229843] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16830.229854] .
[16830.559334] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16830.873920] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16831.233892] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16831.233898] .
[16831.560359] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16831.877892] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16832.237901] EtherCAT 0: Domain 0: 8 working counter changes - now 3/3
[16832.237908] .
[16832.557727] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16832.881852] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16833.241904] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16833.241911] .
[16833.558874] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16833.885917] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16834.245883] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16834.245889] .
[16834.557694] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16834.889858] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16835.249932] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16835.249940] .
[16835.560869] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16835.893898] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16836.253853] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16836.253859] .
[16836.561528] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16836.897904] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16837.257917] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16837.257924] .
[16837.558614] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16837.901904] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16838.261903] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16838.261909] .
[16838.557817] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16838.905898] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16839.265884] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16839.265890] .
[16839.559634] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16839.909919] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16840.269881] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16840.269886] .
[16840.558048] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16840.913853] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16841.273899] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16841.273905] .
[16841.559161] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16841.917874] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16842.035093] EtherCAT 0: 0 slave(s) responding on main device.
[16842.046817] EtherCAT 0: 1 slave(s) responding on main device.
[16842.052637] EtherCAT 0: Slave states on main device: OP.
[16842.067570] EtherCAT 0: Scanning bus.
[16842.277878] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16842.277883] .
[16842.560969] EtherCAT WARNING 0: 25 datagrams UNMATCHED!
[16842.863365] EtherCAT WARNING: Datagram 000000009709d9b5 (master-fsm) was SKIPPED 1 time.
[16842.921913] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16843.281897] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16843.281904] .
[16843.560394] EtherCAT WARNING 0: 16 datagrams UNMATCHED!
[16843.925884] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16844.285894] EtherCAT 0: Domain 0: 8 working counter changes - now 3/3
[16844.285901] .
[16844.558353] EtherCAT WARNING 0: 16 datagrams UNMATCHED!
[16844.929911] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16845.279272] EtherCAT 0: Bus scanning completed in 3220 ms.
[16845.285100] EtherCAT 0: Using slave 0 as DC reference clock.
[16845.289855] EtherCAT 0: Domain 0: 4 working counter changes - now 3/3
[16845.289861] .
[16845.559029] EtherCAT WARNING 0: 10 datagrams UNMATCHED!
[16845.933893] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 9 times.
[16846.293902] EtherCAT 0: Domain 0: 2 working counter changes - now 3/3
[16846.293909] .
[16846.560366] EtherCAT WARNING 0: 32 datagrams UNMATCHED!
[16846.937895] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 16 times.
[16847.297881] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16847.297887] .
[16847.560378] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16847.941881] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16848.301898] EtherCAT 0: Domain 0: 6 working counter changes - now 3/3
[16848.301904] .
[16848.560487] EtherCAT WARNING 0: 34 datagrams UNMATCHED!
[16848.945876] EtherCAT WARNING: Datagram 0000000034347194 (domain0-0-main) was SKIPPED 17 times.
[16849.078481] EtherCAT 0: Master thread exited.
[16849.082914] EtherCAT 0: Starting EtherCAT-IDLE thread.
[16849.088856] EtherCAT 0: Releasing master...
[16849.093155] EtherCAT 0: Released.
[16849.097545] EtherCAT WARNING 0-0: Changed to SAFEOP + ERROR in the meantime.
[16849.215460] EtherCAT 0: Slave states on main device: PREOP.
[16849.892503] EtherCAT WARNING: Datagram 000000009709d9b5 (master-fsm) was SKIPPED 1 time.

Problem with 64-bits

Hi Sascha,

Since your last update of config files I get this error in debian wheezy with linuxcnc 2.7.3 64bits. In other system with 32 bits the problem doesn't occur.

make[1]: se ingresa al directorio /home/fdl/linuxcnc/ethercat/linuxcnc-ethercat/src' make[2]: se ingresa al directorio/home/fdl/linuxcnc/ethercat/linuxcnc-ethercat/src'
gcc -o lcec_conf.o -Os -g -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I/usr/include/i386-linux-gnu -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range -mhard-float -DRTAI=3 -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__ -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULAPI -Os -c lcec_conf.c
gcc -o lcec_conf lcec_conf.o -Wl,-rpath,/lib -L/lib -llinuxcnchal -lexpat
/usr/bin/ld: /usr/lib/gcc/i486-linux-gnu/4.7/../../../i386-linux-gnu/crti.o: unrecognized relocation (0x2b) in section .init' /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status make[2]: *** [lcec_conf] Error 1 make[2]: se sale del directorio/home/fdl/linuxcnc/ethercat/linuxcnc-ethercat/src'
make[1]: *** [all] Error 2
make[1]: se sale del directorio `/home/fdl/linuxcnc/ethercat/linuxcnc-ethercat/src'
make: *** [all] Error 2

Is it support Linuxcnc 2.9 now?

Dears
I‘ve tried many times on linuxcnc 2.9 with this driver。but it always has many problems。
Can it match Linuxcnc 2.9 now?
Thanks & Best Regards
Wade

sdoConfig data with Etherlab

Your README says:

to get the sdoConfig data (which is needed to configure the
EL6751 in this case) is generated by TwinCAT by Beckhoff.

I just found out that you can do the same with Etherlab master:

$ ethercat debug 1
$ ethercat download -a 255  --type int16 0x6040 0 0x000f

And then:

$ dmesg  -T | tail  -10
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG 0: ecrt_master_sdo_download(master = 0xffff880136276000, slave_position = 0, index = 0x6040, subindex = 0x00, data = 0xffff8801382cf0a8, data_size = 2, abort_code = 0xffff880138a2fd40)
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG 0-0: Scheduling SDO download request.
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG 0-0: Processing SDO request...
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG 0-0: Downloading SDO 0x6040:00.
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG: 0F 00
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG 0-0: Expedited download request:
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG: 00 20 2B 40 60 00 0F 00 00 00
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG 0-0: Download response:
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG: 00 30 60 40 60 00 00 00 00 00
[Fri Nov 13 12:19:47 2015] EtherCAT DEBUG 0-0: Finished SDO request.

You can then identify 2B 40 60 00 0F 00 00 00 as a raw SDO message.
Of course, the problem of correct order of the SDO configuration messages does not go away thus,
but at least we do not need any TwinCAT.

hello, scale AX5000 + sync + lcec_write_idn

Hello, can you help me with the enlargement of the scale for the AX5000 in speed mode ?, tried to follow the example of the file Stmds5K.c but I can not get it to work well, can you help me?
Thank you.

ASDA-A2-E not responding to vel_cmd (PDO 0x60FF)

I am having a problem getting the servo to move through linuxcnc. I have followed the instructions in the delta ASDA-A2-E manual and can confirm in lcec.deasda.c that everything that should be happening, is happening. I cannot confirm if the data is actually getting written to 0x60FF (target velocity PDO) but due to the enable volts and other control PDO bits working as intended, I have to assume the connection is fine. Seeing others posting problems with tuning problems means they've gotten past the problem I currently have.

Things that work:
-can jog in ASDA_SOFT using usb connection.

  • setp lcec.0.x.srv-enable-volts true (enables drive volts in linuxcnc where it can then be followed by lcec.0.x.srv-enable where it then holds torque.
    -can read encoder position when enabled or not. Confirmed by spinning motor by hand and seeing the position change in LinuxCNC
    -read all the related hal pins to the drive and none of the fault or warnings are true.

Things that don't work
-setp lcec.0.x.srv-vel-cmd 10 ( or any number)

Super frustrating when all the other things work fine including a write to the control PDO, but velocity doesn't even show an error. Its as if the drive isn't looking at that register.

I posted before as tezza120 but the heading might of been too vague?

Any help would be greatly appreciated.

Possible bug: rtapi_mutex_get instead of rtapi_mutex_try ?

If I understand these lines correctly

'rtapi_mutex_get()' gets the mutex pointed to by 'mutex',
blocking if the mutex is not available. Because of this,
calling it from a realtime task is a "very bad" thing to
do.

https://github.com/machinekit/machinekit/blob/9e5dedd360fddd31cb8963a714f7297519c6bd4e/src/rtapi/rtapi.h#L405-L409
then the cyclic tasks void lcec_read_master(void *arg, long period) and void lcec_write_master(void *arg, long period) may not give a mutex if the cycle time is not properly estimated and therefore exceeds the servo thread period?

int rtapi_mutex_try(unsigned long *mutex) as a workaround?

generic driver - 8/16 bit signed floats require cast before return not to loose the signal

Here is the fix:

hal_s32_t lcec_generic_read_s32(uint8_t *pd, lcec_generic_pin_t *hal_data) {
int i, offset;
hal_s32_t sval;
if (hal_data->pdo_bp == 0 && hal_data->bitOffset == 0) {
switch (hal_data->bitLength) {
case 8:
return EC_READ_S8(&pd[hal_data->pdo_os]);
case 16:
return EC_READ_S16(&pd[hal_data->pdo_os]);
case 32:
return EC_READ_S32(&pd[hal_data->pdo_os]);
}
}

offset = ((hal_data->pdo_os << 3) | (hal_data->pdo_bp & 0x07)) + hal_data->bitOffset;
for (sval=0, i=0; i < hal_data->bitLength; i++, offset++) {
if (EC_READ_BIT(&pd[offset >> 3], offset & 0x07)) {
sval |= (1 << i);
}
}

switch (hal_data->bitLength) {
case 8:
return (int8_t)sval;
case 16:
return (int16_t)sval;
}

return sval;
}

How build with machinkit-hal and EMCApplication?

How build with machinkit-hal and EMCApplication?
I want build it with machinekit-hal & emcapplication.
machinekit-hal & emcapplication already builded and work~
but when i want build linuxcnc-ethercat, there seems to be a dependency error of the library?
I changed the link library path to machinekit-hal and modified the library to -lhal, but it doesn't seem to work

LCEC and deasda ethercat not 100% working

So I've successfully got LCEC Hal commands to enable the asda-a2 E drive where it will hold position...kind of (very slow rotation) but LCEC.0.x.srv-vel-cmd 10 has no effect on the drive. The Hal pin shows its set to 10 but no spin. When linked to the joint , it will have holding torque but a command to new position results in ferror.

srv-enable works
enc-pos works
Neg and pos limits are false
srv-vel-cmd doesn't work. No error, just no spin

I feel like I may have a servo parameter set wrong but the fact I can successfully use every other hal pin but srv-vel-cmd is a tad confusing.

Anyone else had this problem and solved it?

A question about xml_config

When I config the ethercat-conf-X.xml ,there are more than 20 startup SDO in my servo‘s xml。need I config them all?

The list is as following:

0x1C12:00 0x1C13:00 0x1A00:00 0x1A00:01 0x1A00:02 0x1A00:03 0x1A00:04 0x1A00:05 0x1A00:06 0x1A00:07 0x1A00:08 0x1A00:00 0x1A01:00 0x1A01:01 0x1A01:02 0x1A01:03 0x1A01:04 0x1A01:05 0x1A01:06 0x1A01:07 0x1A01:08 0x1A01:09 0x1A01:00 0x1A02:00 0x1A02:01 0x1A02:02 0x1A02:03 0x1A02:04 0x1A02:05 0x1A02:06 0x1A02:07 0x1A02:08 0x1A02:09 0x1A02:00 0x1A03:00 0x1A03:01 0x1A03:02 0x1A03:03 0x1A03:04 0x1A03:05 0x1A03:06 0x1A03:07 0x1A03:08 0x1A03:09 0x1A03:00 0x1600:00 0x1600:01 0x1600:02 0x1600:03 0x1600:04 0x1600:00 0x1601:00 0x1601:01 0x1601:02 0x1601:03 0x1601:04 0x1601:05 0x1601:06 0x1601:07 0x1601:00 0x1602:00 0x1602:01 0x1602:02 0x1602:03 0x1602:04 0x1602:05 0x1602:06 0x1602:00 0x1603:00 0x1603:01 0x1603:02 0x1603:03 0x1603:04 0x1603:05 0x1603:06 0x1603:07 0x1603:08 0x1603:00 0x1C12:01 0x1C12:00 0x1C13:01 0x1C13:00

System crash with complex pins

Hallo Sascha,
beim Benutzen von vielen Complex Pins kommt es zu einem System crash.

Siehe dmesg:
[ 2154.820477] I-pipe: head domain RTAI registered.
[ 2154.820481] RTAI[hal]: compiled with gcc version 4.7.2 (Debian 4.7.2-5) .
[ 2154.820510] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 2154.820513] SYSINFO: CPUs 2, LINUX APIC IRQ 2312, TIM_FREQ 20870305, CLK_FREQ 2671600000, CPU_FREQ 2671600000
[ 2154.820516] RTAI_APIC_TIMER_IPI: RTAI DEFINED 2314, VECTOR 2314; LINUX_APIC_TIMER_IPI: RTAI DEFINED 2312, VECTOR 2312
[ 2154.820519] TIMER NAME: lapic; VARIOUSLY FOUND APIC FREQs: 20870305, 20870305, 20832250
[ 2154.827127] RTAI[malloc]: global heap size = 2097152 bytes, .
[ 2154.827154] , , kstacks pool size = 524288 bytes.
[ 2154.827158] RTAI[sched]: hard timer type/freq = APIC/20870305(Hz); default timing: oneshot; linear timed lists.
[ 2154.827161] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2671600000 hz.
[ 2154.827163] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 2154.841034] RTAI[math]: loaded.
[ 2154.890487] EtherCAT: Requesting master 0...
[ 2154.890492] EtherCAT: Successfully requested master 0.
[ 2154.890517] BUG: unable to handle kernel paging request at 0102f10f
[ 2154.890539] IP: [] rtapi_vsnprintf+0x33f/0x950 [rtapi]
[ 2154.890552] *pde = 00000000
[ 2154.890558] Oops: 0000 [#1] PREEMPT SMP
[ 2154.890568] Modules linked in: lcec(O+) hal_lib(O) rtapi(O) rtai_math(O) rtai_sched(O) rtai_hal(O) cryptd aes_i586 aes_generic parport_pc ppdev lp parport bnep rfcomm bluetooth uinput nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc ec_8139too(O) ec_master(O) loop arc4 adt7475 hwmon_vid snd_rme96 snd_pcm snd_page_alloc snd_seq snd_seq_device snd_timer rtl8187 mac80211 cfg80211 rfkill eeprom_93cx6 snd coretemp i2c_i801 serio_raw soundcore iTCO_wdt iTCO_vendor_support evdev asus_atk0110 nouveau mxm_wmi wmi video ttm drm_kms_helper drm thermal_sys power_supply i2c_algo_bit i2c_core button ext4 crc16 jbd2 mbcache sg sd_mod crc_t10dif usbhid hid floppy ata_generic pata_jmicron microcode ahci libahci 8139cp mii ata_piix uhci_hcd libata scsi_mod ehci_hcd usbcore usb_common [last unloaded: rtai_hal]
[ 2154.890749]
[ 2154.891059] Pid: 8362, comm: insmod Tainted: G O 3.4-9-rtai-686-pae #1 System manufacturer P5K Deluxe/P5K Deluxe
[ 2154.891073] EIP: 0060:[] EFLAGS: 00010286 CPU: 1
[ 2154.891079] EIP is at rtapi_vsnprintf+0x33f/0x950 [rtapi]
[ 2154.891086] EAX: 0102f10f EBX: fb421885 ECX: ffffffff EDX: fb344496
[ 2154.891093] ESI: ffffffff EDI: f314be01 EBP: f314bde4 ESP: f314bd80
[ 2154.891112] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 2154.891129] CR0: 80050033 CR2: 0102f10f CR3: 3482b000 CR4: 000007d0
[ 2154.891141] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 2154.891155] DR6: ffff0ff0 DR7: 00000400
[ 2154.891166] Process insmod (pid: 8362, ti=f314a000 task=f6f20d40 task.ti=f314a000)
[ 2154.891182] I-pipe domain Linux
[ 2154.891187] Stack:
[ 2154.891192] c13ee769 c13ee767 c104ec08 00000030 fffffffe fb40c59c f314bddc 0000001f
[ 2154.891223] 00000001 fb40c5cb fb40c59c c1363d5c 00000020 00000030 fffffffe f314bdfc
[ 2154.891256] f314be68 00000004 fb3614ec f314be2b 00000000 fb365a31 00000001 00000010
[ 2154.891287] Call Trace:
[ 2154.891297] [] ? get_parent_ip+0x8/0x20
[ 2154.891311] [] ? _raw_spin_unlock_irqrestore+0x1c/0x40
[ 2154.891321] [] ? hal_pin_new+0x22c/0x400 [hal_lib]
[ 2154.891332] [] ? hal_pin_newfv+0x3a/0xb0 [hal_lib]
[ 2154.891344] [] ? hal_pin_newfv+0x5c/0xb0 [hal_lib]
[ 2154.891353] [] ? get_parent_ip+0x8/0x20
[ 2154.891364] [] ? add_preempt_count+0x5f/0xa0
[ 2154.891372] [] ? _raw_spin_lock_irqsave+0x41/0x70
[ 2154.891388] [] ? hal_pin_bit_newf+0x2c/0x30 [hal_lib]
[ 2154.891398] [] ? lcec_el2xxx_init+0xc3/0x157 [lcec]
[ 2154.891412] [] ? lcec_el2xxx_write+0x79/0x79 [lcec]
[ 2154.891426] [] ? init_module+0x1d7/0x4b0 [lcec]
[ 2154.891442] [] ? 0xfb411fff
[ 2154.891459] [] ? change_page_attr_set_clr+0x2eb/0x390
[ 2154.891477] [] ? do_one_initcall+0x32/0x190
[ 2154.891492] [] ? set_memory_ro+0x31/0x40
[ 2154.891513] [] ? lcec_init_slave_state_hal+0x1a6/0x1a6 [lcec]
[ 2154.891536] [] ? sys_init_module+0x8bd/0x1ad0
[ 2154.891559] [] ? sysenter_do_call+0x12/0x16
[ 2154.891576] Code: 38 0a 00 00 00 e9 6b ff ff ff 8b 45 08 8b 55 08 83 c0 04 89 44 24 40 8b 02 ba 96 44 34 fb 85 c0 0f 44 c2 85 f6 0f 84 b1 05 00 00 <80> 38 00 0f 84 a8 05 00 00 83 ee 01 89 c2 89 74 24 44 31 f6 89
[ 2154.891775] EIP: [] rtapi_vsnprintf+0x33f/0x950 [rtapi] SS:ESP 0068:f314bd80
[ 2154.891798] CR2: 000000000102f10f
[ 2154.898518] ---[ end trace cfb55c06b06f1de9 ]---
[ 2157.182374] RTAI[math]: unloaded.

hier die Einträge in der XML:

<sdoConfig idx="1c32" subIdx="complete">
  <sdoDataRaw data="03 00 01 00 00 09 3D 00"/>
  <sdoDataRaw data="00 00 00 00"/>
</sdoConfig>

<sdoConfig idx="1c33" subIdx="complete">
  <sdoDataRaw data="03 00 22 00 00 00 00 00"/>
  <sdoDataRaw data="00 9F 24 00"/>
</sdoConfig>

<sdoConfig idx="f800" subIdx="complete">
  <sdoDataRaw data="0A 00 7F 02 80 00 1E 00"/>
  <sdoDataRaw data="01 00 11 00 64 00"/>
</sdoConfig>

<!--SDO Init Cmds Node 0 -->
<sdoConfig idx="8000" subIdx="complete">
  <sdoDataRaw data="2B 00 02 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 92 01 42 00"/>
  <sdoDataRaw data="A4 00 00 00 D0 20 00 00"/>
  <sdoDataRaw data="00 00 00 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 64 00 03 00"/>
  <sdoDataRaw data="D0 07 D0 07 03 03 77 00"/>
  <sdoDataRaw data="0A 0A"/>
</sdoConfig>

<sdoConfig idx="8001" subIdx="complete">
  <sdoDataRaw data="03 00 01 00 00 00 FF 02"/>
  <sdoDataRaw data="82 01 00 00 00 00 00 18"/>
  <sdoDataRaw data="01 00 00 00 FF 06 82 02"/>
  <sdoDataRaw data="00 00 00 00 01 18 01 00"/>
  <sdoDataRaw data="00 00 FF 06 82 03 00 00"/>
  <sdoDataRaw data="00 00 02 18"/>
</sdoConfig>

<sdoConfig idx="8002" subIdx="complete">
  <sdoDataRaw data="03 00 00 00 00 00 FF 02"/>
  <sdoDataRaw data="02 02 00 00 00 00 00 14"/>
  <sdoDataRaw data="00 00 00 00 FF 06 02 03"/>
  <sdoDataRaw data="00 00 00 00 01 14 00 00"/>
  <sdoDataRaw data="00 00 FF 06 02 04 00 00"/>
  <sdoDataRaw data="00 00 02 14"/>
</sdoConfig>

<sdoConfig idx="8003" subIdx="complete">
  <sdoDataRaw data="10 00"/>
  <sdoDataRaw data="00 18 01 04 00 82 01 00 00"/>
  <sdoDataRaw data="00 18 02 01 00 FF"/>
  <sdoDataRaw data="01 18 01 04 00 82 02 00 00"/>
  <sdoDataRaw data="01 18 02 01 00 FF"/>
  <sdoDataRaw data="02 18 01 04 00 82 03 00 00"/>
  <sdoDataRaw data="02 18 02 01 00 FF "/>
  <sdoDataRaw data="00 14 01 04 00 02 02 00 00"/>
  <sdoDataRaw data="00 14 02 01 00 FF "/>
  <sdoDataRaw data="01 14 01 04 00 02 03 00 00 "/>
  <sdoDataRaw data="01 14 02 01 00 FF "/>
  <sdoDataRaw data="02 14 01 04 00 02 04 00 00 "/>
  <sdoDataRaw data="02 14 02 01 00 FF"/>
  <!-- 0x6081 Geschwindigkeit 0x2710 (10000)-->
  <sdoDataRaw data="81 60 00 04 00 10 27 00 00"/>
  <!-- 0x6083 Beschleunigung 0x2CFFFF (2949119)-->
  <sdoDataRaw data="83 60 00 04 00 FF FF 2C 00"/>
  <!-- 0x6084 Verzögerung 0x2CFFFF (2949119)-->
  <sdoDataRaw data="84 60 00 04 00 FF FF 2C 00"/>
  <!-- 0x6040 Commandregister 0x0080-->
  <sdoDataRaw data="40 60 00 02 00 80 00"/>
  <!-- 0x6040 Commandregister 0x000F-->
  <sdoDataRaw data="40 60 00 02 00 0F 00"/>
  <!-- 0x6060 Mode Positionsregelung 0x01-->
  <sdoDataRaw data="60 60 00 01 00 01"/>
</sdoConfig>

<!--SDO Init Cmds Node 1 -->
<sdoConfig idx="8010" subIdx="complete">
  <sdoDataRaw data="2B 00 03 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 92 01 42 00"/>
  <sdoDataRaw data="A4 00 00 00 D0 20 00 00"/>
  <sdoDataRaw data="00 00 00 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 64 00 03 00"/>
  <sdoDataRaw data="D0 07 D0 07 03 03 77 00"/>
  <sdoDataRaw data="0A 0A"/>
</sdoConfig>

<sdoConfig idx="8011" subIdx="complete">
  <sdoDataRaw data="03 00 01 00 00 00 FF 02"/>
  <sdoDataRaw data="83 01 00 00 00 00 00 18"/>
  <sdoDataRaw data="01 00 00 00 FF 06 83 02"/>
  <sdoDataRaw data="00 00 00 00 01 18 01 00"/>
  <sdoDataRaw data="00 00 FF 06 83 03 00 00"/>
  <sdoDataRaw data="00 00 02 18"/>
</sdoConfig>

<sdoConfig idx="8012" subIdx="complete">
  <sdoDataRaw data="03 00 00 00 00 00 FF 02"/>
  <sdoDataRaw data="03 02 00 00 00 00 00 14"/>
  <sdoDataRaw data="00 00 00 00 FF 06 03 03"/>
  <sdoDataRaw data="00 00 00 00 01 14 00 00"/>
  <sdoDataRaw data="00 00 FF 06 03 04 00 00"/>
  <sdoDataRaw data="00 00 02 14"/>
</sdoConfig>

<sdoConfig idx="8013" subIdx="complete">
  <sdoDataRaw data="10 00"/>
  <sdoDataRaw data="00 18 01 04 00 83 01 00 00"/>
  <sdoDataRaw data="00 18 02 01 00 FF"/>
  <sdoDataRaw data="01 18 01 04 00 83 02 00 00"/>
  <sdoDataRaw data="01 18 02 01 00 FF"/>
  <sdoDataRaw data="02 18 01 04 00 83 03 00 00"/>
  <sdoDataRaw data="02 18 02 01 00 FF"/>
  <sdoDataRaw data="00 14 01 04 00 03 02 00 00"/>
  <sdoDataRaw data="00 14 02 01 00 FF"/>
  <sdoDataRaw data="01 14 01 04 00 03 03 00 00"/>
  <sdoDataRaw data="01 14 02 01 00 FF"/>
  <sdoDataRaw data="02 14 01 04 00 03 04 00 00"/>
  <sdoDataRaw data="02 14 02 01 00 FF"/>
  <!-- 0x6081 Geschwindigkeit 0x2710 (10000)-->
  <sdoDataRaw data="81 60 00 04 00 10 27 00 00"/>
  <!-- 0x6083 Beschleunigung 0x2CFFFF (2949119)-->
  <sdoDataRaw data="83 60 00 04 00 FF FF 2C 00"/>
  <!-- 0x6084 Verzögerung 0x2CFFFF (2949119)-->
  <sdoDataRaw data="84 60 00 04 00 FF FF 2C 00"/>
  <!-- 0x6040 Commandregister 0x0080-->
  <sdoDataRaw data="40 60 00 02 00 80 00"/>
  <!-- 0x6040 Commandregister 0x000F-->
  <sdoDataRaw data="40 60 00 02 00 0F 00"/>
  <!-- 0x6060 Mode Positionsregelung 0x01-->
  <sdoDataRaw data="60 60 00 01 00 01"/>
</sdoConfig>

<!--SDO Init Cmds Node 2 -->
<sdoConfig idx="8020" subIdx="complete">
  <sdoDataRaw data="2B 00 04 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 92 01 42 00"/>
  <sdoDataRaw data="A4 00 00 00 D0 20 00 00"/>
  <sdoDataRaw data="00 00 00 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 00 00 00 00"/>
  <sdoDataRaw data="00 00 00 00 64 00 03 00"/>
  <sdoDataRaw data="D0 07 D0 07 03 03 89 00"/>
  <sdoDataRaw data="0A 0A"/>
</sdoConfig>

<sdoConfig idx="8021" subIdx="complete">
  <sdoDataRaw data="03 00 01 00 00 00 FF 02"/>
  <sdoDataRaw data="84 01 00 00 00 00 00 18"/>
  <sdoDataRaw data="01 00 00 00 FF 06 84 02"/>
  <sdoDataRaw data="00 00 00 00 01 18 01 00"/>
  <sdoDataRaw data="00 00 FF 06 84 03 00 00"/>
  <sdoDataRaw data="00 00 02 18"/>
</sdoConfig>

<sdoConfig idx="8022" subIdx="complete">
  <sdoDataRaw data="03 00 00 00 00 00 FF 02"/>
  <sdoDataRaw data="04 02 00 00 00 00 00 14"/>
  <sdoDataRaw data="00 00 00 00 FF 06 04 03"/>
  <sdoDataRaw data="00 00 00 00 01 14 00 00"/>
  <sdoDataRaw data="00 00 FF 06 04 04 00 00"/>
  <sdoDataRaw data="00 00 02 14"/>
</sdoConfig>

<sdoConfig idx="8023" subIdx="complete">
  <sdoDataRaw data="12 00"/>
  <sdoDataRaw data="00 18 01 04 00 84 01 00 00"/>
  <sdoDataRaw data="00 18 02 01 00 FF"/>
  <sdoDataRaw data="01 18 01 04 00 84 02 00 00"/>
  <sdoDataRaw data="01 18 02 01 00 FF"/>
  <sdoDataRaw data="02 18 01 04 00 84 03 00 00"/>
  <sdoDataRaw data="02 18 02 01 00 FF"/>
  <sdoDataRaw data="00 14 01 04 00 04 02 00 00"/>
  <sdoDataRaw data="00 14 02 01 00 FF"/>
  <sdoDataRaw data="01 14 01 04 00 04 03 00 00"/>
  <sdoDataRaw data="01 14 02 01 00 FF"/>
  <sdoDataRaw data="02 14 01 04 00 04 04 00 00"/>
  <sdoDataRaw data="02 14 02 01 00 FF"/>
  <!-- 0x6081 Geschwindigkeit 0x2710 (10000)-->
  <sdoDataRaw data="81 60 00 04 00 10 27 00 00"/>
  <!-- 0x6083 Beschleunigung 0x2CFFFF (2949119)-->
  <sdoDataRaw data="83 60 00 04 00 FF FF 2C 00"/>
  <!-- 0x6084 Verzögerung 0x2CFFFF (2949119)-->
  <sdoDataRaw data="84 60 00 04 00 FF FF 2C 00"/>
  <!-- 0x6040 Commandregister 0x0080-->
  <sdoDataRaw data="40 60 00 02 00 80 00"/>
  <!-- 0x6040 Commandregister 0x000F-->
  <sdoDataRaw data="40 60 00 02 00 0F 00"/>
  <!-- 0x6060 Mode Positionsregelung 0x01-->
  <sdoDataRaw data="60 60 00 01 00 01"/>
</sdoConfig>

<sdoConfig idx="1c12" subIdx="complete">
  <sdoDataRaw data="03 00 00 16 01 16 02 16"/>
</sdoConfig>

<sdoConfig idx="1c13" subIdx="complete">
  <sdoDataRaw data="04 00 00 1A 01 1A 02 1A 80 1A"/>
</sdoConfig>

<syncManager idx="0" dir="out">
</syncManager>
<syncManager idx="1" dir="in">
</syncManager>

<syncManager idx="2" dir="out">
  <pdo idx="1600">
    <pdoEntry idx="7000" subIdx="01" bitLen="16" halPin="X-RxPDO_1" halType="u32"/>
    <pdoEntry idx="7000" subIdx="02" bitLen="48" halType="complex">
    <complexEntry bitLen="1" halPin="X-cmd-SwitchOn" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-EnableVoltage" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-/QuickStop" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-EnableOperation" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-NewSetpoint" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-ChangeSetImmediatly" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-RelativPos" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-FaultReset" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-Halt" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-bit09" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-bit10" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-bit11" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-bit12" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-bit13" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-bit14" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-cmd-bit15" halType="bit"/>
    <complexEntry bitLen="32" halPin="X-TargetPos" halType="float" scale="3276.8"/>
</pdoEntry>
    <pdoEntry idx="7000" subIdx="03" bitLen="48" halType="complex">
      <complexEntry bitLen="16" halPin="X-RxPDO_3-cmd" halType="u32"/>
      <complexEntry bitLen="32" halPin="X-RxPDO_3-vel" halType="s32"/>
</pdoEntry>
  </pdo>

  <pdo idx="1601">
    <pdoEntry idx="7010" subIdx="01" bitLen="16" halPin="Y-RxPDO_1" halType="u32"/>
    <pdoEntry idx="7010" subIdx="02" bitLen="48" halType="complex">
    <complexEntry bitLen="1" halPin="Y-cmd-SwitchOn" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-EnableVoltage" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-/QuickStop" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-EnableOperation" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-NewSetpoint" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-ChangeSetImmediatly" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-RelativPos" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-FaultReset" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-Halt" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-bit09" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-bit10" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-bit11" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-bit12" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-bit13" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-bit14" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-cmd-bit15" halType="bit"/>
    <complexEntry bitLen="32" halPin="Y-TargetPos" halType="float" scale="3276.8"/>
</pdoEntry>
    <pdoEntry idx="7010" subIdx="03" bitLen="48" halType="complex">
      <complexEntry bitLen="16" halPin="Y-RxPDO_3-cmd" halType="u32"/>
      <complexEntry bitLen="32" halPin="Y-RxPDO_3-vel" halType="s32"/>
</pdoEntry>
  </pdo>

  <pdo idx="1602">
    <pdoEntry idx="7020" subIdx="01" bitLen="16" halPin="Z-RxPDO_1" halType="u32"/>
    <pdoEntry idx="7020" subIdx="02" bitLen="48" halType="complex">
    <complexEntry bitLen="1" halPin="Z-cmd-SwitchOn" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-EnableVoltage" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-/QuickStop" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-EnableOperation" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-NewSetpoint" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-ChangeSetImmediatly" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-RelativPos" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-FaultReset" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-Halt" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-bit09" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-bit10" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-bit11" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-bit12" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-bit13" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-bit14" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-cmd-bit15" halType="bit"/>
    <complexEntry bitLen="32" halPin="Z-TargetPos" halType="float" scale="3276.8"/>
</pdoEntry>
    <pdoEntry idx="7020" subIdx="03" bitLen="48" halType="complex">
      <complexEntry bitLen="16" halPin="Z-RxPDO_3-cmd" halType="u32"/>
      <complexEntry bitLen="32" halPin="Z-RxPDO_3-vel" halType="s32"/>
</pdoEntry>
  </pdo>
</syncManager>

<syncManager idx="3" dir="in">
  <pdo idx="1a00">
    <pdoEntry idx="6000" subIdx="01" bitLen="16" halPin="X-TxPDO_1" halType="u32"/>
    <pdoEntry idx="6000" subIdx="02" bitLen="48" halType="complex">
    <complexEntry bitLen="1" halPin="X-stat-ReadyToSwitchOn" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-SwitchOn" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-OperationEnable" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-Fault" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-VoltageEnabled" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-QuickStop" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-SwitchOnDisable" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-Warning" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-HaltRequestActive" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-Remote" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-TargetIsReached" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-bit11" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-SetpointAck" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-x_err" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-x_end" halType="bit"/>
    <complexEntry bitLen="1" halPin="X-stat-RefOk" halType="bit"/>
    <complexEntry bitLen="32" halPin="X-Pos" halType="float" scale="0.00030517578125"/>
</pdoEntry>
    <pdoEntry idx="6000" subIdx="03" bitLen="48" halType="complex">
      <complexEntry bitLen="16" halPin="X-TxPDO_3-cmd" halType="u32"/>
      <complexEntry bitLen="32" halPin="X-TxPDO_3-vel" halType="s32"/>
</pdoEntry>
  </pdo>

  <pdo idx="1a01">
    <pdoEntry idx="6010" subIdx="01" bitLen="16" halPin="Y-TxPDO_1" halType="u32"/>
    <pdoEntry idx="6010" subIdx="02" bitLen="48" halType="complex">
    <complexEntry bitLen="1" halPin="Y-stat-ReadyToSwitchOn" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-SwitchOn" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-OperationEnable" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-Fault" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-VoltageEnabled" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-QuickStop" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-SwitchOnDisable" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-Warning" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-HaltRequestActive" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-Remote" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-TargetIsReached" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-bit11" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-SetpointAck" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-x_err" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-x_end" halType="bit"/>
    <complexEntry bitLen="1" halPin="Y-stat-RefOk" halType="bit"/>
    <complexEntry bitLen="32" halPin="Y-Pos" halType="float" scale="0.00030517578125"/>
</pdoEntry>
    <pdoEntry idx="6010" subIdx="03" bitLen="48" halType="complex">
      <complexEntry bitLen="16" halPin="Y-TxPDO_3-cmd" halType="u32"/>
      <complexEntry bitLen="32" halPin="Y-TxPDO_3-vel" halType="s32"/>
</pdoEntry>
  </pdo>

  <pdo idx="1a02">
    <pdoEntry idx="6020" subIdx="01" bitLen="16" halPin="Z-TxPDO_1" halType="u32"/>
    <pdoEntry idx="6020" subIdx="02" bitLen="48" halType="complex">
    <complexEntry bitLen="1" halPin="Z-stat-ReadyToSwitchOn" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-SwitchOn" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-OperationEnable" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-Fault" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-VoltageEnabled" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-QuickStop" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-SwitchOnDisable" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-Warning" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-HaltRequestActive" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-Remote" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-TargetIsReached" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-bit11" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-SetpointAck" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-x_err" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-x_end" halType="bit"/>
    <complexEntry bitLen="1" halPin="Z-stat-RefOk" halType="bit"/>
    <complexEntry bitLen="32" halPin="Z-Pos" halType="float" scale="0.00030517578125"/>
</pdoEntry>
    <pdoEntry idx="6020" subIdx="03" bitLen="48" halType="complex">
      <complexEntry bitLen="16" halPin="Z-TxPDO_3-cmd" halType="u32"/>
      <complexEntry bitLen="32" halPin="Z-TxPDO_3-vel" halType="s32"/>
</pdoEntry>
  </pdo>

  <pdo idx="1a80">
    <pdoEntry idx="f102" subIdx="01" bitLen="8" halPin="CanNode1State" halType="u32"/>
    <pdoEntry idx="f102" subIdx="02" bitLen="8" halPin="CanNode2State" halType="u32"/>
    <pdoEntry idx="f102" subIdx="03" bitLen="8" halPin="CanNode3State" halType="u32"/>
    <pdoEntry idx="f101" subIdx="03" bitLen="8" halPin="f101:03/8" halType="u32"/>
    <pdoEntry idx="f108" subIdx="01" bitLen="1" halPin="CanBusOff" halType="bit"/>
    <pdoEntry idx="f108" subIdx="02" bitLen="1" halPin="CanWarnLimit" halType="bit"/>
    <pdoEntry idx="f108" subIdx="03" bitLen="1" halPin="RxFifoOverflow" halType="bit"/>
    <pdoEntry idx="0000" subIdx="00" bitLen="1" halPin="0000:00/1" halType="bit"/>
    <pdoEntry idx="f108" subIdx="05" bitLen="1" halPin="TxFifoOverflow" halType="bit"/>
    <pdoEntry idx="f108" subIdx="06" bitLen="1" halPin="CanAckErr" halType="bit"/>
    <pdoEntry idx="0000" subIdx="00" bitLen="2" halPin="0000:00/2" halType="bit"/>
    <pdoEntry idx="0000" subIdx="00" bitLen="8" halPin="0000:00/8" halType="bit"/>
    <pdoEntry idx="f108" subIdx="21" bitLen="8" halPin="RxErrCount" halType="u32"/>
    <pdoEntry idx="f108" subIdx="22" bitLen="8" halPin="TxErrCount" halType="u32"/>
    <pdoEntry idx="f101" subIdx="14" bitLen="1" halPin="f101:14/1" halType="bit"/>
    <pdoEntry idx="f103" subIdx="01" bitLen="1" halPin="CanDiagSlave1" halType="bit"/>
    <pdoEntry idx="f103" subIdx="02" bitLen="1" halPin="CanDiagSlave2" halType="bit"/>
    <pdoEntry idx="f103" subIdx="03" bitLen="1" halPin="CanDiagSlave3" halType="bit"/>
    <pdoEntry idx="0000" subIdx="00" bitLen="4" halPin="0000:00/4" halType="bit"/>
  </pdo>
</syncManager>

Gruß Frank

DC synchronization problems

Could you check this problem I describe here:

http://lists.etherlab.org/pipermail/etherlab-users/2018/003281.html

Some improvements for the current code is change the order of (in lcec_main.c)

  // send process data
  rtapi_mutex_get(&master->mutex);
  

  // update application time
  master->app_time += master->app_time_period;
  ecrt_master_application_time(master->master, master->app_time);

  // sync ref clock to master
  if (master->sync_ref_cycles > 0) {
    if (master->sync_ref_cnt == 0) {
      master->sync_ref_cnt = master->sync_ref_cycles;
      ecrt_master_sync_reference_clock(master->master);
    }
    master->sync_ref_cnt--;
  }

  // sync slaves to ref clock
  ecrt_master_sync_slave_clocks(master->master);

  // send domain data
  ecrt_domain_queue(master->domain);
  ecrt_master_send(master->master);
  rtapi_mutex_give(&master->mutex);

Moving ecrt_domain_queue(master->domain); after rtapi_mutex_get(&master->mutex);.

By the way could you try to implement the b dc sync mode that Graeme Foot described here http://lists.etherlab.org/pipermail/etherlab-users/2016/003013.html???

Many thanks for your work
BR
Ignacio Rosales

How fine tune PLL ?

Hello Sasha.
I don't know this platform very well. Maybe I'm posting in the wrong place. I have a question. Sorry again, I guess I'm in the wrong place. Referring to your explanation #45.
My problem was solved with method B, but there is still oscillation. How do I fine tune the P I controller you mentioned?

More precisely, which is the P parameter, which is the I parameter? And how to set it correctly.
Thank you for your contribution to the world.

Best Regadrs

Build from source WARNING: ecrt_.........undefined!

WARNING: "ecrt_master_receive" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_create_domain" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_slave_config_sdo" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_send" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_domain_queue" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_sdo_upload" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_sync_slave_clocks" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_slave_config_complete_sdo" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_slave_config_watchdog" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_domain_reg_pdo_entry_list" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_application_time" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_read_idn" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_domain_process" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_callbacks" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_state" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_slave_config_state" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_slave_config" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_slave_config_dc" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_slave_config_idn" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_domain_data" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_slave_config_pdos" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_sync_reference_clock" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_deactivate" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_domain_size" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_master_activate" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_release_master" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_request_master" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!
WARNING: "ecrt_slave_config_sdo8" [/home/nat/linuxcnc-ethercat/src/lcec.ko] undefined!

how to apply the PLL patch

Hello, I would like to know how I can apply the PLL patch that is integrated in linuxcnc-ethercat?
regards

-discharge linuxcnc 2.7.14
-install the .parche
-compilation of linuxcnc and installation
-refclocksynccycles = -1

-I do not get the HAL PLL pins?

some help?,

Thank you

solved, quite easy to apply, I do not lose synchronism in the series beckhoff AX5000, thank you very much Sittner for the work.

does these sentense need to be modified?

in examples/swm-fm45a-io.hal

.......
###########################################################

digital outputs

###########################################################

net coolant-on => lcec.0.D3.dout-0
net spindle-cw <= lcec.0.D3.dout-1
net spindle-ccw <= lcec.0.D3.dout-2
net z-brake => lcec.0.D3.dout-6
......

does these sentense need to be modified to

......
net spindle-cw => lcec.0.D3.dout-1
net spindle-ccw => lcec.0.D3.dout-2
......
?

mffu syncmanger delta asda-a2-e

HI,
I try to run delta driver asda-a2-e but without result.
I can see all device (ethercat slaves) i can read write thrue CoE, but when I run linuxcnc, dmesg shows
problem with syncmanager for SM2 and SM3 because cannot read info for MFFU adress, size etc.
is this info in E2PROM?
Is it possible to write this info into xml config file for lcec_conf?
Thanks. Martin

EL6751 CANOpen configuration in TwinCAT?

Fantastic work on this project!!
I am trying to use an EL6751 CANOpen slice and with ESTUN servo drives that only speak CANOpen. ( https://www.estuneurope.eu/wp-content/uploads/2019/03/Servo-CANOpen-V1.04-Users-Manual_compressed.pdf )

Did I understand that correctly: I have to make a TwinCAT project and configure my EL6751 correctly to generate all the stuff? ( i.e. in https://github.com/sittner/linuxcnc-ethercat/blob/master/examples/generic-complex/CPD17/ethercat-conf_X.xml )

How can I export the config in TwinCAT then?

Problems with float. Anybody else?

Hallo.

I have problems with floats - they are simpy too big.
So I looked into the source code.
The lines https://github.com/sittner/linuxcnc-ethercat/blob/master/src/lcec_generic.c#L132-L137

 if (hal_data->subType == lcecPdoEntTypeFloatUnsigned) {
          fval = lcec_generic_read_u32(pd, hal_data);
        } else {
          fval = lcec_generic_read_s32(pd, hal_data);
        }
}

seem to be strange as fval is of type hal_float_t , but lcec_generic_read_u32(pd, hal_data)
and lcec_generic_read_s32(pd, hal_data) return (un)signed integers. Thus we lose information when casting integers to float.

Shouldn't we define an exra function for floats?
Something like:

double lcec_generic_read_float(uint8_t *pd, lcec_generic_pin_t *hal_data) {

    if (hal_data->subType==lcecPdoEntTypeFloat32) { // for REAL data type in EtherCAT standard
      uint32_t temp = EC_READ_U32(&pd[hal_data->pdo_os]);
      float ret;
      memcpy(&ret,&temp,4);
      return ret;
  }
  else { //for 64 bit -  for LREAL data type in EtherCAT standard
       uint64_t temp = EC_READ_U64(&pd[hal_data->pdo_os]);
       double ret;
       memcpy(&ret,&temp,8);
       return ret;
  }

}

libethercat not linked

  • use master branch, run loadrt lcec in halcmd environment, an error occur that -- Undefined symbol ecrt_slave_config_sdo
  • I found that lcec.so is not linked with libethercat.so by running ldd lcec.so
  • I reverted commit 7b1e4bb , and it works
  • my kernel is 4.4.12-rt20 linuxcnc version 2.7.14

why the linux dead after i run start in halcmd in few seconds

Hello,

Why the linux dead after i run start in halcmd in few seconds

execute hal cmd as follow,

loadusr -W lcec_conf driver.xml
loadrt lcec
loadrt threads name testing period1=1000000
addf lcec.read-all testing
addf lcec.write-all testing
start

after cmd 'start', i can read pin data. but after a few seconds, linux is dead. no respond with any keybord typing and mouse moving. the wireshark which is listening on another PC, has not recieved any ethercat frames .

help, please.

my kernel is debain 3.4.9-rtai-686-pae #1 SMP PREEMPT Debian 3.4.55-4linuxcnc -686 GNU/Linux. linuxcnc version 2.7.14

Failed to allocate Memory

Looking for assistance on this one.

halrun
halcmd: loadusr -W lcec_conf ~/conf.xml
Note: Using POSIX realtime                                                                               
Failed to map process data: Cannot allocate memory                                                                
LCEC: failed to activate master 0                                                                             
lcec: rtapi_app_main: Invalid argument (-22)                                                                             
<stdin>:3: waitpid failed /usr/bin/rtapi_app lcec                                                                    
<stdin>:3: /usr/bin/rtapi_app exited without becoming ready                                                          
<stdin>:3: insmod for lcec failed, returned -1
uname                                                             
5.10.30-rt39 #1 SMP PREEMPT_RT Wed May 19 14:38:10 CST 2021 x86_64 x86_64 x86_64 GNU/Linux

I see the error is actually originating from the IGH code, however the driver seems to working on their end.

I can see the master and slaves and communicate with Ethercat commands. But I can't seem to run it in LCNC

structure change & config tools

Dear sittner,

We'd appreciate to talk to you, before implementing changes you dont't like to pull.
(idk if this is the place, you wish to discuss on this topic, so please just call back: flo.kerle(a-T )gmx.at)

As I've read on the LinuxCNC forum, you also thought about introducing another layer, for hardware abstraction? We want to:

  • eliminate configuration needs inside the code. (see: DEVICE DRIVERS)
  • use (GUI) tools for configuration
  • add: PROFILES. one for each type of component (dI/O, aI/O, servo- / stepper drive)
    (mapping HAL pin <-> property: i.e. .positionCommand)
  • modify: DEVICE DRIVERS. This is mostly what you already have with the "generic driver"
    we'd like to add config options for pdo objects (not sure if that's already implemented) and finally be able to read beckhoff-style .xml files, for configuration aids

Background:
My company TEAM ELECTRONICS (www.team-electronics.com) is going to use LinuxCNC & EtherCAT for a new modular series of "plug in CNC controllers". As we successfully use LinuxCNC, we'd like to contribute. Atm we are starting to integrate new hardware-drivers for LTi ServoOne and Nanotec servo controllers, i.e.
Depending on customers requirements, a completely revised GUI could follow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.