EasyManua.ls Logo

IFM AL1940 - Modbus: Programmers Notes

IFM AL1940
110 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
58
ifm Device Manual IO-Link Master with Modbus interface CabinetLine 8 Ports IP 20 (AL1940) 05 / 2018
Configuration Modbus
>
8.3.11 Modbus: Programmers' notes
Rules for accessing the Modbus register ...............................................................................................58
Supported function codes .......................................................................................................................59
Use acyclic services ...............................................................................................................................59
17965
>
Rules for accessing the Modbus register
13916
The Modbus table of the AL1940 is subdivided into areas.
1
A register area has one
start address.
2
A register area consists of
one or several registers
(length/number of words)
The following general rules apply for access to the Modbus registers:
► Only read or write Modbus registers word by word.
► Only use the valid function codes to read or write Modbus registers (→ Supported function codes
(→ p. 59)).
► Only implement read and write access via valid start addresses. Access via an invalid start
address generates an error.
Example:
Task: Write IO-Link output data of the IO-Link port X02 (process data length n = 2 bytes)
Solutions:
Right:
Version 1: "Output Data" area (→ Output Data (→ p. 81))
► In the Compact Output Block of the ports X01…X04, read the registers 600…603 (FC03, start
address: 600, length: 4 words)
► Change read values of the register 601.
► In the Compact Output Block of the ports X01…X04, write the registers 600…603 (FC16, start
address: 600, length: 4 words)
Version 2: "Single Port Access" area (→ Single Port Access (→ p. 82))
► Write the required value into register 2101 (FC06, start address: 2101)
Wrong:
► In the Compact Output Block of the ports X01…X04, write the register 601 (FC06, start
address: 601, length: 1 word)

Table of Contents