09-17-2020 04:31 AM
Hello,
I have a positioning system that has 2 servomotors and is controlling the position of the end effector. It can drive to any position commanded by the user or other system that is using the positioning system.
In order to have constant speed and clear trajectory, I am controlling the vectorspace (2 axes) in contouring mode. The system is receiving one set point after the other and they are not known until they are received. When the systems is receiving a set point I am doing following operation:
(1) I am calculating the trajectory and creating the motion profile. This gives the number of points based on the time interval.
(2) Setting operation mode to contouring and configuring the buffer as needed.
(3) Write the data points to the buffer
(4) Starting the motion
(5) If needed writing remaining points to the buffer
(6) After move is complete I am clearing the buffer and restoring the operation mode
This all works fine in terms of motion and trajectory, but I identified that the configure buffer/clear buffer takes some time to complete, which is quite critical for my application. In the NI-Help it is also mentioned that:
"Configuring and clearing buffers is a processor-intensive operation on the NI motion controller that requires the allocation and de-allocation of memory. Configure and clear buffers only when motors are not moving and onboard programs are not running."
I am looking for a possibility to configure once a buffer and use it for any set points the system is receiving. That means I would like to use the same buffer for the same resource, but I would like to rewrite a new array of points when I am receiving a new set point for the system without clearing the the relation of the buffer to the resource and without the de-allocation of memory, because of the time it takes. Going through the ni-motion user manual and help files I could not find anything that could fix this.
Do you have any ideas or suggestions?
In case of questions just write.
Thanks.
09-28-2020 07:16 AM
Any ideas or suggestions?