Explicitly setting the threadcount for ControlWin x64 PLC

Runtime
aliazzz
2020-07-22
2020-07-23
  • aliazzz

    aliazzz - 2020-07-22

    Hi,

    I wanted to know if it possible to limit the default thread count used when running the ControlWin x64 PLC? At this time it hogging my all available (per default) threads. Can this be overridden somehow?

    Thank you!

     
  • aliazzz

    aliazzz - 2020-07-23

    I have found the way to do bind the softPLC to a specific CPU Core (actually a thread)
    Find the directory where your ControlWin x64 instance runs, which is something like;

    C:\ProgramData\CODESYS\CODESYSControlWinV3x64\F11FFF3A

    Now open the CODESYSControl.cfg and search for the following section

    [SysCpuMultiCore]
    ;BindProcess.CoreID=-1
    

    Now uncomment line which says: BindProcess.CoreID=-1
    or edit it like I did so you can always undo the change quickly;

    [SysCpuMultiCore]
    ;BindProcess.CoreID=-1
    BindProcess.CoreID=0 ;the PLC explicitly runs on core 0 (the first core/thread)
    

    Which results after a restart of ControlWin x64 in;

    Number of licensed cores for IEC-tasks: 1 from 4</Entry>
    Number of available cores: 4</Entry>
    MultiCore support: [deactivated], process is bound to core 
    

    So now the SoftPLC isn't hogging all threads anymore.

    Reason is that I strongly suspect that the the overall performance of the ControlWin x64 PLC is not going to benefit from big threadcounts.

    I noticed that the machine I work on gets slower to the point of irritation if the SoftPLC is enabled with the default setting ( = use all cores) while my machine has more than sufficient free resources for a few dedicated PLC core(s).

    So changing the default setting (use all cores) to manually bind the softcontroller to a (few) cores has benefited me.

    ** Did some more testing on this and it seems that my assumption is valid unless offcourse someone can show me otherwise

     
    👍
    1

    Last edit: aliazzz 2020-07-24

Log in to post a comment.