Home
Modbus COMMUNICATION PROTOCOL USER MANUAL
Contents
1. Srel 402 0a Hardware version 03 04 Convert the read Hex value in Decimal rev 1 00 KRALgroup KRALOrZup 420 602 360 502 http www kralgroup cz 18 Ing Alena amp Ing Leo Rosol 420 602 360 501 4 info kralgroup cz Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 4 aklrpremagas atlas cz KRALCFZU Ing Alna amp Ing F code Register Register description Hex Hex Data meaning COILS Alarm events 01 0000 40 coils Byte 1 voltage out of range UV3 UV2 UV1 UV OV3 OV2 OV1 OV Byte 2 line voltage out of range ICOM RES UV23 UV31 UV12 OV23 OV31 OV12 Byte 3 4 current out of range RES TRES RES RES RES UIN UIS OZ UI UIZ OIN eli Byte 5 frequency out of range RES RES RES r LEGEND UV undervoltage OV overvoltage UI undercurrent Ol overcurrent F frequency out of range COM communication in progress RES reserved bit to 0 NOTE the voltage current and frequency threshold values can change according to the combined coun ter model Please refer to the table shown below PARAMETER THRESHOLDS COUNTER NOMINAL PHASE VOLTAGE LINE VOLTAGE VOLTAGE available only for 2 4 not available for CURRENT FREQUENCY wire model counters 2 wire model counter UV Vnom
2. 00 MEM o NE hr 2 NEC E oc NH EM ouo EM gt Re ME DIE p c e NN hr 7 00000 56 53704 MEN cc NE hr 2 BO ET CIEN EE 2200 NEM EE oz EM 2 4 M gt ST ED eee A T Tn __ 53704 MEM ou NE hes E e NB i vee e EEE E ee E ae B 7 53704 ME cuc NE f _ ae M ty 8 __ a a AULA UTD 22 22 7 0 MEM ou NE BIB Mu TM HI PM 5 NE E EM S __ NC E Mace NC 8 gt kvarh2 L System exported lagging reactive energy 03 04 3 0 1 varh 2 KRALgroup KRALOgrZup 420 602 360 502 http www kralgroup cz Ing Alsa Kulea a Rael 420 602 360 501 gt lt info kralgroup cz 030EM15 Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt 4 aklrpremagas Qatlas cz b Group Ing ELT 44 Ing Revol F code INTEGER not MODBUS paramere Hex ud Register Register Hex Words M U Hex Words M U TARIFF 2 COUNTER VALUES kvarh1 C Phase 1 imported leading reactive energy 03 04 0 1 varh 2 presses emp curi pre e NN __ 2 BETON ane M C I
3. E D EE E gt m EM EM Sco 2 NEC 00 MEN o NB EE os ED ee c HE TA hr 2 NET RET ieee EE oo 2 NEC yee EM oo EM 2 _ EE o EM ee EM oos DM 2 _ o0 MEM oc NE _ TAT RICE 701 MEM o EB here m 7 kVAh2 C System exported leading apparent energy 03 04 3 2 KRALgroup KRALOgrZup 420 602 360 502 http www kralgroup cz Ig Ing Lot Pol 6 420 602 360 501 Er gt Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt aklroremagas atlas cz KRALCFZUD Ing Aisa amp Ing Jon Rosol TERENE Sign INTEGER not MODBUS god Words M U EIE Words M U TARIFF 1 COUNTER VALUES kvarh1 L Phase 1 imported lagging reactive energy 03 04 9 0 1 varh 2 eem 22272 2 2 2120 f GC ERN dom up ce er rir De Eruca es mm M 53704 MEN ccc NE 8 0 MEM 5 NE i Tw __ Panne 53701 BEEN 2 NE __ a ELT C OG
4. 55704 MEN c NN i EMO 2 NEC eM ee oic BB EE alvum ER __ Barrer i vce anim ben E en UBI olv EROGO S 2 __ tuer eee 55704 WENN o1co EN EXC olv _ Rec M Im c NEM a _ E avr HEU _ ENTIRE MI ocs f S 2 NEC 70 MEN ccc BE f 2 NEC ad MEN occ NE cB avr NERO gt __ ES 200022 00 MEM oc BB M olv ER S 2 Pert ere ec De l Msy 570 MEN ccc EE a 2 NEC TARIFF 1 COUNTER VALUES kWh1 Phase 1 imported active energy 03 04 3 2 E a a oo NB EE m 2 BENE 2 RB TENA ooo EN EE SM 8 2 ER NM ERE Mop e 22200 0 A oc NE EE ow __ BRIDE oyo fa ow eee 7 8 au EE OON 2 EE M ie M M E EE 2 SM MEN cc NE EE uw B 2 d pe EU 701 MEE o EB EE oos 2 PNIS UE IR Sy a EE o DN 2 NEC nn MM I EIE T ere ee ae EM oo Ese A 42442 gt NB EE oo _ gt
5. KRALCFZU Ing EDT 44 Ing Leo Host 5 a O gt cc oO ib _ co 222 lt 2 n 9 e Ww Z 5 5 t c NC Modbus COMMUNICATION PROTOCOL for NOVA RS485 MOD BUS for NOVA LAN GATEWAY with changes valid to 30 06 2012 Features and specifications are subject to change USER MANUAL KRALCFZUD Ing Alena amp Ing Leos Rosol 281 970 988 Meinlinova 309 7 4 info kralgroup cz CZ 190 16 Praha 9 Kolod je http www kralgroup cz 602 360 501 2 KRALgroup WARNING Device installation and use must be carried out only by qualified staff Switch off the voltage before device installation The content and the technical specification of this User Manual are subject to change without prior notice They do not represent any contractual obligation LIMITATION OF LIABILITY The Manufacturer reserves the right to modify the software or the software specifications in this manual without previous warning Any copy of this manual in part or in full whether by photocopy or by other means even of electronic nature without the manufacture giving written authorization breaches the terms of copyright and is liable to prosecution It is absolutely forbidden to use the device incl software for different uses other than those for which it has been devised for as inferr
6. _ v ae o NE M AUC ERN pm avr ERN gt ___ 22 222 222222 gt 22 53704 ME cosa NEN 8 OC EM __ E E E occ NE S 22 40 Aa coco NE Tw _ __ ee peer eT ee ee ae ot GC a _ o0 MEN oc BE SAT OC ER gt pec T I cma ee 0 ERN S f AC EN _ TARIFF 2 COUNTER VALUES kWh1 Phase 1 imported active energy 03 04 3 0 1 Wh 2 UL a o EN 8 PUN gt 72 M e E v o1wr EUN 53704 MEN coos NEN o1wr EN gt ee eee oa ME oc NE 7 e er EE Cc v aT wr ED NT MN 0 MEM c NE 2 BE NM 2 o0 MEN css NE A gt a 22222 02 A a coin 8 m ae 53704 BEEN coc NN hrs 2 BEC a IC o0 MEN 55 NE he gt EDI c ree e E M c Vn 5 NE _ c m ee 1 57 NN EE EDEN E ce QUU NE i NEM m hr EDEN 7222 E ouo gt a al x ee el 8 hr x
7. 02 600 bps 03 1200 bps 04 2400 bps 05 4800 bps 06 9600 bps 07 19200 bps 08 38400 bps 09 57600 bps 0A 115200 bps KRALgroup KRALGFZUPp 420 602 360 502 http www kralgroup cz Ing A daa Ine Los Rosol 420 602 360 501 info kral rou 7 lt gt lt aklrpremagas atlas cz 17 Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 b KRALCFZU Ing pr amp Ing INTEGER AT F code Register description H Data meaning Hex Register Hex Words COUNTER amp COMMUNICATION MODULE DATA Partial counters status 03 0517 1 Convert the read Hex value in Binary e g 0003 0000000000000011 Each bit corresponds to the status of a partial counter Oz inactive 1 active 0000000000000011 Start to read bit string following the arrow The first bit corresponds to the status of the first counter in the list 1 kWhz PAR 2 kWhz PAR 3 kVAhZ L PAR 4 kVAhz L PAR 5 kVAhZ C PAR 6 kVAhz C PAR 7 kvarhz L PAR 8 kvarhz L PAR 9 2 PAR 10 kvarhZ C PAR The last six bits of the string are reserved In the example only kWh2 PAR and kWh PAR counters are active COMMUNICATION MODULE DATA Serial number 03 04 10 ASCII chars 00 Reserved 03 04 Firmware release 03 04 Convert the read Hex value in Decimal Aaa
8. 20 UV Vnom 3 20 0 Vnom N3 20 UI Start current value Ist F low 45Hz Ol Full scale value FS F high 65Hz UV 230V 20 UV 400V 20 OV 240V 20 415V 20 KRALgroup KRALGFZUPp 420 602 360 502 http www kralgroup cz he Alsa a deditos 420 602 360 501 gt lt info kralgroup cz 030EM19 Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt 4 aklroremagas atlas cz KRALCFZU Ing ELT 44 Ing Revol 5 2 Writing registers Function code 10 2 T F code Register description Hex COUNTER amp COMMUNICATION MODULE DATA MODBUS address 10 not available for LAN GATEWAY i MODBUS mode 10 MEM LL Communication speed 10 not available for LAN GATEWAY Reel CL Partial counters status 10 NOTE INTEGER Data meaning Register Hex Words 01 F7 00 722 ASCII 01 8N1 RTU 01 300 bps 02 600 bps 03 1200 bps 04 2400 bps 05 4800 bps 06 9600 bps 07 19200 bps 08 38400 bps 09 57600 bps 0A 115200 bps Byte 1 partial counter selection 00 kWh PAR 01 kKWhZ PAR 02 kVAh2 L PAR 03 kVAh2 L PAR 04 kVAh2 C PAR 05 kVAh2 C PAR 06 kvarh2 L PAR 07 kvarhz L PAR 08 kvarh2 C PAR 09 kvarhz C PAR 0A all partial counters Byte 2 partial counter s operation 01 start 02 stop 03 res
9. T 1 29 NB ELM Ice Eee M MI ME IM oso A 2 8 eee Em CDM Ea E 202220020 2222 0 NEN E T amm Een ase c eed o NM Gor nel i onan a 28 NB EM DM 8 E EM o DM CLTC eI __ o E EN Sram EUN o MEN coo NE 24 MD M 34 00 123 CCW 01 321 CW 02 not available in case of 1 phase counter TOTAL COUNTER VALUES kWh1 Phase 1 imported active energy 03 04 3 2 EUROS EUER O 097 cu BEN c5 NN DN 2 EE OM ERUDITUS m _ 8 s NE o TUER Y 2222222 5 cu BEN vo NA E a N UM 2221 EM v 2 BO cu BEN oc NA ER cu MEN oo NN EM o E EM o Uu MEME coc NA Eo BON ENS M EE a TEUER d ao 8 Ot Van rr gt kVAh2 L Phase 2 exported lagging apparent energy 03 04 3 2 M A cu BEN
10. USASCIIE ia etie 8 MODBU TOP m 9 4 COGGS 10 4 1 MODBUS ASCONI RTU 10 MODBUS TOP METTE 11 5 Register Iabl68 siiieessisenornosne irme emus dumubhd dua eas in iniit Rhin 11 5 1 Reading registers Function code 501 03 04 13 5 2 Writing registers Function code 10 20 1 Description MODBUS ASCII RTU is a master slave communication protocol able to sup port up to 247 slaves connected in a bus or a star network The protocol uses a simplex connection on a single line In this way the commu nication messages move on a single line in two opposite directions MODBUS TCP is a variant of the MODBUS family Specifically it covers the use of MODBUS messaging in an Intranet or Internet environment using the TCP IP protocol on a fixed port 502 Master slave messages can be e Reading Function code 01 03 04 the communication is between the master and a single slave It allows to read information about the que ried counter e Writing Function code 10 the communication is between the master and asingle slave It allows to change the counter settings e Broadcast not available for MODBUS TCP the
11. or bytes which can be read with a single command e in ASCII mode 63 registers e in RTU mode 127 registers e in TCP mode 256 bytes El NOTE Highest number of registers which can be programmed with a single command e in ASCII mode 13 registers e in RTU mode 29 registers e in TCP mode 1 register El NOTE The register values are in hex format El NOTE IEEE registers cannot be used in case of MODBUS TCP protocol KRALgroup KRALCFZUM 420 602 360 502 http www kralgroup cz Ing A daa Ing Los Rosol 420 602 360 501 info kral rou 7 lt gt lt aklrpremagas atlas cz 11 Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 KRALCFZU Ing ELT 44 Ing Hoc 030EM12 TABLE HEADER Parameter Programmable data MEANING Measuring parameter to be read If this column is checked the read register value can have positive or negative sign Convert a signed register value as shown in the following instructions The Most Significant Bit MSB indicates the sign as follows O positive 1 negative Negative value example MSB 8020 1000000000100000 32 HEX BIN DEC Description of data which can be sent for a writing command KRALgroup KRALCFZUD 420 602 360 502 http www kralgroup cz Ing Alena o amp Ing Leak Rosol 420 602 360 501 gt info kralgroup cz M
12. 00 High o E querer tee Command successfully sent D 01 Low 4 Exception codes When the module receives a not valid query an error message exception code is sent According to the used MODBUS protocol mode possible exception codes are as follows 4 1 MODBUS ASCII RTU Values contained in Response messages are in hex format Response example in case of MODBUS ASCII RTU 01830131F0 Example Byte Description No of bytes 01 Slave address 1 83 Function code 80 03 1 01 Exception code 1 31 High Error check CRC 2 FO Low Exception codes for MODBUS ASCII RTU are following described 01 ILLEGAL FUNCTION the function code received in the query is notan allowable action 02 ILLEGAL DATA ADDRESS the data address received in the query is not an allowable address i e the combination of register and transfer length is invalid 03 ILLEGAL DATA VALUE a value contained in the query data field is not an allowable value 04 ILLEGAL RESPONSE LENGTH the request would generate a response with size bigger than that available for MODBUS protocol KRALgroup KRALCF ZUD 420 602 360 502 http www kralgroup cz 1 Ing Alena amp Ing Leos Rosol 420 602 360 501 4 info kralgroup cz Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 4 aklrpremagas atlas cz KRALCFZU Ing ELT 44 Ing Hoc 4 2 MOD
13. Error check CRC 2 C1 Low 3 2 MODBUS TCP Values contained both in Request or Response messages are in hex format Query example in case of MODBUS TCP 010000000009011005150001020008 Example Byte Description No of bytes 01 Transaction identifier 1 00 High 00 Low Protocol identifier 4 00 High 00 Low 09 Byte count 1 01 Unit identifier 1 10 Function code 1 05 High 2 22 Starting register 2 15 Low 00 High of words to be written 2 01 Low 02 Data byte counter 1 00 High i eS eem Data for programming 2 08 Low KRALgroup KRALGFZUPp 420 602 360 502 http www kralgroup cz Ing Alena Kurillov 4 Ing Leos Rosol 420 602 360 501 b lt info kralaroup cz 9 Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt 4 aklroremagas atlas cz KRALCFZU Ing ELT 44 Ing Hoc Priklad dotazu v pr pad rezimu MODBUS TCP 010000000006011005150001 Example Byte Description No of bytes 01 Transaction identifier 1 00 High 00 Low E Protocol identifier 4 00 High 00 Low 06 Byte count 1 01 Unit identifier 1 10 Function code 1 05 High MEME EOD eov Starting register 2 15 Low
14. in hex format Query example in case of MODBUS TCP 010000000006010400020002 Example Byte Description No of bytes 01 Transaction identifier 1 00 High 00 Low MM Protocol identifier 4 00 High 00 Low 06 Byte count 1 01 Unit identifier 1 04 Function code 1 00 High MEME 09QQoQ0Qunooes d Starting register 2 02 Low 00 High MEN lt of words to be read 2 02 Low KRALgroup 420 602 360 502 http www kralgroup cz Ing Alena amp Ing Leos Rosol 420 602 360 501 4 info kralgroup cz Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 4 aklrpremagas atlas cz KRALCFZU Ing ELT 44 Ing Hoc ir Response example in case of MODBUS TCP 01000000000701040400035571 Example Byte Description No of bytes 01 Transaction identifier 1 00 High 00 Low Protocol identifier 4 00 High 00 Low 07 Byte count 1 01 Unit identifier 1 04 Function code 1 04 No of byte of requested data 1 00 High 03 Low Requested data 4 55 High 71 Low 2 3 Floating point as per IEEE Standard not available for MODBUS TCP The basic format allows a IEEE standard floating point number to be represented in a single 32 bit format as shown below N n 1 2 1 f where S is the sign bit i
15. oc NR EM on BIN NAR e NR gt KRALgroup KRALOgrZup 420 602 360 502 http www kralgroup cz Ing Alsa Kulea a Rael 420 602 360 501 gt lt info kralgroup cz 030EM13 Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt aklrpremagas Qatlas cz b KRALCFZUD Ing Aisa amp Ing Jon Rosol F code INTEGER not MODBUS Register Register Hex Words M U Hex Words M U TOTAL COUNTER VALUES kVAh1 C Phase 1 imported leading apparent energy 03 04 9 0 1 VAh 2 roy ey EM M M 8 EE oo m gt EN c2 NB EE oo EM gt A m ea eee occ NE _ 7 NO Ie Thre 2 NE UI _ EE ous m 2 NEC m ee mc 55704 MEN a 700 MEM vau NB E 2 ae va NB E olv 2 NEC 7 MEN cuc BE f Na oo NB E __ 00 MEN vsu BB f an EE gt __ ae inm
16. 8 0x88 0x48 0x49 0x89 Ox4B Ox8B 0x8A Ox4A 0 4 Ox8E Ox8F Ox4F Ox8D Ox4D Ox4C Ox8C 0x44 0x84 0x85 0x45 0x87 0x47 0x46 0x86 0x82 0x42 0x43 0x83 0x41 0x81 0x80 0x40 y unsigned short ModBus CRC16 unsigned char Buffer unsigned short Length unsigned char CRCHi OxFF unsigned char CRCLo OxFF int Index unsigned short ret while Length Idex CRCLo Buffer CRCLo CRCHi CRC Table Hi Index Table Lo Index ret unsigned short CRCHi lt lt 8 ret unsigned short CRCLo return ret j RAL grOUD 420 602 360 502 http www kralgroup cz 4 Ing Alena amp Ing Leos Rosol 420 602 360 501 4 info kralgroup cz Meinlinova 309 2 190 16 Praha 9 Kolod je 420 281970988 01 akirpremagas atlas cz KRALCFZU Ing ELT 44 Ing Lo Host OR CAN BE USED CALCULATED METHOD WITHOUT TABLE ModBus CRC16 Calculatd CRC16 with polynome 0xA001 and init value OXFFFF Input Buffer pointer on data Input Length number byte in buffer Output calculated CRC 16 i cur crc OxFFFF do unsigned inti 8 cur crc Buffer do 0 0001 4 _ cur_crc gt 1 cur crc 0 001 cur crc 2 1 while i while Length return cur Crc 2 Read commands structure The master communication device can send commands to t
17. BUS TCP Values contained in Response messages are in hex format Response example in case of MODBUS TCP 010000000003018302 Example Byte Description No of bytes 01 Transaction identifier 1 7 c ARD Protocol identifier 4 n ME 7 MERE o AMEN 5 VEMEMBB Exception codes for MODBUS are following described 01 ILLEGAL FUNCTION the function code is unknown by the server 02 ILLEGAL DATA ADDRESS the data address received in the query is not an allowable address for the combined counter i e the combination of register and transfer length is invalid 03 ILLEGAL DATA VALUE a value contained in the query data field is not an allowable value for the combined counter 04 SERVER FAILURE the server failed during the execution 05 ACKNOWLEDGE the server accepted the server invocation but the service requires a relatively long time to execute The server therefore returns only an acknowledgement of the service invocation receipt 06 ACKNOWLEDGE the server was unable to accept the MB request PDU The client application has the responsibility of deciding if and when re sending the request 0A GATEWAY PATH UNAVAILABLE the communication module is not configured or cannot communicate 0B GATEWAY TARGET DEVICE FAILED TO RESPOND the counter is not available in the network 5 Register tables El NOTE Highest number of registers
18. C1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC 1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC 1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 OxC 1 0x81 0x40 y table for c
19. Ig Ing Lot Pod 420 602 360 501 Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt aklroremagas atlas cz KRALCFZUD Ing ELT 44 Ing Revol INTEGER c F code Register description H Data meaning Hex Register Word Hex oras COUNTER amp COMMUNICATION MODULE DATA 03 04 5 o eee Model 03 04 1 03 6A 3phases 4wires 06 6A 3phases 3wires 08 80A 3phases 4wires 0A 80A 3phases 3wires 85 D GSQEUE E Firmware release 03 04 Convert the read Hex value in Decimal value Diesen CC CMM C MC E ME e ess mima pep T RM in Decimal value e g 64 100 Te 100 h O aa Reserved 03 04 Tariff in use 03 04 01 tariff 1 KEEN 1 5B NN __ MM Primary secondary value 03 04 00 primary PEN RE Error code 03 04 900 gt PHASE Sequence eror ________ CT value 03 04 0001 2710 en Reserved 03 04 FSA value 03 04 00 1A 01 n l Lu MM Wiring mode 03 01 3 phases 4 wires 3 currents 02 3 phases 3 wires 2 currents MODBUS address 03 04 587 not available for LAN GATEWAY MODBUS mode 03 00 7E2 ASCIl not available for LAN GATEWAY 01 8N1 RTU Communication speed 03 01 300 bps not available for LAN GATEWAY
20. U IS M v E 55704 alor EUM coco NEN T ERN 55704 ia a 2 ERWIN ee 55704 MEN oor NEN CEN alor o7 NN j gt A Um PARTIAL COUNTER VALUES kWh System imported active energy 03 04 9 0 1 Wh 2 Tene DEDE m M AM gt A eee cuoc NN EM oo gt __ EUNDI E E EDEN IM erue cce ETT _8___ 55704 MEI cuoc BEN EE o NEN E E m cuoc NN EM o a iT ae NN _ REDE Fee CE D EE I E cuc NN E olor _ _ MEN ous EE alor 2 BET ee c EE c RES _ 52704 NENNEN ooo EN aan olor gt BALANCE VALUES kWhz System active energy 03 04 X 0 1 Wh ne 6 070000007005 704 NN EE o POM o SITES ee ae EN EE o gt BE NN oar M EE o 8 alc gt ___ KRALgroup KRALOgrZup 420 602 360 502 http www kralgroup cz
21. alculate with polynom 0xA001 with init value OXFFFF Low half word rom unsigned char CRC Table Lo 7 0x00 OxCO OxC1 0x01 OxC3 0x03 0x02 OxC2 OxC6 0x06 0x07 OxC7 0x05 5 OxC4A 0x04 OxCC 0 0 OxOD OxCD OxOF OxCF OxCE OxOE 0x0A OxCB OxOB OxC9 0x09 0x08 0xC8 OxD8 0x18 0x19 0 09 Ox1B OxDB OxDA Ox1A Ox1E OxDE OxDF Ox1F OxDD Ox1D Ox1C OxDC 0x14 0 04 OxD5 0x15 OxD7 0x17 0x16 OxD6 OxD2 0x12 0x13 OxD3 0x11 OxD1 OxDO 0x10 OxFO 0x30 0x31 OxF 1 0x33 OxF3 OxF2 0x32 0x36 OxF6 OxF7 0x37 OxF5 0x35 0x34 OxF4 Ox3C OxFC OxFD Ox3D OxFF Ox3F Ox3E OxFE OxFA Ox3A Ox3B OxFB 0x39 OxF9 OxF8 0x38 0x28 OxE8 OxE9 0x29 OxEB 0x2B 0x2A OxEA OxEE 2 Ox2F OxEF Ox2D OxED OxEC Ox2C OxE4 0x24 0x25 OxE5 0x27 OxE7 OxE6 0x26 0x22 OxE2 0x23 OxE1 0x21 0x20 OxEO 0x60 0x61 OxA1 0x63 OxA3 OxA2 0x62 0x66 6 0xA7 0x67 OxA5 0x65 0x64 4 Ox6C OxAC OxAD Ox6D OxAF Ox6F Ox6E OxAE Ox6A Ox6B OxAB 0x69 9 0xA8 0x68 0x78 OxB8 OxB9 0x79 OxBB Ox7B Ox7A OxBA OxBE Ox7E Ox7F OxBF Ox7D OxBD OxBC Ox7C OxB4 Ox74 0x75 OxB5 0x77 OxB7 OxB6 0x76 0x72 OxB2 0xB3 0x73 OxB1 0x71 0x70 OxBO 0x50 0x90 0x91 0x51 0x93 0x53 0x52 0x92 0x96 0x56 0x57 0x97 0x55 0x95 0x94 0x54 Ox9C Ox5C 0 50 Ox9D Ox5F Ox9F Ox9E Ox5E 0x5A Ox9A Ox9B Ox5B 0x99 0x59 0x58 0x9
22. alue 8 When the CRC is placed into the message its upper and lower bytes must be swapped as described below PLACING THE CRC INTO THE MESSAGE When the 16 bit CRC two 8 bit bytes is transmitted in the message the low order byte will be transmitted first followed by the high order byte For example if the CRC value is 35F7 0011 0101 1111 0111 Data Data Data Data C RC CRE Count lo F7 hi 35 KRALgroup KRALCFZUM 420 602 360 502 http www kralgroup cz Ing A daa Ing Los Rosol 420 602 360 501 info kral rou 7 lt gt lt aklrpremagas atlas cz 030 03 Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 KRALCFZU Ing ELT 44 Ing Hoc TABLE CRC GENERATION FUNCTIONS All of the possible CRC values are preloaded into two arrays which are simply indexed as the function increments through the message buffer One array contains all of the 256 possible CRC values for the high byte of the 16 bit CRC field and the other array contains all of the values for the low byte Indexing the CRC in this way provides faster execution than would be achieved by calculating anew CRC value with each new character from the message buffer CRC table for calculate with polynom 0xA001 with init value OxFFFF High half word rom unsigned char CRC Table Hil 0x00 OxC1 0x81 0x40 0x01 OxCO 0x80 0x41 0x01 OxCO 0x80 0x41 0x00 Ox
23. communication is bet ween the master and all the connected slaves It is always a write command Function code 10 and required logical number 00 In a multi point type connection MODBUS ASCII RTU slave address called also logical number allows to identify each counter during the communication Each counter is preset with a default slave address 01 and the user can change it In case of MODBUS TCP slave address is replaced by a single byte the Unit identifier KRALgroup O030EMO1 420 602 360 502 420 602 360 501 420 281 970 988 KRALOgFZUD Ing Kurillov amp Ing deos Meinlinova 309 CZ 190 16 Praha 9 Kolod je http www kralgroup cz gt lt info kralgroup cz aklroremagas Qatlas cz KRALCFZU Ing ELT 44 Ing Hoc COMMUNICATION FRAME STRUCTURE ASCII mode Bit per byte 1 Start 7 Bit Even 1 Stop 7E1 _ Ltengh Function S Message start marker Starts with colon 3A Carriage return line feed CRLF pair 0D amp 0A RTU mode Bit per byte 1 Start 8 Bit None 1 Stop 8N1 Mame mh Function TCP mode Bit per byte 1 Start 7 Bit Even 2 Stop 7E2 _ jLengh Funtion 0000000 TRANSACTION ID 2 bytes For synchronization between messages of server amp client PROTOCOL ID 2 bytes Zero for MODBUS TCP 1 1 LRC generation The Longitudinal Redundancy Check LRC field is on
24. e byte containing an 8 bit binary value The LRC value is calculated by the transmitting device which appends the LRC to the message The receiving device recalculates an LRC during receipt of the message and compares the calculated value to the actual value it received in the LRC field If the two values are not equal an error results The LRC is calculated by adding together successive 8 bit bytes in the message discarding any carries and then two s complementing the result The LRC is an 8 bit field therefore each new addition of a character that would result in a value higher than 255 decimal simply rolls over the field s value through zero Because there is no ninth bit the carry is discarded automatically A procedure for generating an LRC is 1 Add all bytes in the message excluding the starting colon and ending CRLF Add them into an 8bit field so that carries will be discarded 2 Subtract the final field value from FF to produce the ones complement 3 Add 1 to produce the twos complement KRALgroup KRALCF ZUD 420 602 360 502 http www kralgroup cz 2 Ing Alena amp Ing Leos Rosol 420 602 360 501 4 info kralgroup cz Meinlinova 309 2 190 16 Praha 9 Kolod je 420 281970988 01 akirpremagas atlas cz KRALCFZU Ing ELT 44 Ing Hoc PLACING THE LRC INTO THE MESSAGE When the 8 bit LRC 2 ASCII characters is transmitted in the message the high o
25. ed to in this manual When using the features in this software obey all laws and respect privacy and legitimate rights of others EXCEPT TO THE EXTENT PROHIBITED BY APPLICABLE LAW UNDER NO CIRCUMSTANCES SHALL THE MANUFACTURER BE LIABLE FOR CONSEQUENTIAL DAMAGES SUSTAINED IN CONNECTION WITH SAID PRODUCT AND THE MANUFACTURER NEITHER ASSUMES NOR AUTHORIZES ANY REPRESENTATIVE OR OTHER PERSON TO ASSUME FOR IT ANY OBBLIGATION OR LIABILTY OTHER THAN SUCH AS IS EXPRESSLY SET FORTH HEREIN All trademarks in this manual are property of their respective owners The information contained in this manual is for information purposes only is subject to changes without previous warning and cannot be considered binding for the Manufacturer The Manufacturer assumes no responsibility for any errors orincoherence possibly contained in this manual OBSAH Page 222 20201 1 NIBIL e 2 T 1 NIB e ____ 2 MAS duc m 9 2 Read commands structure 2222 2 5 T MODBUSASCUHR TU na ueste UNE Diaeta 5 2 2 CES 6 2 3 Floating point as per IEEE Standard 7 3 Write commands structure 222 1 8 2d MODB
26. einlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt akilrpremagas atlas cz KRALCFZU Ing Alag amp Ing Jon 5 1 Reading registers Function code 01 03 04 IEEE INTEGER not available for MODBUS Parameter Sign Hex Register Hex Words M U Hex Words M U REAL TIME VALUES V1 L N voltage phase 1 03 04 2 2 V 55 2 2 2 5 cu BENI coo NR 2 ala NEP EAE See HU sH coo NN 2S TM 2 ae Pc eso ce 2 ES cu BEN co NA 2 cu BEN co EB EE 8 2 VUE eo AGS re ee ee ee NS 2o d 222 2222 MEM UNI o 2 a o BH OE PON B 28 E 2S ICM o Rp E aa o 0 E 2 o EE __ 2 aa hocce eem M oso B 238 NB 24 2o H DN E NEM Oo BEN PF2 Phase 2 power factor 03 04 X 1 2 co E MIN pcm di nr DEL DN EE NEM 3 _ 2E Dose ee e o E C DN LONE o A 28 NB EM EOM ONE Dum Eu EN EE E c cC _____ 2 8
27. et e g start kWh2 PAR counter 00 kWh2z PAR 01 start final value to be set 0001 0513 0514 0515 writing registers allow to program the module communication parameters KRALCFZURD Ing Ale KO amp Ing J ee Your partner for measuring the energy DIN RAIL MOUNTED kWh METERS PREPAYMENT kWh METERS CREDIT CARDS kWh METERS GSM OPERATED kWh METERS SPECIAL kWh METERS OTHERS FOR THE MEASUREMENT OF ELECTRICITY ENERGY CURRENT TRANSFORMERS MEASURING POWER IN HARBORS AND ANCHORAGE SHIP MARINAS MEASURING POWER IN THE CAMP IN TRADE FAIR EXHIBITION BUSINESS COMMERCIAL AND ADMINISTRATIVE CENTERS ENERGY MANAGEMENT SYSTEMS M Bus PLC GSM RS 485 EIB INSTA BUS a Our advice is for You with pleasure KRALgroup 420 602 360 502 http www kralgroup cz 20 Ing Alena amp Ing Leo Rosol 420 602 360 501 4 info kralgroup cz Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt lt aklrpremagas atlas cz
28. he module to read its status and setup or the measured values status and setup relevant to the combined counter More registers can be read the same time sending a single command only if the registers are consecutive see chapter 5 According to the used MODBUS protocol mode the read command is structured as follows 2 1 MODBUS ASCII RTU Values contained both in Query or Response messages are in hex format Query example in case of MODBUS ASCII RTU 010300020002D00B Example Byte Description No of bytes 01 Slave address 1 03 Function code 1 00 High 0202 Starting register 2 02 Low 00 High of words to be read 2 02 Low DO High MEME em vovv Error check CRC 2 Low KRALgroup KRALCFZUD 420 602 360 502 http Awww kralgroup cz lu Alice Kalo 2 delen Rotel 420 602 360 501 gt info kralgroup cz 5 Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt 4 aklroremagas atlas cz KRALCFZU Ing ELT 44 Ing Hoc ir Response example in case of MODBUS ASCII RTU 01030400035571F4F0 Example Byte Description No of bytes 01 Slave address 1 03 Function code 1 04 Byte count 1 00 High 03 Low Requested data 4 55 High 71 Low F4 High 2 Low 2 2MODBUS TCP Values contained both in Query or Response messages are
29. ifted in the direction of the least significant bit LSB with a zero filled into the most significant bit MSB position The LSB is extracted and examined If the LSB was a 1 the register is then exclusive ORed with a preset fixed value Ifthe LSB was 0 no exclusive OR takes place This process is repeated until eight shifts have been performed After the last eighth shift the next 8 bit character is exclusive ORed with the register s current value and the process repeats for eight more shifts as described above The final contents of the register after all the characters of the message have been applied is the CRC value Acalculated procedure for generating a CRC is 1 Load a 16 bit register with FFFF Call this the CRC register 2 Exclusive OR the first 8 bit byte of the message with the low order byte of the 16 bit CRC register putting the result in the CRC register 3 Shift the CRC register one bit to the right toward the LSB zero filling the MSB Extract and examine the LSB 4 Ifthe LSB was 0 Repeat Step another shift If the LSB was 1 Exclusive OR the CRC register with the polynomial value A001 1010 0000 0000 0001 5 Repeat Steps 3 and 4 until 8 shifts have been performed When this is done a complete 8 bit byte will have been processed 6 Repeat Steps 2 through 5 for the next 8 bit byte of the message Continue doing this until all bytes have been processed 7 The final contents of the CRC register is the CRC v
30. rder character will be transmitted first followed by the low order character For example if the LRC value is 52 0101 0010 Colon Data Data Data Data LRC L RC CR LF di Count Hi 5 Lo 2 C function calculate LRC pucFrame pointer on Addr of message usLen length message from Addr to end Data UCHAR prvucMBLRC UCHAR pucFrame USHORT usLen UCHAR ucLRC 0 LRC char initialized while usLen ucLRC pucFrame Add buffer byte without carry Return twos complement ucLRC UCHAR CHAR ucLRC return ucLRC 1 2 CRC generation The Cyclical Redundancy Check CRC field is two bytes containing a 16 bit value The CRC value is calculated by the transmitting device which appends the CRC to the message The receiving device recalculates a CRC during receipt of the message and compares the calculated value to the actual value it received in the CRC field If the two values are not equal an error results The CRC is started by first preloading a 16 bit register to all 1 s Then a process begins of applying successive 8bit bytes of the message to the current contents of the re gister Only the eight bits of data in each character are used for generating the CRC Start and stop bits and the parity bit do not apply to the CRC During generation of the CRC each 8 bit character is exclusive ORed with the register contents Then the result is sh
31. s the first part of the exponent and f is the decimal fraction placed next 1 Internally the exponent is 8 bits in length and the stored fraction is 23 bits long Around to nearest method is applied to the calculated value of floating point The floating point format is shown as follows 31 30 23 22 0 lt bit number where bit length Sign 1 Exponent 8 Fraction 23 1 Total m 32 1 Exponent Min e 0 Maxe 255 Bias 127 NOTE Fractions decimals are always shown while the leading 1 hidden bit is not stored KRALgroup KRALOCgFrZup 420 602 360 502 http www kralgroup cz hie Aline Kalo delen 420 602 360 501 gt info kralgroup cz 7 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 lt aklroremagas atlas cz KRALCFZUD Ing ELT 44 Ing Lo Hoc EXAMPLE OF CONVERSION OF VALUE SHOWN WITH FLOATING POINT Value read with floating point 45 0 6 Value converted binary format 0 10001011 01010101100110000000000 5 LLL JL exponent fraction sign sign 0 exponent 10001011 5 139 10 fraction 01010101100110000000000 8388608 19 2804736 9 8388608 10 0 334350585 40 S e 12 N n 1 2 14f 0 139 127 1 2 1 334350585 1 4096 1 334350585 5465 5 3 Write commands structure The master communication device can send commands to the module to program it
32. self or the combined counter More settings can be carried out at the same time sending a single command only if the relevant registers are consecutive see chapter 5 According to the used MODBUS protocol type the write command is structured as follows 3 1 MODBUS ASCII RTU Values contained both in Request or Response messages are in hex format Query example in case of MODBUS ASCII RTU 011005150001020008F053 Example Byte Description No of bytes 01 _ Slave address 1 10 Function code 1 05 High 2 Starting register 2 15 Low 00 High 5 of words to be written 2 01 Low 02 Data byte counter 1 00 High ci EE Data for programming D 08 Low FO High oo o o s oo Re Error check CRC D 53 Low KRALgroup KRALOrZup 420 602 360 502 http www kralgroup cz Ing Alena Kurillov 4 Ing Leos Rosol 420 602 360 501 4 info kralgroup cz Meinlinova 309 CZ 190 16 Praha 9 Kolod je 420 281 970 988 gt akilrpremagas atlas cz KRALCFZU Ing ELT 44 Ing Hoc ir Response example in case of MODBUS ASCII RTU 01100515000110C1 Example Byte Description No of bytes 01 Slave address 1 10 Function code 1 05 High MM n ral Starting register 2 15 Low 00 High ERR of written words 2 01 Low 10 High
Download Pdf Manuals
Related Search
Related Contents
Qwest S1 Telephone User Manual Renseignements importants en matière d`innocuité 安全上のご注意 Easylon USB Socket Interface User Manual User Manual (English) - MYRATEC® – Myrateche.com SLL360 Cover.indd - Topographie Laser Annotate, Innovate - TheVisualiserShop.com Amplificateur marine Copyright © All rights reserved.
Failed to retrieve file