
NOVUS AUTOMATION
22/53
(°F). See the
chapter for more information about the drives supported by the
device.
timestamp
Informs the log date and time in Unix Timestamp or TDateTime format, as defined in the MQTT tab of
NXperience
software. See the
section of this chapter for more information on both formats or
the
chapter to find out how to set up the
Timestamp.
value_channels
Informs the values read by the active channels, always using three decimal places to do it.
Table 07 – Frame Parameters
7.3.1
TIMESTAMP
The frame timestamp parameter informs the timestamp of the device in UNIX Timestamp or TDateTime format, as configured in the
NXperience
Time Format
In an example where the date and time of a log are 18/07/2018 and 20:25:58, respectively, the MQTT protocol would convert them to:
•
UNIX Timestamp:
1531945548.
•
TDateTime:
43299.8512615.
7.4
MQTT PROTOCOL CONFIGURATION IN SOFTWARE NXPERIENCE
The user can enable and configure the MQTT protocol through the
NXperience
software, as can be seen in the
Below are pertinent information and concepts about the MQTT protocol and that will later be essential for its configuration in
NXperience
.
7.4.1
QoS
The Quality of Service (QoS) serves to indicate the quality of the service in relation to the delivery of the data packets.
QoS
Delivery Type
0
At most once. Known as "best effort". It resembles the UDP transport protocol, where there are no acknowledgments of message
delivery to the sender. The sender has no obligation to keep the message stored for future retransmissions.
1
At least once.
There is a message confirmation of delivery. It addresses situations where the sender of the message ends up
generating several identical messages, possibly due to a delay in the arrival of the confirmation of receipt. This type of delivery
ensures that at least one of them is able to perform the recognition. The message will be stored by the sender until there is a further
confirmation of receipt from the recipient.
2
Exactly once. It ensures that the message is delivered exactly once, also guaranteeing the sending of confirmations of receipt and
confirmations of receipt of the own confirmations of receipt. There are confirmations in two directions for everything that is
trafficked. As long as a message is not acknowledged by the recipient, it is maintained by the sender.
Table 07
– QoS
7.4.2
JSON FORMAT
The
NXperience
JSON Format
parameter allows you to change the formatting of the JSON frame as required by the supervisory software, as
shown in the examples below, which propose a situation where analog channels 1 and 3 are enabled.
•
Static Array:
Send information about all variables, even those that are not enabled, grouping each parameter inside brackets.
o
Status:
{"n_channels":4,"timestamp":43277.40465278,"battery":5.69,"value_channels":[0.000,22.300,0.000,22.300],"alarm_low":[0,1,0,0],"alarm_hi
gh":[0,0,0,1],"buzzer_state":0}
o
Config:
{"n_channels":4,"timestamp":43277.57437500,"frame_format":"array_static","channels_enabled":[0,1,0,1],"hash":"1C0606FF77D68DD1DB
DD6D25AC773C76AF42D3BB","gmt":-
180,"tag_channels":["","Analog1","","Analog3"],"tag_units":["","Celsius","","Celsius"],"sp_alarm_low":[0.000,40.500,0.000,0.000],"sp_alarm_
high":[0.000,0.000,0.000,20.000]}
•
Dynamic Array:
Send information only about the enabled variables, grouping each parameter inside brackets.
o
Status:
{"n_channels":2,"timestamp":43277.40706019,"battery":5.69,"value_channels":[22.300,22.300],"alarm_low":[1,0],"alarm_high":[0,1],"buzzer
_state":0}
o
Config:
{"n_channels":2,"timestamp":43277.57538194,"frame_format":"array_dynamic","channels_enabled":[1,1],"hash":"9401ACBDFFD105D653
DAE5222470B47127455BBC","gmt":-
180,"tag_channels":["Analog1","Analog3"],"tag_units":["Celsius","Celsius"],"sp_alarm_low":[40.500,0.000],"sp_alarm_high":[0.000,20.000]}
•
Static Descriptive:
Send information about all variables, even those that are not enabled, grouping each variable in unit mode.
o
Status:
{"n_channels":4,"timestamp":43277.40924769,"battery":5.69,"ch_dig":0.000,"ch_analog_1":22.600,"ch_analog_2":0.000,"ch_analog_3":22.
600,"alarm_low_dig":0,"alarm_low_analog_1":1,"alarm_low_analog_2":0,"alarm_low_analog_3":0,"alarm_high_dig":0,"alarm_high_analog_
1":0,"alarm_high_analog_2":0,"alarm_high_analog_3":1,"buzzer_state":0}