SNP Snapshot Function Block
|
The Snapshot (SNP) function block adds a local history data capture facility for MBus_io12_LCD and MBus_io14_DIN devices. When triggered, the SNP block will capture the values of a defined list of parameters (values of other program blocks) and store those values along with a timestamp into flash memory. Subsequent triggers will add additional records overwriting older data in a circular fashion. The defined MBus_ioFlash program can contain many SNP blocks, each can have a different list of parameters and can be triggered independently. The output value of the block itself will be the number of records that have been captured so far.
An external device can read the captured data via standard Modbus "Read Holding Registers (03)" commands. Data values will be formatted as 16 bit signed integers, same format as is currently used to read block values via Modbus.
The memory storage space consumed by the SNP blocks is shared with the
MBus_ioFlash program space which is limited to about 16000 bytes. Each stored
data record requires 6 bytes for the
timestamp plus 2 bytes for each parameter. Hence the total memory consumption of
one SNP block can be computed as: (6 + number_of_parameters * 2)*
maximum_records. For example if a SNP block is defined with 15 parameters and a maximum of 52
records it will consume: (6 + 15 * 2) * 52 = 1872 bytes, which represents about
12% of the available program space.
Parameter | Description |
Name | Function block name, see common parameters |
Modbus Reg no. | The Modbus start register number to access the saved history data. The first register is the number of stored records and subsequent registers correspond to the stored data. The first 6 registers of each record is the time stamp, formatted as (year, month, day ,hour, minute, second), followed by the data. |
Point list |
The names of the blocks in the current MBus_ioFlash program page which will be acquired for each snapshot data record. |
Max Records |
Maximum number of snapshot data records to store. When exceeded, the oldest record is overwritten in a circular fashion. |
Input Trigger |
The input block that will trigger the storage of a new snapshot data record. |
/ | Mixed inputs option, see common parameters |
/ |
Toggle button: specifies the type of trigger, low-to-high or high-to-low. |