Back to top

Reading a Drive Parameter with AKD Ethernet IP

There are several ways to read a parameter in the AKD drive over Ethernet IP. It is important to note the advantages and disadvantages of each method.

The AB Micrologix 1400 PLC supports only explicit messaging via the MSG block. For more details see the AKD Ethernet IP RSLogix Communications manual under Appendix C: RSLogix 500 for examples and details.

Compactogix and Contrologix PLCs support both explicit and implicit (I/O ) messaging and our Add-On-Instruction library. The remainder of this article will apply to them.

  1. The first method to read a parameter is the AKD_Get_Parameter Add-On-Instruction.

All Add-On-Instructions use the same Command and Response assembly bytes ( bytes 0 through 32 ) therefore only 1 AOI can be executing at a time ( for a given axis ). If you command another AOI before the current one finishes you will get errors. The issue with this method is in order to query a parameter you can’t be doing something else ( like an AKD_Move, AKD_Jog, etc. ) at the time same time.

The AKD_Get_Parameter or AKD_Set_Parameter AOIs use the following method internally. The key point is that they use the polled I/O to execute it.

      image

  1. The second method is to use dynamic mapping. Dynamic mapping allows you to put parameters you want to read or write data from/to on the RPI poll. These parameters get mapped to bytes 36-63 so they do not interfere with AOIs or the static mapping of the command and response assemblies. There is an application note on this ( see the link below ).  Be aware that we recently found a bug in the Workbench GUI regarding graphically mapping the parameters under the Ethernet IP tab under Communications. The original method for mapping uses the EIP.CMDMAP and EIP.RSPMAP keywords in the Workbench terminal and work fine and should be used until the fix comes out in a later version of Workbench. The AKD Ethernet IP Communications manual has examples for mapping using the Workbench terminal ( see chapter 9 ).

          App Note: http://kdn.kollmorgen.com/content/akd-ethernet-ip-diagnostics-and-dynamic-mapping

  1. The 3rd method is to do explicit messaging using the MSG block which is also independent of the polled IO.

Explicit Messaging using the MSG block uses the following method which is independent of the polled I/O. The disadvantage is this is on-demand and not on the RPI poll so the data is only updated every time the MSG is triggered.

image

Compactlogix and Contrologix Explicit MSG Example: Read DRV.ACTIVE

From Appendix B: Parameter Listing which gives the instance number, parameter keyword, data size, and data type:

image

 

image

image

The order of communication efficiency from most to least is Dynamic Mapping->Explicit Messaging->AOI Read/Write.

The order of ease of setup from most to least is AOI Read/Write->Explicit Messaging->Dynamic Mapping.

Note they are opposite in order so perhaps a trade-off.

Note that the above also applies to writing a parameter via either AKD_Set_Parameter AOI, Dynamic Mapping, or MSG block.