Doc
#
E149701
B-47
B: Modbus Map and Retrieving Logs
Electro
Industries/GaugeTech
The Leader In Power Monitoring and Smart Grid Solutions
Electro
Industries/GaugeTech
The Leader In Power Monitoring and Smart Grid Solutions
000001a0 FF FF FF FF FF FF FF FF 41 4E 00 00 1A 70 19 50 //414E = "AN"
000001b0 18 88 17 78 16 60 15 80 14 98 13 70 12 E0 12 10
000001c0 11 18 10 68 0F 90 0E 90 0E 00 0D 68 0C D8 0C D0
000001d0 0C A8 0C 48 0C 70 0C 68 0C 30 0C 60 0C 98 0D 00
...
waveform_capture[424] // 41 = 'A'
waveform_capture[425] // 4E = 'N'
Processing a Waveform Capture
Once the waveform capture has been created, you can use the waveform capture
byte-map (see tables earlier in this section) to extract the RMS and channel sample
data values desired. Take note that the waveform capture byte-map is in MSB (hi-
byte, lo-byte) form.
The following is an example snippet in which we first parse the waveform capture
header values and then each waveform capture channel block using a predefined
function. (
NOTE:
We assume the channel blocks to be in order in this example, e.g.
AN, IA, BN, IB, CN, IC. These channels can be in any order and it is up to you to check
which channel ID values you are currently processing).
//
HEADER BLOCK PARSING - Get Waveform Capture header values (hi-byte,
lo-byte)
trigger_source = BitConverter.ToUInt16(new byte[2] { waveform_cap-
ture[0], waveform_capture[1] }, 0);
sample_rate = waveform_capture[2];
flags = waveform_capture[3];
...
rms_va = BitConverter.ToUInt16(new byte[2] { waveform_capture[12],
waveform_capture[13] }, 0);
Содержание Shark 200
Страница 1: ...V 1 24 March 15 2018 ...
Страница 2: ...This page intentionally left blank ...