31
10 Programming Using IO-Link
<Sample programming 2>
(1) Specify the location of the safety
light curtain to read error codes
from as follows:
• Specify the unit type from which the
data is read as NX Unit.
• Specify the node location where the
IO-Link Master Unit is mounted by the
value of device variable
N5_Node_location_information.
• Specify the port No. of the safety
light curtain as "1".
• Specify Index No. 81 where the
error code of the safety light
curtain is stored.
• Specify Sub-Index No. 0 where the
error code of the safety light
curtain is stored.
(3) Read the error codes of the
safety light curtain specified
above by executing IO-Link
communications instructions.
• Specify the location of the safety
light curtain by the value of
DevicePort (specified in (1)), and
the error codes to be read by the
value of DeviceObject (specified in
(2)).
• After they are read, error codes are
stored to SLC_Error_Code.
(2) Specify the No. of the service data where
the error code is stored as follows: