IFM AL1921 handleiding

135 pagina's
PDF beschikbaar

Handleiding

Je bekijkt pagina 67 van 135
IO-Link master with EtherNet/IP interface AL1921
67
Example: Publishing the temperature to an MQTT broker
Task: The temperature of the unit is to be published to an MQTT broker every 5 seconds (MQTT
broker: 192.168.82.100, port: 1883, topic: deviceTemp).
Solution:
u Setting the interval of the timer
Request:
{
"code":"request",
"cid":1,
"adr":"/timer[1]/interval/setdata",
"data":{
"newvalue":5000
}
}
u Publishing the temperature to an MQTT broker
Request:
{
"code":"request",
"cid":2,
"adr":"/timer[1]/counter/datachanged/subscribe",
"data":{
"callback":"mqtt://192.168.82.100:1883/deviceTemp",
"datatosend":["processdatamaster/temperature"]
}
}
Response:
{
"cid":2,
"code":200
}
9.2.25.9 WebSocket support
The ifm IoT-Core supports communication via WebSocket protocol. With WebSocket, the user can
establish a full-duplex communication channel via a TCP connection.
WebSocket can be used for the following services:
subscribe
unsubscribe
Maximum number of simultaneous WebSocket connections: 8
Secure WebSocket connections (wss://) are not supported.
To transmit notifications via a WebSocket connection:
u Establish a WebSocket connection (e.g. "ws://192.168.0.55:80/mywebsocket")
Option 1: without parameter "callback”
u Send a subscribe/unsubscribe request without "callback” parameter.
w ifm IoT-Core sends notifications about existing WebSocket connections.
Option 2: with parameter "callback”

Bekijk gratis de handleiding van IFM AL1921, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.

Productinformatie

MerkIFM
ModelAL1921
CategorieNiet gecategoriseerd
TaalNederlands
Grootte11184 MB