mbusRecordGetInfo (Functionblock) |
Top Previous Next |
This function block will provide information about the records requested with mbusDataRequest or received with mbusDataReceive.
The VIF describes the unit and multiplier for the value, e.g. a VIF of 0x15 indicates that the value is in W and must be multiplied by 10. Please refer to the M-Bus documentation for details about the VIF/VIFE tables etc.
Input: handle : SYSHANDLE A handle to the connection index : INT The index of the record to read, starting with index 1. mbusRecordCount can be used to get the total number of records.
Output: type : SINT The record type:
address: STRING The address associated with this record. For simple packages it will match the slave address, but other times, the record may have been forwarded from another meter with this address.
VIF : USINT Value Information Field, indicates the type of value the record contains, e.g. the unit and multiplier. Bit 7 is the extension bit. If it is set, the VIF is extended with the contents of VIFE[1]. If bit 0-6 is less than 0x7B, the primary VIF table must be used. If the VIF is 0xFD or 0xFB, the extension VIF tables must be used to look up the value of VIFE[1]. If the VIF is 0x7F or 0xFF, the data is manufacturer specific. If the VIF is 0x7C/0xFC, a custom string is used for the VIF, which can be found in the text variable.
VIFE : ARRAY [1..10] OF USINT VIF Extension, indicates the type of value the record contains, e.g. the unit and multiplier, if the extension bit is set in the VIF. If the extension bit is set in VIFE[n], VIFE[n+1] is valid.
text : STRING String describing the unit and multiplier. If VIF is 0x7C, this was sent from the slave, otherwise this is the result of a table lookup, which does not know all the manufacturer specific values.
func : SINT The type of value.
device : INT Index of the sub device the record belongs to.
tariff : DINT The tariff value for the record.
storage : DINT The storage value for the record (lower 32 bits).
storage_upper : UINT The storage value for the record (upper 9 bits, will normally be 0).
ready : BOOL TRUE if the information is available, FALSE if not.
Declaration: FUNCTION_BLOCK mbusRecordGetInfo;
Example: INCLUDE rtcu.inc
|