I have a project which consists of 2 'standard' PRG tasks, and 1 additional task called as "VisuElements.VisuPrg".
If I wanted to disable for example one of the first 2 tasks above, it could be easily accomplished with a flag within an IF...ELSE control logic.
However, it is not clear how to interact with the Visual task programmatically, I mean, is there any procedure in the IEC library with which I can handle Tasks (e.g: exit, pause, resume, etc...) ?
Last edit: alrcastro 2020-03-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
in the visu task all the calculations required to paint the visualization.
You should never suspend this task! Otherwise you can get into a lot of problems (e.g. during download/online change).
Could you please describe why you would like to do such a thing?
Best regards,
Marcel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[ Could you please describe why you would like to do such a thing? ]
Because the Visu task is not necessary to run everytime, it is a mere webserver, and sometimes the task ehxibit a sudden peak in the processing time, from 19-22us to something around 400-500us, dangerously too close from the Task cycle - which is close 1,000us.
BTW, I was able to solve the issue charmly by using both the following functions, either to start or to stop the task:
You can start the webserver without having a visualization (or a webvisu below the visu manager).
Therefore you have to adjust the configuration (CODESYSControl.cfg).
Check out the section CmpWebServer.
[CmpWebServer];The handling of startup/shutdown of the webserver:;0->automatically start, shutdown only on shutdown of the runtime;1->automatically start, could be shutdown on demand;2(default)->start/shutdown on demand;3->start on demand, shutdown only on shutdown of the runtime;StartupType=2
For your use case you simple set StartupType=0 like this
[CmpWebServer]StartupType=0
With this you do not need a visualization, it will reduce your application size and still the webserver is always running.
Best regards,
Marcel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
for me it sounds like your plc needs better realtime capabilites ;-) ?
Then these kind of problems should not occure.
Which plc is it?
If it is Control Win ( think you have mentioned this in an older post, not sure) an option would be to switch to Control RTE?
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Cannot agree at all, without running the Visu task the PC seems pretty well sized for the application; as mentioned above, the average task processing lies between 19-22us for a task whose cycle was defined as 1,000us, something very comfortable. The issue is the delay peaks resulting from Task Visu execution, something confirmed by the absence of these 400-500us artifacts whenever this task is disabled, so my conclusion is that Visu task is primarily intended to be used with simplest PLC applications, such as interlock or any other for which timming is not so critical in the range of miliseconds.
anoptionwouldbetoswitchtoControlRTE
Unfortunately, Codesys in the RTE variant took all the processing from the other applications running on the PC, turned them almost frozen.
Whichplcisit?
The "CODESYS Control Win SL", it was the one that best fit both worlds, evenly distributing processing among the PLC runtime, and the applications running under SO.
Last edit: alrcastro 2020-03-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hm... maybe using Multicore on Control Win https://store.codesys.com/codesys-control-win-mc-sl.html
might then improve the situation. But I'm not sure,
maybe you should give this a try.
The bad thing is even for trying it you need to have a multicore license.
This will be changed to 3.5SP16 version then.(Release and of April)
I have a project which consists of 2 'standard' PRG tasks, and 1 additional task called as "VisuElements.VisuPrg".
If I wanted to disable for example one of the first 2 tasks above, it could be easily accomplished with a flag within an IF...ELSE control logic.
However, it is not clear how to interact with the Visual task programmatically, I mean, is there any procedure in the IEC library with which I can handle Tasks (e.g: exit, pause, resume, etc...) ?
Last edit: alrcastro 2020-03-09
Hello,
in the visu task all the calculations required to paint the visualization.
You should never suspend this task! Otherwise you can get into a lot of problems (e.g. during download/online change).
Could you please describe why you would like to do such a thing?
Best regards,
Marcel
[ Could you please describe why you would like to do such a thing? ]
Because the Visu task is not necessary to run everytime, it is a mere webserver, and sometimes the task ehxibit a sudden peak in the processing time, from 19-22us to something around 400-500us, dangerously too close from the Task cycle - which is close 1,000us.
BTW, I was able to solve the issue charmly by using both the following functions, either to start or to stop the task:
Hello,
this can be achieved in a much easier way.
You can start the webserver without having a visualization (or a webvisu below the visu manager).
Therefore you have to adjust the configuration (CODESYSControl.cfg).
Check out the section CmpWebServer.
For your use case you simple set StartupType=0 like this
With this you do not need a visualization, it will reduce your application size and still the webserver is always running.
Best regards,
Marcel
Hi,
for me it sounds like your plc needs better realtime capabilites ;-) ?
Then these kind of problems should not occure.
Which plc is it?
If it is Control Win ( think you have mentioned this in an older post, not sure) an option would be to switch to Control RTE?
BR
Edwin
Cannot agree at all, without running the Visu task the PC seems pretty well sized for the application; as mentioned above, the average task processing lies between 19-22us for a task whose cycle was defined as 1,000us, something very comfortable. The issue is the delay peaks resulting from Task Visu execution, something confirmed by the absence of these 400-500us artifacts whenever this task is disabled, so my conclusion is that Visu task is primarily intended to be used with simplest PLC applications, such as interlock or any other for which timming is not so critical in the range of miliseconds.
Unfortunately, Codesys in the RTE variant took all the processing from the other applications running on the PC, turned them almost frozen.
The "CODESYS Control Win SL", it was the one that best fit both worlds, evenly distributing processing among the PLC runtime, and the applications running under SO.
Last edit: alrcastro 2020-03-17
hm... maybe using Multicore on Control Win
https://store.codesys.com/codesys-control-win-mc-sl.html
might then improve the situation. But I'm not sure,
maybe you should give this a try.
The bad thing is even for trying it you need to have a multicore license.
This will be changed to 3.5SP16 version then.(Release and of April)
BR
Edwin
Last edit: eschwellinger 2020-03-19