Trouble with Cia402 drive configuration
- peterpan
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 1
24 Sep 2025 16:41 #335372
by peterpan
Replied by peterpan on topic Trouble with Cia402 drive configuration
I set configPDOS="false" and set debug level to 1 then started linuxcnc and did dmesg:
[ 5955.390588] EtherCAT DEBUG 0-3: Sync after 2916 ms: 10723 ns
[ 5955.391589] EtherCAT DEBUG 0-3: 9904 ns difference after 2920 ms.
[ 5955.391591] EtherCAT DEBUG 0-3: ref_time=812044903503955000
[ 5955.391592] EtherCAT DEBUG 0-3: app_time=812044909343879717
[ 5955.391593] EtherCAT DEBUG 0-3: start_time=812044909442878936
[ 5955.391594] EtherCAT DEBUG 0-3: cycle=1000000
[ 5955.391595] EtherCAT DEBUG 0-3: shift_time=0
[ 5955.391596] EtherCAT DEBUG 0-3: remainder=923936
[ 5955.391597] EtherCAT DEBUG 0-3: start=812044909442955000
[ 5955.391598] EtherCAT DEBUG 0-3: Setting DC cyclic operation start time to 812044909442955000.
[ 5955.393588] EtherCAT DEBUG 0-3: Setting DC AssignActivate to 0x0300.
[ 5955.396589] EtherCAT ERROR 0-3: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 5955.397588] EtherCAT ERROR 0-3: AL status message 0x001E: "Invalid input configuration".
[ 5955.399588] EtherCAT 0-3: Acknowledged state PREOP.
ethercat upload 0x60c2 1
0x02 2
ethercat upload 0x60c2 2
0xfffffffd -3
Don't know what this means; could you explain what interpolation time is?
[ 5955.390588] EtherCAT DEBUG 0-3: Sync after 2916 ms: 10723 ns
[ 5955.391589] EtherCAT DEBUG 0-3: 9904 ns difference after 2920 ms.
[ 5955.391591] EtherCAT DEBUG 0-3: ref_time=812044903503955000
[ 5955.391592] EtherCAT DEBUG 0-3: app_time=812044909343879717
[ 5955.391593] EtherCAT DEBUG 0-3: start_time=812044909442878936
[ 5955.391594] EtherCAT DEBUG 0-3: cycle=1000000
[ 5955.391595] EtherCAT DEBUG 0-3: shift_time=0
[ 5955.391596] EtherCAT DEBUG 0-3: remainder=923936
[ 5955.391597] EtherCAT DEBUG 0-3: start=812044909442955000
[ 5955.391598] EtherCAT DEBUG 0-3: Setting DC cyclic operation start time to 812044909442955000.
[ 5955.393588] EtherCAT DEBUG 0-3: Setting DC AssignActivate to 0x0300.
[ 5955.396589] EtherCAT ERROR 0-3: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 5955.397588] EtherCAT ERROR 0-3: AL status message 0x001E: "Invalid input configuration".
[ 5955.399588] EtherCAT 0-3: Acknowledged state PREOP.
ethercat upload 0x60c2 1
0x02 2
ethercat upload 0x60c2 2
0xfffffffd -3
Don't know what this means; could you explain what interpolation time is?
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 899
- Thank you received: 315
25 Sep 2025 08:44 #335401
by Hakan
Replied by Hakan on topic Trouble with Cia402 drive configuration
It's from the ethercat manual, I put a link there a post ago.
This is unique for this servo
You have a 1 ms cycle time in axis.ini. According to the manual you have it set to 2 ms. Change that withand check the value again with ethercat upload.
The error comes from the drive, it thinks the config is wrong.
The only thing to do is to follow the manual.
One thing I can think of is that it doesn't like variable PDOS.
But there aren't any complains about that.
You can as a next step test to define the receive and transmit PDOS
as on page 9 and 10. Include all pdo entries even the ones you don't use.
This is unique for this servo
You have a 1 ms cycle time in axis.ini. According to the manual you have it set to 2 ms. Change that with
ethercat download 0x60c2 1 1
The error comes from the drive, it thinks the config is wrong.
The only thing to do is to follow the manual.
One thing I can think of is that it doesn't like variable PDOS.
But there aren't any complains about that.
You can as a next step test to define the receive and transmit PDOS
as on page 9 and 10. Include all pdo entries even the ones you don't use.
Attachments:
The following user(s) said Thank You: peterpan
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 899
- Thank you received: 315
25 Sep 2025 08:53 #335402
by Hakan
Replied by Hakan on topic Trouble with Cia402 drive configuration
After reading Note under the table, you can set "sync0Shift=700000" in ethercat.xml
Please Log in or Create an account to join the conversation.
- peterpan
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 1
25 Sep 2025 14:29 #335413
by peterpan
It also says the bits are unique for each operating mode; do I also need to configure the individual bits of Controlword to achieve:
"The servo must be Enabled before it can follow any command. Enable
the servo by turning on bits 1 and 2 of the Controlword (Ready to
Switch On) then turning on bits 0-3 of the Controlword (Operation
Enabled)."
This is stated multiple times, including page 12, 13, 15 and 26
Setting "sync0Shift=700000" didn't seem to change anything that I can see
Could I just change the configuration to 2ms?
Replied by peterpan on topic Trouble with Cia402 drive configuration
Do I need to configure all pdo entries for all 7 modes? (1600 1A00, 1601 1A01, 1602 etc)
Include all pdo entries even the ones you don't use.
It also says the bits are unique for each operating mode; do I also need to configure the individual bits of Controlword to achieve:
"The servo must be Enabled before it can follow any command. Enable
the servo by turning on bits 1 and 2 of the Controlword (Ready to
Switch On) then turning on bits 0-3 of the Controlword (Operation
Enabled)."
This is stated multiple times, including page 12, 13, 15 and 26
Setting "sync0Shift=700000" didn't seem to change anything that I can see
Could I just change the configuration to 2ms?
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 899
- Thank you received: 315
25 Sep 2025 15:20 #335414
by Hakan
Replied by Hakan on topic Trouble with Cia402 drive configuration
The ones on page 9 and 10 only.
The cia402 module will do the right thing with controlword and statusword, you should not need to do anything yourself.
The drive needs to be in OP first.
You can try with 2 ms, I guess. Should work too.
The cia402 module will do the right thing with controlword and statusword, you should not need to do anything yourself.
The drive needs to be in OP first.
You can try with 2 ms, I guess. Should work too.
Please Log in or Create an account to join the conversation.
- peterpan
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 1
25 Sep 2025 18:23 #335420
by peterpan
Replied by peterpan on topic Trouble with Cia402 drive configuration
After adding the rest of the pdo entries on pg 9 and 10 the drive still stays in PREOP
The dmesg:
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
<slave idx="0" type="EK1100" />
<slave idx="1" type="EL1008" />
<slave idx="2" type="EL2008" />
<slave idx="3" type="generic" vid="0x00000c96" pid="0x00000001" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="700000" />
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32" />
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32" />
<pdoEntry idx="6071" subIdx="00" bitLen="16" halPin="target-torque" halType="s32" />
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32" />
<pdoEntry idx="60FE" subIdx="00" bitLen="32" halPin="digital-outputs" halType="u32" />
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32" />
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="603F" subIdx="00" bitLen="16" halPin="error-code" halType="u32" />
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32" />
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-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="32" halPin="actual-torque" halType="s32" />
<pdoEntry idx="60F4" subIdx="00" bitLen="32" halPin="follow-error" halType="s32" />
<pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="digital-inputs" halType="u32" />
</pdo>
</syncManager>
</slave>
</master>
</masters>
The dmesg:
[100592.236726] EtherCAT DEBUG 0-3: 9936 ns difference after 400 ms.
[100592.236728] EtherCAT DEBUG 0-3: ref_time=812139542737448000
[100592.236729] EtherCAT DEBUG 0-3: app_time=812139546509016167
[100592.236730] EtherCAT DEBUG 0-3: start_time=812139546609016167
[100592.236731] EtherCAT DEBUG 0-3: cycle=1000000
[100592.236732] EtherCAT DEBUG 0-3: shift_time=700000
[100592.236733] EtherCAT DEBUG 0-3: remainder=568167
[100592.236734] EtherCAT DEBUG 0-3: start=812139546610148000
[100592.236735] EtherCAT DEBUG 0-3: Setting DC cyclic operation start time to 812139546610148000.
[100592.238726] EtherCAT DEBUG 0-3: Setting DC AssignActivate to 0x0300.
[100592.241726] EtherCAT ERROR 0-3: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[100592.242726] EtherCAT ERROR 0-3: AL status message 0x001E: "Invalid input configuration".
[100592.244725] EtherCAT 0-3: Acknowledged state PREOP.
[100592.465795] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[100592.489802] EtherCAT WARNING: Datagram 0000000070b69bf8 (master-fsm) was SKIPPED 1 time.
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 899
- Thank you received: 315
25 Sep 2025 21:06 #335435
by Hakan
Replied by Hakan on topic Trouble with Cia402 drive configuration
Change appTimePeriod as well. Lcec usually gives an error for mismatch with servoperiod, error somewhere after linuxcnc start command.
Are there any other errors in the window where you start linuxcnc?
Can you post the ouput from the "lcec_config" command?
I really only have two more ideas, try with sm sync and free run.
For sm sync change to assignActivate=100, and for free run test comment out the whole dcConf line/item.
If that doesn't makes things better I think you should hook it up to Twincat and get it going there.
Are there any other errors in the window where you start linuxcnc?
Can you post the ouput from the "lcec_config" command?
I really only have two more ideas, try with sm sync and free run.
For sm sync change to assignActivate=100, and for free run test comment out the whole dcConf line/item.
If that doesn't makes things better I think you should hook it up to Twincat and get it going there.
The following user(s) said Thank You: peterpan
Please Log in or Create an account to join the conversation.
- peterpan
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 1
26 Sep 2025 16:47 #335462
by peterpan
Replied by peterpan on topic Trouble with Cia402 drive configuration
This is the entirety of the linuxcnc command info
When I type "lcec_config" into the command line I get command not found.
Changing dcConf didn't seem to change anything...
Is there a guide on the linuxcnc forums to setting up Twincat with LinuxCNC? I can't find out, but I could try to figure it out without one.
LINUXCNC - 2.9.4
Machine configuration directory is '/home/cnc/linuxcnc/configs/sim.axis'
Machine configuration file is 'axis.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./ethercat.hal
note: MAXV max: 5.000 units/sec 300.000 units/min
note: LJOG max: 5.000 units/sec 300.000 units/min
note: LJOG default: 0.250 units/sec 15.000 units/min
note: jog_order='X'
note: jog_invert=set()
When I type "lcec_config" into the command line I get command not found.
Changing dcConf didn't seem to change anything...
Is there a guide on the linuxcnc forums to setting up Twincat with LinuxCNC? I can't find out, but I could try to figure it out without one.
Please Log in or Create an account to join the conversation.
- peterpan
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 1
26 Sep 2025 18:53 #335464
by peterpan
Replied by peterpan on topic Trouble with Cia402 drive configuration
I am having trouble interpreting this thread, but it seems to have similar debug info to my problem:
forum.linuxcnc.org/ethercat/51505-new-hardware-trouble?start=0
Could my problem be EoE related?
forum.linuxcnc.org/ethercat/51505-new-hardware-trouble?start=0
Could my problem be EoE related?
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 899
- Thank you received: 315
27 Sep 2025 16:48 - 27 Sep 2025 16:52 #335494
by Hakan
Replied by Hakan on topic Trouble with Cia402 drive configuration
I meant "lcec_configgen".
I don't think there is a guide for TwinCAT here, have not seen one.
Maybe my old stumbling tries with Twincat still works.
Youtube video Twincat start
Download TwinCAT XAE shell from beckhoff (free).
It might need other downloads as well, but once installed it seems to work.
So I think we have tried everything now.
TwinCAT should be supported by the manufacturer, so you should be able to ask the manufacturer how to get it running.
Once you have got was is needed to get the drive from PreOP+E it should be possible to replicate in lcec.
I don't think there is a guide for TwinCAT here, have not seen one.
Maybe my old stumbling tries with Twincat still works.
Youtube video Twincat start
Download TwinCAT XAE shell from beckhoff (free).
It might need other downloads as well, but once installed it seems to work.
So I think we have tried everything now.
TwinCAT should be supported by the manufacturer, so you should be able to ask the manufacturer how to get it running.
Once you have got was is needed to get the drive from PreOP+E it should be possible to replicate in lcec.
Last edit: 27 Sep 2025 16:52 by Hakan.
Please Log in or Create an account to join the conversation.
Time to create page: 0.096 seconds