52
ifm
Device Manual IO-Link Master with PROFINET interface CabinetLine 8 Ports IP 20 (AL1900)
05 / 2018
Configuration
IoT Core
>
Example: Read the parameter value of an IO-Link device
16546
Task:
Read the serial number of the ifm temperature sensor TN2531 at IO-Link port X02
Solution:
Read the serial number with the
iolreadacyclic
service from the IO-Link device (index:
21, subindex: 0)
Request object:
{
"code":10,
"cid":4711,
"adr":"/iolinkmaster/port[2]/iolinkdevice/iolreadacyclic",
"data":{"index":21,"subindex":0}
}
Return object:
{
"cid":4711,
"data":{"value":"4730323134323830373130"},
"code":200
}
The returned value is given in hexadecimal format. The conversion of the HEX value in a STRING
value is: G0214280710
>
Example: Change the parameter value of an IO-Link device
16578
Task:
Set the output configuration OUT1 of the ifm temperature sensor TN2531 at IO-Link port X02 to
the value "Hnc / hysteresis function, normally closed".
Solution:
Change the parameter [ou1] of the sensor to the value 4 using the iolwriteacyclicdata
service. The parameter can be accessed via IO-Link index 580, subindex 0 (
→ IO-Link description of
the sensor).
Request object:
{
"code":10,
"cid":4711,
"adr":"/iolinkmaster/port[2]/iolinkdevice/iolwriteacyclic",
"data":{"index":580,"subindex":0,"value":"34"}
}
The value has to be given in hexadecimal format. The conversion of the STRING value in a HEX value
is: 34.
Response object:
{
"cid":4711,
"code":200
}