Back to top
Velocity mode control of an axis with KAS controller
The attached demo project shows how to control a servo axis with a KAS controller in Velocity Mode instead fo the default Position Mode.
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 and Digital Output parameters from Output PDO mapping 1601, and then added objects 60FF for Velocity demand and 6072 for Max Torque in their place.
I then went to the PDO Selection/Mapping tab seen below, and mapped PLC variables to the newly added Max Torque and Velocity demand objects. 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 3 so it starts in fieldbus velocity mode.
The last thing I did was add some PLC code to allow the user to enter a command current in Amps and RPM 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, and Velocity demand in RPM*1000. I added the below code so the user can enter command current in amps and velocity in RPM 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. Can modify both the max current and command velocity for Axis 1 from 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.