CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Fri May 26, 2017 9:54 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Max resolution timer
PostPosted: Thu Apr 27, 2017 9:45 am 
Offline

Joined: Wed Mar 08, 2017 11:39 am
Posts: 3
Hello

I would like to now the max resolution for a timer/task on a Pi 3, and having a good performance for others tasks..

Thanks,

Miquel


Top
   
 Post subject: Re: Max resolution timer
PostPosted: Sat Apr 29, 2017 9:54 am 
Offline
Frequent User
Frequent User

Joined: Wed May 04, 2016 6:00 pm
Posts: 105
Ei Miquel.

It depends on the execution time of your codesys code.

For example. If your code takes 1 ms of execution time, you can use a timer task of 10 ms. But if your execution time is 9 ms, 10 ms could not be a good option

As I can remember, raspberry codesys allow a minimum cycle of 10ms. Normally a cycle time between 10 and 100 ms. Could be good.

Be carefull with visualization tasks on Raspberry. Its takes a lot of time.

And finally, executing on an standard raspbian linux you will have a jitter which can be 0,5 ms. The people says that with a preemtive kernel it is reduced to 100 us...


Top
   
 Post subject: Re: Max resolution timer
PostPosted: Sat Apr 29, 2017 8:04 pm 
Offline
Site Admin

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

if you use a Pi2 or Pi3 even cycltimes < 1ms should not be a problem, (for example 500us is possible)
but I agree to Joseph you need to take care if you set this in the highest prio task the max calc time from your code should not take
more than the cycle time you have specified.
If you do this I would recommend to set the following settting
in /etc/CODESYSControl.cfg to enable the processorload supervision.

[CmpSchedule]
ProcessorLoad.Enable=1
ProcessorLoad.Maximum=95
ProcessorLoad.Interval=5000



BR
Edwin


Top
   
 Post subject: Re: Max resolution timer
PostPosted: Wed May 10, 2017 12:13 pm 
Offline

Joined: Wed Mar 08, 2017 11:39 am
Posts: 3
Thanks for your reply..

I'm trying to read a encoder though a Ethercat BUS, and i was wondering what max cycle task could be achieve without stuck the pi.. If we consider that i have a PREEMPT kernel, i should be able to get it properly, as you explain...


Regards

Miquel


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 5 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