I recently started using Codesys and started making some tests with the SoftMotion library.
I found something in the manual I would say is contradictory, therefore I would like to have some clarifications from those users who have these concepts clear:
I understand a motion generating funtion should be in the Bus Cycle Task (the example where the Ethercat stack is running). This makes sense in order to generate the set points at the same rate as the master stack is sending the data to the nodes, also to achieve a level of syncrhonicity ensuring the new data is ready before is sent through the bus.
However, in the second link (which is about the Robotics functionality), it is mentioned that in case of having more than one physical core available for the Codesys runtime, the recommendation is to spread the computation-intensive tasks. If I am not wrong, even if you separate letΒ΄s say, the two main axes groups in your application into two tasks (on different cores), they will still run on Ethercat, and therefore, they should be running on the same Bus Task according to the first statement, which can only run on one processor at a time.
I hope my question makes sense and any of you can help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think that the question is not separate the axes motion between tasks, is to send to another task the trajectory precalcs (Normally newton-rawlson solver equations involved).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I understood well, you mean that there are motion generating functions that require trayectory precalculations (I imagine CNC path planning and robotics). This precalculations could be swapped out to another task to another core.
However, as a rule of thumb for creating motion programs, the functions should be executed in the Bus Cycle Task? This is my main question. If this should always be like this, no matter how many cores you have on the IPC, then it means that axis or axis groups should all be running on the same task on the same core.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I recently started using Codesys and started making some tests with the SoftMotion library.
I found something in the manual I would say is contradictory, therefore I would like to have some clarifications from those users who have these concepts clear:
"All motion-generating function blocks or generally all function blocks, that have a VAR_IN_OUT of type AXIS_REF_*, need to be called in the bus cycle task of the drive device that is represented by this AXIS_REF_SM3."
"By distributing the motion tasks over multiple processor cores, more axes or axis groups can be actuated by SoftMotion. As a result, computation-intensive tasks, such as CNC path preprocessing or robotics path planning for CP movements, can be swapped out to another processor core. Then there is more time for other tasks in the bus task. The fact that the computing power of the single-core controller is insufficient is demonstrated in the case of robotics by the unexplainable decrease in path speed."
I understand a motion generating funtion should be in the Bus Cycle Task (the example where the Ethercat stack is running). This makes sense in order to generate the set points at the same rate as the master stack is sending the data to the nodes, also to achieve a level of syncrhonicity ensuring the new data is ready before is sent through the bus.
However, in the second link (which is about the Robotics functionality), it is mentioned that in case of having more than one physical core available for the Codesys runtime, the recommendation is to spread the computation-intensive tasks. If I am not wrong, even if you separate letΒ΄s say, the two main axes groups in your application into two tasks (on different cores), they will still run on Ethercat, and therefore, they should be running on the same Bus Task according to the first statement, which can only run on one processor at a time.
I hope my question makes sense and any of you can help.
I think that the question is not separate the axes motion between tasks, is to send to another task the trajectory precalcs (Normally newton-rawlson solver equations involved).
Thanks for your reply.
If I understood well, you mean that there are motion generating functions that require trayectory precalculations (I imagine CNC path planning and robotics). This precalculations could be swapped out to another task to another core.
However, as a rule of thumb for creating motion programs, the functions should be executed in the Bus Cycle Task? This is my main question. If this should always be like this, no matter how many cores you have on the IPC, then it means that axis or axis groups should all be running on the same task on the same core.