Advanced Search

Search Results (Searched for: halpin)

  • fer662
  • fer662
18 Jun 2026 13:43 - 18 Jun 2026 14:37

Setting up the Stepperonline A6 battery encoder cable

Category: EtherCAT

I don't think any of that is necessary (mapping homing pins to the regular inputs). I'm like 95% there now getting cia402 homing working with the absolute mode disabled. I'm able to home all axis x and y (z spins around looking for the z pulse and doesn't find it), but sometimes a joint will throw an amplifier fault JUST after completing homing (I can see the logging from cia402_homecomp indicating that the process had finished for that axis). I'm not sure why this is and it seems to be random...It'd be nice to figure it out but I guess that all i need is for homing to succeed once and then switch to absolute encoder mode? I'm still not sure how the combined Y+Y2 is supposed to work without homing... Like suppose you move one of the motors when the machine is off, will linuxCNC or something try to correct this deviation when the machine is turned on? If anyone knows what is the aim regarding this topic, please let me know. Below are my steps to getting to this stage:

- This repo is the best one I found for both homecomp implementation and linuxCNC config for these servos github.com/nickstewartroc/linuxcnc-a6-servo , and it is a fork from the one mentioned by @andrax (though the files he posted are not from there or are modified at least). Only one thing from there didn't work for me which is the binding of the di pins to see their state, they didn't reflect the way they are setup there. This is how each servo looks and what worked for seeing the home switches change state ( see;). Also, I initially had issues halcompiling this homecomp with the additional includes, it was giving me an error on some types, make sure the cloned linuxCNC repo is on the same tag as your installation and not on main.

<slave idx="3" type="generic" vid="0x00400000" pid="0x00000715" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="300000"/>
<watchdog divider="2498" intervals="1000" />
<sdoConfig idx="2004" subIdx="0a"><sdoDataRaw data="01 00"/></sdoConfig>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="control-word" halType="u32" />
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="control-mode" halType="s32" />
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32" />
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
<pdoEntry idx="607C" subIdx="00" bitLen="32" halPin="home-offset" halType="s32"/>
<pdoEntry idx="6098" subIdx="00" bitLen="8" halPin="homing-method" halType="s32" />
<pdoEntry idx="6099" subIdx="01" bitLen="32" halPin="homing-high-velocity" halType="u32"/>
<pdoEntry idx="6099" subIdx="02" bitLen="32" halPin="homing-low-velocity" halType="u32"/>
<pdoEntry idx="609A" subIdx="00" bitLen="32" halPin="homing-acceleration" halType="u32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1A00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="status-word" halType="u32" />
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="mode-display" halType="s32" />
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32" />
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="actual-torque" halType="s32"/>
<pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="digital-inputs" halType="u32"/>
<pdoEntry idx="2040" subIdx="05" bitLen="16" halType="complex">
<complexEntry bitLen="1" halPin="di-1" halType="bit"/>
<complexEntry bitLen="1" halPin="di-2" halType="bit"/>
<complexEntry bitLen="1" halPin="di-3" halType="bit"/>
<complexEntry bitLen="1" halPin="di-4" halType="bit"/>
<complexEntry bitLen="1" halPin="di-5" halType="bit"/>
<complexEntry bitLen="11"/>
</pdoEntry>
</pdo>
</syncManager>
</slave>

- Wire the home switch per page 26 of the manual. You need to tie either COM- or COM+ to your external PSU's negative output depending on the sensor type (NPN or PNP). I had tied COM- instead of COM+ for PNP and that wasn't working. Make sure DI3 flips when the sensor toggles before proceeding any further.
- Depending on whether your sensor is NC or NO, you need to change your home switch between active low and active high, documentation for this is in page 209. (<sdoConfig idx="2004" subIdx="0a"><sdoDataRaw data="01 00"/></sdoConfig> in my config for NC switch). Also on page 209 is the function selection for DI3. It's set correctly by default, but one of my drives had it wrong and i presume this was the result of debugging changes made via dcConf entries that got removed. Check that all yours drives have it on the correct setting which is 5. You could technically use any of the DI pins that have function selection as the home switch changing stuff around this PDO. By this time the sensor pin should light up in halshow when triggered no matter whether the sensor is NO or NC.
- At this point it should be possible (though i haven't tested, i did have it working with the pins wired to the beckoff inputs though) to configure regular homing using the drive pins as input if you wished to test it out for sanity checking.
- Assuming that works or you skip it, copy the relevant bits of the hal in the referenced repo. I didn't have to change anything there since i dumped my XML (which was already very close but had slightly different property names) so i could just copypaste as it was.
- I used homing mode 4 like @Andrax but that might not be right for you. On Page 74 there's ample documentation for how each home mode works.
- When trying things out you might use low speeds for the 2 speeds involved in homing. Beware homing has a timeout that defaults to 60 seconds on the servo config. Homecomp doesn't catch this timeout and gets stuck forever, leading you to have to close linuxCNC and power cycle the drives (Page 215).
- Presumably once you're happy you'd comment the homing stuff and add HOME_ABSOLUTE_ENCODER to the joints like the initial post suggests.

I hope this helps someone, and please let me know if your know what the amplifier faults i'm getting after homing might be. This is my first time using linuxCNC. My config is attached for whoever finds it useful or can help me with the little bit i think i have left to fix.
  • rodw
  • rodw's Avatar
26 May 2026 01:23

Stepperonline A6 Ethercat - Digital IO [SOLVED]

Category: EtherCAT

ok, seems its like
<syncManager idx="3" dir="in">
        <pdo idx="1a00">
        .......
          <pdoEntry idx="60FD" subIdx="0" bitLen="32" halType="complex">
            <complexEntry bitLen="1" halPin="CW-limit" halType="bit"/>
            <complexEntry bitLen="1" halPin="CCW-limit" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-home" halType="bit"/>
            <complexEntry bitLen="13"/>
            <complexEntry bitLen="1" halPin="in-1" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-2" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-3" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-4" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-5" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-6" halType="bit"/>
            <complexEntry bitLen="10"/>
          </pdoEntry>          
        </pdo>

Keep the rest of the entries there. Things like status words are important
Also make sure the total bits adds up to 32, pad out unused ones
 
  • rodw
  • rodw's Avatar
25 May 2026 22:34 - 25 May 2026 22:36

Stepperonline A6 Ethercat - Digital IO [SOLVED]

Category: EtherCAT

type:
ethercat pdos > pdos.txt
ethercat sdos > sdos.txt
and share the output here.

Probably something like
<pdoEntry idx="60FE" subIdx="1" bitLen="16" halType="complex">
<complexEntry bitLen="1" halPin="out-1" halType="bit"/>
<complexEntry bitLen="1" halPin="out-2" halType="bit"/>
<complexEntry bitLen="14"/>
</pdoEntry>


also adapted from my GitHub example
 
  • rodw
  • rodw's Avatar
25 May 2026 21:47

Stepperonline A6 Ethercat - Digital IO [SOLVED]

Category: EtherCAT

You don't need bitslice, just do it in the xml
<pdoEntry idx="60FD" subIdx="0" bitLen="32" halType="complex">
            <complexEntry bitLen="1" halPin="CW-limit" halType="bit"/>
            <complexEntry bitLen="1" halPin="CCW-limit" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-home" halType="bit"/>
            <complexEntry bitLen="13"/>
            <complexEntry bitLen="1" halPin="in-1" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-2" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-3" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-4" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-5" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-6" halType="bit"/>
            <complexEntry bitLen="10"/>
          </pdoEntry>       
 NOte there are some unused bits in this example
  • spumco
  • spumco
25 May 2026 15:59

Stepperonline A6 Ethercat - Digital IO [SOLVED]

Category: EtherCAT

Got the inputs figured out.

1.  Program drive so all inputs are 'no function assigned'

2. Change xml input address HAL name:
<pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="digitalinputs" halType="u32"/>

3. Add bitslice to HAL, using the bit chart from the servo manual:
loadrt bitslice count=1 personality=32
addf    bitslice.0              servo-thread    #DRIVE IO

net DI-X-IN     <=  lcec.0.A6.digitalinputs
net DI-X-IN     =>  bitslice.0.in

net DI-X-IN-16  <=  bitslice.0.out-16
net DI-X-IN-17  <=  bitslice.0.out-17
net DI-X-IN-18  <=  bitslice.0.out-18
net DI-X-IN-19  <=  bitslice.0.out-19
net DI-X-IN-20  <=  bitslice.0.out-20

Now I can press buttons connected to the drive and all five inputs react in halshow.  Rather exciting...

Next step is to see if I can fumble through changing the PDOs to 'fixed' and somehow map the outputs.

Anyone have a clue what 'sub-index 1' means?
 
  • onceloved
  • onceloved's Avatar
08 May 2026 11:01 - 08 May 2026 11:04
Replied by onceloved on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

That sounds like the noise produced when synchronization is lost during motion. My solution was to change the parameters to `refClockSyncCycles="-1" sync0Cycle="*2"`. After making this adjustment, I no longer experienced any synchronization loss. I am using an Inovance SV660N drive. You can also add the following line to the XML configuration to monitor the number of synchronization loss events: `<pdoEntry idx="200e" subIdx="19" bitLen="16" halPin="SyncLossCount" halType="s32" />`.


The entry `<pdoEntry idx="200e" subIdx="19" bitLen="16" halPin="SyncLossCount" halType="s32" />` is effective only for Inovance SV series drives; it cannot be used with other drive models.
  • pushkarp
  • pushkarp
06 May 2026 06:42

VEICHI SD700 EtherCAT — Er.960 on startup, clears after few F2 presses — why?

Category: EtherCAT

VEICHI SD700 EtherCAT — Er.960 on startup, clears after few F2 presses — why?Platform: LinuxCNC 2.9.8, Debian, kernel 6.12.57+deb13-rt-amd64 (PREEMPT_RT) Drive: VEICHI SD700 EtherCAT servo drive (firmware V1.2) Interface: linuxcnc-ethercat (lcec) with cia402 component Mode: CSP (Cyclic Synchronous Position), 1ms servo periodWhat's happeningEvery time I start LinuxCNC, the drive shows Er.960 (SYNC0 synchronous frame loss) for the first 15-30 seconds. During this time pressing F2 gives:
joint 0 amplifier fault
emc/task/taskintf.cc 976: Error on joint 0, command number 56
After pressing F2 several times over 15-30 seconds, the drive eventually shows "88" (operating state), I hear a click from the motor, and everything works fine after that — jogging, position feedback, motion programs all stable.My question is: why does Er.960 appear at startup and what is actually happening when F2 eventually causes it to go away?System latencyThis is likely relevant. My machine is an AMD Ryzen system on a Shenzhen Meigao generic motherboard. Latency-test shows:
Servo thread (1ms):  Max Jitter = 85,000 ns (85µs)
Base thread (25µs):  Max Jitter = 58,000 ns (58µs)
I have tried:
  • CPU governor set to performance
  • C-states disabled via cpupower
  • nomodeset (amdgpu blacklisted)
  • isolcpus, nohz_full, rcu_nocbs kernel parameters
  • idle=poll
None brought jitter below ~80µs — likely SMM interrupts from locked-down BIOS on this generic hardware.Current workaroundUsing
sync0Shift=500000
(500µs) in dcConf which helps the drive lock faster but doesn't eliminate the startup Er.960 completely.Config filessd700.xml
<?xml version="1.0"?>
<masters>
  <master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">

    <slave idx="0"
           type="generic"
           vid="00850104"
           pid="01030507"
           name="x"
           configPdos="true">

      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="500000"/>

      <sdoConfig idx="6060" subIdx="00">
        <sdoDataRaw data="08"/>
      </sdoConfig>

      <syncManager idx="2" dir="out">
        <pdo idx="1601">
          <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="control-word"    halType="u32"/>
          <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
          <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
        </pdo>
      </syncManager>

      <syncManager idx="3" dir="in">
        <pdo idx="1A01">
          <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="status-word"           halType="u32"/>
          <pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="position-actual-value" halType="s32"/>
          <pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="velocity-actual-value" halType="s32"/>
        </pdo>
      </syncManager>

    </slave>
  </master>
</masters>
sd700.hal
loadusr -W lcec_conf sd700.xml
loadrt lcec
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt cia402 count=1

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

net x-status-word   lcec.0.x.status-word           => cia402.0.statusword
net x-control-word  cia402.0.controlword            => lcec.0.x.control-word
net x-pos-raw       lcec.0.x.position-actual-value  => cia402.0.drv-actual-position
net x-tgt-raw       cia402.0.drv-target-position    => lcec.0.x.target-position
net x-pos-cmd       joint.0.motor-pos-cmd           => cia402.0.pos-cmd
net x-pos-fb        cia402.0.pos-fb                 => joint.0.motor-pos-fb
net x-enable        joint.0.amp-enable-out          => cia402.0.enable
net x-fault         cia402.0.drv-fault              => joint.0.amp-fault-in

setp cia402.0.pos-scale 10000
setp iocontrol.0.emc-enable-in 1
net tool-prep  iocontrol.0.tool-prepare  => iocontrol.0.tool-prepared
net tool-chg   iocontrol.0.tool-change   => iocontrol.0.tool-changed
sd700.ini
[EMC]
MACHINE = sd700-test
VERSION = 1.1

[DISPLAY]
DISPLAY    = axis
CYCLE_TIME = 0.100

[TASK]
TASK       = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT       = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000

[HAL]
HALFILE = sd700.hal

[KINS]
KINEMATICS = trivkins coordinates=X
JOINTS     = 1

[TRAJ]
COORDINATES             = X
LINEAR_UNITS            = mm
ANGULAR_UNITS           = degree
MAX_LINEAR_VELOCITY     = 5
MAX_LINEAR_ACCELERATION = 20

[EMCIO]
EMCIO      = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_X]
MAX_VELOCITY     = 5
MAX_ACCELERATION = 20
MIN_LIMIT        = -9999
MAX_LIMIT        =  9999

[JOINT_0]
TYPE             = LINEAR
HOME             = 0.0
MAX_VELOCITY     = 5
MAX_ACCELERATION = 20
MIN_LIMIT        = -9999
MAX_LIMIT        =  9999
FERROR           = 50
MIN_FERROR       = 5
SCALE            = 10000
HOME_SEARCH_VEL  = 0
HOME_LATCH_VEL   = 0
HOME_SEQUENCE    = 0
Specific questions
  1. Is Er.960 at startup expected behavior on a high-jitter system while DC sync is being acquired, or does it indicate a configuration problem?
  2. Why does pressing F2 (which sends CIA402 enable controlword) help the drive clear Er.960 and lock onto DC sync? I would not expect an application-layer command to affect DC sync acquisition.
  3. Is there a way to make the drive more tolerant of sync frame jitter during the initial lock-in period — either via SDO parameters or lcec config?
  4. Would increasing
    refClockSyncCycles
    help, and what is the recommended value for a high-jitter system?
  5. Is there a known-good
    sync0Shift
    formula based on measured max jitter? (e.g. shift = 2x max jitter?)
Any insight appreciated. The system works well once locked — just trying to understand the startup behavior and ideally make it more reliable.
  • Konstantin
  • Konstantin
26 Apr 2026 20:12 - 26 Apr 2026 20:14
Replied by Konstantin on topic CiA 402 Folder Missing

CiA 402 Folder Missing

Category: EtherCAT

@andrax
I appreciate your help and efforts on the topic. Actually, this was my working configuration, I just added the additional rows in .ini and .hal files as per you absolute encoder guide topic.

The "sdoConfig" line for 0x6098 is there to set the homing method of the drive. I added it before looking at your guide. It simply sets homing mode 34 - index pulse.

What do you mean by the wrong naming convention? You stated the halpin "opmode". Did I write it wrong or is the data type of signed 32 wrong? As per servo manual, it is an 8 bit variable but LinuxCNC expects it as signed 32.

I did not use the "name" attribute for the EtherCAT slave in the .xml, instead I use the slave ID number in the .hal file.

Would elaborate more on what is wrong the .xml file? I can get the .ini and .hal files from you absolute encoder tutorial but there is no .xml file there. That is why I ask about my errors in the .xml file.
  • andrax
  • andrax's Avatar
26 Apr 2026 16:23
Replied by andrax on topic CiA 402 Folder Missing

CiA 402 Folder Missing

Category: EtherCAT

Konstatin, 
I don't understand why you don't stick with one configuration and keep trying different ones.
You already had working configurations, but you replaced them with new experiments.
I get the impression that you haven't read the important threads!

Your EtherCAT XML is full of errors again.
You have to give each drive a name so it can be assigned   name="X"

What are you trying to achieve with the following lines???
<sdoConfig idx="6098" subIdx="00">
<sdoDataRaw data="22 00"/>
</sdoConfig>
6098 refers to the homing method and is defined in the .ini file
CIA402_HOMING_ENABLED = 1
CIA402_HOMING_METHOD=4
CIA402_HOMING_SEARCH_VELOCITY=300000
CIA402_HOMING_LATCH_VELOCITY=100000
CIA402_HOMING_ACCELERATION=131072


A certain naming convention has been established here in the forum
With such naming conventions, you’ll confuse your fellow forum members and no one will be able to help you anymore.
halPin=“opmode” halType="s32"/>

You have to remember that the names you define in the XML must also be used in the .hal file.

I can only recommend one thing:
Delete all that junk!!!
Use the templates from the A6, and enter your VID and PID correctly.
Stick with this template and post any error messages!
 
  • endian
  • endian's Avatar
12 Apr 2026 18:12
Replied by endian on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

xml on debian trixie
i have test refClockSyncCycles = -1 , but problem is the same
Warning: Spoiler!

 

what help me during the grinding noise was reinstall driver to chip native or dcConf assignActivate = "300" edit to something as dcConf assignActivate = "730" ... then generic driver works well ...

I have hardware which runs at 250us and generic driver was not capable therefore I searched for other way of grinding avoiding with higher value of assign ... else with native chip driver is 0x0300 good enough 

 
  • endian
  • endian's Avatar
12 Apr 2026 15:55
Replied by endian on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

There is actually a bug in the code when you use both the "-" sign and the syncToRefClock option.
Both will switch on the pll code.
The bug is corrected, so depending on if you have that version or not.
Fix: don't use the "-" sign to switch on/off the pll code. Use only the syncToRefClock option.

 

last time when I was using the syncToRefClock instead of negative cycles there was an error of synchronization ... 
[ 2129.412707] EtherCAT 0: Master thread exited.
[ 2129.412708] EtherCAT 0: Starting EtherCAT-OP thread.
[ 2129.412731] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[ 2129.576578] EtherCAT 0: Slave states on main device: OP.
[ 2296.800969] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".
[ 2296.801476] EtherCAT 0-0: Acknowledged state SAFEOP.
[ 2297.416576] EtherCAT WARNING 0: 6 datagrams UNMATCHED!
[ 2350.481058] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".
[ 2350.481557] EtherCAT 0-0: Acknowledged state SAFEOP.
[ 2434.605096] EtherCAT 0: Slave states on main device: SAFEOP + ERROR.
[ 2434.613479] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".
[ 2434.614728] EtherCAT 0-0: Acknowledged state SAFEOP.
[ 2434.832592] EtherCAT 0: Slave states on main device: OP.
[ 2574.400506] EtherCAT 0: Master thread exited.
[ 2574.400515] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 2574.400543] EtherCAT ERROR 0-0: Failed to receive AL state datagram: 
[ 2574.400544] EtherCAT 0: Releasing master...
[ 2574.400545] Datagram initialized.
[ 2574.400549] EtherCAT 0: Released.
[ 2574.405124] EtherCAT 0: Slave states on main device: SAFEOP + ERROR.
[ 2574.412778] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".
[ 2574.413072] EtherCAT 0-0: Acknowledged state SAFEOP.
[ 2574.421158] EtherCAT 0: Slave states on main device: PREOP.
[ 2574.724604] EtherCAT WARNING: Datagram 000000005d8b16eb (master-fsm) was SKIPPED 1 time.

it is just foe experimenting purposes but durin negative syncs are everything rock solid ...
<masters>
    <master idx="0" appTimePeriod="250000" refClockSyncCycles="-100">    
        <slave idx="0" type="generic" vid="0x0000006a" pid="0x03000700" name="x-s343" configPdos="true">

            <!-- driver outputs setup -->
            <!-- reset number of mapped PDOs -->
            <sdoConfig idx="1A00" subIdx="00">
            <sdoDataRaw data="00 3F 6C 65"/>
            </sdoConfig>
            <!-- status word UINT16 -->
            <sdoConfig idx="1A00" subIdx="01">
            <sdoDataRaw data="10 00 41 60"/>
            </sdoConfig>
            <!-- incremental position from motor feedback INT32 -->
            <sdoConfig idx="1A00" subIdx="02">
            <sdoDataRaw data="20 00 63 60"/>
            </sdoConfig>
            <!--
             incremental position from motor extrenal feedback INT32 
            -->
            <sdoConfig idx="1A00" subIdx="03">
            <sdoDataRaw data="20 00 50 20"/>
            </sdoConfig>
            <!-- actual velocity in incremental status INT32 -->
            <sdoConfig idx="1A00" subIdx="04">
            <sdoDataRaw data="20 00 6C 60"/>
            </sdoConfig>
            <!-- internal operation mode INT16 -->
            <sdoConfig idx="1A00" subIdx="05">
            <sdoDataRaw data="10 00 53 23"/>
            </sdoConfig>
            <!-- driver warning code INT32 -->
            <sdoConfig idx="1A00" subIdx="06">
            <sdoDataRaw data="20 00 00 20"/>
            </sdoConfig>
            <!-- actual AI status INT16 -->
            <sdoConfig idx="1A00" subIdx="07">
            <sdoDataRaw data="10 01 B2 20"/>
            </sdoConfig>
            <!-- actual AI status INT16 -->
            <sdoConfig idx="1A00" subIdx="08">
            <sdoDataRaw data="10 02 B2 20"/>
            </sdoConfig>
            <!-- driver warning code INT32 -->
            <sdoConfig idx="1A00" subIdx="09">
            <sdoDataRaw data="20 00 02 10"/>
            </sdoConfig>
            <!-- define number of mapped PDOs -->
            <sdoConfig idx="1A00" subIdx="00">
            <sdoDataRaw data="09 40 6F 77"/>
            </sdoConfig>
            <!-- driver outputs end setup -->
            <!-- driver inputs setup -->
            <!-- reset number of mapped PDOs -->
            <sdoConfig idx="1600" subIdx="00">
            <sdoDataRaw data="00 3F 6C 65"/>
            </sdoConfig>
            <!--
             0x6041 0010 == register 0x6041 + value 0x10(16bit decimal) 
            -->
            <sdoConfig idx="1600" subIdx="01">
            <sdoDataRaw data="10 00 40 60"/>
            </sdoConfig>
            <!-- 0x60C1 0020 == 0x20 == 0d32 bit INT32-->
            <sdoConfig idx="1600" subIdx="02">
            <sdoDataRaw data="20 00 C1 60"/>
            </sdoConfig>
            <!-- actual velocity in incremental status INT32 -->
            <sdoConfig idx="1600" subIdx="03">
            <sdoDataRaw data="20 00 FF 60"/>
            </sdoConfig>
            <!-- opmode request UINT16 -->
            <sdoConfig idx="1600" subIdx="04">
            <sdoDataRaw data="10 00 52 23"/>
            </sdoConfig>
            <!-- digital outputs write INT16 -->
            <sdoConfig idx="1600" subIdx="05">
            <sdoDataRaw data="10 00 02 23"/>
            </sdoConfig>
            <!-- define number of mapped PDOs -->
            <sdoConfig idx="1600" subIdx="00">
            <sdoDataRaw data="05 40 6F 77"/>
            </sdoConfig>
            <!-- driver inputs end setup -->
            <sdoConfig idx="1C12" subIdx="01">
            <sdoDataRaw data="00 16"/>
            </sdoConfig>
            <sdoConfig idx="1C12" subIdx="00">
            <sdoDataRaw data="01"/>
            </sdoConfig>
            <sdoConfig idx="1C13" subIdx="01">
            <sdoDataRaw data="00 1A"/>
            </sdoConfig>
            <sdoConfig idx="1C13" subIdx="00">
            <sdoDataRaw data="01"/>
            </sdoConfig>
            
            <!-- Set OpMode to Cyclic Synchronous Position -->
            <sdoConfig idx="6060" subIdx="00">
            <sdoDataRaw data="FA"/>
            </sdoConfig>
            <!-- Set Cycle Time -->
            <sdoConfig idx="60C2" subIdx="01">
            <sdoDataRaw data="19"/>
            </sdoConfig>
            <!-- Set Cycle exp = (-3) == 10^(-3) -->
            <sdoConfig idx="60C2" subIdx="02">
            <sdoDataRaw data="FB"/>
            </sdoConfig>
        
        <syncManager idx="0" dir="out"> </syncManager>
        <syncManager idx="1" dir="in"> </syncManager>
        <syncManager idx="2" dir="out">
            <pdo idx="1600">
                <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="target-controlword" halType="u32"/>
                <pdoEntry idx="60C1" subIdx="00" bitLen="32" halPin="target-position-inc" halType="s32"/>
                <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity-inc" halType="s32"/>
                <pdoEntry idx="2352" subIdx="00" bitLen="16" halPin="target-internal-opmode" halType="s32"/>
                <pdoEntry idx="2302" subIdx="00" bitLen="16" halPin="target-digital-output" halType="s32"/>
            </pdo>
        </syncManager>
        <syncManager idx="3" dir="in">
            <pdo idx="1A00">
                <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="actual-statusword" halType="u32"/>
                <pdoEntry idx="6063" subIdx="00" bitLen="32" halPin="actaul-position-inc" halType="s32"/>
                <pdoEntry idx="2050" subIdx="00" bitLen="32" halPin="actaul-position-inc-dro" halType="s32"/>
                <pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity-inc" halType="s32"/>
                <pdoEntry idx="2353" subIdx="00" bitLen="16" halPin="actual-internal-opmode" halType="s32"/>
                <pdoEntry idx="2000" subIdx="00" bitLen="32" halPin="actual-warning-code" halType="s32"/>
                <pdoEntry idx="20B2" subIdx="01" bitLen="16" halPin="actual-analog-input-1-mV" halType="s32"/>
                <pdoEntry idx="20B2" subIdx="02" bitLen="16" halPin="actual-analog-input-2-mV" halType="s32"/>
                <pdoEntry idx="1002" subIdx="00" bitLen="32" halPin="status-register" halType="u32"/>
            </pdo>
        </syncManager>
            <dcConf assignActivate="730" sync0Cycle="*1" sync0Shift="0"/>
        </slave>
</master>
</masters>
 
  • papagno-source
  • papagno-source
12 Apr 2026 12:44 - 12 Apr 2026 14:06
Replied by papagno-source on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

xml on debian trixie
i have test refClockSyncCycles = -1 , but problem is the same
Warning: Spoiler!

 
  • papagno-source
  • papagno-source
12 Apr 2026 12:41 - 12 Apr 2026 14:07
Replied by papagno-source on topic Ethercat random jitter fix

Ethercat random jitter fix

Category: EtherCAT

xml debian 10

Warning: Spoiler!
  • cekaa
  • cekaa's Avatar
04 Apr 2026 06:37

Hello, I would like to add an EtherCAT IO device. What should I do

Category: EtherCAT

I struggled a lot because it was a topic I didn't understand at all. I added the pdos and the lcec_configgen result, but I didn't understand what kind of structure I was supposed to create.
When 32 bit = 16 bit
ceka@debian:~$ ethercat slave
0 0:0 OP + XINJE-DS5C1 EtherCAT(CoE) Drive Rev4.0 v3.7.70
1 0:1 OP + XINJE-DS5C1 EtherCAT(CoE) Drive Rev4.0 v3.7.70
2 0:2 OP + XINJE-DS5C1 EtherCAT(CoE) Drive Rev4.0 v3.7.70
3 0:3 SAFEOP+ERROR E EM32DX-E4   ????????????????????????????????????????????
ceka@debian:~$

SAFEOP+ERROR E EM32DX-E4

old now

ceka@debian:~$ ethercat pdos
=== Master 0, Slave 3 ===
SM0: PhysAddr 0x1000, DefaultSize  128, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1400, DefaultSize  128, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1800, DefaultSize    5, ControlRegister 0x64, Enable 1
  RxPDO 0x1600 "RxPDO0-Map"
    PDO entry 0x7000:01, 16 bit, "OUT"
SM3: PhysAddr 0x1c00, DefaultSize    7, ControlRegister 0x20, Enable 1
  TxPDO 0x1a00 "TxPDO1-Map"
    PDO entry 0x6000:01, 16 bit, "IN"
ceka@debian:~$

lcec_configgen
<slave idx="3" type="generic" vid="0x00004321" pid="0x01100073" name="D4">
      <!--EM32DX-E4-->
      <syncManager idx="0" dir="in"/>
      <syncManager idx="1" dir="out"/>
      <syncManager idx="2" dir="out">
        <pdo idx="1600">
          <!--RxPDO0-Map-->
          <pdoEntry idx="7000" subIdx="01" bitLen="16" halPin="out" halType="u32"/>
        </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
        <pdo idx="1a00">
          <!--TxPDO1-Map-->
          <pdoEntry idx="6000" subIdx="01" bitLen="16" halPin="in" halType="u32"/>
        </pdo>
      </syncManager>
    </slave>
  </master>
</masters>
ceka@debian:~$


Would the `lcec_configgen` command help? Could someone write the correct configuration for me?


 
  • cekaa
  • cekaa's Avatar
02 Apr 2026 11:13

Hello, I would like to add an EtherCAT IO device. What should I do

Category: EtherCAT

Hi, I have the same problem. How did you switch to XML OP mode? 
Leidshine em32dx-e

ceka@debian:~$ ethercat slave
0  0:0  OP     +  XINJE-DS5C1 EtherCAT(CoE) Drive Rev4.0 v3.7.70
1  0:1  OP     +  XINJE-DS5C1 EtherCAT(CoE) Drive Rev4.0 v3.7.70
2  0:2  OP     +  XINJE-DS5C1 EtherCAT(CoE) Drive Rev4.0 v3.7.70
3  0:3  PREOP  E  EM32DX-E4
ceka@debian:~$

main xml

 
slave idx="3" type="generic" vid="0x00004321" pid="0x01100073" configPdos="true">
      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>     
      <syncManager idx="2" dir="out">
        <pdo idx="1600">            
            <!-- Digtial Outputs (RTEC1616)-->
          <pdoEntry idx="0x7000," subIdx="01" bitLen="16" halType="complex">
            <complexEntry bitLen="1" halPin="out-01" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-02" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-03" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-04" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-05" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-06" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-07" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-08" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-09" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-10" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-11" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-12" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-13" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-14" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-15" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-16" halType="bit"/>
          </pdoEntry>  
          
      </pdo>
      </syncManager>      
      <syncManager idx="3" dir="in">
        <pdo idx="0x1a00,">    
          <!-- Digtial_inputs  -->
          <pdoEntry idx="0x6000," subIdx="01" bitLen="32" halType="complex">
            <complexEntry bitLen="1" halPin="in-01" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-02" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-03" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-04" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-05" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-06" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-07" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-08" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-09" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-10" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-11" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-12" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-13" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-14" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-15" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-16" halType="bit"/>    
           </pdoEntry>  
        </pdo>
      </syncManager>   
       </slave>
</master>
</masters>  


 
Displaying 1 - 15 out of 41 results.
Time to create page: 0.320 seconds
Powered by Kunena Forum