WLS27 Pro Parameter Data Function Block
WLS27 Pro Parameter Data Function Block
Pro Parameter Data Function Block
5/31/2019
This document covers the installation and use of a function block for Siemen’s TIA Portal software package.
This function block handles acyclic IO‐Link commands to and from a Banner WLS27 Pro and allows the user to
easily change WLS27 Pro Parameter Data.
Each Banner IO‐Link Device Parameter Data function block is meant to be used alongside a Banner IO‐Link
Device Master Control function block. This paper describes how to set up both of these blocks.
Components NOTE: The WLS27 Pro, depending
on length, can draw more current
Banner IO‐Link Library.zal14 than a typical IO‐Link Master can
also requires Siemens IO_LINK_DEVICE function block provide. A splitter arrangement
may be necessary, where the light
Installation Instructions is powered from a different source.
1. Open a project.
2. Go to Options > Global Libraries > Retrieve Library.
3. Select the Banner IO‐Link Library. Click Open.
5/31/2019 WLS27 Pro Parameter Data Function Block
4. The Banner IO‐Link Library will now be in the Global
Library List. Expand the Master copies section. The WLS27
Pro folder contains elements for both Process Data and
Parameter Data connections to a WLS27 Pro device. As
Parameter Data is the focus of this paper, we will concern
ourselves with these items: Banner_WLS27Pro,
Banner_WLS27Pro_CC, Banner_WLS27Pro_IOL,
Banner_WLS27Pro_LevelConfig,
Banner_WLS27Pro_LevelThreshold,
Banner_WLS27Pro_PositionConfig, Banner_WLS27Pro_RD,
Banner_WLS27Pro_SegConfig, Banner_WLS27Pro_SegMode,
Banner_WLS27Pro_VarColorConfig, and
Banner_WLS27Pro_WD.
5. Drag Banner_WLS27Pro_IOL to the Program Blocks area
under your PLC.
6. Drag the rest to the PLC Data Types area under your PLC.
7. We also have to prepare for setting up the IO‐Link Master.
Go to the IOLM_Control section of the Banner IO‐Link
Library List.
8. Drag Banner_IOLM and Banner_IOLM_EL to the PLC Data
Types area under your PLC.
9. Drag the Banner_IOLM_Control to the Program Blocks area
under your PLC.
2
5/31/2019 WLS27 Pro Parameter Data Function Block
10. Finally, we have to bring the Siemens‐made IO_LINK_DEVICE function block specific to your
PLC into our project. This can be found in a Siemens IO‐Link Library. See their website for
more details. Once that library is retrieved and opened, drag IO_LINK_DEVICE to the Program
Blocks area under your PLC.
11. Go to Devices and networks to configure the system as necessary. Below is an example of
what a configuration might look like. This example shows 5 different IO‐Link Masters
connected to the same PLC.
3
5/31/2019 WLS27 Pro Parameter Data Function Block
12. Go to Program blocks. Add a new Data block if necessary. In this example the new data block
is named “Banner IO‐Link Data”.
13. In the new data block, create a new tag to represent the IO‐Link Master, using the data type
“Banner_IOLM”. This example uses the tag name “IOLM5”. A different IO‐Link Master might
be called IOLM1 or IOLM2, for instance.
4
5/31/2019 WLS27 Pro Parameter Data Function Block
14. Expand the IOLM5 tag, then expand the Port Controlled section. The Port Controlled tag array
determines which of the ports has a function block‐controlled Banner IO‐Link device plugged
into it. Each Port Controlled array tag with true as the start value is considered to have such a
device connected. Correctly setting this array allows the Device and IO‐Link Master function
blocks to control the device on that port. Errors will occur if a port without an IO‐Link device
is set to true.
5
5/31/2019 WLS27 Pro Parameter Data Function Block
15. Next add the “Banner_IOLM_Control” function block to an OB ladder. You will be prompted to
make a new data block. You now have to define three input variables for this function block:
CAP, ID Control state, and IOLM.
Defining an input variable for the fourth input, Communications Error, is optional.
The Client Access Point (CAP) varies, depending on the specific IO‐Link Master used.
IO‐Link Master CAP
Balluff (BNI PNT‐508‐105‐Z015) 255
Comtrol (IOLMPN8P) 255
ifm (AL1102) 46080
Siemens (CM 4xIO‐Link) 227
Turck (TBEN‐L5‐8IOL) 251
The ID Control state variable should be “true” if using an IO‐Link Master from ifm; otherwise
it should be set to “false”.
Link the “IOLM” input variable to the tag created in step 13.
Figure 1: An example using an ifm IO‐Link Master
Figure 2: An example using a Balluff IO‐Link Master
6
5/31/2019 WLS27 Pro Parameter Data Function Block
16. The ID Control true/false state is linked to an array called “ID_Array”, found in
“Banner_IOLM_Control_DB”. This array contains the Hardware ID property of the PROFINET
configuration.
See Appendix A for more information on how to find the correct value for your specific IO‐
Link Master.
In the case of an IO‐Link Master from ifm, each port has a different Hardware ID and each
number must be entered into the correct place. The example shown in Figure 3 is of an IO‐
Link device connected to port 6 of an ifm IO‐Link Master. The ifm IO‐Link Master’s port 6
Hardware ID is entered into the “ID_Array[6]” slot. This full array of different Hardware IDs,
based on port used, is used when the “ID Control” variable is set to true (i.e. only when the IO‐
Link Master is from ifm).
IO‐Link Masters from other vendors use a single Hardware ID value for all ports. In this case,
the Hardware ID is entered into the “ID_Array[1]” slot of the array, regardless of the port to
which the device is connected. This array is ignored (but the [1] slot is still important) when
the “ID Control” variable is set to false.
Figure 3: The ID_Array when using an ifm IO‐Link Master; device attached to port 6
Figure 4: The ID_Array when using a Balluff IO‐Link Master; device attached to any port (only ID_Array[1] is used)
7
5/31/2019 WLS27 Pro Parameter Data Function Block
17. Now add the “Banner_WLS27Pro_IOL” function block to an OB ladder. You will be prompted
to make a new data block. Type in the port number for the device, then link the “IOLM”
variable to the IO‐Link master variable created in step 13.
As a final step, the Port Activate bit is added on the same rung as the WLS27 Pro function
block in order to ensure orderly behavior. The IO‐Link Master function block will cycle
through all ports, giving each connected device function block a time to shine.
8
5/31/2019 WLS27 Pro Parameter Data Function Block
18. The WLS27 Pro Parameter Data function block is now set up. Compile the project and
download it to the PLC. Go online, then open the WLS27 Pro data block. When the function
block starts out, it does an initial global read of all WLS27 Pro information. The Read Data
section of the data block shows this information.
9
5/31/2019 WLS27 Pro Parameter Data Function Block
19. The Write Data section of the data block shows all of the writeable parameter data for the
WLS27 Pro. Simply change a value here and it will be automatically written to the sensor via
a one‐time acyclic write through the IO‐Link Master.
It is almost like the WLS27 Pro is a PROFINET‐speaking device!
10
5/31/2019 WLS27 Pro Parameter Data Function Block
Appendix A IO‐Link Master Hardware ID Numbers
The Hardware ID number used in “ID_Array” in the “Banner_IOLM_Control_DB” function block is
not trivial to find. Each manufacturer uses the Hardware Identifier of a slightly different
subcomponent as the value required for our purposes. Furthermore, the particular Hardware
Identifier numbers will change based on the number of devices in your configuration. These
pictures show which subcomponent’s Hardware ID is relevant to the function block.
In each case, click on the hardware device from the “Devices & Networks” view. Click on
“Properties”, then click on “System Constants” to see the screen shots below.
Balluff
Use the Hardware Identifier from the “BNI_PNT‐508‐105‐Z015_1” Hw_SubModule. Type this
number into the [1] slot of the ID_Array found in the “Banner_IOLM_Control_DB” data block.
Figure 5: Balluff BNI005H. Type this value into the “ID_Array[1]” location.
11
5/31/2019 WLS27 Pro Parameter Data Function Block
Comtrol
Use the Hardware Identifier from the “Head” Hw_SubModule. Type this number into the [1] slot
of the ID_Array found in the “Banner_IOLM_Control_DB” data block.
Figure 6: Comtrol IOLM8 PNIO. Type this value into the “ID_Array[1]” location.
12
5/31/2019 WLS27 Pro Parameter Data Function Block
Turck
Use the Hardware Identifier from the “Basic_1” Hw_SubModule. Type this number into the [1]
slot of the ID_Array found in the “Banner_IOLM_Control_DB” data block.
Figure 3: Turck TBEN‐L5‐8IOL. Type this value into the “ID_Array[1]” location.
13
5/31/2019 WLS27 Pro Parameter Data Function Block
Siemens
Use the Hardware Identifier from the “CM_4xIO‐Link_1” Hw_SubModule. Type this number into
the [1] slot of the ID_Array ID_Array found in the “Banner_IOLM_Control_DB” data block.
Figure 4: Siemens CM 4xIO‐Link Master on ET‐200SP. Type this value into the “ID_Array[1]” location.
14
5/31/2019 WLS27 Pro Parameter Data Function Block
ifm
Use the Hardware Identifier from the port to which the IO‐Link Device you wish to control is
connected Hw_SubModule. Each port is a different Hardware identifier. You will need to populate
the ID_Array, found in the “Banner_IOLM_Control_DB” data block, with the correct values. In the
example below, port 6 on the master has a Hardware ID of “279”. Thus, the [6] entry in the
ID_Array variable should be set to “279”.
Figure 5: ifm AL1102: each port on the ifm IO‐Link Master has its own Hardware ID. Type these values into the correct
“ID_Array[x]” location, where ‘x’ is the port number in question ([6] here, as the ports are labeled 2 through 9).
15