CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Mon Nov 19, 2018 10:05 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
 Post subject: SanyoDenkyRS2 EtherCAT
PostPosted: Tue Sep 25, 2018 5:04 pm 
Offline

Joined: Fri Sep 07, 2018 8:16 am
Posts: 8
Hi at all, i'm using a Sanyo Denki RS2 and i have these problems:

--- Deafault values are: EtherCAT Task 4ms - Distribuited Clock 4000us, offset 20% ---

Task EtherCAT
Distribuited Clock Notes
2500 us 2500 us Motor spins for 5sec and then RS2 is in fault
2000 us 3000 us Motor spins but sometimes it lost some steps
3000 us 3000 us The same of first case
1000 us 2000 us Motor spins but sometimes it lost some steps
1000 us 4000 us No problems
2000 us 8000 us No problems

It would be fantastic if i could set "Task EtherCAT" at 1000us and "Distribuited Clock" at 2000 (max offset 35/40%).
Jitter is +/- 250 (more or less), and it's ok for me. I must stay under 300.

I don't understand why, for example, in the third case i have problems, but not in the fourth even if in last one Ethercat Task has "only" 1000 us...

Someone can help me to resolve this problem? If you need other infos, i'm here.


Best Regards,
Gianmarco


You do not have the required permissions to view the files attached to this post.


Last edited by gdalbo on Tue Oct 02, 2018 8:53 am, edited 1 time in total.

Top
   
PostPosted: Tue Sep 25, 2018 5:58 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2958
Hi,
please check if the Motor runs with sync offset 20 (default is for 99% the best solution I guess)
Are you using Raspberry Pi with rt_preempt patched Linux Kernel?
Then use 'FrameAtTaskstart' this is from my point of view mandatory for drives... see screenshot.

BR
Edwin


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Wed Sep 26, 2018 12:37 pm 
Offline

Joined: Fri Sep 07, 2018 8:16 am
Posts: 8
Hi Edwin, thank you very much for the answers.

I'm using an OMAP-L137 board with real time preemption kernel @444 MHz.

I'm also using "EtherCAT_MasterSoftmotion" wich alreaady has "FrameAtTaskStarts" setted "TRUE".

Anyway with "max offset 35%/40%" i mean that for me it's ok if for some reason i have to set these values up to 35%/40%...
I tested values on the "table" in the first post using 20%/30%/35%/40% of offset, the best result was using 35% and 2000us Ethercat Task - 2000us DClock.

Maybe is it an hardware limit? No... i think.. because the strange thing is that with 6000us Ethercat Task and 6000us DClock and quite immediately sanyo going in fault

EDIT:
I've just try to use CodesysWin to control Sanyo, and problems are the same... therefore i think that it isn't an hardware limit

Best Regards,
Gianmarco


Top
   
PostPosted: Wed Sep 26, 2018 2:50 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2958
Hi Gianmarco,

please check the realtime capabilities of your system.
Taskmonitor - you should see jitter times <100us (if you do a reset by rightclick in the Ethercat Task)
On realtime capable plc's ( ->Control Win is not possible to use!!) the Sanyo drive will work with 20% Offset (Default)
and no matter 1000us,2000us,3000us,4000us Taskcycle(Ethercat) and DC clock should the be the same setting -> use the same sync time than the ethercat master Task is.

BR
Edwin


Top
   
PostPosted: Fri Sep 28, 2018 6:37 pm 
Offline

Joined: Fri Sep 07, 2018 8:16 am
Posts: 8
Edwin Schwellinger wrote:
Hi Gianmarco,

please check the realtime capabilities of your system.
Taskmonitor - you should see jitter times <100us (if you do a reset by rightclick in the Ethercat Task)
On realtime capable plc's ( ->Control Win is not possible to use!!) the Sanyo drive will work with 20% Offset (Default)
and no matter 1000us,2000us,3000us,4000us Taskcycle(Ethercat) and DC clock should the be the same setting -> use the same sync time than the ethercat master Task is.

BR
Edwin


Hi Edwin,

our system is ok about realtime... unfortunately it isn't very fast, infact for us and our applications it's ok a jitter <=300us

It's ok about Task Etchercat cycle and DC too.


In these days we have done another test:

Our board has an Ethernet switch (MICREL) and two eth port, the first one is connected to the lan (then from codesys i can choose it through scanning devices), and the last one goes to Ethercat devices.

Now i'm doing tests using board and Sanyo driver.
If i send positions (sanyo is in csp), for example at 2ms ETC Task and 2ms DC, drive loses some steps, but if i remove the cable which connects board to lan, it loses less steps!
Maybe is there some particular config to use? Is it possible that Ethercat comes into conflict with other packets in the Ethernet line? Probably this is a part of the problem...
but i cant understand why if i set 6ms on ETC Task and 6ms on DC, driver goes instantly in fault...

Thank you for your patience,
Gianmarco


Last edited by gdalbo on Tue Oct 02, 2018 9:16 am, edited 1 time in total.

Top
   
PostPosted: Sun Sep 30, 2018 9:47 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2958
Hi Gianmarco,

hm could you add your CODESYSControl.cfg file?
Is this physically only one ethercat port then? ( switched)
Ethercat need an own port ...


BR
Edwin


Top
   
PostPosted: Mon Oct 01, 2018 9:04 am 
Offline

Joined: Fri Sep 07, 2018 8:16 am
Posts: 8
Edwin Schwellinger wrote:
Hi Gianmarco,

hm could you add your CODESYSControl.cfg file?
Is this physically only one ethercat port then? ( switched)
Ethercat need an own port ...


BR
Edwin


Hi Edwin and good Monday!

Yes, you're right, our board has the eth switch (Micrel KSZ8893MQL) and in the main uC there is only one ethernet port.

You can find "CODESYSControl 3.5SP12Patch3.cfg" and "CODESYSControl .cfg" in the attachments.

Thank you very much.

Best Regards,
Gianmarco


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Mon Oct 01, 2018 12:48 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2958
Gooday Gianmarco,

I need the CODESYSControl.cfg file from the plc - guess these are from CODESYS and your pc.

Not sure if this will work if you have really only one port for doing this.
Ethercat need to run exclusive at one port ( without other traffic)
Is it possible to connect a USB-to-ethernet adapter and do the CODESYS connection via this.
Than have Ethercat exclusive with the Sanyo denki connected?

BR
Edwin


Top
   
PostPosted: Tue Oct 02, 2018 12:28 pm 
Offline

Joined: Fri Sep 07, 2018 8:16 am
Posts: 8
Edwin Schwellinger wrote:
Gooday Gianmarco,

I need the CODESYSControl.cfg file from the plc - guess these are from CODESYS and your pc.

Not sure if this will work if you have really only one port for doing this.
Ethercat need to run exclusive at one port ( without other traffic)
Is it possible to connect a USB-to-ethernet adapter and do the CODESYS connection via this.
Than have Ethercat exclusive with the Sanyo denki connected?

BR
Edwin


Goodmorning Edwin,

Sorry, here you are the right CODESYSConfig.cfg form the plc.

Anyway, at the moment our board is directly connected to Sanyo.
It is connected on lan only when I'm logged in to donwload code/start some process, but as soon as i did this i can disconnect it from lan.
In this way motor loses less steps..
gdalbo wrote:
If i send positions (sanyo is in csp), for example at 2ms ETC Task and 2ms DC, drive loses some steps, but if i remove the cable which connects board to lan, it loses less steps!


In the attachments you can find the right " .cfg", and a very very simple scheme of what we're using.

P.S.: Do you know why if i set 6ms on ETC task and DC, sanyo goes in fault? Is it too much?



Thank you so much Edwin,
Gianmarco


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Tue Oct 02, 2018 2:54 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2958
Hi Gianmarco,

config file is ok.
I fear it is really a problem of this switched port you need really 2 ports.

I could check if my drive works with 6ms - will give feedback a.s.a.p.

BR
Edwin


Top
   
PostPosted: Tue Oct 02, 2018 4:37 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2958
Hi,
I agree with 6ms the drive does not run,
seems a slave Problem I think.
With other cycle times it works like charm.

BR
Edwin


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited