Simplified Motion Series Control With Siemens PLC Through Festo CPX-AP-I IO-Link Master
Simplified Motion Series Control With Siemens PLC Through Festo CPX-AP-I IO-Link Master
100356
Title .......................... Simplified Motion Series Control With Siemens PLC Through Festo CPX-AP-I IO-Link Master
Version ............................................................................................................................................................. 1.20
Document no. .............................................................................................................................................. 100356
Original .................................................................................................................................................................en
Author ............................................................................................................................................................. Festo
Copyright Notice
This documentation is the intellectual property of Festo SE & Co. KG, which also has the exclusive copyright. Any
modification of the content, duplication or reprinting of this documentation as well as distribution to third par-
ties can only be made with the express consent of Festo SE & Co. KG.
Festo SE & Co KG reserves the right to make modifications to this document in whole or in part. All brand and
product names are trademarks or registered trademarks of their respective owners.
Legal Notice
Hardware, software, operating systems and drivers may only be used for the applications described and only in
conjunction with components recommended by Festo SE & Co. KG.
Festo SE & Co. KG does not accept any liability for damages arising from the use of any incorrect or incomplete
information contained in this documentation or any information missing therefrom.
Defects resulting from the improper handling of devices and modules are excluded from the warranty.
The data and information specified in this document should not be used for the implementation of safety func-
tions relating to the protection of personnel and machinery.
No liability is accepted for claims for damages arising from a failure or functional defect. In other respects, the
regulations with regard to liability from the terms and conditions of delivery, payment and use of software of
Festo SE & Co. KG, which can be found at www.festo.com and can be supplied on request, shall apply.
All data contained in this document do not represent guaranteed specifications, particularly with regard to func-
tionality, condition or quality, in the legal sense.
The information in this document serves only as basic information for the implementation of a specific, hypo-
thetical application and is in no way intended as a substitute for the operating instructions of the respective
manufacturers and the design and testing of the respective application by the user.
The operating instructions for Festo products can be found at www.festo.com .
Users of this document (application note) must verify that all functions described here also work correctly in the
application. By reading this document and adhering to the specifications contained therein, users are also solely
responsible for their own application.
1 Introduction ................................................................................................................................................ 5
1.1 Hardware & Software Requirements ........................................................................................................... 6
1.2 Hardware Overview ..................................................................................................................................... 6
1.3 Communication Architecture ....................................................................................................................... 7
1 Introduction
This application note demonstrate the controlling of Simplified Motion Series like EPCE, EPCS-BS, EGSS, ELGS-
BS, ELGS-TB, ELGE, ERMS with SIEMENS PLC through Festo CPX-AP-I IO-Link Master. The Library has four func-
tion block variants based on its function.
The “SMS_Festo_Advance” includes to access all advanced parameters,
The “SMS_Festo_Basic” has access to few mandatory parameters &
The “SMS_Festo_IO” has only basic function to control the actuator IN & Out movements.
The “SMS_Festo_Intermediate” has basic function to control the actuator IN & Out movements and also access
the Intermediate function Parameters.
“SMS_Festo_Advanced” Function block is capable to control the motion system like IN & OUT function, Error
reset, Enable power stage of drive, Parameters read & write, Also to read the diagnostic data from the drive unit.
Note
• This application note shows how to use function block with Festo CPX-AP-I IO-Link Master. The
function blocks are tested and released for this IO-Link Master.
• Compatibility with other IO-Link Masters is not tested and released. Use of function blocks with
different IO-Link masters is on own responsibility.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 5 of 44
Simplified Motion Series Control With Siemens PLC
Page 6 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Note
• Communication Architecture may change depend on user CPX-AP-I expansion modules.
The above structure shown for demonstration.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 7 of 44
Simplified Motion Series Control With Siemens PLC
Step-1
Page 8 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Step-2
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 9 of 44
Simplified Motion Series Control With Siemens PLC
Step-1
Page 10 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Step-2
Note
• In our example we are connecting CPX-AP-I-PN to PROFINET interface[X1].
• If the CPX-AP-I-PN is connected to PROFINET interface[X2] , then that port IP address must be in
the same range of IP address of CPX-AP-I-PN.
Note
• The Profinet Interface address of PLC , CPX-AP-I-PN module and the PLC must be in the same
range.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 11 of 44
Simplified Motion Series Control With Siemens PLC
Step – 1
Download the GSDML File for CPX-AP-I-PN module from the Festo Support Portal. And save the GSDML file in an
appropriate folder in your PC.
Step – 2
The downloaded GSDML file of CPX-AP-I-PN module must be added to the TIA portal.
The Manage general station description files tab will be displayed as shown below Step-3.
Page 12 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Step – 3
1. Select Installed GSDs from Manage general station description files tab.
2. Select the Path from the Source path field, where the GSDML file is saved.
3. Select the GSDML file from the file list.
4. Click on Install to add GSD to the project.
Once the installation is completed, the installation wizard will be shown as below.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 13 of 44
Simplified Motion Series Control With Siemens PLC
Step – 1
Page 14 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 15 of 44
Simplified Motion Series Control With Siemens PLC
Step – 2
Page 16 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Step – 1
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 17 of 44
Simplified Motion Series Control With Siemens PLC
Step – 2
Note
• The IP address of the Profinet interface of CPX-AP-I-PN module , S7-1500 PLC must be in same
range.
Page 18 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Step – 1
The Assign device name tab will be displayed as shown below Step-2.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 19 of 44
Simplified Motion Series Control With Siemens PLC
Step – 2
Page 20 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Step – 1
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 21 of 44
Simplified Motion Series Control With Siemens PLC
Step – 2
Note
• Festo Simplified Motion Series actuator unit is connected to CPX-API-I-4IOL-M12 Master Module
in Port-1.
Page 22 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Step – 1
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 23 of 44
Simplified Motion Series Control With Siemens PLC
Step – 2
Page 24 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Step – 1
1. Download the SMS_Festo_Lib_V2.0 library File from the Festo Support Portal.
2. Save the Downloaded file in an appropriate folder in your PC.
3. Unzip the library file in an appropriate folder.
Step – 2
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 25 of 44
Simplified Motion Series Control With Siemens PLC
Step – 3
The Library sub folder S7-1200/1500 has following Blocks and Supporting files.
Function Blocks
1. CPXAPI_LIOLinkParameter block is used to Read and Write the data of IO-Link device.
2. SMS_Festo_Advance block is used to access all advanced parameters.
3. SMS_Festo_Basic block is used to access the basic parameters.
4. SMS_Festo_IO block is used to operate the basic function like IN and OUT movements.
5. SMS_Festo_Intermediate block is used to operate the basic function like IN and OUT movements and
also access the Intermediate function Parameters.
Supporting files
• LIOLink_typeDiagnostics
• UDT_ISDU_Common
• UDT_ReadParameter
• UDT_WriteParameter
The above supporting files are User data type files which are used in CPXAPI_LIOLinkParameter Block, Advanced
block, Basic block and Intermediate block.
Page 26 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
1. Drag and drop the Function blocks from the SMS_Blocks Library folder to the Program Blocks in the
project.
2. And the Supporting Blocks and User data type Files come along with the Simplified Motion Series block.
Note
• User need not to drag and drop the CPXAPI_LIOLinkParameter function block and User data type
files, because while drag and drop the Simplified Motion Series blocks, the supporting blocks
and user data type files are automatically comes and sit on the corresponding floders.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 27 of 44
Simplified Motion Series Control With Siemens PLC
7.1 Configuring the SMS_Festo_Advanced Function Block Input & Output Interface
Tags
Note
• Follow the same procedure for SMS_Festo_Basic & SMS_Festo_IO Function blocks input & out-
put interface tags.
Step – 1
1. Drag & Drop the SMS_Festo_Advanced block from Program blocks to program area.
2. The Call options tab will open.
3. Enter the name of the FB instance on the Name field.
4. Click on OK to confirm the FB name and close the Call options tab.
Page 28 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Step – 2
1. Enter the input address in RefINPUTS input tag and assign the tag name for that address.
2. Enter the output address in RefOUTPUTS output tag and assign the tag name for that address.
Note
• User must be taken the input and output address from Device overview tab, Which is assigned in
I address and Q address field.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 29 of 44
Simplified Motion Series Control With Siemens PLC
Step – 3
Step – 3
Note
• Repeat Step-3 for create and assign the different input & output tags in function block.
Page 30 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Once all steps completed successfully the SMS_Festo_Advanced Function block will be look like below.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 31 of 44
Simplified Motion Series Control With Siemens PLC
Once all steps completed successfully the SMS_Festo_Basic Function block will be look like below.
Page 32 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Once all steps completed successfully the SMS_Festo_IO Function block will be look like below.
Once all steps completed successfully the SMS_Festo_Intermediate Function block will be look like below.
Note
• User has to call one function block at a time in program.
• User has to call the function block depends on the application.
• If the user application need only I/O related operation, then user can call the SMS_Festo_IO
block.
• If the user application need only I/O related operation and Intermediate function parameter, then
user can call the SMS_Festo_Intermediate block.
• If the user application needs only I/O and basic Parameter, then user can call the
SMS_Festo_Basic block.
• If the user application need I/O and All Parameter, then user can call the SMS_Festo_Advanced
block.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 33 of 44
Simplified Motion Series Control With Siemens PLC
xMoveIN BOOL Control command for executing the motion "Mov In" to the inner
(reference) end position "LimIn(Ref)"
TRUE - Actuator unit moves to inner end position “LimIn(Ref)”
FALSE - Actuator unit stops
Note: The control command only works in combination with the
bits MoveOUT and MoveIntermediate.
xMoveIntermediate BOOL Control command for executing the movement "Mov Imp" to the in-
termediate position "PosImp"
TRUE - Actuator unit moves to Intermediate Position “PosImp”
FALSE - Actuator unit stops
Note: The control command only works in combination with the
bits MoveIN and MoveOUT.
xMoveOut BOOL Control command for executing the motion "Mov Out" to the outer
end position "LimOut"
TRUE - Actuator unit moves to outer end position “LimOut”
FALSE - Actuator unit stops
Note: The control command only works in combination with the
bits MoveIN and MoveIntermediate.
xQuitError BOOL Control command for acknowledging errors
TRUE - Start error acknowledgement
FALSE - Do not start error acknowledgement
xPowerSMS BOOL Control command for switching on the power stage.
TRUE - Enable power stage of actuator unit
FALSE - Disable power stage of actuator unit
xUserInterfaceLock BOOL TRUE - Access to display and operating components (HMI) on
control unit locked
FALSE - Access to display and operating components (HMI) on
control unit enabled
Page 34 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
1 - 10% (default)
...
10 - 100%
xReferenceDirection BOOL Position of the reference end position "Ref" after homing has
been carried out
Linear drive systems:
TRUE: Facing away from motor
FALSE: Facing motor
Rotary drive systems (ERMS: view of the rotating plate)
TRUE: Right
FALSE: Left
xExecuteReference BOOL Command for executing the homing with end position detection
(detection of the mechanical end positions)
TRUE - Start homing
FALSE - Do not start homing
Note: Take effect only when falling to raising edge when AOI is
enable state.
reStratPressPosition REAL Stroke or angle of rotation distance from the "Start Press" posi-
tion to the reference end position "Ref".
Defines point on stroke, actuator starts force controlled move-
ment.
Linear actuator unit:-unit: [mm]-gradient: 0.01
Rotative actuator unit:-unit: [°]-gradient: 0.1
reIntermediatePosition REAL Stroke or rotation angle distance of the intermediate position
"PosImp" to the reference end position "Ref".
Defines intermediate point on stroke, actuator movement stops
and waits for next motion command.
Linear actuator unit:-unit: [mm]-gradient: 0.01
Rotative actuator unit:-unit: [°]-gradient: 0.1
reEndPosition REAL Stroke or rotation angle distance of the "LimOut" end position to
the reference end position "Ref"
Defines end point on stroke, actuator movement stops and waits
for next motion command.
Linear actuator unit: -unit: [mm] -gradient: 0.01
Rotative actuator unit:-unit: [°] -gradient: 0.1
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 35 of 44
Simplified Motion Series Control With Siemens PLC
Page 36 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 37 of 44
Simplified Motion Series Control With Siemens PLC
Page 38 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
9 Sample Code
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 39 of 44
Simplified Motion Series Control With Siemens PLC
Note
• After enabling the function block user have to give a reset command to clear the local error 1001.
Reset command can give through input tag xQuitError by toggling false to true.
Note
• Refer Section 5 for finding the Hardware ID.
• Refer section 4.1 Step-2 for Identify the Port Number.
Page 40 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
Note
• If user want to change the homing direction then user can change direction by toggling the input
tag xReferenceDirection from False to True before the reference command.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 41 of 44
Simplified Motion Series Control With Siemens PLC
• Toggle control tag xMoveIN from false to true to move the actuator unit towards IN direction.
Once actuator unit reached IN position status tag xStatusIn will be true.
Page 42 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20
Simplified Motion Series Control With Siemens PLC
• Toggle control tag xMoveOut from false to true to move the actuator unit towards Out direction.
Once actuator unit reached Out position status tag xStateOut will be true.
Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20 Page 43 of 44
Simplified Motion Series Control With Siemens PLC
• Toggle control tag xMoveIntermediate from false to true to move the actuator unit towards intermedi-
ate position. Once actuator unit reached intermediate position status tag xStateIntermediate will be
true.
Page 44 of 44 Application Note – Simplified Motion Series Control With Siemens PLC Through IO-Link Master – 1.20