Back to top
Adding Axes to RSLogix for AKD Ethernet IP
This application note applies only to the AKD-P-NxEI Motion Tasking Drive with Ethernet IP communications.
For the KAS, PDMM, and PCMM platform and use of Ethernet IP communications please see the support documentation that applies to them.
The Sample Project and Ethernet IP manual show the setup for communicating to 1 AKD drive.
Often the question of “How do I modify the sample project for multiple axes or how do I setup an existing project to support more than one drive?”.
The organization and program flow is up to the programmer but many users opt to put the logic ( and AOI logic ) for each axis in their own subroutine to make troubleshooting and the program read more easily. There have been cases where there is only the main routine and encompasses the entire program. However you organize your program, it is important that the best practice as indicated in the “Getting Started with AKD Ethernet IP” application note that indicates the placing of the AKD_Drive communication block in a rung prior to all the rungs that contain AOIs with the same Axis name as the AKD_Drive’s “Axis_Internal” name for that axis so the AKD_Drive AOI is scanned first.
In the following screenshot the following is shown:
- The first Generic Ethernet Module properties for the first AKD axis.
- The AKD_Drive “Drive Communication” add-on instruction in rung 0 of that routine.
- Controller tags and structures declared when the Generic Ethernet Module was added and configured and the instance tagname used for the “AKD_Drive” input of the AKD_Drive AOI when the AOI was added to the ladder.
The name of the Generic Ethernet Module is up to the programmer. Since this is a sample project AKD_1 was used ( see the green arrow ) and for the second drive AKD_2 was used.
Figure 1: Overview
From the screenshot above here are a few important points:
When the Generic Ethernet Module is added under “Ethernet” and configured which includes a Name and the Connection Parameters ( Input 102 64 bytes, Output 101 64 bytes, Configuration 100 0 bytes ), the tag structure in the Controller database is created. In the AKD_Drive AOI, the Axis_Input and Axis_Output entries point to the Name.I and Name:0 tags to correlate the AKD_Drive AOI with the Generic Ethernet Module to be associated with the Axis_Internal tagname. In this way, the AKD_Drive correlates and acts as a liaison between the AOI instances that are declared later with the same Axis name as the AKD_Drive’s Axis_Internal tagname AND the communications of the Generic Ethernet Module ( that is the AKD with the respective IP Address ). This correlation is shown in Figure 1: Overview with the RED and BLUE arrows. From the ladder is an example of this:
If more axes are added, the same methodology is used but care must be taken in that the AOIs for the second axis must be declared with new instance tagnames and those tagnames must be carried through all the logic for that axis as shown below. Special care must be taken with this if all the logic for axis 1 has been copied and pasted as logic for axis 2.
- Note the AKD_Drive tagname is the instance name and must be unique for every instance of AKD_Drive AOIs in your PLC program. Although this is arbitrary for consistency the same name used for the axis’ Generic Ethernet Module was used for the AKD_Drive name as well. This is shown in Figure 1: Overview with the VIOLET arrows.
- Note there is a second ETHERNET-MODULE added under Ethernet in the RSLogix5000 Controller Organizer ( see Figure 1: Overview ) to demonstrate the addition of another AKD axis. Note the 2 Generic Ethernet Modules have unique Names and IP Addresses. The IP Addresses must not be shared with another device ( i.e. the PLC, etc. ).
As stated before how you organize your program is your responsibility but the follow is typical:
MainRoutine has two JSR ( Jump To Subroutine ) instructions and 2 subroutines are declared under MainProgram in the Controller Organizer ( AKD_Axis_1 and AKD_Axis_2 ). The naming convention can be a mnemonic or something meaningful in your application.
Beginning of AKD_Axis_1 subroutine:
Beginning of AKD_Axis_2 subroutine: