26
10 Programming Using IO-Link
10.1.2 Programming
1
Make sure that the IO-Link Master Unit is in the offline mode. If the IO-Link Master Unit is
online, set it to the offline mode.
2
Select
Programming
in the Multiview
Explorer.
3
Open
POUs
-
Programs
-
Program0
-
Section0
.
When
Section0
is already used for another program, right-click
Program0
and click
Add
-
Section
.
4
Right-click on the first ladder in the
Section0-Program0
Pane in the Edit
Pane, and click
Insert Input (C)
.
5
Click
Enter Variable
, and enter the
following variable name.
Variable name:
N5_Port1_IN_Data_Enable
6
Right-click on the ladder at the right of
the inserted input, and click
Insert
Function
.
7
Join the data of the power supply
voltage that was split into two 1-byte
parts into one 2-byte (one word) data
item.
Enter the following function name.
Function name: PackWord
8
Click
Enter Variable
at
High
and
Low
in the PackWord block, and enter each
of the following variable names.
High: N5_Port1_Power_supply_high
Low: N5_Port1_Power_supply_low
9
Create the variable for outputting the
power supply voltage.
Double-click
Data
-
Global Variables
in
the Multiview Explorer.