EtherCat Sync & DC problem

More
8 years 7 months ago #107375 by Automata27
Hi,

I am using Ethercat hal driver with lcec & lcec_conf...i am facing synch & DC(distributed clock ) issue...i am using panasonic A6 drives & motor...i am running lcec in csp mode...

i have attached ecat_conf.xml file for ref. and output waveform of pos-cmd(motor-pos-cmd), pos-fb(lcec.0.0.pos-fb), internal cmd velocity and velocity- feedback(lcec.0.0.actvel) ethercat bus. you can see in the waveform that on feedback velocity graphs there is spikes at certain fixed interval (approx 2.3 sec).

anyone have any idea about this??
it would be great if anyone can help me with this.

FYI...
i am using following systems:-
- linux kernel :- 3.4-9-rtai-686-pae #1 SMP PREEMPT Debian 3.4.55-4linuxcnc i686 GNU/Linux (debian wheezy)
- network card :- realtek r8169

File Attachment:

File Name: ecat_conf_...3-15.xml
File Size:5.01 KB


Thanks in advance.
Regards.

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

More
8 years 7 months ago #107415 by sirop
Replied by sirop on topic EtherCat Sync & DC problem
Hi.

Why do you suspect it to be Sync & DC problem?

If you run your slaves in csp (Cyclic Synchronous Position),
you send increments of position and - I guess - wait until the target position is reached.
The each time your velocity would increase up to a certain value and then decrease.

Check the manual of your drive for Trapezoidal and S-curve Motion Profiles.

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

More
8 years 7 months ago #107460 by Automata27
Hi sirop,

thanks for reply...
i have checked in servo drive's s-curve profile parameter and have tried setting position command smoothening parameter also...in this case amplitude of spike gets reduced but still that spike comes at regular interval...setting this parameter will increase ferror...secondly i am not using motion profiles from drive, i am using linuxcnc motion profiler...

i am suspecting dc problem because it is coming at regular interval...it might be some issue with xml configuration like appTimePeriod or refClockSyncCycles or synch0shift etc., it will be helpful if you can check and let me know if it is correct or not...

Regards.

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

More
8 years 7 months ago #107461 by sirop
Replied by sirop on topic EtherCat Sync & DC problem
I can not really test it as I do no have your setup here.

synch0shift: try to play with it similar to github.com/sittner/linuxcnc-ethercat/blo...thercat-conf.xml#L10 .

The Sync0shift values should be the same for all slaves (with the same time base), so that they all apply their PDO data at the same shift time from the start of the period. This allows you to send the PDO information any time between the start of the period and the sync time without the slave missing the information. The distributed clock framework makes sure all the slaves clocks are in sync so that the sync0 time occurs at the same time on all the slaves.

I have a period of 1000us, so I use a shift time of 500us. So I can use up to half of by period to receive, calc and send new PDOs. Note: the send time includes the time the frame is on the wire.


Graeme.

lists.etherlab.org/pipermail/etherlab-users/2018/003287.html

refClockSyncCycles: this value defines how often the network is re-sync'ed. Try somehting like 4 or 5 insted of the present 1000 .

If you used RT PREEMPT, you could try out: github.com/sittner/linuxcnc-ethercat/iss...suecomment-371244865
The following user(s) said Thank You: pamxy

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

More
8 years 7 months ago - 8 years 7 months ago #107487 by chimeno
Replied by chimeno on topic EtherCat Sync & DC problem
hello Automata,
I do not understand your question very well but seen in the .xml file a couple of things, I would change the refClockSyncCycles = "* 1" and sync0Cycle = "configured cycle time"

sync0Cycle = "250000"
sync0Shift = "125000"

depending on how you have configured the servo, which DC mode do you use?
DC (Synch.),
SM2 (Synch.),
FreeRun (Non-synch.)
What cycle time do you use?
125μs, 250μs, 500μs, 1ms, 2ms, 4ms
 when I had synchronization problems, that is, only problem is reading the frame so that the servo cycle time corresponded with the LCEC, place a buffer.
// ax5xxx raw position counter 2

pos_count_2 = EC_READ_S32 (& pd [hal_data-> ax5xxx_fd2]);

if (pos_count_2! = 0) {// SYNC
if (* (hal_data-> pos_fb_2)> (double) 0x7fffffff) {
* (hal_data-> pos_fb_2) = (double) 0x7fffffff;
}
if (* (hal_data-> pos_fb_2)> (double) -0x7fffffff) {
* (hal_data-> pos_fb_2) = (double) -0x7fffffff;
}
* (hal_data-> pos_fb_2) = (double) pos_count_2 / (AX5XXX_POSITION_SCALE * hal_data-> pos_scale);
}

sync0Shift = "half cycle"



I hope I can help you.
regards
Chineno
Last edit: 8 years 7 months ago by chimeno. Reason: Edit

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

More
8 years 7 months ago #107596 by Automata27
as per your suggestion following settings i have changed...

refClockSyncCycles = "* 1" and sync0Cycle = "configured cycle time"
sync0Cycle = "1000000"
sync0Shift = "0"

attached is the waveform that i got now...still dc issue is there...

i am configured drive DC synch mode...
cycle time that i use is 1ms....

as per your suggestion if i set sycn0shift = "half cycle " then also same issue...no change...

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

Time to create page: 0.072 seconds
Powered by Kunena Forum