Modbus Slave - Functionality - YASKAWA CP 341 Manual

Rs422/485
Table of Contents

Advertisement

Communication protocols
Modbus > Modbus Slave - Functionality

6.4.6 Modbus Slave - Functionality

Overview
Message structure
ADDR
FUNC
FC
Function
01
Read coil status
02
Read input status
03
Read holding registers
04
Read input registers
05
Force single coil
06
Preset single register
08
Loop back test
15
Force multiple coils
16
Preset multiple registers
70
n
With Modbus the data transfer happens without any handshake. The master initiates
the transmission, and after sending a request message it waits for a reply message
from the slave for the duration of the reply monitoring time set. The type of data
transfer between Modbus systems is controlled by function codes.
At Modbus slave side the Modbus address of the message of the master is trans-
n
formed to the memory area of the CPU by the protocol driver. The corresponding area
assignment may be established by the parameterization.
n
Data transfer between CP and CPU happens by the Modbus communication FB 80 -
MODB_341.
FB 7 - P_PRC_RK and FB 8 - P_SND_RK are internally called by this FB.
n
At slave side FB 7 - P_PRC_RK and FB 8 - P_SND_RK are necessary for communi-
cation, so copy them to your project.
For communication Modbus uses the following message structure:
ADDR
FUNC
Byte
Byte
Modbus slave address with the range 1...255. With slave address 0 (Broadcast Message)
every slave at the bus is addressed by the master. This is only permitted in conjunction
with the writing function codes. Here the message is not applied by the slave.
The function code defines the meaning as well as the structure of a message. The fol-
lowing function codes are supported by the Modbus slave driver:
DATA
n Byte
Action in the PLC
read in bits
read in bits
read in bits (16bit grid)
read in bits (16bit grid)
read in bits
read in bits
read in words
read in words
write in bits
write in bits
write in words
-
write in bits (1...2040bits)
write in bits (1...2040bits)
write in words (1...127 Register)
VIPA System 300S
CRC-CHECK
Word
Memory bits M
Outputs Q
Timer T
Counter C
Memory bits M
Inputs I
Data block DB
Data block DB
Memory bits M
Outputs Q
Data block DB
-
Memory bits M
Outputs Q
Data block DB
HB130 | CP | 341-1CH01 | en | 18-40

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vipa system 300s

Table of Contents