Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
50
Добавлен:
11.10.2020
Размер:
3.2 Mб
Скачать

Fieldbus Controller 750-841 73

Data Exchange

3.1.5.6 Data Exchange between Master and PLC Functionality (CPU)

The fieldbus master and the PLC functionality of the controller regard the data in a different manner.

Variable data created by the fieldbus master reaches the PFC as input variables. Data created in the PFC is sent to the fieldbus master through output variables.

In the PFC, the controller can access the MODBUS TCP PFC variable data from word address 256 to 511 (double word address 128-255, byte address 512-1023) and the Ethernet IP PFC variable data from word address 1276 to 1531 (double word address 638-765, byte address 2552-3063).

3.1.5.6.1 Example MODBUS TCP Master and PLC functionality (CPU)

Data Access by the MODBUS TCP Master

With MODBUS TCP, the fieldbus master can access controller data as words or bits.

When accessing the first 256 words of memory from the Fieldbus port (physical I/O modules), the I/O modules start with the address 0 for both bit and word access.

When accessing data from the starting memory address of 256, the bit and word addresses follow the sequence below:

4096 for bit 0 in word 256

4097 for bit 1 in word 256

...

8191 for bit 15 in word 511.

The bit number can be calculated from the following formula:

BitNo = (Word * 16) + Bitno_in_Word

Data Access by the PLC Functionality

When accessing the same data from both a PLC and Fieldbus master, the following memory address conventions should be understood:

A 16 bit IEC 61131-3 variable uses the same addressing as the MODBUS word format.

An IEC 61131-3 boolean variable (1 bit) uses a “WORD.BIT” notation for addressing, which is different from MODBUS’s bit notation.

WAGO-I/O-SYSTEM 750 ETHERNET TCP/IP

74 • Fieldbus Controller 750-841

Data Exchange

The “WORD.BIT” notation is composed of the boolean’s word address and bit number in the word, separated by a dot. The Word and Bit values are zero based (e.g., %IX0.0 is the first possible digital input).

Example:

MODBUS bit number 19 => bit addressing in PLC <Wordno>.<Bitno> = 1.2

The PLC functionality of the PFC can also access the data as Bytes and

DoubleWords.

The byte addresses are computed according to the following formula:

High-Byte Address = Word address*2

Low-Byte Address = (Word address*2) + 1

The double word address is computed according to the following formula: Double word address = High word address/2 (rounded off)

or = Low word address/2

WAGO-I/O-SYSTEM 750 ETHERNET TCP/IP

Соседние файлы в папке 750-841