Torque mode control of an axis with KAS Controller
The attached demo project shows how to control a servo axis with a KAS controller in Torque Mode instead fo the default Position Mode. This project requires a 2.9 release of KAS software and PDMM firmware, which is currently only available in beta form if you have a customer that requires this feature.
New in the 2.9 release of KAS is the PDO editor to freely map parameters to input and output PDO mappings. As seen below, the first step was to open an AKD drive from the EtherCAT section of the KAS IDE Project explorer and going to the new PDO editor tab. After selecting one of the input or output PDO mappings from the Editable PDO list on the left, it will show up on the PDO content section on the right. I have Deleted the Additive Torque Value parameter from Output PDO mapping 1601, and then added object 6071 for Torque Command in its place.
I then went to the PDO Selection/Mapping tab seen below, and mapped a PLC variable to the newly added Target Torque object. To do so, right click the PLC Variable column next to the desired object and choose the map option. From the mapping popup window you can choose an already declared variable or create a new one with the right variable type. You can also click on the Select Output or Select Input PDOs buttons to choose different mappings if you are using something other than the defaults.
I then went to the CoE Init-Commands tab to modify the value written to one parameter whenever a KAS project starts. Normally we write a 7 to index 6060 so an AKD drive starts in fieldbus position mode, but we changed it to 4 so it starts in fieldbus torque mode.
The last thing I did was add some PLC code to allow the user to enter a command current in Amps directly. You can only map integer based variables to PDO parameters, and the conversion factor used is Torque Command *6/1000 = command in amps sent to the AKD drive. I added the below code so the user can enter command current in amps directly as a LREAL variable and it will convert it in the desired decimal number.
Can use the built in control panel in the attached demo project to run. The enable and disable buttons will work for both Axis1 and Axis2. Axis2 will stay in position mode and the Run/Stop switch will control a velocity move. Axis1 will be in torque mode and you can enter a command current directly in an editable box in the control panel.
The free PDO mapping feature allows you to customize the parameters that you can read or write each EtherCAT update at a high speed, deterministic rate. This is now available for AKD servo drives and third party EtherCAT products connected to KAS controllers.