Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
AnyBus-S ModBus RTU.rev1.00.pdf
Скачиваний:
22
Добавлен:
23.08.2013
Размер:
975.19 Кб
Скачать

Fieldbus Appendix - ANYBUS®-S Modbus RTU DOC. ABS-APPENDIX-RTU Rev 1.00 2003-04-28

6.6 Data Exchange

The AnyBus S Modbus RTU device can be read/written from the Modbus master. The amount of data copied is determined in the configuration phase of the fieldbus initialization. The data will be exchanged via the IN and OUT data areas of the DPRAM, or via the mailbox messages if internal memory is used.

6.6.1 Map data to/from the Network

Example: If the module is initialized from the application with the following sizes...

IN I/O SIZE : 64 bytes ( 32words)

IN DPRAM SIZE : 200 bytes (100 words)

IN TOTAL SIZE : 200 bytes (100 words)

OUT I/O SIZE : 64 bytes ( 32words)

OUT DPRAM SIZE : 200 bytes (100 words)

OUT TOTAL SIZE : 200 bytes (100 words)

...the data map from the fieldbus will look like this (section 6.6.1.1 and 6.6.1.2):

6.6.1.1 Data to network

The "Data To Network" area always starts at 0001, and the whole content in the "Data to Network" area can be read with Modbus commands such as “Read Holding Registers” (see chapter 4.1).

“Data to Network” area

Words 0001 - 0256

I/O-Data

Table 27: Command and response layout; Data To Network

Example:

To read four words from the "Data to Network" area, use “Read Holding Registers” with start address 0001, and with number of registers to read, set to 4. This will give you the four first data words.

28

HMS INDUSTRIAL NETWORKS AB

Fieldbus Appendix - ANYBUS®-S Modbus RTU

DOC. ABS-APPENDIX-RTU Rev 1.00

2003-04-28

6.6.1.2 Data from network

The "Data from Network" always starts at 1025 and the whole "Data from Network" area can be read and written by the Modbus commands.

“Data from Network” area

Words 1025 - 1281

I/O-Data

Table 28: Command and response layout; Data From Network

Example:

To write to the first two words of the "Data from Network" area in the AnyBus module, use “Preset Multiple Register” (see chapter 4.1) with the start register 1025 and with number of registers set to 2 words.

HMS INDUSTRIAL NETWORKS AB

29