There are 2 types of information that the GRD-MQ/cLAN-MQ can send. On one side, we have the reports that contain the real values of inputs and outputs updated according to the criteria configured in the device. We can select the values we want to have updated and under which conditions and only when there is a connection with the broker. On the other hand, and independently, we have the Historicals, which are made of registers of events and time (logs) that are stored in the GRD-MQ and are sent to the broker. If there is no connection the registers remain in the equipment until they are recovered.
Topics and formats to publish reports and historical records are configured on the MQTT tab..
Historicals and reports are configured on the channels.
You can configure a different topic/format for reports for each channel type. There's a single topic/format for historical records.
If the topic/format for historical records is no configured, the records will be deleted as soon as they are created.
For sending multiple records in a single message you must configure how to limit each record
%n | Channel type (I, O, AN, PI) |
%i | I/O channel number |
%v | I/O channel value in numeric format |
%wX | I/O channel value in numeric format, with fixed point at X position (GRD 2.2+ / cLAN 3.1+) |
%b | I/O channel value in boolean format (true - false) |
%t | Seconds since 1970 |
%d | Day |
%M | Month |
%y | Year |
%h | Hour |
%m | Minutes |
%s | Seconds |
%x | Historical record type |
R: General report | |
HC: By change | |
HT: By time - current value | |
MIN-AL: By low value | |
N_AL: Normal value | |
MAX-AL: By high value | |
HTMIN: By time - minimum value | |
HTMAX: By time - maximum value | |
HTAV: By time - average value |
Here are some examples following the configuration on the previous snapshots.
Analog input channels 1, 2, 3 and 4:
[{A1:893},{A2:41},{A3:312},{A4:1933}]
Historical record for analog input channel 2, at Feb21 2020 08:02:20pm with value 41
[{"ts":"1582315320000","values":{A2HT:41}}]
Digital output channel 2 with value 1
Historical record for digital output channel 2, at Feb21 2020 08:05:34pm with value 1
[{"ts":"1582315534000","values":{O2HC:1}}]
We will now see the types of reports and how to configure them. The reports are configured individually in each channel, to access the report configuration screen go to the Configurator, the “Channels” menu and here select the type of channel and channel number by double clicking on it. A configuration screen will be displayed where you have the available configurations for that channel.
It is important to be aware that when the GRD-MQ losses connection with the broker and recovers it or is the first time it is connected, it sends a message with all configured reports.
The following figure shows the configuration screen of the digital inputs reports:
If a report by change of a digital input cannel is enabled, a change of value will generate a message that will be sent to the broker. This way, only the events of interest at the moment they occur, are reported, if one of the inputs with a disabled report changes value it will not be reported.
It defines the time in minutes which determines how often a report message is generated. Let’s suppose that we are interested in updating an input channel every five minutes independently of the changes that occur, the only thing we need to do is to enable the report by time and configure in 5 minutes, this will force the report message that will update the input value in the broker every 5 minutes.
The following screen shows the configuration screen of the analog inputs report. The analog inputs have 2 types of reports, on one side reports by percentage change and the other one temporary report.
The report by change is enabled in the channels we want to be updated in the broker every time that the signal changes
The "percentage" report will report if the input changes a percentage from full scale. The full scale value will depend on the input type.
The "quantitative" report will report if the input changes a configured absolute value. .
It defines a time in minutes which determines how often a report message is generated.
In this case we only count on a temporary report, the change report is always enabled, this means that when a change occurs in one of the outputs, it will be immediately reported. The purpose of having the change report permanently enabled, is because the report can be used as verification of a remote activation.
The pulse channels have 2 types of reports. On one side the reports by performed count and on the other the temporary report.
In the counts number report the device sends a message to the broker each time the desired input counts a number of pulses from the last report of this channel, by counts or by time.
It defines time in minutes which determines how often a report message is generated.
Historicals allow the device to store the events as changes in inputs or outputs being either on-line or off-line and then transmit them to the broker for further visualization and analysis. These Historicals will let you know the value and number, of an input or an output that has been modified and the date and time the event took place.
![]() |
The GRD and the cLAN have the capability of storing up to 100000 events in off-line mode. |
Para acceder a la pantalla de configuración de históricos debe ir en el Configurador al menú “Channels” allí seleccionar el tipo de canal y luego el número de canal haciendo doble clic sobre él de esta manera accederá a una pantalla de configuración donde tendrá las configuraciones disponibles para dicho canal.
In this case the digital input channels have Historicals by change, this means that a register is generated for every change of this input. The following figure shows the screen to enable these Historicals.
Just as in digital inputs it is possible to keep a Historical of analog inputs under two clearly defined criteria.
On one side we have an alarm type register of Historicals that allows monitoring the limits of tensions with a determined value of hysteresis.
On the other side, we can create a register of Historicals by time, that is, sample the analog inputs and store its value every specific time, this type of Historical, in turn, is subdivided into 4 since we can store the real value, the minimum value, the maximum value or the average in the configured time period.
Once stored in the device's memory, it is transmitted whenever possible, but is never lost under any circumstance.
This criterion defines an operational band through a maximum and minimum. When the analog input exceeds the maximum value a Historical is generated by maximum, when the analog input is lower than the minimum a Historical by minimum is generated and when the analog input passes from a maximum value or from a minimum value to a normal value between both a Historical by normal value is generated. In this manner we can follow the evolution of the input when it fluctuates between the specified limits. In addition to the maximums and minimums a value of hysteresis must be defined to avoid continuous generation of Historicals when the analog signal oscillates above a threshold value. In the following figure we can see how the hysteresis mechanism works for the maximum.
The same happens for minimum values but in an exactly opposite manner.
It is not possible to configure a value of hysteresis greater than the difference between the maximum and minimum, and also a maximum smaller than a minimum. We can also associate a digital output channel to the alarm event by maximum and another one of alarm by minimum, this means that when the analog input in the maximum range will activate an output and in the minimum another one.
In this case the Historical by time has 4 sub-types.
This type of Historical makes a unique capture of the value of the analog channel at the moment the configured time is due and generates the register.
In this case captures are made from the last Historical until the register time is due, when this happens a Historical is generated with the maximum value measured in this period.
This Historical is similar to the maximum but only registers the minimum value in the time period.
The concept is the same as in the previous ones but in this case it calculates an average of the value of the channel in the time period.
The device is prepared to register by cardinal time, this means that if we configure the time in 60 minutes at 8:38 it will register for the first time at 9:00 hrs, then at 10:00 hrs and so on.
Just as the inputs a Historical by change of the output channels can be made. Take into account that modifying one of the outputs remotely depends on the availability of the communication with the MW at that moment
The pulse channels can also generate Historicals in a specific time that can be configured the same way as in the other channels, as it is shown in the following figure. We can also decide if once the Historical is generated, we want the counter reset to 0 or not.
In the need of erasing Historical registers, this can be done by means of the “GRD Config” in the monitor window with the “Delete” button located next to the indicator of stored Historicals.
This operation can take a considerable time.
The time can be updated on the monitoring screen by clicking on the “Sync” button. The time is synchronized with the PC time to which is connected.
![]() |
It is important to disable the Windows option “Automatic time change according to daylight savings time”. In case of being in a region with no daylight savings time change the time zone and in an area with daylight savings time change the time zone to a region with it and disable it, then return to your time zone. |
2021-09-21