TCG120-4_R1.3
–
May 2022
Page 33
bbbb
value for limit “Max”
y
stands for “H
y
s”
cccc
value for “Hys”.
Example:
set of sensor 1 parameter 1 (temperature):
Command:
set ls11=n25.0,x35.0,y1.0
Answer:
ls11=n25.0,x35.0,y1.0
Command:
set ls11=n31.0
Answer:
ls11=n31.0,x35.0,y1.0
Example:
set of sensor 1 parameter 2 (humidity):
Command:
set ls12=n45.0,x60.0,y1.0
Answer:
ls12=n45.0,x60.0,y1.0
9.
Protocols and API
9.1.
HTTP API
HTTP is a very popular protocol for the implementation of remote monitoring and control SCADA
systems. These systems are built on client-server technology.
TCG120-4 supports client mode
–
HTTP/HTTPS Post. This makes the device compatible with all
SCADA software running HTTP protocol.
9.2.
XML/JSON file HTTP Post
When this service is active, the module periodically sends the HTTP Post to a server. The Post
contains an XML or JSON file with the current status of monitored parameters.
HTTP and HTTPS protocols are supported.
The Post can be sent also on an alarm condition - as an analogy of the SNMP trap.
On every HTTP Post, the server returns a response in accordance with the HTTP protocol. Only if
“Process Answer” is enabled, TCG12
0-4 will execute the commands, contained in the answer.
Otherwise, the device will terminate the connection immediately after the response.
A very important parameter in this communication is the HTTP Post period. With a shorter time
period the device generates more data traffic, but this keeps the information and possibility to
control the device closer to "real-time".
The HTTP Post period can be changed by the server with the appropriate HTTP command. This
makes communication very flexible.
9.2.1.
Commands
The commands for TCG120-4
are sent in the answer’s body of HTTP Post request. The structure
of command is:
set yyy=xxx
Where:
yyy is the command;
xxx is the parameter.
Example:
set r1=on
–
will turn on the relay 1.
set FIN
–
will terminate the session.
The full list of the commands is available on 9.4.
9.2.2.
Typical communication session
Below is a typical communication session between TCG120-4 and a remote server
, with “Process
Answer”
enabled:
Содержание TCG120-4
Страница 1: ......
Страница 46: ...TCG120 4_R1 3 May 2022 Page 46 Appendix C Fig 1 Fig 2...