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 Fri Oct 18, 2019 2:12 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Linux Realtime Scheduler
PostPosted: Sun Mar 31, 2019 2:03 am 
Offline

Joined: Thu Aug 17, 2017 12:35 pm
Posts: 27
Hello.

I have seen in the device description file that you have texts like these:
Quote:
realtime priority (SCHED FIFO 66)


I was wondering when i have a realtime kernel does Codesys automatically create processes for the tasks that runs with SCHED_FIFO according to the device description?

Because when looking with ps in the linux shell I can only see two codesys processes that are SCHED_OTHER.
And I read on another forum a tip that I should schedule the two codesys processes as SCHED_RR to make Codesys run with lower Jitter... But that doesnt seem to change anything if I try It and that setting is lost when rebooting.

Is there anything you can do to try and improve the jitter? I am not having any problems at the moment but I like to know these things so that when it becomes a problem I know what to do.


Top
   
PostPosted: Sun Mar 31, 2019 7:51 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3492
Hi,
you just need to apply and rt_prempt kernel patch for your Linux kernel this is mandatory to have realtime and less jitter.
That's it.
You will see then on you Pi jitter <150us and even better in the highest prio task.
An additional option is the muclticore version of the PI.
This will improve the jitter additional and a lot ( depending on how you distribute the application in the CODESYS project to your cores see the screen captures attached)
BR
Edwin


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


Top
   
PostPosted: Sun Mar 31, 2019 1:43 pm 
Offline

Joined: Thu Aug 17, 2017 12:35 pm
Posts: 27
The problem may be that I am using a device Pigeon RB-300 which is based on a Rpi CM3.?
The kernel is based on Raspbian Stretch Lite with kernel version 4.9.80 with Preempt RT patch.

I am getting on a empty project in the Jitter colum a jitter value of 414us(-208/+206) in my task with prio 1.

I tried to disable GPIO, SPI master etc no difference.

So I guess with this hardware this is the best I can get.


Another question..
If I already have a License is there a possibility to purchase only a upgrade to multicore if deemed needed or do I need to buy a new license again?


Top
   
PostPosted: Mon Apr 01, 2019 6:01 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3492
Hi,
i have done no Tests with the CM3 so far,
bubt even around 200 us is not so bad and for most Things good enough.

Quote:
If I already have a License is there a possibility to purchase only a upgrade to multicore if deemed needed or do I need to buy a new license again

No this is not possible - this is a different product with different price.

BR
Edwin


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 3 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