Ethercat random jitter fix

More
6 months 2 weeks ago #345450 by grandixximo
To rule out issues with anything outside the programs, did you try to swap SSD with the debian 10 you know is working on other hardware?

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #345452 by andrax
Replied by andrax on topic Ethercat random jitter fix
I would suggest taking an analytical approach to this.
As I understand it, 4 registers are important:
607A target-position
60FF target-velocity
and
6064 actual-position
606C actual-velocity
I simply enter a value in 607A and 60FF, and the axis moves to that position. LinuxCNC evaluates 6064 and 606C. If the target and actual values match, LinuxCNC is satisfied.
That’s my understanding.
Now the question arises: Does the axis vibrate when stationary or while moving?
If it vibrates when stationary, which shouldn’t happen, it’s constantly receiving new positions and oscillating.
Control loop?
Do the axes oscillate while moving?
Unstable, fluctuating setpoints?

At this point, I would use Wireshark to compare the traffic between the two systems.
I think the findings will be very revealing.
 

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #345453 by papagno-source
The problem only occurs during movement and is a noise transmitted to the mechanics, the kind you usually hear about on the LinuxCNC forum.
It seems to have solved the problem. First, I restored the original lcec_conf, Lcec_coffigen, and Lcec.so files. I changed the parameters refClockSyncCycles="-1" and syncToRefClock="false" in the XML file.
For now, I've left the sync0Shift = "0" parameter.
I'll test the machine and update you on how it works.

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago - 6 months 2 weeks ago #345455 by Hakan
Replied by Hakan on topic Ethercat random jitter fix
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 edit: 6 months 2 weeks ago by Hakan.

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #345456 by endian
Replied by endian on topic Ethercat random jitter fix

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 ... 
Code:
[ 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 ...
Code:
<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>
 

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #345457 by papagno-source
I've already run tests with:
refClockSyncCycles="1" and syncToRefClock= "true"
refClockSyncCycles="5" and syncToRefClock= "true"
refClockSyncCycles="1000" and syncToRefClock= "true"
refClockSyncCycles="-1" and syncToRefClock= "true"

With these settings, the machine makes noise when moving.
Now I've set refClockSyncCycles="-1" and syncToRefClock= "false"
and the machine is working without problems so far.

Please Log in or Create an account to join the conversation.

Time to create page: 0.410 seconds
Powered by Kunena Forum