Advanced Search

Search Results (Searched for: )

  • Nikita
  • Nikita
Today 21:53 - Today 22:06

Lenze ECSxM via EMF2192IB (EtherCAT): CiA402 compatibility and configuration iss

Category: General LinuxCNC Questions

Title Idea: Lenze ECSxM EtherCAT (CiA402) configuration issue – Drive stuck in PREOP E with Bus Error 20000OS and Hardware Environment:OS / Core: Debian Linux with RT (Realtime) kernel, LinuxCNC version 2.9.4.Driver / Module: linuxcnc-ethercat (the lcec module by Sittner).Servo Drive: Lenze ECSxM (Identified on the bus as: Vendor ID 0x0000003b, Product Code 0x014e7bc0).Network Interface: Integrated Realtek Ethernet adapter. The driver runs in standard generic emulation mode.PC & Realtime Optimization:One CPU core is completely isolated at the GRUB bootloader level (isolcpus) specifically for the LinuxCNC Servo Thread.The Ethernet port dedicated to the EtherCAT bus is completely disconnected from the Linux network stack (all IP addresses removed, any third-party internet traffic is blocked) to eliminate OS-induced jitter.The isolated core and the NIC show excellent results during the standard LinuxCNC Latency Test.Step-by-Step Troubleshooting HistoryStep 1. Initial INI File Adjustments (cia402.ini)The initial configuration had maximum velocity mismatches. Trajectory limits under [DISPLAY] and [TRAJ] were raised to 100.0 to match the simulated X and Z axes (MAX_VELOCITY = 100.0). For the physical Y-axis (Lenze drive, [JOINT_1]), following error limits were adjusted, and homing speeds (HOME_SEARCH_VEL / HOME_LATCH_VEL) were changed from 0.0 to -10.0 and 2.0 to prevent initial startup errors.Step 2. First Run & LCEC CrashRunning linuxcnc /home/debian/devel/cia402.ini resulted in a critical HAL initialization failure:Failed to register PDO entry: No such file or directory
LCEC: master 0 PDO entry registration failed
./cia402.hal:9: insmod for lcec failed, returned -1
This indicated that the ethercat-conf.xml file requested PDO variables that did not match the physical memory layout of the servo amplifier.Step 3. SDO and XML Profile DiagnosticThe ethercat sdos output showed proprietary Lenze arrays (indices like 0x58df, 0x58de). However, running ethercat xml read the ESI profile directly from the drive's EEPROM and revealed the following true CoE / CiA402 structure:Device Name: Servo ECSxM CiA 402RxPDO (Sm="2", idx="1600"): Contains standard 0x6040 (Control word), 0x60b8 (TP Function), 0x607a (Target position), 0x60ff (Target velocity), and an output array from 0x58e1:07 to 0x58e1:12. Total size: 192 bits (24 bytes).TxPDO (Sm="3", idx="1a00"): Starts with a specific 14-bit empty alignment gap (Index 0x0000, BitLen 14), followed by service bits 1800:09 and 1800:07, status word 0x6041, touch-probe registers 60b9-60bb, actual position 0x6064, and an input array from 0x58e0:09 to 0x58e0:12. Total size: 208 bits (26 bytes).Step 4. Adapting XML Syntax to the lcec_conf ParserWe had to match the specific strict XML syntax expected by this particular linuxcnc-ethercat build:vendor="59" product="21920704" type="cia402" threw Invalid slave attribute vendor.vendor="0x3b" product="0x014e7bc0" type="lcec_cia402" threw Cannot find slave type lcec_cia402.Ultimately, we discovered the working format for this build: it requires vid and pid attributes written as 8-character uppercase HEX strings without the 0x prefix (e.g., vid="0000003B" pid="014E7BC0"), along with type="generic" configPdos="true". All entry types must use halType (u32, s32, bit) instead of dataType.Step 5. Handling the 14-bit Alignment Gap in TxPDODeclaring the gap as <pdoEntry idx="0000" subIdx="00" bitLen="14" halPin="gap" halType="raw"/> caused a crash: Invalid pdoEntry halType raw. Stripping the HAL attributes completely allowed the XML parser to pass, but the 14 bits were seemingly ignored in the total Sync Manager size calculation. Later, we tried using a dummy entry without a pin assignment, like <pdoEntry idx="0000" subIdx="00" bitLen="14" halType="u32"/>.Step 6. HAL File Synchronization (cia402.hal)Once the XML was accepted, HAL failed with Pin 'lcec.0.0.status-word' does not exist because under type="generic" the pins are named strictly after the halPin attribute. The HAL file was fully updated to use the new lcec.0.0.cia-controlword and lcec.0.0.cia-statusword pins. Virtual feedback loops (motor-pos-cmd => motor-pos-fb) were also added to the simulated X (Joint 0) and Z (Joint 2) axes to satisfy the XYZ trajectory planner constraints.Following these changes, the Axis GUI opens successfully without any internal HAL or LinuxCNC errors.Step 7. The Main Problem: PREOP E and Error Code 20000Even though the GUI loads, the Lenze ECSxM drive immediately drops the bus into PREOP E (Pre-Operational with Error) and locks LinuxCNC in a permanent E-Stop (АВОСТ) state.sudo dmesg reveals bus warnings: EtherCAT WARNING: 6 datagrams UNMATCHED! and was SKIPPED.Checking the drive's internal Bus Status register (C1830) using ethercat upload -p 0 0x58d9 00 --type uint32 consistently returns 0x00004E20 (Decimal: 20000). In Lenze module documentation, this code translates to "Invalid Parameter Set / Sync Manager Configuration Error" or "Waiting for Phase Synchronization".Step 8. Distributed Clocks (DC) & Clock Sync AttemptsTo fix the 20000 code, we tested several clock synchronization strategies:Adding addf lcec.sync-clock servo-thread or lcec.sync-clocks to cia402.hal failed with function not found (this lcec build handles DC entirely via the XML config).In ethercat-conf.xml, we shifted the master period to 1000000 (1 ms) and cycled through <dcConf> configurations: assignActivate="300", hex assignActivate="0x0300", and added a phase offset sync0Shift="250000".We also attempted to completely disable DC (Free-Run / SM-Sync mode) by using assignActivate="0000", assignActivate="0x0210", or removing the <dcConf /> tag altogether.Result: ESC registers 0x092c and 0x0910 indicate that the drive sees the master's time but reports a massive System Time Offset (~2.7 seconds). The Lenze drive ignores the mode changes and remains stuck at code 20000. We also tried shifting the PDO map to the alternative standard TwinCAT ESI indices (1601 / 1a01 instead of 1600 / 1a00), but the 20000 error persists.Questions for the Community:Lenze ECS Error Code 20000: When dealing with Lenze ECS CoE modules under linuxcnc-ethercat, what exactly triggers the 20000 (0x4E20) bus status? Is it strictly a DC phase synchronization timeout, or is it a Sync Manager length mismatch?TxPDO 14-bit Alignment Gap: How should the 0x0000 index with a 14-bit length be mapped in ethercat-conf.xml for a generic slave so that the lcec driver counts it toward the total SM3 size (which must be exactly 26 bytes) without triggering a halType parsing error?PDO Mapping via SDOs: Does the Lenze ECS series require explicit PDO mapping commands via <initCmds> in the XML configuration, or should the master automatically handle the structure when type="generic" and configPdos="true" are set?Realtek NIC Impact: Could the standard generic Linux EtherCAT driver on an integrated Realtek chip cause a phase drift large enough (~2.7s offset in register 0x0910) to make Lenze reject DC synchronization entirely? Should I force a specific native driver or swap to an Intel NIC?
1. Enabling the Network Interface (Bringing the Link UP)The network card was initially disabled at the OS level (status DOWN), which prevented the EtherCAT master from sending any packets.Action taken: Forced the network interface enp2s0 to turn on using the following command:bashsudo ip link set enp2s0 up
2. CPU Core Isolation for Real-Time (In the GRUB Configuration)The standard network card driver (generic) was delaying packets, causing LinuxCNC to freeze and EtherCAT to trigger datagram timeouts.Action taken: Corrected the Linux kernel boot parameters line in /etc/default/grub. This isolated the 4th CPU core (index 3) exclusively for real-time and EtherCAT tasks and completely disabled power-saving sleep modes:iniGRUB_CMDLINE_LINUX_DEFAULT="quiet isolcpus=3 nohz_full=3 rcu_nocbs=3 intel_idle.max_cstate=0 processor.max_cstate=0 idle=poll"
(Changes were applied via sudo update-grub followed by a system reboot).
3. Binding the MAC Address to the EtherCAT MasterThis tells the EtherCAT service which specific physical port on the PC to use for communicating with the Lenze drive.Action taken: Added your card's unique hardware MAC address into the main EtherCAT service configuration file (under the line MASTER0_DEVICE="00:e0:26:32:3a:40").4. Preparing to Disable Hardware Optimizations (Offloading)Because EtherCAT communicates using raw Ethernet frames without IP addresses, the network chip was attempting to reassemble them. This resulted in thousands of transmission errors (Tx errors). To fix this, we prepared a command to disable all chip optimizations using the ethtool utility:bashsudo ethtool -K enp2s0 tx off rx off sg off tso off gso off gro off lro off


I am also providing a PDF with screenshots from TwinCAT taken from the machine where this axis module ECSCM048C4B was installed, together with the communication module EMF2192IB mounted on top (I think this will be useful).Additionally, I downloaded the XML for the EMF2192IB from TwinCAT, named Lenze_EMF2192_20101005.xml.I am also including the INI, HAL, and ethercat-config.xml files that I created with the help of artificial intelligence, as well as the command‑line outputs. 

File Attachment:

File Name: cia402.hal
File Size:3 KB
 

File Attachment:

File Name: cia402.ini
File Size:2 KB
  

File Attachment:

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

File Attachment:

File Name: ethercatslaves-v.txt
File Size:1 KB
 

File Attachment:

File Name: ethercatslaves-v.txt
File Size:1 KB
 

File Attachment:

File Name: ethercatslaves-v.txt
File Size:1 KB

File Attachment:

File Name: cia402.hal
File Size:3 KB

File Attachment:

File Name: ethercatslaves-v.txt
File Size:1 KB

File Attachment:

File Name: cia402.ini
File Size:2 KB

File Attachment:

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

File Attachment:

File Name: pdos.txt
File Size:1 KB

File Attachment:

File Name: sdos.txt
File Size:10 KB

File Attachment:

File Name: Lenze_EMF2...1005.xml
File Size:177 KB
  • rbobey1989
  • rbobey1989's Avatar
Today 21:22
Replied by rbobey1989 on topic EL7221-9014/15 LCEC Driver Support

EL7221-9014/15 LCEC Driver Support

Category: EtherCAT

Hi Endian:

Thanks for your reply and sorry for the delay in responding, it completely slipped my mind...

The EL7221-9014 and ZB8610 modules have arrived, but I had to request the motor and cables. The supplier told me they'll arrive this week! I'm dying to have everything so I can start working! I think I included homing among the capabilities of the EL7221-9014 module in my previous description, and it's true what you said, the module doesn't hom, although it does have probing. Regarding the latter, it's not absolutely necessary for me; I'll use LinuxCNC's homing. What I would like, as I explained before, is to use the module in speed mode with its internal control...

As soon as I have everything, I'll start testing. I'll update you. Regards and thanks.
  • PCW
  • PCW's Avatar
Today 20:55 - Today 21:00

Request custom bitfile: 5i25 + 7i77 (P3) + 7i74 (P2) with pktUART for Modbus

Category: Driver Boards

Yes, too old to run MODBUS which requires a PktUART version >1:


hm2/hm2_5i25.0: inconsistent Module Descriptor for PktUART Transmit Channel, not loading driver
hm2/hm2_5i25.0: Version = 3, expected 0



Also with this firmware there is no sserial port 1
(all channels = 0..7 are port 0)
  • HR
  • HR
Today 20:04

Retrofitting Gerber Sabre 408 CNC Router

Category: General LinuxCNC Questions

I am starting this thread to seek information and guidance, with the hope that it may also serve as a helpful resource for others facing similar challenges.I am currently considering retrofitting my machine as the most practical option, given the scarcity and high cost of original replacement parts. With that in mind, I would appreciate any advice on the best approach to begin this project.
  • umerov
  • umerov
Today 19:21

Request custom bitfile: 5i25 + 7i77 (P3) + 7i74 (P2) with pktUART for Modbus

Category: Driver Boards

Firmware flashed without any errors. However, when launching my configuration, I receive errors.

Could this be because of the old Linux?

Or am I loading it wrong?
loadrt hm2_pci config="num_encoders=3 num_pwmgens=0 num_stepgens=0 sserial_port_0=000000 sserial_port_1=00000000"

Terminal output:

Note: Using POSIX realtime
hm2/hm2_5i25.0: inconsistent Module Descriptor for PktUART Transmit Channel, not loading driver
hm2/hm2_5i25.0: Version = 3, expected 0
hm2/hm2_5i25.0: NumRegisters = 4, expected 4
hm2/hm2_5i25.0: InstanceStride = 0x00000004, expected 0x00000004
hm2/hm2_5i25.0: MultipleRegisters = 0x0000000F, expected 0x0000000F
hm2/hm2_5i25.0: inconsistent Module Descriptor!
hm2/hm2_5i25.0: failed to parse Module Descriptor 5
hm2_5i25.0: board fails HM2 registration
RTAPI_PCI: Unmapped 65536 bytes at 0x7f733da96000
Driver probe function failed!
hm2_pci: error registering PCI driver
hm2_pci: rtapi_app_main: Operation not permitted (-1)
  • deltafox24
  • deltafox24
Today 18:30
Replied by deltafox24 on topic Rotary axis in Qtdragon_hd

Rotary axis in Qtdragon_hd

Category: Qtvcp

That's absolutely right; I'm trying to get it to look like your screenshot, but everything is on the same plane for me,
  • PCW
  • PCW's Avatar
Today 18:25

Request custom bitfile: 5i25 + 7i77 (P3) + 7i74 (P2) with pktUART for Modbus

Category: Driver Boards

 

File Attachment:

File Name: 5i25_7i77_...pktd.zip
File Size:108 KB


5i25 bitfile for 7I77 on P3, 7I74 on P2
2 PktUARTs on 7I74 channels 6 and 7 (PktUART channels 1 and 0)
7I74 channels 0..4 = sserial port 0 channels 3..7
(two sserial ports wont fit with two PktUARTS on a 5I25 but using one sserial port
only loses one 7I74 channel)
  • umerov
  • umerov
Today 17:49

Request custom bitfile: 5i25 + 7i77 (P3) + 7i74 (P2) with pktUART for Modbus

Category: Driver Boards

Thank you for the clarification! That actually works out perfectly for my setup.

Since my Modbus VFD needs RS-485, I will use Channel 7 for that.

I also have a custom remote pendant (already come with cnc) that uses full-duplex RS-422, so I can use one of the RS-422-only channels for that.

Could you please compile a 5I25 bitfile with the following configuration?
P3: Standard 7I77
P2: 7I74
Channel 0: SSerial (for my 7I84)
Channel 1: SSerial (for my 7I70)
Channel 2: SSerial (for my 7I71)

Channels 3-5: SSerial (or unused)

Channel 6: pktUART (RS-422 for the Pendant)
Channel 7: pktUART (RS-485 for the Modbus VFD)

Thank you so much for your time and support!
  • Ul
  • Ul
Today 17:43

Tipps für aktuelle LinuxCNC Hardware gesucht

Category: Deutsch

Frage den Verkäufer, ob er dir die Dateien über E-Mail zusenden kann.
Ich habe alte Zugangsdaten für den Baidu Link Downloader gefunden, er will jetzt aber 3$ dafür haben.
Im Ordner ist eine Datei "F7I98 source code.zip". Darin ist vermutlich alles, was es für die Bitfileerstellung mit Xilinx ISE braucht.
Wenn er dir das zuschickt und du das ISE heruntergeladen hast, ist es nur copy&paste + ein Doppelklick, um das Bitfile zu erstellen. Eine weitere Karte würde ich wegen vorhandenem Bitfile allein nicht kaufen.
Poste den Zipordner hier, dann probiere ich selber das Bitfile zu machen.
  • MaHa
  • MaHa
Today 17:28
Replied by MaHa on topic Custom M-Code (Python)

Custom M-Code (Python)

Category: G&M Codes

I don't know if this helps, as i am usually wrong. In a project with tkinter yesnobox, thats the first lines of the python file


#! /usr/bin/python3

import tkinter as tk
import tkinter.messagebox
import sys
import linuxcnc
import time

root = tk.Tk()
root.withdraw()
  • PCW
  • PCW's Avatar
Today 17:06

Request custom bitfile: 5i25 + 7i77 (P3) + 7i74 (P2) with pktUART for Modbus

Category: Driver Boards

The 7I74 can only support 1 RS-485 channel (channel 7) as channels 0..6 are RS-422 only

You can use the serial port on the 7I77 for RS-485
 
  • Todd Zuercher
  • Todd Zuercher's Avatar
Today 16:19 - Today 16:22
Replied by Todd Zuercher on topic Custom M-Code (Python)

Custom M-Code (Python)

Category: G&M Codes

I was wanting to revisit this, and tried to make it work with the current version of linuxcnc, but it seems that the switch from Python2 to Python3 has rendered the python remap script non functional.

At first Linuxcnc wouldn't even start. But with clues from error messages I changed the 4th line from:
from Tkinter import *
to:
from tkinter import *

And that got the config running again.  But it still doesn't work right and now there are no error messages.  The input window opens, but it is completely empty except for the OK button and the title doesn't show in the title bar.  So at least a little of the Tkinter is working, but not most of it.
  • umerov
  • umerov
Today 14:19 - Today 14:27

Request custom bitfile: 5i25 + 7i77 (P3) + 7i74 (P2) with pktUART for Modbus

Category: Driver Boards

I am retrofitting an old Morbidelli CNC woodworking machine. My old setup used analog 0-10V to control the spindle inverter, but I would like to switch to Modbus RTU using an unused channel on my 7I74 card.

I checked the standard Mesa firmware archive but couldn't find a bitfile with the pktUART module for this exact hardware combination. Could PCW or someone else kindly compile a custom bitfile for me with 1 or 2 channels of pktUART on the 7I74, leaving the rest as standard SSerial?

My current hardware configuration is:
5I25 (P3) -> 7I77
5I25 (P2) -> 7I74
  • 7I74 (Channel 0) -> 7I84 (inputs/outputs)
  • 7I74 (Channel 1) -> 7I70 (inputs)
  • 7I74 (Channel 2) -> 7I71 (outputs)
I need channels 0, 1, and 2 to remain SSerial for my existing expansion boards. If channel 6 (or 6 and 7) could be configured as pktUART for the Modbus VFD, that would be perfect!
Thanks in advance for the help!
  • muddiver
  • muddiver
Today 13:57
Replied by muddiver on topic Tipps für aktuelle LinuxCNC Hardware gesucht

Tipps für aktuelle LinuxCNC Hardware gesucht

Category: Deutsch

Da es für die 7i92 mit dem Benezanbitfile schon was passendes gibt, wäre ich auch am schauen nach einer 7i92, da sollten ja die originales Bitfiles draufpassen. Die hier würde mir vorschieben.. de.aliexpress.com/item/1005010725599295....%7C_p_origin_prod%3A
 
Displaying 1 - 15 out of 286895 results.
Time to create page: 9.197 seconds
Powered by Kunena Forum