YASKAWA CP 341 Manual page 80

Rs422/485
Table of Contents

Advertisement

Communication protocols
Modbus > Modbus Slave - Function codes
6.4.8.1
FC 01 - Read Coil Status
Request message
ADDR
Reply message
ADDR
start_addr
Conversion bit memories
and outputs
Conversion counter and
timer
bit_number
Example
80
This function serves to read individual bits of the output area of the CPU by the Modbus
master.
FUNC
FUNC
n
The Modbus bit address start_addr contains the start of the area of the CPU, which is
be accessed.
The corresponding address allocation of the CPU memory area are established by
n
the properties of "FC 01, 05, 15" in the parameterization of the CP.
Here the "Modbus address in transmission message" briefly Param-start-address
may be assigned to a "SIMATIC memory area" briefly PLC-area.
n
Byte address = ((start_addr - Param-start-address) / 8) + PLC-area
When accessing bit memories respectively outputs of the CPU, the remaining Rest-bit-
number is calculated and used to address the relevant bit within the bit memory area
respectively the output area.
Rest-bit-number = (start_addr - Param-start-address) % 8 [Modulo 8]
n
Word address = ((start_addr - Param-start-address) / 16) + PLC-area
With the address calculation, it must be possible to divide the result start_addr - Param-
start-address by 16 without having a left over value Word-by-word access may only start
from word limit.
Values between 1 and 2040 are permitted as bit_number.
n
n
This number of bits are read.
n
When accessing timer and counters, it must be possible to divide the bit_number by
16.
n
Maximally 16 timers and counters may be accessed.
Conversion Modbus addressing for FC 01, 05, 15
"Modbus address in the transmission message"
Param-start-address
from 0 ... 1023
from 1024 ... 2047
from 2048 ... 4057
from 4064 ... 4096
start_addr
byte_count n
bit_number
n byte data
"SIMATIC memory area"
PLC-area
Memory commence at M 1000.0
Outputs commence at Q 100.0
Timer commence at T 100
Counter commence at C 200
HB130 | CP | 341-1CH01 | en | 18-40
VIPA System 300S
CRC
CRC

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vipa system 300s

Table of Contents