48
ifm
Operating Instructions IO-Link Master with PROFINET interface DataLine 4 Ports IP 65 / IP 66 / IP 67 / IP 69K (AL1301)
05 / 2018
Configuration
IoT Core
>
8.3.11
Examples
Example: Read process data of an IO-Link device ................................................................................48
Example: Read several parameter values of the IO-Link master simultaneously ..................................49
Example: Change name of the IO-Link master ......................................................................................49
Example: Read the parameter value of an IO-Link device .....................................................................50
Example: Change the parameter value of an IO-Link device .................................................................50
Example: Subscribe to event ..................................................................................................................51
16577
>
Example: Read process data of an IO-Link device
16574
Task
: Read the current measured value of the ifm temperature sensor TN2531 at IO-Link port X06
Solution:
Read the data point for the process input data with the
getdata
service.
Request object:
{
"code":10,
"cid":4711,
"adr":"/iolinkmaster/port[6]/iolinkdevice/pdin/getdata"
}
Return object:
{
"cid":4711,
"data":{"value": "03C9"},
"code":200
}
The return value is given in hexadecimal format. Besides the temperature value the return value
comprises additional information (
→ IO Device Description (IODD) of the sensor). The temperature
value is shown in bits 2 to 15.
0x03C9 = 0b
11110010
01
Temperature value: 0b11110010 = 242
Therefore: The current temperature value is 24.2 °C.