Acontis EC-Engineer

Library Download

For details about the releases, see here.


Library Setup

Setup Fieldbus

Step 1: Open the Acontis EC-Engineer program

image-20241223-231458.png

Step 2: Click File->ESI Manager

image-20241223-231534.png

Step 3: In the ESI Manager click the Add File button

image-20241223-231553.png

Step 4: In the Add ESI File window select the PMC ESI file and click Open

image-20241223-231613.png

Step 5: Click File->Add Master-Unit->EtherCAT Master Unit (Class A)

image-20241223-231630.png

Step 6: Make sure that the Class-A Master’s Cycle Time matches the Cycle Time Config in the Planar Motor Tool

image-20241223-231659.png
image-20241223-231726.png

Step 7: Right click on the Class-A Master and click Append Slave(s)

image-20241223-231744.png

Step 8: Select the Planar Motor Incorporated->Planar Motor Controller->Communication Protocol A and click OK

image-20241223-231805.png

Step 9: Then click Export ENI

image-20241223-231823.png

Step 10: Give the ENI XML file an unique name and click Save

image-20241223-231839.png

Step 11: In the Acontis library the ENI file is loaded by the ConfigureNetwork function

image-20241223-231905.png

Import and use library

Step 1: Navigate to the location of the four header files in the library (PMC_Enums.h, PMC_Structs.h, PMC_Cpp_API.h, PMC_Acontis_Cpp_API.h)

image-20241223-232120.png

Step 2: Copy the four header files into the project workspace

image-20241223-232145.png

Step 3: Include PMC_Acontis_Cpp_API.h in the project

image-20241223-232250.png

Step 4: Then take the libPMC_Cpp_API.so and libPMC_Acontis_Cpp_API.so files

image-20241223-232351.png

Step 5: And put them into the project workspace

image-20241223-232410.png

Step 6: To use the library either

  • Add target_include_directory(${AppName} PRIVATE ${path/to/headers}) and target_link_libraries(${AppName} PRIVATE ${path/to/.so}) to the CMakeList script compiling, or

  • Include the header and library manually in the build CLI. i.e. g++ ... -I/path/to/headers -L/path/to/.so/

Step 7: It is advised to add using namespace PMC; to the project so that you don’t have to add PMC:: in front of all PMC function calls and variable declarations

image-20241223-233215.png

Step 8: When using the PMC library, ConnectToPMC must be called after calling ecatConfigureNetwork prior to using the rest of the library

image-20241223-233254.png

Step 9: AutoRefresh needs to be called regularly at the same rate as the EtherCAT bus. It is recommended to spin up a separate thread to handle this task

image-20241223-233400.png
image-20241223-233417.png