Library Download
For details about the releases, see here.
|
PMLib Version |
Compatible with PMC Version |
Download |
Changelog |
|---|---|---|---|
|
6.03.037.00 |
117.17.12 or higher |
Library Setup
Creating a New Project
Step 1: Start by clicking File → New Project
Step 2: In the New Project window select Standard Project as the category. Select the PLC being used, the programming language to use (structured text in this example), give the project a unique name and click OK
Setup Fieldbus
Step 1: In the Devices panel click Network Configuration. In the Network Configuration window click Import ECT File
Step 2: Select the PMC ESI file and click Open
Step 3: In the Network Devices List double click on EtherCAT Port → Planar Motor Incorporated → Planar Motor Controller → Communication Protocol A
Import and use library
Step 1: Click Tools → Library Repository
Step 2: In the Library Repository window click "Install..."
Step 3: In the Select Library window browse to and select the PMC .compiled-library file. Then click "Open"
Step 4: Open the Library Manger from the Devices tree. Then click "Add library"
Step 5: Search for and find the PMC library and click "OK"
Step 6: The task that calls the PMC function blocks should be the same task responsible for the Ethercat Bus Cycle. You can either move the PLC_PRG to the EtherCAT_Task or give the MainTask the Bus Cycle. This example chooses the latter. Double click the EtherCAT Master. Then go the EtherCAT I/O Mapping tab and switch the Bus cycle task to the MainTask
Step 7: Then make sure that the MainTask’s cyclic interval (double click MainTask) and the EtherCAT Master’s cycle time (General tab in the EtherCAT Master) are at the same time
Step 8: In the PLC_PRG POU declare a PMCLib.PMControllerType variable
Step 9: Double click the PMC device (Communication Protocol A) and go to the EtherCAT I/O Mapping tab. Switch the Always update variables option to Enable 2 (always in bus cycle task)
Step 10: Map the DataToPMCArray channel to the DataToPMC member of the PMControllerType variable you declared in the PLC_PRG. Map the DataFromPMCArray channel to the DataFromPMC member of the PMControllerType variable
Step 11: Before using the PMC library, make sure that one and only one instance of the PMC_AutoRefresh function block is declared and that the PMC_AutoRefresh function block is called once and only once per PLC cycle