I am having troubles to bind the process /opt/codesys/bin/codesyscontrol.bin /etc/CODESYSControl.cfg
to core 1 by evoking the following command
sudo taskset -pc 1 $pid
The process affinity changes from 0 to 1, but the process still runs on core 0.
Note: I do not want any Multi-Core usage. Just Single-Core on a different core than 0.
Not even after altering the script /etc/init.d/codesyscontrol in line 115 from
while ! pidof -s $EXEC >$PIDFILE 2>/dev/null; do
while ! pidof -s taskset -c 1 $EXEC >$PIDFILE 2>/dev/null; do
the process actually runs on core 0...
Does anyone know the trick?
Shouldn't you still use a CODESYS RPi MC (Multicore license) for this?
AFAIK a standard license without MC support will default balance the codesys processes over all CPU's and I doubt if this behaviour is easily changed.
So you think, a Single-Core License is bound to Core 0 - which would be a pitty as there are 0-3 cores on a RPi...
I see an affinity of the codesyscontrol-process of 0 as of standard on a Single-Core License - so would it be 0-3 on a Multi-Core License?
And more so: Would it be possible to set the affinity of just one process (single application in my project) to one specific core on a Multi-Core License?
I only know that the main purpose of an MC license is setting up CPU core affinities (via the CodesysControl File) and enable PLC multi-threaded process programming. So I guess this anwsers your questions;
Extension of the CODESYS Development System for binding individual IEC applications to different CPU cores
Debugging of the multicore application within CODESYS
PS, you can try the MC license for free (2 hrs demo, after which you need to restart the runtime)so you try out if it meets your needs. Just open the CODESYS IDE, and select the MC license instead of the Normal license.
Log in to post a comment.