EasyManua.ls Logo

YASKAWA VIPA SPEED7 - Page 189

YASKAWA VIPA SPEED7
1007 pages
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...
9.1.2.2 Example
The CPU provides 100 byte data in the flag area starting from MB200 for a Modbus client
via the Modbus register 0...49. Data can be read from the Modbus client via Function
code 03h and written with Function code 06h, 10h. The CPU output Q1.0 is to be con-
trolled by a Modbus client via Function code 05h and the start address 5008. Errors are
to be stored.
CALL FB 65 , DB65
REQ :=M100.0
ID :=W#16#1
DONE :=M100.1
BUSY :=
ERROR :=M100.2
STATUS :=MW102
CONNECT:=P#DB255.DBX 0.0 BYTE 64
UN M 100.2
SPB ERR1
L MW 102
T MW 104
ERR1: NOP 0
U M 100.1
R M 100.0
L 5000
T DB71.DBW 52
CALL FB 71 , DB71
ENABLE :=M101.0
MB_DATA_PTR:=P#M 200.0 BYTE 100
ID :=W#16#1
NDR :=M101.1
DR :=M101.2
ERROR :=M101.3
STATUS :=MW106
UN M 101.3
SPB ERR2
L MW 106
T MW 108
ERR2: NOP 0
1. Call of FB 65 (TCON) to establish a communication connection with the partner sta-
tion.
2. Calling the handling block of the Modbus/TCP server with the correct parameters.
3. There is no connection to the partner station and MW102 returns 7000h.
4. Set M100.0 in the CPU to TRUE.
ð
If M100.0 is automatically reset, the connection to the partner station is estab-
lished and MW108 returns 7006h.
5. 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 52 in the instance data block).
6. Set M101.0 in the CPU to TRUE.
ð
The Modbus server now works.
7. The client sends a Modbus request with Function code 03h start address 10 and
quantity 30.
Task
OB1
OB1 - Description
VIPA SPEED7
Modbus Communication
TCP > FB 71 - TCP_MB_SERVER - Modbus/TCP server
HB00 | OPL_SP7 | Operation list | en | 18-30 189

Table of Contents

Related product manuals