Архитектура Аудит Военная наука Иностранные языки Медицина Металлургия Метрология
Образование Политология Производство Психология Стандартизация Технологии


Sentinel values for instrumentation



Size of register Sentinel values Notes
16 bit unsigned, any scale 0xFFFF Unimplemented
  0xFFFE Over measurable range
  0xFFFD Under measurable range
  0xFFFC Transducer fault
  0xFFFB Bad data
  0xFFFA High digital input
  0xFFF9 Low digital input
  0xFFF8 Reserved
16 bit signed, any scale 0x7FFF Unimplemented
  0x7FFE Over measurable range
  0x7FFD Under measurable range
  0x7FFC Transducer fault
  0x7FFB Bad data
  0x7FFA High digital input
  0x7FF9 Low digital input
  0x7FF8 Reserved
32 bit unsigned, any scale 0xFFFFFFFF Unimplemented
  0xFFFFFFFE Over measurable range
  0xFFFFFFFD Under measurable range
  0xFFFFFFFC Transducer fault
  0xFFFFFFFB Bad data
  0xFFFFFFFA High digital input
  0xFFFFFFF9 Low digital input
  0xFFFFFFF8 Reserved
32 bit signed, any scale 0x7FFFFFFF Unimplemented
  0x7FFFFFFE Over measurable range
  0x7FFFFFFD Under measurable range
  0x7FFFFFFC Transducer fault
  0x7FFFFFFB Bad data
  0x7FFFFFFA High digital input
  0x7FFFFFF9 Low digital input
  0x7FFFFFF8 Reserved

 

Function 16 - Write Multiple Registers

Writes one or more 16 bit registers to the slave device.

 

Notes:

1. The limit of 123 registers is to comply with the Modbus specification which requires that a message must not exceed 256 bytes including all fields.

2. A write to a register that is defined in this standard but not implemented on this slave device will return extended exception 4 (Register not implemented) and have no other affect.

3. A write to a register that is defined in this standard as unimplemented will return extended exception 4 (Register not implemented) and have no other affect.

4. A write to a register that is defined in this standard as containing some unimplemented bits will only affect the implemented bits, the state of the unimplemented bits is irrelevant.

5. An attempt to write to a register that is defined as reserved in this standard will return extended exception code 12 (Reserved register) and have no other affect.

6. A write to a multi-register value such as a 32 bit value, a password or a string must be performed by a single message, not by multiple ones. This avoids the possibility of a value being partly current and partly old data.

7. The maximum allowable writing frequency to modbus registers should be limited to 10 times per second, to prolong the life of the module it is recommended that registers are only written to when their value needs to be changed ( avoid writing the same data repeatedly ).

Query message

Byte Field name Notes
0 Slave address  
1 Function code (16)  
2 First register address - high byte 16 bit register address
3 First register address - low byte  
4 Number of registers to write - high byte 16 bit number of registers, must be in the range 1 to 123
5 Number of registers to write - low byte  
6 Byte count (n) 8 bit even number in the range 2 to 246 (number of registers *2)
7 First register - high byte 16 bit register
8 First register - low byte  
   
5+n Last register - high byte 16 bit register
6+n Last register - low byte  
7+n/8+n Error check CRC  

 

Normal response message

Byte Field name Notes
0 Slave address  
1 Function code (16)  
2 First register address - high byte 16 bit register address
3 First register address - low byte  
4 Number of registers written - high byte 16 bit number of registers, must be in the range 1 to 123
5 Number of registers written - low byte  
6/7 Error check CRC  

Exception response message

Byte Field name Notes
0 Slave address  
1 Function code +128 (144) Top bit is set
2 Exception code 1 - Illegal function code 2 - Illegal data address 6 - Slave device busy
3/4 Error check CRC  

 

 

Language Codes

 

Notes:

1. Language codes follow the Windows definition, the primary language code is stored in the least significant 10 bits and the sub-language code is stored in the most significant 6 bits of the 16 bit language code.

2. Microsoft add to this list periodically but have reserved sections of the list for custom languages and sub-languages. Primary language codes 0x200-0x3FF can be used for additional languages and sub-language codes 0x20-0x3F can be used for additional dialects of a primary languages but these should only be used where none of the defined codes is appropriate.

 

Language codes

Primary language Sub-language Primary language code Sub-language code Language code
Neutral Neutral 0x00 0x00 0x0000
Arabic Saudi Arabia 0x01 0x01 0x0401
  Iraq   0x02 0x0801
  Egypt   0x03 0x0C01
  Libya   0x04 0x1001
  Algeria   0x05 0x1401
  Morocco   0x06 0x1801
  Tunisia   0x07 0x1C01
  Oman   0x08 0x2001
  Yemen   0x09 0x2401
  Syria   0x0A 0x2801
  Jordan   0x0B 0x2C01
  Lebanon   0x0C 0x3001
  Kuwait   0x0E 0x3401
  United Arab Emerates   0x0E 0x3801
  Bahrain   0x0F 0x3C01
  Qatar   0x10 0x4001
Bulgarian Standard 0x02 0x01 0x0402
Catalan Standard 0x03 0x01 0x0403
Chinese Taiwan 0x04 0x01 0x0404
  Peoples Republic   0x02 0x0804
  Hong Kong   0x03 0x0C04
  Singapore   0x04 0x1004
  Macau   0x05 0x1405
Czech Standard 0x05 0x01 0x0405
Danish Standard 0x06 0x01 0x0406
German Standard 0x07 0x01 0x0407
  Swiss   0x02 0x0807
  Austrian   0x03 0x0C07
  Luxembourg   0x04 0x1007
  Liechtenstein   0x05 0x1407
Greek Standard 0x08 0x01 0x0408

 



Language codes continued

Primary language Sub-language Primary language code Sub-language code Language code
English United states 0x09 0x01 0x0409
  United kingdom   0x02 0x0809
  Australia   0x03 0x0C09
  Canada   0x04 0x1009
  New Zealand   0x05 0x1409
  Ireland   0x06 0x1809
  South Africa   0x07 0x1C09
  Jamaica   0x08 0x2009
  Caribbean   0x09 0x2409
  Belize   0x0A 0x2809
  Trinidad   0x0B 0x2C09
  Zimbabwe   0x0C 0x3009
  Philippines   0x0D 0x3409
Spanish Traditional 0x0A 0x01 0x040A
  Mexican   0x02 0x080A
  Modern   0x03 0x0C0A
  Guatemala   0x04 0x100A
  Costa Rica   0x05 0x140A
  Panama   0x06 0x180A
  Dominican Republic   0x07 0x1C0A
  Venezuela   0x08 0x200A
  Colombia   0x09 0x240A
  Peru   0x0A 0x280A
  Argentina   0x0B 0x2C0A
  Ecuador   0x0C 0x300A
  Chile   0x0D 0x340A
  Uruguay   0x0E 0x380A
  Paraguay   0x0F 0x3C0A
  Bolivia   0x10 0x400A
  El Salvador   0x11 0x440A
  Honduras   0x12 0x480A
  Nicaragua   0x13 0x4C0A
  Puerto Rico   0x14 0x500A
Finnish Standard 0x0B 0x01 0x040B
French Standard 0x0C 0x01 0x040C
  Belgian   0x02 0x080C
  Canadian   0x03 0x0C0C
  Swiss   0x04 0x100C
  Luxembourg   0x05 0x140C
  Monaco   0x06 0x180C
Hebrew Standard 0x0D 0x01 0x040D
Hungarian Standard 0x0E 0x01 0x040E
Icelandic Standard 0x0F 0x01 0x040F
Italian Standard 0x10 0x01 0x0410
  Swiss   0x02 0x0810
Japanese Standard 0x11 0x01 0x0411
Korean Extended Wansung 0x12 0x01 0x0412
  Johab   0x02 0x0812
Dutch Standard 0x13 0x01 0x0413
  Belgian   0x02 0x0813
Norwegian Bokmal 0x14 0x01 0x0414
  Nynorsk   0x02 0x0814

 



Language codes continued

Primary language Sub-language Primary language code Sub-language code Language code
Polish Standard 0x15 0x01 0x0415
Portuguese Brazilian 0x16 0x01 0x0416
  Standard   0x02 0x0816
Rhaeto-romanic Standard 0x17 0x01 0x0417
Romanian Standard 0x18 0x01 0x0418
  Moldavia   0x02 0x0818
Russian Standard 0x19 0x01 0x0419
  Moldavia   0x02 0x0819
Croatian Standard 0x1A 0x01 0x041A
Serbian Latin 0x1A 0x02 0x081A
  Cyrillic   0x03 0x0C1A
Slovak Standard 0x1B 0x01 0x041B
Albanian Standard 0x1C 0x01 0x041C
Swedish Standard 0x1D 0x01 0x041D
  Finland   0x02 0x081D
Thai Standard 0x1E 0x01 0x041E
Turkish Standard 0x1F 0x01 0x041F
Urdu Standard 0x20 0x01 0x0420
Indonesian Standard 0x21 0x01 0x0421
Ukrainian Standard 0x22 0x01 0x0422
Byelorusian Standard 0x23 0x01 0x0423
Slovenian Standard 0x24 0x01 0x0424
Estonian Standard 0x25 0x01 0x0425
Latvian Standard 0x26 0x01 0x0426
Lithuanian Standard 0x27 0x01 0x0427
  Classic   0x02 0x0827
Reserved   0x28   0x0428
Farsi Standard 0x29 0x01 0x0429
Vietnamese Standard 0x2A 0x01 0x042A
Reserved   0x2B   0x042B
Reserved   0x2C   0x042C
Basque Standard 0x2D 0x01 0x042D
Sorbian Standard 0x2E 0x01 0x042E
Macedonian Standard 0x2F 0x01 0x042F
Sutu Standard 0x30 0x01 0x0430
Tsonga Standard 0x31 0x01 0x0431
Tswana Standard 0x32 0x01 0x0432
Venda Standard 0x33 0x01 0x0433
Xhosa Standard 0x34 0x01 0x0434
Zulu Standard 0x35 0x01 0x0435
Afrikaans Standard 0x36 0x01 0x0436
Reserved   0x37   0x3700
Faeroese Standard 0x38 0x01 0x0438
Hindi Standard 0x39 0x01 0x0439
Maltese Standard 0x3A 0x01 0x043A

 



Language codes continued

Primary language Sub-language Primary language code Sub-language code Language code
Sami (Lapland) Standard 0x3B 0x01 0x043B
Scots Gaelic Standard 0x3C 0x01 0x043C
Reserved   0x3D   0x043D
Malay Standard 0x3E 0x01 0x043E
  Brunei Darussalam   0x02 0x083E
Reserved   0x3F   0x043F
Reserved   0x40   0x0440
Swahili Standard 0x41 0x01 0x0441
Reserved   0x42-0x1FF    
Custom languages   0x200-0x3FF   0x0200-0x03FF
Custom language English for pumps 0x20 0x00 0x0200

 

Modbus Registers Defined

Notes:

1. The register array is divided into 256 pages each containing up to 256 registers, the actual register address is obtained from the formula: register_address=page_number*256+register_offset.

2. All unused parts of pages 0-127 are defined as reserved for expansion of this standard, any attempt to access them will result in an exception response with extended exception code 12 (Reserved register).

3. Pages 128-255 are available for manufacturer specific applications such as configuration of the control equipment, these are not defined by this standard.

4. Any device which requires registers in pages 128-255 to be implemented in order to perform a task which can be performed by registers defined in this standard is deemed to be non-compliant with this standard.

5. This document always refers to register addresses which start at 0 as defined in the Modbus protocol. Register numbers, which start at 1, are not used in this document in order to avoid confusion.

6. The additional instrumentation pages are to be defined.

7. S.M. means state machine.

8. A letter S in the bits/sign column indicates a signed value using two’s compliment arithmetic, all others are unsigned.

9. A double number in the bits/sign column indicates a bit within a register of a specific size e.g. 16/16 is the most significant bit and 1/16 is the least significant bit of a 16 bit register.

10. Bits within registers are numbered from 1 not 0 to avoid the confusion that would be caused if the sixteenth bit of a 16 bit register were labelled 15/16.

11. For an integer type register the register contents should be multiplied by the scaling factor to obtain the actual value.

12. For a flag type register (1 bit) the minimum value column indicates the meaning if the flag is 0, the maximum column indicates the meaning if the flag is 1.

13. For an integer type register the minimum and maximum value columns indicate the minimum and maximum values after multiplying by the scaling factor.

14. Any software that reads an integer type register must be able to process and display correctly over the full range specified in the minimum and maximum value columns.

15. 32 bit values are stored with the most significant bits in the register with the lowest address.

16. Where two ASCII characters are stored in a single register the first character is in the most significant bits.

17. The first register of a 32 bit number is always aligned at an even address for the benefit of some 32 bit CPUs.

 

Index of Register Pages

Page number Description Read/write
0 Communications status information Read only
1 Communications configuration Read/write and write only
2 Modem configuration Read/write
3 Generating set status information Read only
4 Basic instrumentation Read only
5 Extended instrumentation Read only
6 Derived Instrumentation Read only
7 Accumulated Instrumentation Read/write
8 Alarm conditions Read only
9 Total Harmonic Distortion information Read only
10 Reserved  
11 Diagnostic - general Read only
12 Diagnostic - digital inputs Read only
13 Diagnostic - digital outputs Read only and read write
14 Diagnostic - LEDs Read only and read write
15 Diagnostic - Reserved  
16 Control registers Read only and write only
17 J1939 active diagnostic trouble codes in decoded format Read only
18 J1939 active diagnostic trouble codes in raw format Read only
19 Reserved  
20 Various strings Read only
24 Identity strings Read/write
26 State machine name strings Read only
28 State machine state strings Read only
29-31 Reserved  

 

 


Поделиться:



Последнее изменение этой страницы: 2019-04-01; Просмотров: 316; Нарушение авторского права страницы


lektsia.com 2007 - 2024 год. Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав! (0.026 с.)
Главная | Случайная страница | Обратная связь