Back to top

Understanding AKD MT LOAD and MT SET

Understanding the MT.LOAD and MT.SET command parameters

I see this come up a lot and often there is confusion of how these keywords work and what they do.

A motion task consists of the following parameters. See Workbench Help for more details and descriptions of each parameter.










The best way to understand this group of parameters is to think of them as temporary values or containers to hold values.

MT.NUM should be considered a pointer. It’s value points to what row of the Motion Task table you want to either upload ( read ) or download values ( write ).







To demonstrate, I created 2 motion task and populated them with values that differentiate one from the other.



In Workbench Terminal I queried the value of MT.NUM which was 2 in this case.
Notice what happens when I query MT.P after changing MT.NUM to 0 ( a non-existent motion task ) or MT.NUM to 1 ( a different motion task ).  MT.P is still holding the value for Motion Task 2.  At this point you can look at it as the MT parameters are not synchronized or do not match the motion task the pointer MT.NUM is pointing to.




If I want the MT parameters to match what MT.NUM is pointing to, MT.LOAD needs to be executed to upload the values FROM the motion task TO the temporary MT parameters.


Step 1: Set MT.NUM to the desired motion  task ( in this case 1 ).

Step 2: Execute the MT.LOAD command which uploads the values of the motion task to the temporary

             MT parameters.

Step 3: Now when queried the MT parameters match the values of motion task 1.



The MT.LOAD command is especially useful in the case where you want to change only 1 one parameter in a motion task.  MT.LOAD will upload or copy the values into the temporary MT parameters and then you can change what parameter needs to be changed and when the MT.SET is executed it will send the values back down to the motion task keeping unchanged parameters the same and modifying the one. Keep in mind that using MT.LOAD is not a requirement; merely a convenience. It is possible to set all the MT parameters to the desired values and then write them to a given motion task via MT.SET.







MT.SET is a command to download ( write ) the MT parameter values to the Motion Task pointed to by MT.NUM. This is the converse of what MT.LOAD does.


In this example I assume the other MT parameters are ok and set the basic parameters.

Step 1: Set MT.NUM to the desired motion  task ( in this case 1 ).

Step 2: Set the MT parameters as required.

Step 3: Execute the MT.SET to download ( write ) the MT parameter values to the motion task.



Keep in mind that the motion tasks at this point are volatile meaning if you cycle control power to the drive you will lose the motion tasks. In order for motion tasks to be non-volatile, a Save To Device in Workbench or a DRV.NVSAVE must be executed to save all parameters and motion task to non-volatile memory.