NOVUS AUTOMATION
26/85
PARAMETER
DESCRIPTION
value_channels
Informs the values read by the active channels, always using three decimal places to do it.
Table 7 –
Frame Parameters
8.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
parameter (check the
chapter).
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.
8.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
.
8.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 can 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. If a message is not acknowledged by the recipient, it is maintained by the sender.
Table 8 –
QoS
8.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,"n_alarms":10,"timestamp":43277.40465278,"battery":5.69,"value_channels":[0.000,22.300,0.000,22.300],"alarms":[0,1,
0,0,0,0,0,0,0,0],"buzzer_state":0}
o
Config:
{"n_channels":4,"n_alarms":10,"timestamp":43277.57437500,"frame_format":"array_static","channels_enabled":[0,1,0,1],
"hash":"1C0606FF77D68DD1DBDD6D25AC773C76AF42D3BB","gmt":180,"tag_channels":["","Analog1","","Analog3"],"tag_units":["","Ce
lsius","","Celsius"],"sp_alarms":[0.000,35.000,0.000,20.000,0.000,0.000, 0.000, 0.000, 0.000, 0.000]}
•
Dynamic Array:
Send information only about the enabled variables, grouping each parameter inside brackets.
o
Status:
{"n_channels":2,"n_alarms":4,"timestamp":43277.40706019,"battery":5.69,"value_channels":[22.300,22.300],"alarms":[1,0,1,0],"buzzer_stat
e":0}
o
Config:
{"n_channels":2,"n_alarms":4,"timestamp":43277.57538194,"frame_format":"array_dynamic","channels_enabled":[1,1],"hash":"9401ACBD
FFD105D653DAE5222470B47127455BBC","gmt":-180,"tag_channels":["Analog1","Analog3"],"tag_units":["Celsius","Celsius"],
"sp_alarms":[35.000,0.000,20.000,0.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,"n_alarms":10,"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_01":0,"alarm_02":1,"alarm_03":0,"alarm_04":0,"alarm_05":0,"alarm_06":0,"alarm_07":0,"alarm_08":0,"alarm_09"
:0,"alarm_10":0,"buzzer_state":0}
o
Config:
{"n_channels":4,"n_alarms":10,"timestamp":43277.57784722,"frame_format":"descriptive_static","enabled_dig":0,"enabled_analog_1":1,"e
nabled_analog_2":0,"enabled_analog_3":1,"hash":"9401ACBDFFD105D653DAE5222470B47127455BBC","gmt":-
180,"tag_dig":"","tag_analog_1":"Analog1","tag_analog_2":"","tag_analog_3":"Analog3","unit_dig":"","unit_analog_1":"Celsius","unit_analog
_2":"","unit_analog_3":"Celsius","sp_alarm_01":0.0,"sp_alarm_02":35.0,"sp_alarm_03":0.00,"sp_alarm_04":22.3,"sp_alarm_05":0.00,"sp_al
arm_06":0.0,"sp_alarm_07":0.0,"sp_alarm_08":0.0,"sp_alarm_09":0.0,"sp_alarm_10":0.0}