Forum Home › Forums › Communicating with Devices › Modbus › Modbus Byte Order
- This topic has 11 replies, 2 voices, and was last updated 7 years, 11 months ago by Mikhail.
-
AuthorPosts
-
April 19, 2016 at 11:11 pm #983C_DParticipant
I am currently trialing RapidSCADA for an energy metering system. I have successfully achieved communication with my modbus devices (Carlo Gavazzi CPT-DIN), however I am having trouble with the byte order.
I am receiving correct data from my devices as seen in the Communication Line Log:
2016-04-20 11:03:36 Communication session with the Device 11 "Power Monitor TR1", type: KpModbus, address: 9 Request element group "Voltage" Send (8): 09 04 00 00 00 0C F1 47 Receive (5/5): 09 04 18 65 6A Receive (24/24): 43 69 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6E CB OK!
The data is a 32 bit IEEE754 floating point number, with a byte order of ‘2301’. So from the example above 0x656A4369 = 233.3961V which is correct.
My problem is that I have 5 of these meters on the same bus, all using the same Device Template, all are communicating correctly BUT when you view the Device Data only the first meter is correctly decoded to show the floating point value, the 4 other meters all read junk such as -2,141,637,779,120,980,000,000,000,000,000.000 which looks like the value has been decoded incorrectly.
Since they all use the same Device Template I don’t see what I could have done wrong. Is this a bug?
April 20, 2016 at 7:26 am #984MikhailModeratorYou right that the reason of the issue is incorrect decoding. I don’t think that it is a bug. Most likely the responses are differ.
Please, post a part of communication log where the response is decoded incorrectly.April 20, 2016 at 7:38 am #985MikhailModeratorI’ve found IEEE754 calculator: http://www.h-schmidt.net/FloatConverter/IEEE754.html
It may help.April 20, 2016 at 8:25 pm #989C_DParticipantMikhail,
I have been using that calculator already to check my data. Here is a full communication log for all my sensors. One is not configured at the moment so it skips over it.
Device 11 – TR1: this is correct.
Device 21 – TR2-L: this is wrong.
Device 22 – TR2-R: this is not configured.
Device 31 – TR3-L: this is wrong.
Device 32 – TR3-R: this is wrong.2016-04-20 07:24:10 Communication session with the Device 11 "Power Monitor TR1", type: KpModbus, address: 9 Request element group "Voltage" Send (8): 09 04 00 00 00 0C F1 47 Receive (5/5): 09 04 18 4D 0D Receive (24/24): 43 66 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 27 89 OK! Request element group "Current" Send (8): 09 04 00 0C 00 08 30 87 Receive (5/5): 09 04 10 00 00 Receive (16/16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 B7 4D OK! Request element group "Real Power (W)" Send (8): 09 04 00 14 00 06 31 44 Receive (5/5): 09 04 0C 00 00 Receive (12/12): 00 00 00 00 00 00 00 00 00 00 9D B1 OK! Request element group "Apparent Power (VA)" Send (8): 09 04 00 1A 00 06 50 87 Receive (5/5): 09 04 0C 00 00 Receive (12/12): 00 00 00 00 00 00 00 00 00 00 9D B1 OK! Request element group "VAR" Send (8): 09 04 00 20 00 06 70 8A Receive (5/5): 09 04 0C 00 00 Receive (12/12): 80 00 00 00 80 00 00 00 80 00 E4 59 OK! Request element group "Phase Sequence" Send (8): 09 04 00 26 00 02 91 48 Receive (5/5): 09 04 04 00 00 Receive (4/4): 3F 80 62 14 OK! Request element group "Power Factor" Send (8): 09 04 00 28 00 06 F1 48 Receive (5/5): 09 04 0C 00 00 Receive (12/12): 3F 80 00 00 3F 80 00 00 3F 80 D8 39 OK! Request element group "Sums" Send (8): 09 04 00 2E 00 0C 91 4E Receive (5/5): 09 04 18 5C 07 Receive (24/24): 43 66 5C 07 43 66 00 00 00 00 00 00 00 00 00 00 80 00 00 00 3F 80 01 0C OK! Request element group "Frequency" Send (8): 09 04 00 3A 00 02 50 8E Receive (5/5): 09 04 04 29 01 Receive (4/4): 42 48 1B 4E OK! Request element group "Asymmetry" Send (8): 09 04 00 3C 00 04 30 8D Receive (5/5): 09 04 08 00 00 Receive (8/8): 42 C8 00 00 00 00 E0 9F OK! Request element group "Demand" Send (8): 09 04 00 40 00 16 71 58 Receive (5/5): 09 84 03 82 C3 Device error: [03] ILLEGAL DATA VALUE! Request element group "Demand" Send (8): 09 04 00 40 00 16 71 58 Receive (5/5): 09 84 03 82 C3 Device error: [03] ILLEGAL DATA VALUE! Request element group "Demand" Send (8): 09 04 00 40 00 16 71 58 Receive (5/5): 09 84 03 82 C3 Device error: [03] ILLEGAL DATA VALUE! 2016-04-20 07:24:13 Communication session with the Device 21 "Power Monitor TR2 Left", type: KpModbus, address: 7 Request element group "Voltage" Send (8): 07 04 00 00 00 0C F0 69 Receive (5/5): 07 04 18 E7 AC Receive (24/24): 43 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 75 C5 OK! Request element group "Current" Send (8): 07 04 00 0C 00 08 31 A9 Receive (5/5): 07 04 10 28 C8 Receive (16/16): 40 08 00 00 00 00 00 00 00 00 9E FB 40 07 7B 3F OK! Request element group "Real Power (W)" Send (8): 07 04 00 14 00 06 30 6A Receive (5/5): 07 04 0C 26 7A Receive (12/12): 43 EC 00 00 00 00 00 00 00 00 7F 04 OK! Request element group "Apparent Power (VA)" Send (8): 07 04 00 1A 00 06 51 A9 Receive (5/5): 07 04 0C F1 33 Receive (12/12): 43 F4 00 00 00 00 00 00 00 00 99 2C OK! Request element group "VAR" Send (8): 07 04 00 20 00 06 71 A4 Receive (5/5): 07 04 0C 40 4A Receive (12/12): 42 FA 00 00 80 00 00 00 80 00 C1 29 OK! Request element group "Phase Sequence" Send (8): 07 04 00 26 00 02 90 66 Receive (5/5): 07 04 04 00 00 Receive (4/4): 3F 80 8D D4 OK! Request element group "Power Factor" Send (8): 07 04 00 28 00 06 F0 66 Receive (5/5): 07 04 0C A6 0C Receive (12/12): 3F 77 00 00 3F 80 00 00 3F 80 C0 90 OK! Request element group "Sums" Send (8): 07 04 00 2E 00 0C 90 60 Receive (5/5): 07 04 18 CA 72 Receive (24/24): 43 65 CA 72 43 65 F7 85 43 F0 DF 12 43 F8 E5 D8 42 F8 DE 7D 3F 77 97 A7 OK! Request element group "Frequency" Send (8): 07 04 00 3A 00 02 51 A0 Receive (5/5): 07 04 04 0F 61 Receive (4/4): 42 48 FF D8 OK! Request element group "Asymmetry" Send (8): 07 04 00 3C 00 04 31 A3 Receive (5/5): 07 04 08 00 00 Receive (8/8): 42 C8 00 00 00 00 D4 77 OK! Request element group "Demand" Send (8): 07 04 00 40 00 16 70 76 Receive (5/5): 07 84 03 E3 00 Device error: [03] ILLEGAL DATA VALUE! Request element group "Demand" Send (8): 07 04 00 40 00 16 70 76 Receive (5/5): 07 84 03 E3 00 Device error: [03] ILLEGAL DATA VALUE! Request element group "Demand" Send (8): 07 04 00 40 00 16 70 76 Receive (5/5): 07 84 03 E3 00 Device error: [03] ILLEGAL DATA VALUE! 2016-04-20 07:24:17 Communication session with the Device 22 "Power Monitor TR2 Right", type: KpModbus, address: 8 Normal device communication is impossible because device template has not been loaded 2016-04-20 07:24:17 Communication session with the Device 31 "Power Monitor TR3 Left", type: KpModbus, address: 10 Request element group "Voltage" Send (8): 0A 04 00 00 00 0C F1 74 Receive (5/5): 0A 04 18 8C 76 Receive (24/24): 43 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4D B4 OK! Request element group "Current" Send (8): 0A 04 00 0C 00 08 30 B4 Receive (5/5): 0A 04 10 00 00 Receive (16/16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F3 09 OK! Request element group "Real Power (W)" Send (8): 0A 04 00 14 00 06 31 77 Receive (5/5): 0A 04 0C 00 00 Receive (12/12): 00 00 00 00 00 00 00 00 00 00 DE B0 OK! Request element group "Apparent Power (VA)" Send (8): 0A 04 00 1A 00 06 50 B4 Receive (5/5): 0A 04 0C 00 00 Receive (12/12): 00 00 00 00 00 00 00 00 00 00 DE B0 OK! Request element group "VAR" Send (8): 0A 04 00 20 00 06 70 B9 Receive (5/5): 0A 04 0C 00 00 Receive (12/12): 00 00 00 00 80 00 00 00 80 00 A0 B0 OK! Request element group "Phase Sequence" Send (8): 0A 04 00 26 00 02 91 7B Receive (5/5): 0A 04 04 00 00 Receive (4/4): BF 80 30 D4 OK! Request element group "Power Factor" Send (8): 0A 04 00 28 00 06 F1 7B Receive (5/5): 0A 04 0C 00 00 Receive (12/12): 3F 80 00 00 3F 80 00 00 3F 80 9B 38 OK! Request element group "Sums" Send (8): 0A 04 00 2E 00 0C 91 7D Receive (5/5): 0A 04 18 74 F8 Receive (24/24): 43 65 74 F8 43 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3F 80 EA 97 OK! Request element group "Frequency" Send (8): 0A 04 00 3A 00 02 50 BD Receive (5/5): 0A 04 04 F0 A8 Receive (4/4): 42 47 83 36 OK! Request element group "Asymmetry" Send (8): 0A 04 00 3C 00 04 30 BE Receive (5/5): 0A 04 08 00 00 Receive (8/8): 42 C8 00 00 00 00 EF DB OK! Request element group "Demand" Send (8): 0A 04 00 40 00 16 71 6B Receive (5/5): 0A 84 03 72 C3 Device error: [03] ILLEGAL DATA VALUE! Request element group "Demand" Send (8): 0A 04 00 40 00 16 71 6B Receive (5/5): 0A 84 03 72 C3 Device error: [03] ILLEGAL DATA VALUE! Request element group "Demand" Send (8): 0A 04 00 40 00 16 71 6B Receive (5/5): 0A 84 03 72 C3 Device error: [03] ILLEGAL DATA VALUE! 2016-04-20 07:24:21 Communication session with the Device 32 "Power Monitor TR3 Right", type: KpModbus, address: 11 Request element group "Voltage" Send (8): 0B 04 00 00 00 0C F0 A5 Receive (5/5): 0B 04 18 9C 1B Receive (24/24): 43 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 40 OK! Request element group "Current" Send (8): 0B 04 00 0C 00 08 31 65 Receive (5/5): 0B 04 10 07 A0 Receive (16/16): 41 00 00 00 00 00 00 00 00 00 19 AA 41 00 7A D2 OK! Request element group "Real Power (W)" Send (8): 0B 04 00 14 00 06 30 A6 Receive (5/5): 0B 04 0C C2 73 Receive (12/12): 44 E5 00 00 00 00 00 00 00 00 F5 26 OK! Request element group "Apparent Power (VA)" Send (8): 0B 04 00 1A 00 06 51 65 Receive (5/5): 0B 04 0C D9 78 Receive (12/12): 44 E5 00 00 00 00 00 00 00 00 F4 26 OK! Request element group "VAR" Send (8): 0B 04 00 20 00 06 71 68 Receive (5/5): 0B 04 0C C4 56 Receive (12/12): 41 91 00 00 80 00 00 00 80 00 7E 30 OK! Request element group "Phase Sequence" Send (8): 0B 04 00 26 00 02 90 AA Receive (5/5): 0B 04 04 00 00 Receive (4/4): BF 80 20 14 OK! Request element group "Power Factor" Send (8): 0B 04 00 28 00 06 F0 AA Receive (5/5): 0B 04 0C FD 38 Receive (12/12): 3F 7F 00 00 3F 80 00 00 3F 80 64 7E OK! Request element group "Sums" Send (8): 0B 04 00 2E 00 0C 90 AC Receive (5/5): 0B 04 18 F4 CA Receive (24/24): 43 65 F4 CA 43 65 1A AE 44 E6 1D 2B 44 E6 0E 38 41 87 FD 3B 3F 7F 82 CD OK! Request element group "Frequency" Send (8): 0B 04 00 3A 00 02 51 6C Receive (5/5): 0B 04 04 E3 DE Receive (4/4): 42 47 76 A8 OK! Request element group "Asymmetry" Send (8): 0B 04 00 3C 00 04 31 6F Receive (5/5): 0B 04 08 00 00 Receive (8/8): 42 C8 00 00 00 00 EB 27 OK! Request element group "Demand" Send (8): 0B 04 00 40 00 16 70 BA Receive (5/5): 0B 84 03 23 03 Device error: [03] ILLEGAL DATA VALUE! Request element group "Demand" Send (8): 0B 04 00 40 00 16 70 BA Receive (5/5): 0B 84 03 23 03 Device error: [03] ILLEGAL DATA VALUE! Request element group "Demand" Send (8): 0B 04 00 40 00 16 70 BA Receive (5/5): 0B 84 03 23 03 Device error: [03] ILLEGAL DATA VALUE!
And here are the matching printouts:
Device 11 "Power Monitor TR1" ----------------------------- DLL : KpModbus State : error Comm. session : 20/04/2016 07:26:29 Command : time is undefined Comm. sessions (total / errors) : 4749 / 4749 Commands (total / errors) : 0 / 0 Requests (total / errors) : 61737 / 14247 Current device tags data +--------+---------------------+---------+---------+ | Signal | Name | Value | Channel | +--------+---------------------+---------+---------+ | ******** Voltage ******************************* | +--------+---------------------+---------+---------+ | 1 | V L1-N | 231.481 | 61 | +--------+---------------------+---------+---------+ | 2 | V L2-N | 0.000 | 62 | +--------+---------------------+---------+---------+ | 3 | V L3-N | 0.000 | 63 | +--------+---------------------+---------+---------+ | 4 | V L1-L2 | 0.000 | 64 | +--------+---------------------+---------+---------+ | 5 | V L2-L3 | 0.000 | 65 | +--------+---------------------+---------+---------+ | 6 | V L3-L1 | 0.000 | 66 | +--------+---------------------+---------+---------+ | ******** Current ******************************* | +--------+---------------------+---------+---------+ | 7 | A L1 | 0.000 | 67 | +--------+---------------------+---------+---------+ | 8 | A L2 | 0.000 | 68 | +--------+---------------------+---------+---------+ | 9 | A L3 | 0.000 | 69 | +--------+---------------------+---------+---------+ | 10 | A N | 0.000 | 70 | +--------+---------------------+---------+---------+ | ******** Real Power (W) ************************ | +--------+---------------------+---------+---------+ | 11 | W L1 | 0.000 | 71 | +--------+---------------------+---------+---------+ | 12 | W L2 | 0.000 | 72 | +--------+---------------------+---------+---------+ | 13 | W L3 | 0.000 | 73 | +--------+---------------------+---------+---------+ | ******** Apparent Power (VA) ******************* | +--------+---------------------+---------+---------+ | 14 | VA L1 | 0.000 | 74 | +--------+---------------------+---------+---------+ | 15 | VA L2 | 0.000 | 75 | +--------+---------------------+---------+---------+ | 16 | VA L3 | 0.000 | 76 | +--------+---------------------+---------+---------+ | ******** VAR *********************************** | +--------+---------------------+---------+---------+ | 17 | VAR L1 | 0.000 | 77 | +--------+---------------------+---------+---------+ | 18 | VAR L2 | 0.000 | 78 | +--------+---------------------+---------+---------+ | 19 | VAR L3 | 0.000 | 79 | +--------+---------------------+---------+---------+ | ******** Phase Sequence ************************ | +--------+---------------------+---------+---------+ | 20 | Phase Sequence | 1.000 | 80 | +--------+---------------------+---------+---------+ | ******** Power Factor ************************** | +--------+---------------------+---------+---------+ | 21 | PF L1 | 1.000 | 81 | +--------+---------------------+---------+---------+ | 22 | PF L2 | 1.000 | 82 | +--------+---------------------+---------+---------+ | 23 | PF L3 | 1.000 | 83 | +--------+---------------------+---------+---------+ | ******** Sums ********************************** | +--------+---------------------+---------+---------+ | 24 | V L-N sum | 231.048 | 84 | +--------+---------------------+---------+---------+ | 25 | V L-L sum | 231.048 | 85 | +--------+---------------------+---------+---------+ | 26 | W sum | 0.000 | 86 | +--------+---------------------+---------+---------+ | 27 | VA sum | 0.000 | 87 | +--------+---------------------+---------+---------+ | 28 | VAR sum | 0.000 | 88 | +--------+---------------------+---------+---------+ | 29 | PF sum | 1.000 | 89 | +--------+---------------------+---------+---------+ | ******** Frequency ***************************** | +--------+---------------------+---------+---------+ | 30 | Hz | 49.990 | 90 | +--------+---------------------+---------+---------+ | ******** Asymmetry ***************************** | +--------+---------------------+---------+---------+ | 31 | Asymmetry L-N (%) | 100.000 | 91 | +--------+---------------------+---------+---------+ | 32 | Asymmetry L-L (%) | 0.000 | 92 | +--------+---------------------+---------+---------+ | ******** Demand ******************************** | +--------+---------------------+---------+---------+ | 33 | A L1 dmd | --- | 93 | +--------+---------------------+---------+---------+ | 34 | A L2 dmd | --- | 94 | +--------+---------------------+---------+---------+ | 35 | A L3 dmd | --- | 95 | +--------+---------------------+---------+---------+ | 36 | W L1 dmd | --- | 96 | +--------+---------------------+---------+---------+ | 37 | W L2 dmd | --- | 97 | +--------+---------------------+---------+---------+ | 38 | W L3 dmd | --- | 98 | +--------+---------------------+---------+---------+ | 39 | VA L1 dmd | --- | 99 | +--------+---------------------+---------+---------+ | 40 | VA L2 dmd | --- | 100 | +--------+---------------------+---------+---------+ | 41 | VA L3 dmd | --- | 101 | +--------+---------------------+---------+---------+ | 42 | W dmd | --- | 102 | +--------+---------------------+---------+---------+ | 43 | VA dmd | --- | 103 | +--------+---------------------+---------+---------+ | ******** Total Energy ************************** | +--------+---------------------+---------+---------+ | 44 | kWh tot. | --- | 104 | +--------+---------------------+---------+---------+ | 45 | KVARh tot. | --- | 105 | +--------+---------------------+---------+---------+ | 46 | KWh par. | --- | 106 | +--------+---------------------+---------+---------+ | 47 | KVARh par. | --- | 107 | +--------+---------------------+---------+---------+ | ******** Hours ********************************* | +--------+---------------------+---------+---------+ | 48 | Hours | --- | 108 | +--------+---------------------+---------+---------+ No archive data No events
Device 21 "Power Monitor TR2 Left" ---------------------------------- DLL : KpModbus State : error Comm. session : 20/04/2016 07:26:48 Command : time is undefined Comm. sessions (total / errors) : 4750 / 4750 Commands (total / errors) : 0 / 0 Requests (total / errors) : 61750 / 14250 Current device tags data +--------+---------------------+---------------------------------------------------------+---------+ | Signal | Name | Value | Channel | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Voltage ******************************************************************************* | +--------+---------------------+---------------------------------------------------------+---------+ | 1 | V L1-N | 0.042 | 121 | +--------+---------------------+---------------------------------------------------------+---------+ | 2 | V L2-N | 0.000 | 122 | +--------+---------------------+---------------------------------------------------------+---------+ | 3 | V L3-N | 0.000 | 123 | +--------+---------------------+---------------------------------------------------------+---------+ | 4 | V L1-L2 | 0.000 | 124 | +--------+---------------------+---------------------------------------------------------+---------+ | 5 | V L2-L3 | 0.000 | 125 | +--------+---------------------+---------------------------------------------------------+---------+ | 6 | V L3-L1 | 0.000 | 126 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Current ******************************************************************************* | +--------+---------------------+---------------------------------------------------------+---------+ | 7 | A L1 | 0.000 | 127 | +--------+---------------------+---------------------------------------------------------+---------+ | 8 | A L2 | 0.000 | 128 | +--------+---------------------+---------------------------------------------------------+---------+ | 9 | A L3 | 0.000 | 129 | +--------+---------------------+---------------------------------------------------------+---------+ | 10 | A N | -7,189,566,586,880.000 | 130 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Real Power (W) ************************************************************************ | +--------+---------------------+---------------------------------------------------------+---------+ | 11 | W L1 | 26,635,203,039,483,000,000,000,000.000 | 131 | +--------+---------------------+---------------------------------------------------------+---------+ | 12 | W L2 | 0.000 | 132 | +--------+---------------------+---------------------------------------------------------+---------+ | 13 | W L3 | 0.000 | 133 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Apparent Power (VA) ******************************************************************* | +--------+---------------------+---------------------------------------------------------+---------+ | 14 | VA L1 | 0.000 | 134 | +--------+---------------------+---------------------------------------------------------+---------+ | 15 | VA L2 | 0.000 | 135 | +--------+---------------------+---------------------------------------------------------+---------+ | 16 | VA L3 | 0.000 | 136 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** VAR *********************************************************************************** | +--------+---------------------+---------------------------------------------------------+---------+ | 17 | VAR L1 | 0.008 | 137 | +--------+---------------------+---------------------------------------------------------+---------+ | 18 | VAR L2 | 0.000 | 138 | +--------+---------------------+---------------------------------------------------------+---------+ | 19 | VAR L3 | 0.000 | 139 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Phase Sequence ************************************************************************ | +--------+---------------------+---------------------------------------------------------+---------+ | 20 | Phase Sequence | 0.000 | 140 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Power Factor ************************************************************************** | +--------+---------------------+---------------------------------------------------------+---------+ | 21 | PF L1 | 0.000 | 141 | +--------+---------------------+---------------------------------------------------------+---------+ | 22 | PF L2 | 0.000 | 142 | +--------+---------------------+---------------------------------------------------------+---------+ | 23 | PF L3 | 0.000 | 143 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Sums ********************************************************************************** | +--------+---------------------+---------------------------------------------------------+---------+ | 24 | V L-N sum | 19,765,344,256.000 | 144 | +--------+---------------------+---------------------------------------------------------+---------+ | 25 | V L-L sum | 19,765,344,256.000 | 145 | +--------+---------------------+---------------------------------------------------------+---------+ | 26 | W sum | -355,590,926,015,742,000,000,000,000,000,000.000 | 146 | +--------+---------------------+---------------------------------------------------------+---------+ | 27 | VA sum | -842,918,920,192.000 | 147 | +--------+---------------------+---------------------------------------------------------+---------+ | 28 | VAR sum | 0.000 | 148 | +--------+---------------------+---------------------------------------------------------+---------+ | 29 | PF sum | -362,275,424.000 | 149 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Frequency ***************************************************************************** | +--------+---------------------+---------------------------------------------------------+---------+ | 30 | Hz | -20,292,235,163,454,000,000,000,000,000,000,000,000.000 | 150 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Asymmetry ***************************************************************************** | +--------+---------------------+---------------------------------------------------------+---------+ | 31 | Asymmetry L-N (%) | 0.000 | 151 | +--------+---------------------+---------------------------------------------------------+---------+ | 32 | Asymmetry L-L (%) | 0.000 | 152 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Demand ******************************************************************************** | +--------+---------------------+---------------------------------------------------------+---------+ | 33 | A L1 dmd | --- | 153 | +--------+---------------------+---------------------------------------------------------+---------+ | 34 | A L2 dmd | --- | 154 | +--------+---------------------+---------------------------------------------------------+---------+ | 35 | A L3 dmd | --- | 155 | +--------+---------------------+---------------------------------------------------------+---------+ | 36 | W L1 dmd | --- | 156 | +--------+---------------------+---------------------------------------------------------+---------+ | 37 | W L2 dmd | --- | 157 | +--------+---------------------+---------------------------------------------------------+---------+ | 38 | W L3 dmd | --- | 158 | +--------+---------------------+---------------------------------------------------------+---------+ | 39 | VA L1 dmd | --- | 159 | +--------+---------------------+---------------------------------------------------------+---------+ | 40 | VA L2 dmd | --- | 160 | +--------+---------------------+---------------------------------------------------------+---------+ | 41 | VA L3 dmd | --- | 161 | +--------+---------------------+---------------------------------------------------------+---------+ | 42 | W dmd | --- | 162 | +--------+---------------------+---------------------------------------------------------+---------+ | 43 | VA dmd | --- | 163 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Total Energy ************************************************************************** | +--------+---------------------+---------------------------------------------------------+---------+ | 44 | kWh tot. | --- | 164 | +--------+---------------------+---------------------------------------------------------+---------+ | 45 | KVARh tot. | --- | 165 | +--------+---------------------+---------------------------------------------------------+---------+ | 46 | KWh par. | --- | 166 | +--------+---------------------+---------------------------------------------------------+---------+ | 47 | KVARh par. | --- | 167 | +--------+---------------------+---------------------------------------------------------+---------+ | ******** Hours ********************************************************************************* | +--------+---------------------+---------------------------------------------------------+---------+ | 48 | Hours | --- | 168 | +--------+---------------------+---------------------------------------------------------+---------+ No archive data No events
Device 22 "Power Monitor TR2 Right" ----------------------------------- DLL : KpModbus State : error Comm. session : 20/04/2016 07:26:52 Command : time is undefined Comm. sessions (total / errors) : 4750 / 4750 Commands (total / errors) : 0 / 0 Requests (total / errors) : 0 / 0 No device tags No archive data No events
Device 31 "Power Monitor TR3 Left" ---------------------------------- DLL : KpModbus State : error Comm. session : 20/04/2016 07:27:08 Command : time is undefined Comm. sessions (total / errors) : 4751 / 4751 Commands (total / errors) : 0 / 0 Requests (total / errors) : 61763 / 14253 Current device tags data +--------+---------------------+-------+---------+ | Signal | Name | Value | Channel | +--------+---------------------+-------+---------+ | ******** Voltage ***************************** | +--------+---------------------+-------+---------+ | 1 | V L1-N | 0.001 | 181 | +--------+---------------------+-------+---------+ | 2 | V L2-N | 0.000 | 182 | +--------+---------------------+-------+---------+ | 3 | V L3-N | 0.000 | 183 | +--------+---------------------+-------+---------+ | 4 | V L1-L2 | 0.000 | 184 | +--------+---------------------+-------+---------+ | 5 | V L2-L3 | 0.000 | 185 | +--------+---------------------+-------+---------+ | 6 | V L3-L1 | 0.000 | 186 | +--------+---------------------+-------+---------+ | ******** Current ***************************** | +--------+---------------------+-------+---------+ | 7 | A L1 | 0.000 | 187 | +--------+---------------------+-------+---------+ | 8 | A L2 | 0.000 | 188 | +--------+---------------------+-------+---------+ | 9 | A L3 | 0.000 | 189 | +--------+---------------------+-------+---------+ | 10 | A N | 0.000 | 190 | +--------+---------------------+-------+---------+ | ******** Real Power (W) ********************** | +--------+---------------------+-------+---------+ | 11 | W L1 | 0.000 | 191 | +--------+---------------------+-------+---------+ | 12 | W L2 | 0.000 | 192 | +--------+---------------------+-------+---------+ | 13 | W L3 | 0.000 | 193 | +--------+---------------------+-------+---------+ | ******** Apparent Power (VA) ***************** | +--------+---------------------+-------+---------+ | 14 | VA L1 | 0.000 | 194 | +--------+---------------------+-------+---------+ | 15 | VA L2 | 0.000 | 195 | +--------+---------------------+-------+---------+ | 16 | VA L3 | 0.000 | 196 | +--------+---------------------+-------+---------+ | ******** VAR ********************************* | +--------+---------------------+-------+---------+ | 17 | VAR L1 | 0.000 | 197 | +--------+---------------------+-------+---------+ | 18 | VAR L2 | 0.000 | 198 | +--------+---------------------+-------+---------+ | 19 | VAR L3 | 0.000 | 199 | +--------+---------------------+-------+---------+ | ******** Phase Sequence ********************** | +--------+---------------------+-------+---------+ | 20 | Phase Sequence | 0.000 | 200 | +--------+---------------------+-------+---------+ | ******** Power Factor ************************ | +--------+---------------------+-------+---------+ | 21 | PF L1 | 0.000 | 201 | +--------+---------------------+-------+---------+ | 22 | PF L2 | 0.000 | 202 | +--------+---------------------+-------+---------+ | 23 | PF L3 | 0.000 | 203 | +--------+---------------------+-------+---------+ | ******** Sums ******************************** | +--------+---------------------+-------+---------+ | 24 | V L-N sum | 0.000 | 204 | +--------+---------------------+-------+---------+ | 25 | V L-L sum | 0.000 | 205 | +--------+---------------------+-------+---------+ | 26 | W sum | 0.000 | 206 | +--------+---------------------+-------+---------+ | 27 | VA sum | 0.000 | 207 | +--------+---------------------+-------+---------+ | 28 | VAR sum | 0.000 | 208 | +--------+---------------------+-------+---------+ | 29 | PF sum | 0.000 | 209 | +--------+---------------------+-------+---------+ | ******** Frequency *************************** | +--------+---------------------+-------+---------+ | 30 | Hz | 0.000 | 210 | +--------+---------------------+-------+---------+ | ******** Asymmetry *************************** | +--------+---------------------+-------+---------+ | 31 | Asymmetry L-N (%) | 0.000 | 211 | +--------+---------------------+-------+---------+ | 32 | Asymmetry L-L (%) | 0.000 | 212 | +--------+---------------------+-------+---------+ | ******** Demand ****************************** | +--------+---------------------+-------+---------+ | 33 | A L1 dmd | --- | 213 | +--------+---------------------+-------+---------+ | 34 | A L2 dmd | --- | 214 | +--------+---------------------+-------+---------+ | 35 | A L3 dmd | --- | 215 | +--------+---------------------+-------+---------+ | 36 | W L1 dmd | --- | 216 | +--------+---------------------+-------+---------+ | 37 | W L2 dmd | --- | 217 | +--------+---------------------+-------+---------+ | 38 | W L3 dmd | --- | 218 | +--------+---------------------+-------+---------+ | 39 | VA L1 dmd | --- | 219 | +--------+---------------------+-------+---------+ | 40 | VA L2 dmd | --- | 220 | +--------+---------------------+-------+---------+ | 41 | VA L3 dmd | --- | 221 | +--------+---------------------+-------+---------+ | 42 | W dmd | --- | 222 | +--------+---------------------+-------+---------+ | 43 | VA dmd | --- | 223 | +--------+---------------------+-------+---------+ | ******** Total Energy ************************ | +--------+---------------------+-------+---------+ | 44 | kWh tot. | --- | 224 | +--------+---------------------+-------+---------+ | 45 | KVARh tot. | --- | 225 | +--------+---------------------+-------+---------+ | 46 | KWh par. | --- | 226 | +--------+---------------------+-------+---------+ | 47 | KVARh par. | --- | 227 | +--------+---------------------+-------+---------+ | ******** Hours ******************************* | +--------+---------------------+-------+---------+ | 48 | Hours | --- | 228 | +--------+---------------------+-------+---------+ No archive data No events
Device 32 "Power Monitor TR3 Right" ----------------------------------- DLL : KpModbus State : error Comm. session : 20/04/2016 07:27:12 Command : time is undefined Comm. sessions (total / errors) : 4751 / 4751 Commands (total / errors) : 0 / 0 Requests (total / errors) : 61763 / 14253 Current device tags data +--------+---------------------+--------------------------------------------------------+---------+ | Signal | Name | Value | Channel | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Voltage ****************************************************************************** | +--------+---------------------+--------------------------------------------------------+---------+ | 1 | V L1-N | -127,659,305,253,422,000,000,000.000 | 241 | +--------+---------------------+--------------------------------------------------------+---------+ | 2 | V L2-N | 0.000 | 242 | +--------+---------------------+--------------------------------------------------------+---------+ | 3 | V L3-N | 0.000 | 243 | +--------+---------------------+--------------------------------------------------------+---------+ | 4 | V L1-L2 | 0.000 | 244 | +--------+---------------------+--------------------------------------------------------+---------+ | 5 | V L2-L3 | 0.000 | 245 | +--------+---------------------+--------------------------------------------------------+---------+ | 6 | V L3-L1 | 0.000 | 246 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Current ****************************************************************************** | +--------+---------------------+--------------------------------------------------------+---------+ | 7 | A L1 | 0.000 | 247 | +--------+---------------------+--------------------------------------------------------+---------+ | 8 | A L2 | 0.000 | 248 | +--------+---------------------+--------------------------------------------------------+---------+ | 9 | A L3 | 0.000 | 249 | +--------+---------------------+--------------------------------------------------------+---------+ | 10 | A N | 0.000 | 250 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Real Power (W) *********************************************************************** | +--------+---------------------+--------------------------------------------------------+---------+ | 11 | W L1 | 0.000 | 251 | +--------+---------------------+--------------------------------------------------------+---------+ | 12 | W L2 | 0.000 | 252 | +--------+---------------------+--------------------------------------------------------+---------+ | 13 | W L3 | 0.000 | 253 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Apparent Power (VA) ****************************************************************** | +--------+---------------------+--------------------------------------------------------+---------+ | 14 | VA L1 | -219,365,394,444,938,000,000.000 | 254 | +--------+---------------------+--------------------------------------------------------+---------+ | 15 | VA L2 | 0.000 | 255 | +--------+---------------------+--------------------------------------------------------+---------+ | 16 | VA L3 | 0.000 | 256 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** VAR ********************************************************************************** | +--------+---------------------+--------------------------------------------------------+---------+ | 17 | VAR L1 | -1,488,065,280,206,370,000,000,000,000,000.000 | 257 | +--------+---------------------+--------------------------------------------------------+---------+ | 18 | VAR L2 | 0.000 | 258 | +--------+---------------------+--------------------------------------------------------+---------+ | 19 | VAR L3 | 0.000 | 259 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Phase Sequence *********************************************************************** | +--------+---------------------+--------------------------------------------------------+---------+ | 20 | Phase Sequence | 0.000 | 260 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Power Factor ************************************************************************* | +--------+---------------------+--------------------------------------------------------+---------+ | 21 | PF L1 | -9,730,282,549,430,550,000,000,000,000,000,000,000.000 | 261 | +--------+---------------------+--------------------------------------------------------+---------+ | 22 | PF L2 | 0.000 | 262 | +--------+---------------------+--------------------------------------------------------+---------+ | 23 | PF L3 | 0.000 | 263 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Sums ********************************************************************************* | +--------+---------------------+--------------------------------------------------------+---------+ | 24 | V L-N sum | -58,516,990,333,482,500,000,000.000 | 264 | +--------+---------------------+--------------------------------------------------------+---------+ | 25 | V L-L sum | -58,516,990,333,482,500,000,000.000 | 265 | +--------+---------------------+--------------------------------------------------------+---------+ | 26 | W sum | 0.000 | 266 | +--------+---------------------+--------------------------------------------------------+---------+ | 27 | VA sum | 0.000 | 267 | +--------+---------------------+--------------------------------------------------------+---------+ | 28 | VAR sum | NaN | 268 | +--------+---------------------+--------------------------------------------------------+---------+ | 29 | PF sum | -9,896,436,048,903,670,000,000,000,000,000,000,000.000 | 269 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Frequency **************************************************************************** | +--------+---------------------+--------------------------------------------------------+---------+ | 30 | Hz | 0.000 | 270 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Asymmetry **************************************************************************** | +--------+---------------------+--------------------------------------------------------+---------+ | 31 | Asymmetry L-N (%) | 0.000 | 271 | +--------+---------------------+--------------------------------------------------------+---------+ | 32 | Asymmetry L-L (%) | 0.000 | 272 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Demand ******************************************************************************* | +--------+---------------------+--------------------------------------------------------+---------+ | 33 | A L1 dmd | --- | 273 | +--------+---------------------+--------------------------------------------------------+---------+ | 34 | A L2 dmd | --- | 274 | +--------+---------------------+--------------------------------------------------------+---------+ | 35 | A L3 dmd | --- | 275 | +--------+---------------------+--------------------------------------------------------+---------+ | 36 | W L1 dmd | --- | 276 | +--------+---------------------+--------------------------------------------------------+---------+ | 37 | W L2 dmd | --- | 277 | +--------+---------------------+--------------------------------------------------------+---------+ | 38 | W L3 dmd | --- | 278 | +--------+---------------------+--------------------------------------------------------+---------+ | 39 | VA L1 dmd | --- | 279 | +--------+---------------------+--------------------------------------------------------+---------+ | 40 | VA L2 dmd | --- | 280 | +--------+---------------------+--------------------------------------------------------+---------+ | 41 | VA L3 dmd | --- | 281 | +--------+---------------------+--------------------------------------------------------+---------+ | 42 | W dmd | --- | 282 | +--------+---------------------+--------------------------------------------------------+---------+ | 43 | VA dmd | --- | 283 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Total Energy ************************************************************************* | +--------+---------------------+--------------------------------------------------------+---------+ | 44 | kWh tot. | --- | 284 | +--------+---------------------+--------------------------------------------------------+---------+ | 45 | KVARh tot. | --- | 285 | +--------+---------------------+--------------------------------------------------------+---------+ | 46 | KWh par. | --- | 286 | +--------+---------------------+--------------------------------------------------------+---------+ | 47 | KVARh par. | --- | 287 | +--------+---------------------+--------------------------------------------------------+---------+ | ******** Hours ******************************************************************************** | +--------+---------------------+--------------------------------------------------------+---------+ | 48 | Hours | --- | 288 | +--------+---------------------+--------------------------------------------------------+---------+ No archive data No events
- This reply was modified 7 years, 11 months ago by C_D.
April 20, 2016 at 8:53 pm #991C_DParticipantJust as a sanity check i will pull some of those numbers out and convert them. This is the first register read from each device (thats a good one to test because it should have a value around 230V).
Unfortunately it looks like my log of the displayed data doesn’t match exactly to the Communication Log, im guessing it updated a few times in between me pasting one and then pasting the next. But you can see the in the Communication Log all the data is reasonable, while in the displayed data all apart from the first device is wrong.
Device 11:
Raw: 4D 0D 43 66
Reordered: 43 66 4D 0D
Converted: 230.30098
Displayed: 231.481Device 21:
Raw: E7 AC 43 65
Reordered: 43 65 E7 AC
Converted: 229.90497
Displayed: 0.042Device 31:
Raw: 8C 76 43 65
Reordered: 43 65 8C 76
Converted: 229.54868
Displayed: 0.001Device 32:
Raw: 9C 1B 43 65
Reordered: 43 65 9C 1B
Converted: 229.60979
Displayed: -127,659,305,253,422,000,000,000.000April 21, 2016 at 5:41 am #994MikhailModeratorI will check today.
April 21, 2016 at 6:01 am #995MikhailModeratorI can’t reproduce the error. Could you set active only one device and only one element group in the template? Then post a part of log and the displaying values as you did.
After polling you should stop Communicator and then look for displayed values to avoid their change.
April 21, 2016 at 10:39 pm #998C_DParticipantIs this what you were after?
You can see data in the messages is correct. The conversion for Device 11 was correct, but for all the others the value has been decoded with the wrong byte order. For the incorrect devices, decoding the message as sent (without reordering the bytes) produces the exact numbers that are displayed.
2016-04-21 09:36:54 Communication session with the Device 21 "Power Monitor TR2 Left", type: KpModbus, address: 7 Request element group "Voltage" Send (8): 07 04 00 00 00 02 71 AD Receive (5/5): 07 04 04 0F F7 Receive (4/4): 43 69 DE 7C OK! 2016-04-21 09:36:54 Communication session with the Device 31 "Power Monitor TR3 Left", type: KpModbus, address: 10 Request element group "Voltage" Send (8): 0A 04 00 00 00 02 70 B0 Receive (5/5): 0A 04 04 CA C4 Receive (4/4): 43 68 0F BF OK! 2016-04-21 09:36:55 Communication session with the Device 32 "Power Monitor TR3 Right", type: KpModbus, address: 11 Request element group "Voltage" Send (8): 0B 04 00 00 00 02 71 61 Receive (5/5): 0B 04 04 5D E8 Receive (4/4): 43 69 33 02 OK! 2016-04-21 09:36:55 Communication session with the Device 11 "Power Monitor TR1", type: KpModbus, address: 9 Request element group "Voltage" Send (8): 09 04 00 00 00 02 70 83 Receive (5/5): 09 04 04 A4 75 Receive (4/4): 43 69 B1 B0 OK!
Device 21 "Power Monitor TR2 Left" ---------------------------------- DLL : KpModbus State : undefined Comm. session : 21/04/2016 09:36:54 Command : time is undefined Comm. sessions (total / errors) : 14 / 0 Commands (total / errors) : 0 / 0 Requests (total / errors) : 14 / 0 Current device tags data +--------+---------+-------+---------+ | Signal | Name | Value | Channel | +--------+---------+-------+---------+ | ******** Voltage ***************** | +--------+---------+-------+---------+ | 1 | V L1-N | 0.000 | 121 | +--------+---------+-------+---------+ Device 31 "Power Monitor TR3 Left" ---------------------------------- DLL : KpModbus State : undefined Comm. session : 21/04/2016 09:36:54 Command : time is undefined Comm. sessions (total / errors) : 14 / 0 Commands (total / errors) : 0 / 0 Requests (total / errors) : 14 / 0 Current device tags data +--------+---------+----------------+---------+ | Signal | Name | Value | Channel | +--------+---------+----------------+---------+ | ******** Voltage ************************** | +--------+---------+----------------+---------+ | 1 | V L1-N | -6,431,156.000 | 181 | +--------+---------+----------------+---------+ Device 32 "Power Monitor TR3 Right" ----------------------------------- DLL : KpModbus State : undefined Comm. session : 21/04/2016 09:36:55 Command : time is undefined Comm. sessions (total / errors) : 14 / 0 Commands (total / errors) : 0 / 0 Requests (total / errors) : 14 / 0 Current device tags data +--------+---------+-------------------------------+---------+ | Signal | Name | Value | Channel | +--------+---------+-------------------------------+---------+ | ******** Voltage ***************************************** | +--------+---------+-------------------------------+---------+ | 1 | V L1-N | 2,092,042,011,119,980,000.000 | 241 | +--------+---------+-------------------------------+---------+ Device 11 "Power Monitor TR1" ----------------------------- DLL : KpModbus State : undefined Comm. session : 21/04/2016 09:36:55 Command : time is undefined Comm. sessions (total / errors) : 15 / 0 Commands (total / errors) : 0 / 0 Requests (total / errors) : 15 / 0 Current device tags data +--------+---------+---------+---------+ | Signal | Name | Value | Channel | +--------+---------+---------+---------+ | ******** Voltage ******************* | +--------+---------+---------+---------+ | 1 | V L1-N | 233.642 | 61 | +--------+---------+---------+---------+
So manually decoding them again:
TR2 Left:
Receive: 0F F7 43 69
Reorder: 43 69 0F F7
Decode: 233.06236
Decode without reorder: 2.4382046E-29 (rounds to 0.000)
Displayed: 0.000TR3 Left:
Receive: CA C4 43 68
Reorder: 43 68 CA C4
Decode: 232.79205
Decode without reorder: -6431156.0
Displayed: -6,431,156.000TR3 Right:
Receive: 5D E8 43 69
Reorder: 43 69 5D E8
Decode: 233.36682
Decode without reorder: 2.09204201E18
Displayed: 2,092,042,011,119,980,000.000TR1:
Receive: A4 75 43 69
Reorder: 43 69 A4 75
Decode: 233.64241
Displayed: 233.642April 21, 2016 at 11:04 pm #1001C_DParticipantIf I remove device 11 (the working one), Device 21 now starts decoding correctly and the others remain incorrect.
It looks very much like the byte order is only being applied to the first device in the list, not all of them. Even though they are all using the same template.
EDIT:
If I create a separate communication line for each Device, I can make each one work correctly on its own. But obviously this doesn’t work when you try and use more than one since they are sharing the same COM port.- This reply was modified 7 years, 11 months ago by C_D.
April 22, 2016 at 7:17 am #1003MikhailModeratorThank you very much for the detailed research.
The fix is ready. Please send a letter to info -a- rapidscada.org, I will send you the fix to try.May 1, 2016 at 9:12 pm #1068C_DParticipantMikhail,
I installed the new version of RapidSCADA this morning and can confirm that this bug is now fixed.
Much appreciated.
May 3, 2016 at 5:52 pm #1073MikhailModeratorThanks for the info.
-
AuthorPosts
- You must be logged in to reply to this topic.