0% found this document useful (0 votes)
228 views44 pages

Simplified Motion Series Control With Siemens PLC Through Festo CPX-AP-I IO-Link Master

Uploaded by

omesco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
228 views44 pages

Simplified Motion Series Control With Siemens PLC Through Festo CPX-AP-I IO-Link Master

Uploaded by

omesco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Application Note

Simplified Motion Series Control With


Siemens PLC Through Festo CPX-AP-I
IO-Link Master

This Application Note explains about Simplified Motion Series EPCE


actuator units (EPCE, EPCS-BS, EGSS, ELGS-BS, ELGS-TB, ELGE, EPCS-BS
ERMS) IN/OUT Control, Read/Write Parameters & Read Diag-
EGSS
nostic Data. Function blocks are tested and released for Festo
CPX-AP-I IO-Link Master. Compatibility with other IO-Link Mas- ELGS-BS
ters is not guaranteed. ELGS-TB
ELGE
ERMS

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

Last saved ............................................................................................................................................ 07.04.2022

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.

© (Festo SE & CO. KG, D-73726 Esslingen, 2022)


Internet: http://www.festo.com
Table of contents

1 Introduction ................................................................................................................................................ 5
1.1 Hardware & Software Requirements ........................................................................................................... 6
1.2 Hardware Overview ..................................................................................................................................... 6
1.3 Communication Architecture ....................................................................................................................... 7

2 Siemens S7-1500 PLC Configuration in TIA Portal ..................................................................................... 8


2.1 Creating a new project and Adding controller in TIA Portal .......................................................................... 8
2.2 Siemens S7-1500 PLC IP Address Configuration ....................................................................................... 10

3 Configuring IO-Link module in TIA Portal ................................................................................................. 12


3.1 Adding the GSD File of CPX-API-I-PN to TIA Portal ..................................................................................... 12
3.2 Adding CPX-API-I-PN module to Network View .......................................................................................... 14
3.3 CPX-API-I-PN IP Address Configuration ...................................................................................................... 17
3.4 Assigning Profinet net Name to CPX-AP-I-PN module ................................................................................ 19

4 Configuring CPX-API-I devices in TIA Portal ............................................................................................. 21


4.1 CPX-API-I devices Configuration ................................................................................................................ 21

5 Determining Hardware ID of CPX-AP-I-4IOL-M12 IO Link Module........................................................... 23

6 Adding SMS_Festo Library to TIA Portal .................................................................................................. 25


6.1 Import the “SMS_Festo_Lib_V2.0” into Global libraries ............................................................................ 25
6.2 Adding Function blocks and Supporting files to Program .......................................................................... 27

7 Configuration of SMS Festo Function blocks in TIA Portal ....................................................................... 28


7.1 Configuring the SMS_Festo_Advanced Function Block Input & Output Interface Tags .............................. 28

8 SMS_Festo_Advanced Function block Interface Tag Details ................................................................... 34


8.1 IO_Interface Tag Details ............................................................................................................................ 34
8.2 Control Tag Details .................................................................................................................................... 34
8.3 Monitor Tag Details ................................................................................................................................... 37

9 Sample Code ............................................................................................................................................. 39


9.1 Initial Setup ............................................................................................................................................... 39
9.2 Actuator unit Homing with stroke detection .............................................................................................. 41
9.3 Actuator unit Move to Inwards .................................................................................................................. 42
9.4 Actuator unit Move to Outwards................................................................................................................ 43
9.5 Actuator unit Move to Intermediate........................................................................................................... 44
Table of contents
Simplified Motion Series Control With Siemens PLC

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

1.1 Hardware & Software Requirements

Device Name Part Number Version Soft- Device Type


ware/Firmware

Any Simplified Motion Series actu- - Latest Hardware


ator unit (EPCE, EPCS-BS, EGSS,
ELGS-BS/TB, ELGE, ERMS)
Festo IO-Link Master CPX-AP-I-4IOL-M12 V1.1.3 & Above Hardware
Festo CPX-AP-I Head Module CPX-AP-I-PN-M12 V1.2.2 & Above Hardware
CPX Module Connecting Cable NEBC-D8G4-ES-0.3-N-S-D8G4-ET - Hardware
CPX Module Power Cable NEBL-M8G4-E-5-N-LE4 - Hardware
Siemens S71200/S71500 - V4.2 / V2.8 Hardware
Siemens SMS V2.0 Library - SMS V2.0 Software
Siemens TIA Portal - V14 Software
Festo Field Device Tool - Latest Software

Table 1.1: 1 Components/Software used

1.2 Hardware Overview

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

1.3 Communication Architecture

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

2 Siemens S7-1500 PLC Configuration in TIA Portal

2.1 Creating a new project and Adding controller in TIA Portal

Step-1

1. Open the TIA Portal V14 Software.


2. Click on Create new project to create the project.
3. Type the Project name on the Project name field.
4. Select the path where the project has to be saved.
5. Click on Create to create project.

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

1. Click on Project view to Open the project view.


2. Double click on Add New Device to add a new PLC to the project.
3. Click on Controllers, The list of available Controllers will be displayed.
4. Select the required PLC in the list.
5. Click on OK to add the selected PLC to the Project.

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

2.2 Siemens S7-1500 PLC IP Address Configuration

Step-1

1. Right on PLC_1 from the Project tree.


2. Click on Properties from the right click menu.

The properties tab will be displayed as shown below Step-2.

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

1. Select General from Properties tab.


2. Click on PROFINET interface [X1] to open the drop down.
3. Click on Ethernet addresses from PROFINET interface dropdown to change the IP address.
4. Click on Add new subnet to add new interface network.
5. Enter the required IP address on the IP address field
6. Enter the Subnet mask on the Subnet mask field
7. Click on OK to confirm the configuration and close the Properties tab.

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

3 Configuring IO-Link module in TIA Portal

3.1 Adding the GSD File of CPX-API-I-PN to TIA Portal

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.

1. Click on Options menu from the top menu bar.


2. Click on Manage general station description files(GSD) from Options menu

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

3.2 Adding CPX-API-I-PN module to Network View

Step – 1

1. Double click on Devices and Networks to go to network view .

2. The network view will be displayed as shown below.

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

3. Go to Hardware Catalog as shown below

4. Select Other field devices from Hardware catalog menu.


5. Select PROFINET IO from the other field devices drop down menu.
6. Select IO from the PROFINET IO drop down menu.
7. Select Festo from the IO drop down menu.
8. CPX-API-I V1 module can be viewed under the Festo CPX-AP-I folder.

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

1. Drag and drop CPX-AP-I V1 module to network view.


2. Connect the S7-1500 PLC to CPX-AP-I-PN module. In the example the CPX-AP-I-PN module is connected
to PROFINET interface[X1] of S7-1500 PLC.

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

3.3 CPX-API-I-PN IP Address Configuration

Step – 1

1. Right on AP-I-PN from the Network view


2. Click on Properties from the right click menu.

The properties will be viewed as shown below Step-2.

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

1. Select General from Properties tab.


2. Click on PROFINET interface [X1] to open the drop down.
3. Click on Ethernet addresses from PROFINET interface dropdown to change the IP address.
4. Enter the required IP address on the IP address field
5. Enter the Subnet mask on the Subnet mask field

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

3.4 Assigning Profinet net Name to CPX-AP-I-PN module

Step – 1

1. Right on AP-I-PN from the Network view


2. Click on Assign device name from the right click menu.

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

1. Click on Update List to scan the accessible devices in the network.


2. Once the scan is completed the CPX-AP-I-PN module will be appear on the field.
3. Select the CPX-AP-I-PN device from accessible device column.
4. Click on Assign name to assign the device name.
5. Click on Close to Finish the Assigning device name.

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

4 Configuring CPX-API-I devices in TIA Portal

4.1 CPX-API-I devices Configuration

Step – 1

1. Double on Devices and Networks to go to network view .

2. Right on AP-I-PN from the Network view


3. Click on Device Configuration from the right click menu.

The Device Configuration 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 21 of 44
Simplified Motion Series Control With Siemens PLC

Step – 2

1. Click on Hardware Catalog from the Device configuration tab.


2. Expand Module to find all the available CPX-AP-I devices.
3. Expand AP-I technology modules to find the CPX-API-I-4IOL-M12 Master module.
4. Drag and Drop the CPX-API-I-4IOL-M12 Master module to under the CPX-API-I-PN in slot-2.
5. Expand Submodules to find the IO-Link generic Devices.
6. Expand IO-Link generic Devices to find the IO-Link telegram.
7. Drag and Drop the required IO-Link telegram to under the CPX-API-I-4IOL-M12 in port-1.
8. Drag and Drop the Port deactivated telegram to deactivate the port.

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

5 Determining Hardware ID of CPX-AP-I-4IOL-M12 IO Link Module.

Step – 1

1. Double on Devices and Networks to go to network view .

2. Right on AP-I-PN from the Network view


3. Click on Device Configuration from the right click menu.

The Device Configuration 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 23 of 44
Simplified Motion Series Control With Siemens PLC

Step – 2

1. Click on CPX-AP-I-4IOL-M12 device from Device overview tab.


2. Click on Properties tab to view the CPX-API-I-4IOL-M12 properties.
3. Click on System constants tab to find the Hardware id.
4. Find the HW_ID of CPX-API-I-4IOL-M12 IO-Link master module from Hardware identifier column.

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

6 Adding SMS_Festo Library to TIA Portal

6.1 Import the “SMS_Festo_Lib_V2.0” into Global libraries

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.

1. Click on Options menu from top menu bar.


2. Expand the Global libraries to find the library options.
3. Click on Open library to open the library file.

The open global library window shown in below Step-2

Step – 2

1. Choose the path where the Library is saved in your system.


2. Select the Library file from Open global library window.
3. Click on open to import the library to Global libraries.

The opened Library shown in below Step-3.

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

1. Click on Libraries to view the opened library.


2. Expand SMS_Festo_Lib_V2.0 to find the all Library folders.
3. Expand Types folder to find the Library sub folders.

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

6.2 Adding Function blocks and Supporting files to Program

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 Configuration of SMS Festo Function blocks in TIA Portal

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.

The called function block shown in below Step-2

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

1. Create a Data blocks to assigning tags for SMS_Festo_Advanced function block.


2. Create the all required tags inside the Data blocks and assign the required data type for the tags.

Step – 3

1. Create the tags as ENABLE inside the SMS_ADV Data block.


2. Assign the Data type as a bool for the ENABLE tag.
3. Drag and Drop the ENABLE tag from SMS_ADV Data block to XEnable input tag in SMS_Festo_Advanced
function block.

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

8 SMS_Festo_Advanced Function block Interface Tag Details

8.1 IO_Interface Tag Details

Tag Name Data Type Function Description

RefINPUTS BYTE Feedback data from actuator unit.


(Data Read from actuator unit to Controller)
RefOUTPUTS BYTE Command data to actuator unit.
(Data Write from Controller to actuator unit)

8.2 Control Tag Details

Tag Name Data Type Function Description

xEnable BOOL True - Enable function block


Hw_id HW_IO Simplified Motion Series Connected Module Hardware Identifier
number
iPort INT Simplified Motion Series Connected Channel port number

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

Tag Name Data Type Function Description


bySpeedOut BYTE Speed for movement “MovOut” towards inner outer end position
“LimOut”
1 - 10% (default)
...
10 - 100%
bySpeedIN BYTE Speed for movement “MovIn” towards inner (reference) end posi-
tion “LimIn(Ref)”
1 - 10% (default)
...
10 - 100%
byForce BYTE Force for force controlled movement “MovOut” from position “PosS-
tartPress” towards outer end position “LimOut

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

Tag Name Data Type Function Description


xAutoStoreActive BOOL Control command for activating automatic and permanent saving
of parameters in the flash memory
TRUE - Automatic saving activated (default)
FALSE - Automatic saving deactivated
Note: When changing parameters frequently, make sure to deac-
tive auto store to avoid damages to the flash memory by exceed-
ing 100.000 write cycles.
xStoreParameters BOOL Control command for single and conscious permanent saving of
parameters in the flash memory
TRUE - Manually stores the last downloaded parameters in the
flash memory
FALSE - Parameters are temporarily saved in RAM.
Note: Take effect only when falling to raising edge when AOI is
enable state.
xReadDiagnosticData BOOL TRUE - Update value of outputs:
DDTemperature
DDCurrent
DDVoltage
DDCyclesTotal
DDCyclesSinceReset
DDMileageTotal
DDMileageSinceReset
xResetCounterMileage BOOL TRUE - Resets values of parameters DDCyclesSinceReset

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

8.3 Monitor Tag Details

Tag Name Data Type Function Description

xEnabled BOOL TRUE – function block enabled.


xWriteDone BOOL TRUE - Last parameter wrote successfully.
xWriteActive BOOL TRUE - Executing parameter write function.
xReadActive BOOL TRUE - Parameter read function is active.
xError BOOL TRUE - Actuator unit in error state.
xStateIn BOOL Status at inner (reference) end position "LimIn(Ref)”
TRUE - Inner (reference) end position “LimIn(Ref)” reached
FALSE – Inner (reference) end position “LimIn(Ref)” not reached
xStateIntermediate BOOL Status at intermediate position “PosImp”
TRUE - Intermediate position “PosImp” reached
FALSE – Intermediate position “PosImp” not reached
xStateOut BOOL Status at outer end position “LimOut”
TRUE - Outer end position "LimOut" reached
FALSE - Outer end position "LimOut" not reached
xStateMove BOOL Status of the actuator unit
TRUE - Actuator unit in moving condition
FALSE - Actuator unit in standstill condition
reCurrentPosition REAL Actuator unit current position feedback
Linear actuator unit: - unit: [mm] - gradient: 0.01
Rotative actuator unit: - unit: [°] - gradient: 0.1
diCurrentSpeed DINT Actuator unit current speed feedback
Linear actuator unit: - unit [mm/s] -gradient: 0.01
Rotative actuator unit: - unit [rpm] -gradient: 0.1
diCurrentForce DINT Actuator unit current feed force feedback
Linear actuator unit: - unit [N] -gradient: 0.01
Rotative actuator unit: - unit [Nm] -gradient: 0.1
diDDTemperature INT Actuator unit current temperature feedback
Unit: [°C].
diDDCurrent DINT Actuator unit present value of current
Unit: [A].
diDDVoltage DINT Actuator unit present voltage feedback
Unit: [V].
diDDCyclesTotal DINT Number (dec) of completed movement cycles of the actuator
unit since delivery
diDDCyclesSinceReset DINT Number (dec) of completed movement cycles of the actuator
unit since last reset command
diDDMileageTotal DINT Mileage of the actuator unit since delivery
Linear actuator unit: unit [km], 0.000001.
Rotative actuator unit: unit [r], 0.001.
diDDMileageSinceReset DINT Mileage of the actuator unit since last reset command
Linear actuator unit: unit [km], 0.000001.
Rotative actuator unit: unit [r], 0.001.

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

Tag Name Data Type Function Description


diNumOfStorageOperation DINT Total number of permanent storage processes in the flash
memory since delivery
aErrorCode WORD[16] Error code of actuator unit
uinLocalError UINT Function block Local Error
1001 – In_SpeedIN Parameter limit out of range error.
1002 – In_SpeedOut Parameter limit out of range error.
1003 – In_Force Parameter limit out of range error.
1004 – Read_Para Error.
1005 - Write_Para Error.

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

9.1 Initial Setup

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

1. Enter the actuator unit connected Hardware ID in Hw_id input tag.


2. Enter the actuator unit connected IO-Link master Port number in “iPort” input tag.
3. Enable actuator unit power stage by toggling xPowerSMS control tag by false to true.
4. Enter the user preferred values for the control tags bySpeedOut, bySpeedIN, byForce, reStartpress Po-
sition , reIntermediatePosition & reEndPosition.
5. Once All entered parameters values writing are successful then the monitor tag xWriteDone will be in
true state.
6. Toggle the xEnable control tag from false to true. If function block enabled xEnabled tag will update the
status by turning into true.

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

9.2 Actuator unit Homing with stroke detection

Toggle the “In_ExecuteReference” control tag from false to true.


At this stage actuator unit starts reference movement move towards selected reference end position “Pos Ref”
defined in “In_ReferenceDirection”, automatically followed by movement towards end position “Lim Out”.
So initially status tag “xStateMove” will be ON and then “xStateOut”.
Remark:
Actuator unit Homing with stroke detection is just needed once during commissioning for teaching the maximum
stroke length of the application, or after changing the stroke length e.g. by external mechanical end stops.
This method is not needed to be executed after every power off.
Homing to existing reference end position after power off is done automatically with the first motion command
sent to the device.

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

9.3 Actuator unit Move to Inwards

• 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

9.4 Actuator unit Move to Outwards

• 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

9.5 Actuator unit Move to Intermediate

• 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

You might also like