Phoenix Contact PLCnext Engineer
Comala Publishing
For details about the releases, see here.
PMLib Version | Compatible with PMC Version | Download | Changelog |
---|
PMLib Version | Compatible with PMC Version | Download | Changelog |
---|---|---|---|
6.03.039.00 | 117.17.43 or higher |
| |
6.03.037.00 | 117.17.12 or higher |
Creating a new project
Step 1: At the welcome screen of PLCnext Engineering select the controller being used in the Project templates
Step 2: To give the new project a unique name click File->Save Project As
Step 3: Navigate to where you want to put the new project, give the project file its unique name and click Save
Setup Fieldbus
Step 1: Click File->Import->Import GSDML File(s)
Step 2: Navigate to the location of the PMC GSDML XML file, select it, and click Open
Step 3: Make sure that the DAP is checked and click OK
Step 4: In the Components panel expand the Network section. Then open Local->Devices->Planar Motor Incorporated->Profinet->I/O. Drag and drop the DAP to the Profinet section of the controller in the Plant panel
Step 5: Then open Local->Devices->Planar Motor Incorporated->Profinet->I/O->Input and Local->Devices->Planar Motor Incorporated->Profinet->I/O->Output. Drag and drop the FB_INs and FB_OUTs over to the PMC DAP in the Plant panel
Step 6: Double click the PMC DAP and go the Settings tab. Make sure that the AML APC station name, Name of station, and DNS hostname all match the Device Name set in the Planar Motor Tool configurator
Import and use library
Step 1: Expand the Libraries in the Components panel. Right click Libraries and click Add User Library
Step 2: Navigate to the location of the PMC library file and select it. Then click Open
Step 3: Double click the IEC 61131-3 option under the controller in the Plant panel
Step 4: Click in the Data List tab. Make sure to click the arrow in the variable column so that you can change the types of the global variables we are going to create
Step 5: Create five different global variables: one PMControllerType variable, two 255 element byte arrays, and two 145 element byte arrays. The PMC input and output each be mapped to one 255 byte array and one 145 byte array. It is recommended to name the arrays so that it is easy to tell which ones are mapped to the input and output
Step 6: To map the input and output double click the PMC DAP and enter the Data List tap
Step 7: Map the pmc/1/1/~IN Process data item to the input 255 byte array
Step 8: Map the pmc/2/1/~IN Process data item to the input 145 byte array
Step 9: Map the pmc/3/1/~OUT Process data item to the output 255 byte array
Step 10: Map the pmc/4/1/~OUT Process data item to the output 145 byte array
Step 11: Next we need to modify the tasks so double click the PLCnext under the controller in the Plant panel
Step 12: Make sure that the main task is Cyclic and change the Interval to the desired communication rate with the PMC. It is also a good idea to change the task’s name to match the new Interval
Step 13: Double click the Profinet in the Plant panel. In the Settings tab make sure that both the Update tasks are set to the cycle task we set earlier
Step 14: Right click Go To Type on the Main task
Step 15: The PMC library works with all three programming languages, but for this example we will use ST
Step 16: In the Variables tab create PM_BufferInput, PM_BufferOutput, and PMC_AutoRefresh function blocks
Step 17: In the Code tab make sure you do the following:
Call the PM_BufferInput function block (with the PMControllerType and the two input mapped arrays) at the beginning, before any other PMC function blocks.
Call the PM_BufferOutput function block (with the PMControllerType and the two output mapped arrays) at the end, after any other PMC function blocks.
Call the PMC_AutoRefresh function block once and only once. Make sure that the AutoRefresh call is after the BufferInput call and before the BufferOutput call.
Upgrade Library
Step 1: In the Libraries section of the Components panel right click the PMC library and click Replace Library
Step 2: Navigate to the new library file and click Open
File I/O on the PLC (Optional)
Step 1: Access to the controller file system is done via SFTP server, so we will need to know the controller’s IP address. You can check this by double clicking the controller in the Plant panel. Then go the Settings tab and click the Ethernet menu
Step 2: You will also need a program that can access SFTP servers. We will use WinSCP for this example
Step 3: Click Session->New Session
Step 4: Select SFTP for the File protocol. The Host name is the controller’s IP address. The user name and password is the same as the one used to connect to the controller in PLCnext Engineer
Step 5: From here you can move files between the PC and controller file systems
Feedback and Comments
Please email us at tech.portal@planarmotor.com