Message format
In the voltage message, a series of voltage values are sent and the oldest one is first.
<Message Id> # <header>,<voltage values>
-
Message Id. 18#
-
Header. Format Number, Meter type, Number of samples, Collection Interval, Scaling Factor
-
Voltage Values. First VA, First VB, First VC, Second VA, Second VB, Second VC, and so on
Format voltage values as integer = floor( Voltage * 10^Scaling factor )
Data size
Message Id: 18# = 3 bytes
Header:
Format Number : 1 byte
Meter type : 2 byte [Max Value possible = 45]
Number of samples : 6 byte [Max Value possible = 172800]
Collection Interval : 6 byte [Max Value possible = 172800]
Scaling Factor : 1 byte [Max Value possible = 5]
Max Header Size = 1 + 2 + 6 + 6 + 1 + 4(Commas) = 20 bytes
Remaining: Payload = 256 - 3 - 20 - 1(comma) = 232 bytes
Payload Capacity Assuming Max Header Size (232 bytes)
-
Assuming Scaling Factor as 5
-
One Voltage value will have max 8 byte (3 digits before decimal point, 5 digits after decimal point)
-
25 samples (single phase. 8 byte + 1 byte(comma) per phase)
-
-
8 samples (for all phases included. 24 bytes + 3 bytes (commas) for 3 phases)
-
Assuming Default Scaling Factor
-
One Voltage value will have max 5 byte (3 digits before decimal point, 2 digits after decimal point)
-
38 samples (single phase. 5byte + 1byte(comma) per phase)
-
-
12 samples (for all phases included. 15 bytes + 3 bytes (comma) for 3 phases)
-
Header Size with default values
-
Format Number: 1 byte
-
Meter type: 1 byte [Default Value = 2]
-
Number of samples: 1 byte [Default Computed Value = 3]
-
Collection Interval: 3 byte [Default Value = 300]
-
Scaling Factor: 1 byte [Default Value = 2]
-
Max Header Size = 1 + 1 + 1 + 3 + 1 + 4(Commas) = 11 bytes
-
Remaining: Payload = 256 - 3 - 11 - 1(comma) = 241 bytes
Payload Capacity Assuming default Header Size (241 bytes)
-
Assuming Default Scaling Factor
-
One Voltage value will have max 5 byte (3 digits before decimal point, 2 digits after decimal point)
-
40 samples (2S meter gives Voltage on Phase A only. 5 byte + 1 byte(comma) per phase)
-
Example
For inputs:
-
Format Number. 0
-
MeterType. 12S Meter
-
Number of Samples. 4
-
Collection Interval. 900 sec
-
Scaling factor. 2
-
First voltage values. VA=240.13, VC=241.69 (As integer: 24013, 24169)
-
Subsequent Voltage values
-
240.99, 241.23
-
241.13, 241.65
-
240.85, 240.94
-
Message:
-
Message Id. 18
-
Header. 0,12,4,900,2
-
Voltage Values. 24013,24169,24099,24123,24113,24165,24085,24094
Sample output:
18#0,12,4,900,2,24013,24169,24099,24123,24113,24165,24085,24094