1. Calling the handling block of the Modbus/TCP server with the correct parameters.
2. If the interface was correctly initialized in the OB100, the slave can be used and
MW102 returns 7006h.
3. The Modbus start register in the process image, which can be reached by Function
code 05h, may be changed in the example by the parameter
FC5_ADDR_OUTPUT_START (word 58 in the instance data block).
4. Set M101.0 in the CPU to TRUE.
ð
The Modbus slave now works.
5. The master sends a Modbus request with Function code 03h start address 10 and
quantity 30.
ð
The slave responds with 60byte starting from MB200. DR is set for one CPU
cycle and thus M101.2 is set to "1".
6. The master sends a Modbus request with Function code 05h start address 5008
and the value FF00h.
ð
The salve acknowledges the request and writes "1" to the output Q1.0. NDR is
set for one CPU cycle and thus M101.1 is set to "1".
7. The master sends a Modbus request with Function code 03h start address 50 (does
not exist!) and quantity 1.
ð
The server responds with Exception code 02h and sets ERROR/STATUS for
one CPU cycle. MW104 returns 8383h.
9.3 FKT Codes
Modbus has some naming conventions:
n Modbus differentiates between bit and word access; Bits = "Coils" and Words = "Reg-
ister".
n Bit inputs are referred to as "Input-Status" and bit outputs as "Coil-Status".
n Word inputs are referred to as "Input-Register" and word outputs as "Holding-Reg-
ister".
Normally the access with Modbus happens by means of the ranges 0x, 1x, 3x and 4x.
0x and 1x gives you access to digital bit areas and 3x and 4x to analog word areas.
For the Ethernet coupler from VIPA is not differentiating digital and analog data, the fol-
lowing assignment is valid:
OB1 - Description
Naming convention
Range definitions
VIPA SPEED7
Modbus Communication
FKT Codes
HB00 | OPL_SP7 | Operation list | en | 18-30 197