0% found this document useful (0 votes)
193 views80 pages

PB B MM.V3x Manual

The document is a manual for the PB-B-MODBUS/232/485/V3x, a bridge product that connects PROFIBUS to MODBUS devices. It details the product's features, configuration options, and technical data, highlighting its compatibility with previous versions and its ability to function as both a MODBUS master and slave. The manual is structured into chapters covering product introduction, installation, communication methods, and configuration examples.

Uploaded by

Andi Pandulu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
193 views80 pages

PB B MM.V3x Manual

The document is a manual for the PB-B-MODBUS/232/485/V3x, a bridge product that connects PROFIBUS to MODBUS devices. It details the product's features, configuration options, and technical data, highlighting its compatibility with previous versions and its ability to function as both a MODBUS master and slave. The manual is structured into chapters covering product introduction, installation, communication methods, and configuration examples.

Uploaded by

Andi Pandulu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 80

PROFIBUS to MODBUS BRIDGE BRIDGE PRODUCTS

PB-B-MODBUS/232/485/V3x
PRODUCTS MANUAl
(PB-B-MM/V3x:MODBUS MASTER)

V 3.x

Beijing D&S Fieldbus Technologe Co. td


Beijing D&S Fieldbus Technologe Co. td

About Manual……
This manual is divided to two parts, which can be read separately. The first part is about the

MODBUS master, and the second one is about MODBUS slave.


About V3……
1 The new product V3 ( PB-B-MODBUS/232/485/V3 ) is the compatible improvement of V2

(PB-B-MODBUS/232/485/V2). That means users can use V3 take the place of V2 without any changes.

2. On PROFIBUS side, V3 products can only be used as PROFIBUS slave(Fig 0-1), while on the MODBUS

side, it can be used as MODBUS master and slave (Fig 0-2).

PROFIBUS Master

PROFIBUS-DP

PB-B-MODBUS/V3x
PB-B-MODBUS/V3x

RS232 RS485
PROFIBUS device PROFIBUS device

MODBUS slave device MODBUS slave device


Fig 0-1:On MODBUS side, Interface PB-B-MODBUS/232/485/V3 is master;It is connected to
the MODBUS slave devices via RS-232/485.

PROFIBUS Master

PROFIBUS-DP

PB-B-MODBUS/V3x PB-B-MODBUS/V3x

RS232 RS485
PROFIBUS device PROFIBUS device

MODBUS master device


MODBUS master device

Fig 0-2:On MODBUS side, Interface PB-B-MODBUS/232/485/V3 is slave,it is connected to


MODBUS master devices via RS-232/485.

3.New functions:

tel: 010-62054940 1 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

⑴ MODBUS protocol, 05H, 06H functions are added on the base of original MODBUS master functions.

⑵ V3 product can be configured as MODBUS slave。

4. The highest bit(SW1) of function dipswitches(on the back of V3 product) provides the user a selection

between MODBUS master and slave function as followed:

SW1=OFF:V3 is set to MODBUS master


ON
OFF
SW1=ON:V3 is set to MODBUS slave
SW1 2 3

5. About GSD file:To configure V3 products as MODBUS master or slave, two completely different GSD

files are needed:

MODBUS Master:DS_MMV3x.GSD;Product Name:PB-B-MM/V3x;

MODBUS Slave:DS_MSV3x.GSD;Product Name:PB-B-MS/V3x;

Show as Fig 0-3:

Configured as MODBUS Master :


DS_MMV32.GSD;
Product Name:PB-B-MM/V32;

Configured as MODBUS Slave :


DS_MSV32.GSD;
Product Name:PB-B-MS/V32;

Notice: Fig 0-3:The catalog when V3 product is being configured

1。So far,the highest version of PB-B-MODBUS as Master Bridge is PB-B-MM/V33。PB-B-MM/V33 is the

improvement of V3.2,and adds the monitor function of status bit and status byte to slave station。

2。So far, the highest version of PB-B-MODBUS as Slave products is PB-B-MS/V32, and PB-B-MM/V33 is

tel: 010-62054940 2 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

only used as master producets. Please notice the SW1 of function dipswitches(on the back of V3 product).

The chapter 5 introduces the configuration and communication taking PB-B-MM/V32 as example.

PB-B-MM/V33 is the same as PB-B-MS/V32 in the using process, referring to the first appendix.

tel: 010-62054940 3 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Index
Chapter 1: Product Introduce...........................................................................................................................................................6
一.The Introduction of Product Series............................................................................................................ 6
1. Product Series ........................................................................................................................................ 6
⒉ Main use of bridge products ............................................................................................................. 6
二. The bridge form PROFIBUS to MODBUS-PB-B-MODBUS/232/485/V3x .............................................. 7
1. Features.................................................................................................................................................. 7
⒉ Technical Data ..................................................................................................................................... 7
Chapter 2:Product Structure, Installation, Start up ........................................................................................................................9
⒈ Shape of Product (In the picture)................................................................................................................. 9
⒉ Installation ................................................................................................................................................. 10
⒊ Shape ......................................................................................................................................................... 10
⒋ PROFIBUS interface components and installation.................................................................................... 11
⒌ RS-232 interface and cable ........................................................................................................................ 11
⒍ RS-485 interface and installation............................................................................................................... 12
(Ⅰ)、The basic feature of RS-485 interface transfer technology of PB-B-MODBUS/485 ................ 12
⑴ The features of RS-485 transfer technology .............................................................................. 12
⑵ The main point of RS-485 transfer devices installation............................................................. 12
(Ⅱ)、The polarity of PB-B-MODBUS/485 interface ......................................................................... 12
(Ⅲ)、the connection of RS-485 terminator......................................................................................... 13
⒎ Power supply ............................................................................................................................................. 14
⒏ PROFIBUS slave address setting .............................................................................................................. 14
⒐ Configure bridge as MODBUS master, or MODBUS slave...................................................................... 15
⒑ LED ........................................................................................................................................................... 15
⒒ The steps of Power on and the exclude of errors ....................................................................................... 16
Chapter 3:MODBUS Introduction ..................................................................................................................................................18
1. MODBUS Protocol...................................................................................................................................... 18
2. MODBUS Protocol points........................................................................................................................... 18
3. Exception Responses ................................................................................................................................... 19
4. MODBUS memory...................................................................................................................................... 20
5.MODBUS function.................................................................................................................................... 20
(1) Read output status .............................................................................................................................. 20
(3) Read holding Registers ...................................................................................................................... 22
(4) Read input Registers .......................................................................................................................... 22
(5) Force single coil ................................................................................................................................. 23
(6) preset single registers ......................................................................................................................... 24
(8) return checking................................................................................................................................... 24
Chapter 4: The Principle of Protocol Transform ..........................................................................................................................26
1.The Hardware Structure of PB-B-MODBUS/232/485 .............................................................................. 26
2.Connection with PROFIBUS..................................................................................................................... 27
3. The protocol transfer principle between PROFIBUS and MODBUS ......................................................... 27
Chapter 5:The method of communication and configuration .......................................................................................................30
1.Example ........................................................................................................................................................ 30
2. method of system configuration .................................................................................................................. 30
(Ⅰ) set up a “project” in PC1-STEP 7 .............................................................................................. 31
(Ⅱ)、Hardware.................................................................................................................................... 32
(Ⅲ) configure PB-B-MODBUS/232/485/V32 as PROFIBUS slave ................................................ 35
(1) configure PROFIBUS slave PB-B-MM/V32 ............................................................................. 35

tel: 010-62054940 4 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

(2) configure RS232 interface of PB-B-MM/V32 ........................................................................... 36


(3) configure PROFIBUS and MODBUS data update mode .......................................................... 37
(4) configure Time of Replay........................................................................................................... 38
(Ⅳ) configure MODBUS message queue of PB-B-MODBUS/V32................................................. 39
⑴open PB-B-MM/V32 catalog in Hardware catalog...................................................................... 39
⑵ example: insert “read 24 bits(0xxxx)”to 2# slot ........................................................................ 40
⑶ example for inserting“read 4 Words (3xxxx)”to 3# slot ............................................................ 43
⑷ example for inserting “Write 16 bits (0xxxx)”into 4# slot......................................................... 45
⑸ example for inserting “write 4 Words (4xxxx)”into #5 slot....................................................... 48
⑹ example for inserting “Force single bit (05H Command)”into #6 slot. ..................................... 50
⑺ example for inserting “set single word (06H command)”in #7 slot........................................... 53
(Ⅴ) “Save and Compile”complete the configuration of system ..................................................... 55
3.The bytes used for communication control and status............................................................................... 55
⑴ format of communication status byte................................................................................................. 56
① receive complete/send permit :re_tr........................................................................................... 56
② M_ER_CODE............................................................................................................................ 57
③ Tmdr_O...................................................................................................................................... 57
④ CRC_er ...................................................................................................................................... 57
⑤ oe_er .......................................................................................................................................... 57
⑵ format of communication control byte .............................................................................................. 57
① Start up scanning time of MODBUS D0:start_M ...................................................................... 57
② MODBUS read permit D1:M_r_en ........................................................................................... 57
③ MODBUS write permit D2:M_w_en......................................................................................... 58
④Clear the error mark D5:clear_er ................................................................................................. 58
⑤ stop waiting D6:escape_M......................................................................................................... 58
⑥ Force MODBUS scan to reset D7:reset_M.................................................................................... 58
⒋ PB-B-MODBUS/V32 work state and transfer........................................................................................... 59
⑴ work state flow chart ......................................................................................................................... 59
⑵ After Power on, MODBUS starts ...................................................................................................... 61
⑶ several errors, failure states and solutions ......................................................................................... 61
① MODBUS scan waiting for reply in endless time...................................................................... 61
② Because D7:reset_M remains efficiency, it causes MODBUS scan pointer to return back to
original position again and again. .................................................................................................... 62
③ Because D6:escape_M remains efficiency, it causes MODBUS scan does not wait but jump
to next position. ............................................................................................................................... 62
④ MODBUS abnormal reply ......................................................................................................... 63
⑤ Communication Parity Error 与 CRC Error .............................................................................. 63
5.How to start to read/write MODBUS communication data in PROFIBUS Master................................... 64
⑴ The corresponding relation between Equipments and Addresses ...................................................... 65
⑵ The corresponding relation of Communication state word, communication control word and
PROFIBUS Addresses ............................................................................................................................. 66
⑶ How to get communication state word .............................................................................................. 66
⑷ How to make MODBUS start、reset、stop waiting、clear error flag in PROFIBUS Master ......... 66
⑸ How to write data to MODBUS data area 0XXXX、4XXXX in PROFIBUS Master ..................... 67
⑹ How to get the data 0XXXX、1XXXX、3XXXX、4XXXX in MODBUS data area in PROFIBUS
Master ...................................................................................................................................................... 70
Appendix 1:V33 new function introduce.........................................................................................................................................73
1、the status monitor function of MODBUS Slave ........................................................................................ 73
2、Example 1:The communication status bit monitor of MODBUS slave.................................................. 73
3、Example 2:The communication status byte monitor of MODBUS slave ............................................... 75
4、Particular case............................................................................................................................................ 78
5、matters need attention—configure the max number of MODBUS slave telegram.................................... 78

tel: 010-62054940 5 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Chapter 1: Product Introduce


一.The Introduction of Product Series
1. Product Series

PB-B-MODBUS/232/485/V3x interface is one product of PROFIBUS bridge products series; This product

manual is only suit to PB-B-MS/232/485/V3 product.

PB -B -MODBUS/232/485 / V3x

Vn:version number of device

RS232/485: Bridge from PROFIBUS to RS232/485 device

MODBUS/232/485: Bridge form PROFIBUS to MODBUS/232/485

SCANER: PROFIBUS scanner interface

CAN: Bridge from PROFIBUS to CAN bus device

ADAM: Bridge from PROFIBUS to YH ADAM module

OMRON: Bridge from PROFIBUS to OMRON PLC

B: bridge products

PB: PROFIBUS Bridge

⒉ Main use of bridge products

Via the bridge, the interface devices, which backup special communication protocols, such as RS232/485,

CAN and MODBUS, can be connected to PROFIBUS as slaves.

ASCII Printer

RS-232 RS-485
PROFIBUS-DP

PB-B-RS232 PB-B-RS485

PB-B-MODBUS PB-B-MODBUS PB-B-ADAM


PB-B-SCANER

YH ADAM module

MODBUS device Scanner


MODBUS device

Fig 1-1:Use bridge to connect RS232/485、MODBUS devices to ROFIBUS

tel: 010-62054940 6 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

二. The bridge form PROFIBUS to MODBUS-PB-B-MODBUS/232/485/V3x


1. Features

▼wide application:All the MODBUS products, which have RS232/485 interface, can be connected to the

PROFIBUS via this product.

The V3x product(PB-B-MODBUS/232/485/V3x), can only be used as slave on PROFIBUS side. While on

the MODBUS side, the product can be used as master (see this manual P1, about V3…Fig 0-1), or as slave (see

this manual P1, about V3…Fig 0-2).

▼simple use: Users do not have to know the details of PROFIBUS and MODBUS technology, only this

manual and the application examples are needed. The communication can be realized by configuration

according to the requirement without complex program.

▼transparent communication: According to the mirror relationship between PROFIBUS communication data

area and MODBUS communication data area, user can implement the transparent communication between

PROFIBUS and MODBUS.

▼technology resources:《PB-B-MM/232/485/V3x Manual》、《PB-B-MS/232/485/V32 Manual》;All these

resources can be downloaded from the Internet. Website:www.c-profibus.com.cn

⒉ Technical Data

⑴On the PROFIBUS side, PB-B-MM/232/485/V3x interface is used as a PROFIBUS-DP slave, and on the

MODBUS side, it is used as MODBUS master. The interface can realize the transparent communication via

the mirror relationship between the PROFIBUS and MODBUS communication data area. See Fig 1-2:

ASCII Printer

PROFIBUS-DP

PB-B-MODBUS/V3x PB-B-MODBUS/V3x

RS-232
PROFIBUS devicePROFIBUS device

MODBUS master
MODBUS master

Fig 1-2:On MODBUS side, it is used as master,On PROFIBUS side is used as slave. Product is
connected to MODBUS master devices via RS-232/485.

⑵ PB-B-MM/232/485/V3x used as MODUBUS slave, supporting 01H、02H、03H、04H、05H、06H、0FH、

tel: 010-62054940 7 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

10H functions.
⑶ PROFIBUS-DP/V0 protocol: according to GB/T20540-2006: Digital data communication for
measurement and control – Fieldbus for use in industrial control systems – type 3: PROFIBUS
⑷ PROFIBUS-DP slave, can detect the boudrate automatically, the max boudrate is 12M/s.

⑸ The input/output data amount of PROFIBUS is not confined, the max PROFIBUS input/output is:

① Input Bytes + Output Bytes ≤232 Bytes

② Max Input Bytes ≤224 Bytes

③ Max Output Bytes ≤224 Bytes

⑹ MODUBUS protocol interface is standard RS-232/485 interface, half-duplex, boudrate: 2400、4800、9600、

19.2K、38.4K、57.6K selectable. parity (odd, even, none selectable)。

⑺ Power supply:24VDC(±5%),140mA

⑻ Environment temperature: 0~55℃, Humidity: 95%

⑼ Shape:(long)70mm×(high)112mm×39.5mm(sick)

⑽ Installation:35mm race

⑾ Safety level:IP20

tel: 010-62054940 8 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Chapter 2:Product Structure, Installation, Start up


⒈ Shape of Product (In the picture)

Power LED POWER(Green) CompanyLogo

PROFIBUS commu.(Yellow)

Product tag :
Information for users
PROFIBUS communication
LED(red),
35mm race

RS-232/485 TxD LED(green)

Address set switch。

RS-232/485 RxD LED(Green)


24VDC power supply

9 pin sub-D connector (female) Product type

RS-232 interface: 9 pin sub-D


RS-485 interface: 5 pin

Fig 2-1:The front

Function switch

35mm race slot

Race lock

Fig 2-2:The back

tel: 010-62054940 9 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

⒉ Installation
During installation, 35mm race is used. See Fig 2-3:

Fig 2-3:Installation with 35mm race

⒊ Shape
70 36
39
112

38

39.5

Fig 2-4:The shape of product

tel: 010-62054940 10 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

⒋ PROFIBUS interface components and installation


9 pin sub-D female connector is used in Standard PROFIBUS interface. Users are suggested to use

standard PROFIBUS interface, and standard PROFIBUS cable. More details about PROFIBUS installation

guideline can refer to PROFIBUS technology standard.

Fig 2-5:9 pin sub-D connector, standard PROFIBUS connector and cable

⒌ RS-232 interface and cable


The RS-232 interface of PB-B-MODBUS, which have 9 pin sub-D connector, is the standard three-line

RS-232 interface. According the figure below, RS-232 can be made by users themselves:

PB-B-MODBUS/232 MODBUS device

fun pin pin fun

1 1

TXD 2 2 RXD

RXD 3 3 TXD

4 4 DTR

GND 5 5 GND

6 DSR

7 7 RTS

8 8 CTS

9 9

Note: The definition of 9 pin connector of the figure above refers to MODICON PLC 140 CPU
534 14.For other MODBUS devices, when making cable, please pay attention to its RS-232 pin
definition, so that Txd(2)→Rxd, Rxd(3)→Txd.

tel: 010-62054940 11 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

⒍ RS-485 interface and installation


(Ⅰ)、The basic feature of RS-485 interface transfer technology of PB-B-MODBUS/485

The feature of 485 interface of PB-B-MODBUS/485 is completely the same with PROFIBUS interface. It

is standard RS-485 interface. The features of this product is introduced as follow:

⑴ The features of RS-485 transfer technology

① Net topo: line bus, with bus terminator resisters on both end points of the bus.

② Boudrate: 2400 bit/s~57.6Kbit/s

③ Media: shielded copper, or without shield, depending on the environment(EMC).

④ Station number: 32 stations per segment (without repeater), the max number is 127 (with repeater).

⑤ Plug connection:4 ports


⑵ The main point of RS-485 transfer devices installation

① All the devices have to be connected to RS-485 bus.

① The number of station per segment cannot be more than 32.

② To make sure that system can operate without error, bus terminator resistors, which have power supply, are

needed on both end of bus. See Fig 2-7:


5V

RxD/TxD-P (+) (+) RxD/TxD-P 390 Ω

Data line
RxD/TxD-P (+)

RxD/TxD-N (-) (-) RxD/TxD-N 220 Ω


Data line
RxD/TxD-N (-)
Shield
390 Ω
Cable

0V
A type cable bus terminator

Fig2-7:RS-485 cable connection and terminator

(4) The max length of cable depends on the boudrate. If A type cable is used, the max length is 1200M when

boudrate is under 187.5K.

(5) The technology date of A type cable:

impedance:135-165Ω capacitance:〈 30pf/m loop resistance:110Ω

acreage of cable:>0.34mm/Ω

(Ⅱ)、The polarity of PB-B-MODBUS/485 interface

The polarity of PB-B-MODBUS/485 interface is showed in Fig 2-8:

tel: 010-62054940 12 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

A-

B+

PE to copper

Fig 2-8:The polarity of PB-B-MODBUS/485 interface

(Ⅲ)、the connection of RS-485 terminator

The feature of 485 interface of PB-B-MODBUS/485 is completely the same with PROFIBUS interface. On the

end of RS-485 bus, bus terminator resistors should be added. See Fig 2-9:
Last station
First station

5V 5V
390Ω Data line B+
B+ B+

220Ω Data line A -


A- A-

390Ω
0V 0V

A B A B

station 2 station 3

Fig 2-9:Bus terminator resistor on both end of bus


PB-B-MODBUS/485 product has already integrated the terminator resistor. See Fig 2-10:

External stub
RTS
A-
Txd
B+
0V

Rxd
External stub

PE to copper

5V

Fig2-10:Bus terminator resistor has been integrated in PB-B-MODBUS/485/V3x

So, when PB-B-MODBUS/485 is placed on the end of RS-485 bus, external stub should be connected, so

that the internal terminator resistor can be connected into the bus. See Fig 2-10 2-11:

tel: 010-62054940 13 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

TA

A-

B+

TB
PE to copper

RS-485 device RS-485 device RS-485 device

Fig 2-11:PB-B-MODBUS/485/V3x is placed at the end of RS-485

When PB-B-MODBUS/485 is not placed on the end of RS-485 bus, See Fig 2-12:

A-

B+

PE to copper

RS-485 device RS-485 device RS-485 device

Fig2-12: PB-B-MODBUS/485/V3x is not placed at theend of RS-485

⒎ Power supply
Power supply: 24VDC(±5%),140mA

24V G PE

Notice the PE!

+24V 24VG PE!


⒏ PROFIBUS slave address setting
Bridge is used as slave on the PROFIBUS side, so the slave address has to be set. Two rotary switches SA

on the frontboard of product do the address setting. See Fig 2-13, the address is 19.

tel: 010-62054940 14 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

ON
OFF
SW1 2 3

Fig 2-13:PROFIBUS address set switch SA. The address is 19 Fig 2-14: with the switches on the back, address more than 99

If PROFIBUS address more than 99 is needed, the function select switch SW on the backboard should be

used to set the address. See Fig 2-14:

If SW3=OFF(downward),the address of this slave is SA(19);

If SW3=ON(upward),the address of this slave is 100+SA(19)=119;

If SA ≧ 27, even SW3=ON(upward),the address of this PROFIBUS slave is still 27, since PROFIBUS

protocol specify the area of slave address is 0 ~ 126.


⒐ Configure bridge as MODBUS master, or MODBUS slave
The highest bit (SW1) of bridge function dipswitches SW (on the back board of product) is used to set the

MODBUS master/slave function. See Fig 2-15:

ON

OFF
SW1 2 3

Fig 2-15:The highest bit (SW1) of bridge function dipswitches SW (on the back board of product)

SW1=OFF(downward):The product is set to PB-B-MM/RS232/485/V3, which means the product is used as

MODBUS master. The GSD file being used is: DS_MMV3x.GSD

SW1=ON(upward):The product is set to PB-B-MS/RS232/485/V3, which means the product is used as

MODBUS master. The GSD file being used is: DS_MSV3x.GSD

⒑ LED
⑴ power LED POWER, green. Light: power on; Out: power off

⑵ PROFIBUS status LED PBOK, yellow. Light: PROFIBUS master has connected to this bridge, the

product is in data exchange status. Out: PROFIBUS master has not exchange data with this bridge.

tel: 010-62054940 15 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

⑶ PROFIBUS failure LED PBFAL, red. Light: PROFIBUS communication fails. Out: PROFIBUS master

connected to this bridge, the product is in data exchange status.

⑷ MODBUS-232/485 TxD LED, green. Light: PB-B-MODBUS/232/485/V3x is send data to the field device.

Out: no data being send.

⑸ MODBUS-232/485 RxD LED, green. Light: PB-B-MODBUS/232/485/V3x is receiving data send by the

field device. Out: no data being received.

⒒ The steps of Power on and the exclude of errors


⑴ the connection between PROFIBUS master and PB-B-MODBUS/232/485/V3x
① Make sure the 24V power supply is connected, and the polarity is right.

② Check the PROFIBUS slave address dipswitches. Note: Since the PB-B-MODBUS/232/485/V3x interface

only read the address set by the switch during power on, so the power supply should be shut down and regives

again if the address is changed.

③头 If PRFIBUS master has already configured the interface slave, PROFIBUS connector should be used. Note:

if this interface is placed at the end of PROFIBUS station, the connector with terminator resister should be

used. And the terminator resister select switch should be placed on ON state.

④ Give 24V power supply, the power LED will be light.

⑤If the PROFIBUS failure LED PBFAL (red) is light, it means the communication between PROFIBUS master

and the interface fails. Please check the connector, PROFIBUS cable, especially the way PROFIBUS master

configure the interface (See Chapter 5). If PROFIBUS failure LED PBFAL (red) is out, and the PROFIBUS

status LED PBOK (yellow) is light, that means the master has already exchanging data with slave interface, the

slave has connected to the PROFIBUS.

⑥ General questions:PROFIBUS failure LED PBFAL (red) is light. The PROFIBUS is not connected:

→check the components connect to PROFIBUS (cable, connector, terminator resistor)

→check the setting of PROFIBUS address dipswitch.

⑵ The connection between MODBUS master PB-B-MM/V3x and MODBUS devices

① If the field device is ready, user can connect to MODBUS device via RS-232 cable or RS-485 double-line

cable. Note: try to avoid insert and pull the RS-232 with power on.

② By checking the MODBUS /232/485/V3x TxD LED and RxD LED, user can handle the communication on

the MODBUS /232/485/V3x side.

Whether the MODBUS/232/485 is normal depends on:


(A) Whether PROFIBUS master controller has connected to PB-B-MODBUS?Refer to ⑴。

tel: 010-62054940 16 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

(B) Whether PB-B-MODBUS’s interface configuration of PROFIBUS master is right?(e.g. use the STEP 7

finish the configuration of HARDWARE, especilly the setting of serial port baud rate),and download the

configuration to master controller.

(C) Whether PROFIBUS master has setted start_M=1 to startup MODBUS communication.

(D) Other questions: please reference to “chapter 5”—4.MODBUS work state and transition—(3) several errors

and fault as well as solution.

tel: 010-62054940 17 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Chapter 3:MODBUS Introduction


Statement: Use PB-B-MODBUS/232/485/V3x products without understanding the technical details,

if reader just want to use the product,you can read block letter only(overlook Italic)。
1. MODBUS Protocol
(1) Modbus Protocol mainly used for communication between the controller。Through this protocol, can
communication between two controller or between a controller that via network (e.g. Ethernet) and other
devices. Nowadays, there are many devices using MODBUS protocol standard.
(2) If refer to international ISO/OSI seven layers network model, standard MODBUS protocol defines physical
layer, data link layer and application layer:
Physical Layer:define the asynchronous serial communication standard that based on RS232 and RS485;
Data link Layer:define the MAC that based on station identification and master/slave mode;
Application Layer:define information criterion (or message format) and communication service functions;

Application Layer

Presentation Layer

Session Layer

Transport Layer

Network Layer

Date Link Layer MODBUS Master/Slave

Physical Layer RS232/485

OSI Model MODBUS Protocol

(3) Many devices are based on MODBUS rs232/485,also have changed MODBUS network communication,
using MODBUS’s Application Layer only, and use other communication protocol in bottom, e.g. use
Ethernet+TCP/IP network, or spread spectrum wireless communication MODBUS network etc. in the bottom.
2. MODBUS Protocol points
(1) MODBUS is master/slave communication protocol. Master initiate transactions ,only the slave that have the
same address with the message that master initiate can sent response to master
(2)It is broadcast mode if message with address 0 ,no slave need to response,can be sent as a broadcasting
message ,including:
•Modify coil status;
•Modify contents of register;
•Force multiple coils;
•Force multiple registers;
•Inquiry diagnosis;
(3) MODBUS defined two transmission modes:ASCII mode、RTU(binary)mode;Two transmission mode can’t
be mixed;
※ This product PB-B-MODBUS/V3x only use RTU mode。

Characters RTU ASCII

tel: 010-62054940 18 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Coding Binary ASCII(characters:0-9,a-z, A-Z)


Bits per Byte Start bit:1 BIT Start bit:1 BIT
Data bits:8 BITS Data bits:7 BITS
Parity(optional):1BIT Parity(optional):1BIT
Stop bits:1or2 Stop bits:1or2
Error Check CRC(Cyclical Redundancy LRC(Lingitudinal Redundancy
Field Check) Check)
(4) Transmission Error Checking
→Transmission error checking have parity checking and redundancy checking.
→Stop dealing with the message, when checking have a error, slave stop communication, not response to this
message any more.
→Once a communication error occur, this message will be regarded as not reliable; MODBUS master will give
a “connumication error has occurred” judgment, if without received response from slave after some time.
(5) message level(character level)use CRC-16(cyclical redundancy check)
(6) RTU format of MODBUS message

Less than 3.5 Address Function Data CRC Check Less than 3.5
characters characters
interval time 1*byte 1*byte N*bytes 2*bytes interval time

3. Exception Responses
(1)Slave receive master’s message,no transmission error,but slave can’t execute master’s order or can’t give a
response correctly, slave will give a “exceptionl response” message to answer.
(2) Message format of exception response
For example:master initiate a request message,Function code 01:read 1 coil value of 04A1

Slave Addre Function Starting Address Hi Starting Address Lo No. of Coils Hi No. of Coils Lo CRC

0A 01 04 A1 00 01 xxxx

As the slave’s highest coil address is 0400, 04A1 over addresses ceiling,slave will give a exception response
asfollow:(Notice:Function code highest bit set to 1):

Slave Address Function Exception Code CRC

0A 81 02 xxxx

(3) Exception Rresponses Codes


Code Name Meaning
01 ILLEGAL The function code received in the query is not an allowable action for the
FUNCTION slave. If a Poll Program Complete command was issued, this code indicates
that no program function preceded it.
02 ILLEGAL DATA The data address received in the query is not an allowable address for the
ADDRESS slave.
03 ILLEGAL DATA Avalue contained in the query data field is not an allowable value for the
VALUE slave
04 SLAVE DEVICE An unrecoverable error occurred while the slave was attempting to perform
FAILURE the the requested action.(See Annotate 1)。

tel: 010-62054940 19 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

05 ACKNOWLEDGE The slave has accepted the request and is processing it, but a long
durationof tiome will be required to do so. This response is returned to
prevent a timeout error from occurring in the master. The master can next
issue a Poll Program Complete message to determine if processing is
completed.(See Annotate 2)。
06 BUSY 、 REFUSE The slave is engaged in processing a long-duration program command. The
EXECUTE master should retransmit the message later when the slave is free.
07 NEGATIVE The slave can’t perform the program function received in the query. This
ACKNOWLEDGE code is returned for an unsuccessful programming request using function
code 13 or 14 decimal. The master should request diagnostic or error
information from the slave.(See Annotate 2)。
08 MEMORY PARITY The slave attempted to read extended memory, but detected a parity error in
ERROR the memory. The master can retry the request, but service may be required
on the slave device.

4. MODBUS memory
MODBUS ranges over controller or MODBUS device, the memory marks with 0XXXX、1XXXX、
3XXXX、4XXXX.
Memory Name Type Read/Write Memory address
mark
0XXXX coil bit Read/Write 00001~0XXXX,
XXXX:be related to device
1XXXX Input coil bit Only read 10001~1XXXX,
XXXX:be related to device
3XXXX Input register word Only read 30001~3XXXX,
XXXX:be related to device
4XXXX keeping/output word Read/Write 40001~4XXXX,
register XXXX:be related to device

5.MODBUS function
MODBUS application layer prescribes the MODBUS telegrame framing and service function.

(1) Read output status

function code:01H

Master query massage framing:

address Functio Start Start Coils number Coils number CRC


n code address(High address(Low (High) (Low)
11 01 00 13(19) 00 25 XXXX

fuction:read output coil status of slave 0XXXX.

Notice:The start address 00000 of of message corresponds to device address 00001,and the others like it。

tel: 010-62054940 20 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

In this example:Read output coil status of 11H slave,start address=0013H=19,corresponding address 00020;

the number of coil=0025H=37;end address=00020+37-1=00056;

So,this query message is reading output coil status of 11H slave,from 00020 to 00056,adding to 37 coils.
Response framing of the slave
Address Function Byte Coils Coils status Coils Coils Coils status CRC
code count status 28-35 status status 52-56
20-27 36-43 44-51
11 01 5 CD 6B B2 0E 1B xxxx

Function: Slave return 0xxxxx status of the output coil


Example: CD=11001101,consequently 0020-0027;
1B= 0 0 0 1 1 0 1 1,consequntly 0052-0056;

00052

00056

Fill 0

(2) Read Input Status


Function code :02H
Master query message framing:
Address Function Starting Starting No. of No. of CRC
code Address Hi Address Lo Points Hi Points Lo
00 16

11 02 00 C4 00 16 XXXX

Function: Read input coils status of 1XXXX in the slave.


Note: coils starting address 000000 in the message counterparting address 100001 in the device,others
deffered.
Example: Read 11H input coils in the slave, starting address=00C4H=196,counterparting address
10197;coils count=0016H=22;ending address=10197+22-1=10218;

So,the function of this query message is: read 17(11H)of input coils in the slave 10197—10218,totally 22

input coils status;

Response framing in the slave:

Address Fuction Byte count DI DI DI CRC


code 10197-10204 10205-10212 10213-10218

11 02 3 AC DB 35 xxxx

tel: 010-62054940 21 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

function:the slave return DI=1XXXX status

(3) Read holding Registers

Function code:03H

Master query massage framing:


Address Function Registers Registers Registers Registers CRC
code starting address starting address Count Hi Count Lo
Hi Lo

11 03 00 6B(107) 00 03 xxxx

Function :Read holding registers:4XXXX。

Note:register starting address 00000 in the massage counterparting address 40001 in the device , others

deffered。

Example :Read 11H holding registers value in the slave,starting address=006BH=107,counterparting

address40108;registers count=0003;ending address=40108+3-1=40110;

So,the function of the query massage is:read 17(11H)3 holding regisres value40108—40110 in the slave;

Response framing in the slave:

Ad Fun Byte Register Register Register Register Register Register CRC


dres ctio count 40108 40108 40109 40109 40110 40110
s n Hi Lo Hi Lo Hi Lo
d
11 03 6 02 2B 01 06 2A 64 XXXX

Function :the slave return holding registers value 40108—40110;(40108)=022BH,(40109)=0106H,

(40110)=2A64H

(4) Read input Registers

Function code:04H

Master query massage framing:

Address Function Registers starting Registers starting Registers Registers CRC


code address Hi address Lo count Hi count Lo

11 04 00 08 00 01 XXXX

tel: 010-62054940 22 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Function:read input registers value 3XXXX in the slave。

Note:register starting address 00000 in the massage counterparting address 30001 in the device , others

deffered。

Example : read 11H input registers value in the slave , starting address=0008H=0008 ,
counterparting address30009;registers count=0001;ending address=30009;so,read 17(11H)
1 holding regisres value 30009 in the slave;
Response framing in the slave:

Address Function Byte Input registers Hi Input registers Lo CRC


code count 30009 30009

11 04 2 01 01 XXXX

Function :slave return input registers value 30009;(30009)=0101H

(5) Force single coil

Function code:05H

Query framing:
Addres Functio Coil address Coil address Force data Force CRC
s n code Hi Lo Hi Data Lo

11 05 00 AC(172) FF 00 XXXX

Function :Force setting 17 slave coil value 0XXXX。coil starting address 00000 in the massage counterparting

address 00001 in the device , others deffered。

Force data=FF00,set coil ON


Force data=0000,set coil OFF
Example :starting address=00AC(H)=172,counterpating address 00173 in the device。Force setting 17 slave

coil 0173 as ON。

Response framing:return just as receive.

Address Functio Coil address Coil address Force data Force Data CRC
n code Hi Lo Hi Lo

11 05 00 AC(172) FF 00 XXXX

Function :force setting 17 slave coil 0173 as ON ,then,just as receive.

tel: 010-62054940 23 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

(6) preset single registers

Function code:06H

Query framing:
address Functio Register Register Data Hi Data Lo CRC
n code address Hi address Lo

11 06 00 87(135) 03 9E XXXX

Function:preset single register value 4XXXX。Coil starting address 00000 in the device counterparting address

40001in the device,others deffered。

Example :preset 17 slave single holding registers value as 40136 =0x039E;

Response framing:return just as receive

Address Functio Register Register Data Hi Data Lo CRC


n code address Hi address Lo

11 06 00 87 03 9E XXXX

Function :preset 17 slave single holding registers value 40136 =0x039E,then return just as receive。
(7) Read Exception Status
Function code:07H
This production PB-B-MODBUS/V32 do not support this function。
(8) return checking
Function code:08H
This production PB-B-MODBUS/V32 do not support this function。
(9) Fetch Comm Event Counter
Function code:0BH
This production PB-B-MODBUS/V32 do not support this function。
(10) Fetch Comm Event Log
Function code:0CH
This production PB-B-MODBUS/V32 do not support this function。
(11) Force Multiple Coils
Function code:0FH

Master query framing:

Addres Functio Coil starting Coil starting Coil count Coil count Byte count Coil status Coil status CRC
s n code address Hi address Lo Hi Lo 20-27 28-29

11 0F 00 13 00 0A 02 CD 00 XXXX

tel: 010-62054940 24 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Function :force preseting multiple coils 0XXXX as ON/OFF。

Note:coil starting address 00000 in the massage counterparting address 30001 in the device , others deffered。

Example :force setting 11H slave multiple coils,coil starting address=0013H=19,counterparting address

00020;coil count=000AH=10;ending address=00020+10-1=00029;

So,the function of this qury massage:force setting 17(11H)slave 10coils value 00020—00029

;0CDH→00020-00027; 00H→00028-00029;

Slave response framing:

address Function Coil starting Coil staring Coil count Coil Count CRC
code address Hi address Lo Hi Lo

11 0F 00 13 00 0A XXXX

(12) Preset Multiple Registers


Function code:10H

Master query response framing:

Add Fun Register Register Register Hi Register Byte Data Data Data Data CRC
ress ctio starting starting Lo count Hi Lo Hi Lo
n address Hi address Lo
cod
e

11 10 00 87 00 02 04 01 05 0A 10 XXXX

Function :preset slave multiple holding register value 4XXXX。

Note:holding register starting address 40000 in the massage counterparting address 40001 in the device , others

deffered。

Example : preset 11H slave multiple holding register value , register starting addres=0087H=135 ,

counterparting address 40136;coil coun=0002H=2;ending addres=40136+2-1=40137;

So,the function of this qury massage:preset 17(11H)slave 2 holding register value 0105H→40136; 0A10H

→40137.

Response framing:

addr Func Register Register Register Register CRC


ess tion starting starting count Hi count Lo
code address Hi address Lo

11 10 00 87 00 02 XXXX

tel: 010-62054940 25 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Chapter 4: The Principle of Protocol Transform


1.The Hardware Structure of PB-B-MODBUS/232/485
PB-B-MODBUS/232/485 is a wise protocol transfer interface from PROFIBUS to MODBUS-232/485. In

the RAM of interface, there is a data area for the mirror relationship between PROFIBUS and MODBUS. The

protocol transfer between PROFIBUS and MODBUS and data exchange is complied by software. See Fig 4-1:

the hardware structure of PB-B-MODBUS/232, and Fig 4-2:the hardware structure of PB-B-MODBUS/485.

Bus Bridge PB-B-MODBUS/485 Bus Bridge PB-B-MODBUS/485

SIEMENS SIEMENS
CPU RAM CPU RAM
SPC 3 SPC 3

PROFIBUS RS-232 PROFIBUS RS-485


Interface Interface Interface Interface

slave addresss Slave address

+24 GND +24 GND

PRPFIBUS RS-232 PRPFIBUS RS-485

Fig 4-1:PB-B-MODBUS/232 Fig 4-2:PB-B-MODBUS/485

Fig 4-1 and Fig 4-2 show the PROFIBUS protocol chip of SIMENSE Company – SPC3. PROFIBUS

Interface is standard PROFIBUS drive circuit, which is composed of optocouplers and RS-485 drive. RS-232

Interface is standard RS-232 drive circuit, which is composed of optocouplers and RS-232 drive chip. CPU can

control the PROFIBUS communication via the control of SPC3; it also can set up a data buffer in the RA M. On

the other side, the communication with MODBUS field devices can be implemented via RS-232 interface, and a

MODBUS data buffer in the RAM. Via the data exchange between the two data buffer area operated by CPU,

the communication between PROFIBUS and MODBUS can be implemented.

tel: 010-62054940 26 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

2.Connection with PROFIBUS


In the PROFIBUS system, which PLC is used as master, PB-B-MS/V3 is PROFIBUS slave. On the other

side, PB-B-MS/V3, which is used as slave, connected to MODBUS devices via RS-232/485. See Fig 4-3. The

PC in the Fig 4-3 is a class 2 master, which is not necessary.

ASCII Printer

PROFIBUS-DP

PB-B-MODBUS PB-B-MODBUS

RS-232
PROFIBUS devicePROFIBUS device

MODBUS master
MODBUS master

Fig 4-3:Using PB-B-MS/V3 connect MODBUS master or a MODBUS local net to PROFIBUS
system which use a PLC as master

3. The protocol transfer principle between PROFIBUS and MODBUS


The protocol transfer principle that is used to this product between PROFIBUS and MODBUS see Fig

4-4,instruction later:

tel: 010-62054940 27 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

PROFIBUS
PROF SPC3 CPU TXD/RXD RS232
IBUS RS485

RAM ①02H function:read input status

②04H function: read input register

③0FH function:force setting coil

④02H function:read input status

MODBUS massage queue


PROFIBUS MODBUS
data data

Note1 : CPU get MODBUS


Note 3 : when CPU Note 2 : CPU receive massage in order,and send the
accomplish MODBUS MODBUS response massage from the serial I/O。
communication one time、 massage , if it is “ read If it is“write(05H、06H、
or scanning MODBUS ( 01H 、 02H 等 )” 0FH 、 10H )” function , write
message one time , then function , store the MODBUS data buffer。
exchange MODBUS data MODBUS data into
and PROFIBUS data in the MODBUS data buffer。
buffer one time。

Fig 4-4 The protocol transfer principle between PROFIBUS and MODBUS

(1)when the product establish “MODBUS message queue” in the RAM,that is MODBUS message serial 。

this request is what user apply according to,when PROFIBUS master configure this interface of this product,

it can be generated automatically once selecting menue,and translate to the RAM in this product if master

connect to this interface。About how to use this request,selecting MODBUS communication function in the

menu,we will describe it detailed in chap five。

(2)establishing PROBIBUS data area in the RAM of this product,the data that PROFIBUS master and

slave communicate with is stored in this area。PROFIBUS communicating data is divided into input data and

output data,all are based on PROFIBUS master。

(3)establishing MODBUS data area in the RAM of this product,he data that MODBUS master and slave

communicate with is stored in this area。

tel: 010-62054940 28 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

MODBUS communicating data is divided into input data and output data,write(set,such as function 05H、
06H、0FH、10H)MODBUS slave are output data, PROFIBUS output data Correspondingly;the data that
read from modbus slave(read,such as function 01H、02H、03H、04H)is MODBUS input data,PROFIBUS
output data Correspondingly。See Fig 4-5:PROFBUS data area and MODBUS data area。

PROFIBUS MODBUS
master slave
MODBUS
PROFIBUS MODBUS Read
input data Input data command
MODBUS
PROFIBUS slave
PROFIBUS MODBUS MODBUS
Write
output data Output data
command

MODBUS
slave

Fig 4-5 data area of PROFIBUS and MODBUS


(4)CPU get MODBUS massage in order,and send the massage from the serial I/O。If it is“write(05H、06H、

0FH、10H)”function,write MODBUS data buffer

(5)CPU receive MODBUS response massage,if it is“read(01H、02H 等)”function,store the MODBUS

data into MODBUS data buffer。

(6)when CPU accomplish MODBUS communication one time、or scanning MODBUS message one time,

then exchange MODBUS data and PROFIBUS data in the buffer one time。

(7)PROFIBUS master communicate by PROFIBUS,accomplishing data exchange with the data area of

PROFIBUS slave by this interface。

tel: 010-62054940 29 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Chapter 5:The method of communication and configuration


1.Example
The instruction will base on an example,this manual that make PB-B-MM/V32 as an example instruct the

method of communication and configuration,this is an example of he method of communication and

configuration of a product.see Fig 5-1

PC1: MPI programming cable S7-300


STEP 7 CPU315-2DP
+8DI+8DO

PROFIBUS-DP
K0
PB-B-MODBUS232/V32 L0
K1
L1
RS232 K2
L2
MODBUS 设备
MODICON PLC … …
140 CPU 534 14
L7 K7

Fig 5-1 an example of the method of communication and configuration of a product

System configuring example


NO. Device name Models and number instruction
Specifications
1 PROFIBUS master CPU315-2DP 1 8DI、8DO
PLC/S7-300
2 PROFIBUS/MODBUS PB-B-MODBUS232 /V32 1 GSD files:
bus bridge DS_MMV32.GSD
3 MODBUS machine MODICON PLC 1 2 MODBUS
140 CPU 534 14 interface ,9 hole
D-type plug
RS232
4 Self-locking button 8DI、8DO connecter of 1
K0~K7; S7-300
LED L0~L7
5 Master configuration and STEP 7 V5.1 1
programming software
6 Computer PC1 and MPI 1
programming cable
2. method of system configuration
naot:
(一)~(二)is an general method to establish an project,if you are skilled with this,you can read

tel: 010-62054940 30 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

it quickly,and read it carefully from (三)。


(Ⅰ) set up a “project” in PC1-STEP 7

using PC1:

(1)Put the GSD file of PB-B-MODBUS/232/485/V32, DS_MSV32.GSD, under the PC1:Step7\S7data\gsd\.

And the bitmap DS232.bmp should be put under PC1:Step7\S7data\nsbmp\;

(2)Open “SIMATIC Manager”;See Fig 5-2

Fig 5-2
(3) File→New, T_MODBUS,→OK. Fig 5-3

Fig 5-3

(4) Insert→Station→SIMATIC 300 Station. Fig 5-4

tel: 010-62054940 31 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Fig 5-4

(Ⅱ)、Hardware

(1) double click SIMATIC 300(1)→Hardware;See Fig 5-5-1、5-5-2。

Fig 5-5

tel: 010-62054940 32 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Fig 5-6

(2) Option→Update Catalog. Put the GSD file of the device into device catalog.

(3) Hardware Catalog\SIMATIC 300\RACK-300\Rail;

(4) the configuration of CPU:select UR 2 slot→Hardware Catalog\SIMATIC 300\CPU-300\CPU 315–2

DP\6ES7 315-2AF03-0AB0(本例); See Fig 5-7

Fig 5-7

(5)the configuration of PROFIBUS:New→Network Settings,select:DP、187.5kbit/s(just a example)→

tel: 010-62054940 33 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Yes。See Fig 5-8

Fig 5-8

(6) select PROFIBUS master address,see 5-9:

Select address

Fig 5-9

tel: 010-62054940 34 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

(Ⅲ) configure PB-B-MODBUS/232/485/V32 as PROFIBUS slave

(1) configure PROFIBUS slave PB-B-MM/V32

Select PROFIBUS(1) DP master system(1),make the line black,open Hardwear Catalog\PROFIBUS

DP\Additional Field Devices\ Gateway\PB-B-MM/V32 double-click;

(as we had copied GSD documents DS_MMV32.GSD to PC1:Step7\S7data\gsd\,click “(2) Option→

Update Catalog。Put facility GSD documents to facility Catalog”make a update,so now we can find our

product configuration in Hardwear Catalog。Other third party product configurations are the same)

Select slave address,in this case select address is :19→enter。See figure5-10、figure 5-11。

Fig 5-10

tel: 010-62054940 35 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Figure 5-11
(2) configure RS232 interface of PB-B-MM/V32

Click PB-B-MM/V32,select Parameter Assignment in the PB-B-MM/V32 device configuration window,

figure 5-12:

Fig 5-12
tel: 010-62054940 36 web: www.c-profibus.com.cn
Beijing D&S Fieldbus Technologe Co. td

① configure RS232 baudrate:select“Baudrate 9600”→“Value” →select the baudrate→OK,figure 5-13。

Selectbaudrat

Fig 5-13
② select“parity verify”:as①select“parity”。

③“master/slave”
:configrure the product as master,use GSDdocuments DS_MMV32.GSD,select MODBUS

master mode only。As ① to select “master”.

(3) configure PROFIBUS and MODBUS data update mode

as“(2) configure RS232 interface of PB-B-MM/V32,set up window;select Parameter Assignment,figure

5-12;”

select“DataUpdataMode At Evry MD End” →“OK”,figure 5-14。

PROFIBUS and MODBUS data update mode:user specify when to exchange PROFIBUS data area and

MODBUS data area。

① At Every MD End

After MODBUS scan machine complete every MODBUS communicate command , execute once

PROFIBUS and MODBUS data area data exchange。This is default mode。It makes sure that transfer data

from PROFIBUS master to MODBUS facilities in a fastest speed。

② At MD_scan End

After MODBUS scan machinecomplete a whole MODBUS message queue scan,execute once PROFIBUS

and MODBUS data area data exchange。This mode makes sure the integrality of MODBUS communicate

tel: 010-62054940 37 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

data。

Data update mode

Fig 5-14

(4) configure Time of Replay

select“Time of Replay → 50ms”→“OK”, figure 5-15。

Select Time of reply

Fig 5-15

tel: 010-62054940 38 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Time of Replay M_Tsdr:after bus bridge sends MODBUS message, waits for MODBUS facilities’ time of

reply。In case MODBUS facilities do not reply exceed M_Tsdr time,bus bridge stop waiting,continue to send

next MODBUS message。M_Tsdr usually has relate to MODBUS facilities。M_Tsdr type value of MODCON

PLC <50ms。This product select range:10ms~infinite。

(Ⅳ) configure MODBUS message queue of PB-B-MODBUS/V32

⑴open PB-B-MM/V32 catalog in Hardware catalog

PB-B-MM/V32 has 0#~38# total 39 slots(logical,not phisical), 0#、1# slots are in use,other 37

slots are supplied for users。Every slot can be inserted a MODBUS communicate module(message),total

can be inserted 37 MODBUS(message)。PB-B-MM/V32 every MODBUS module of PB-B-MM/V32 is

corresponding to one single function MODBUS message,can insert to a slot by double-click。Figure 5-16。

Module and MODBUS messge types relationship showed in table 5-1。

open PB-B-MM/V32 catalog in Hardware


catalog ,every module can form a
MODBUS message

PB-B-MM/V32 has totally 37 slots supplied for users,


which are used to insert MODBUS communicate message

Fig 5-16

tel: 010-62054940 39 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Table 5-1 modules and MODBUS message types relationship


modules Corresponding MODBUS message Further configuration parameters
functions and storage area
read X bits (0xxxx) 01h function, read X output loops ①MODBUS slave address 0-255;
X=8~256 0xxxx state; ②output loop 0xxxx start address 0-65535
(depends on MODBUS facility);
read X bits (1xxxx) 02h funciton, read X input loops 1xxxx ①MODBUS slave address 0-255;
X=8~256 state; ②output loop 1xxxx start address 0-65535
(depends on MODBUS facility);
read X Words (4xxxx) 03h function, read X holding ①MODBUS slave address 0-255;
X=2~60 registers value 4xxxx ② holding register 4xxxx start address
0-65535(depends on MODBUS facility);
read X Words (3xxxx) 04h function, read X input register ①MODBUS slave address 0-255;
X=2~60 value 3xxx 。 ②input register 3xxxx start address 0-65535
(depends on MODBUS facility);
Write X bits (0xxxx) 0Fh function, X continue loops 0xxxx ①MODBUS slave address 0-255;
X=8~256 force to ON/OFF atate。 ②output loop 0xxxx start address 0-65535
(depends on MODBUS facility);
③count: loop(bit) Y, Y≤X
Write X Words (4xxxx) 10h function, default set slave X ①MODBUS slave address 0-255;
X=2~60 holding registers value 4xxxx。 ② holding register 4xxxx start address
0-65535(depends on MODBUS facility);
Force single bit (05H 05h function, force single loop ①MODBUS slave address 0-255;
Command) value 0xxxx。 ②output loop 0xxxx start address 0-65535
(depends on MODBUS facility);
set single word (06H 06h function, default set single ①MODBUS slave address 0-255;
Command)" holdingregister value 4xxxx。 ② holding register 4xxxx start address
0-65535(depends on MODBUS facility);
⑵ example: insert “read 24 bits(0xxxx)”to 2# slot
This MODBUS module corresponds to 01h function of MODBUS, that is:read 24output loops state
0xxxx.
▼step 1: select 2# slot,then double-click “read 24 bits (0xxxx)”。 insert “24DI read 24 bits(0xxxx) 1..3”

to 2# slot, figure 5-17。

tel: 010-62054940 40 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

insert “24DI read 24 bits(0xxxx) 1..3” to


2# slot; I 1…I 3 are distributed by PROFIBUS
master 3 Bytes input address,corresponding to
MODBUS’s 24 bits(0xxxx) reading.

Fig 5-17
▼step2: set MODBUS parameters:double-click “24 DI read 24 bits(0xxxx) 1..3” in the 2# slot;select

“Parameter Assigement”,complete“slave address”and“start address”parameter set 。figure 5-18:

MODBUS slave address

Fig 5-18

Slave address:specify the slave address sent from MODBUS module to MODBUS facility,corresponding to

the first byte of this MODBUS message.

Start address:this case specifies the 0XXXX start address to be read,attention:loop start address in the

tel: 010-62054940 41 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

message 0000 corresponds to the address 00001 of facility;

▼“MODBUS slave address:0” ⇒ input MODBUS slave address 10,figure 5-19:

▼double-click“start address:0” ⇒ input output loop 0xxxx’s start address to be read,set address is 20 in this

example, figure5-19:

input output loop 0xxxx’s start address

Fig 5-19

Relationship of PROFIBUS address and MODBUS address:

See figure 5-17,I1..I3 are PROFIBUS input address I1-I3 distributed to this MODBUS module by

PROFIBUS master,corresponding to this MODBUS message 24 bits (0xxxx), figure 5-20:

S7-300/CPU315-2DP PB-B-MM/V32 MODBUS


facility
PROFIBUS input area PROFIBUS MODBUS
I1: PROFIBUS input area Read data RS232 0xxxx
I2: 0: area
I3: 1: Send 01H 1xxxx
2: command 3xxxx

4xxxx

Fig 5-20

tel: 010-62054940 42 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

⑶ example for inserting“read 4 Words (3xxxx)”to 3# slot

This MODBUSmodule corresponds to MODBUS 04h function, read slave input register value 3xxxx。

▼step1: select 3# slot,double-click“read 4 Words (3xxxx)”


。 insert“4AI read 4 Words (3xxxx)

256..263” to 3# slot, figure 5-21:

insert“read 4 Words (3xxxx)” to 3# slot;


I 256…I 263are 8 bytes input address
distributed to this MODBUS module by
PROFIBUS master,

Fig 5-21

▼Step2: Setting MODBUS parameter:double click 3# slot “read 4 Words (3xxxx)”,and select“Parameter

Assigement”, finishing slave and start address parameter setting ,as show in Fig 5-22:

Fig 5-22

tel: 010-62054940 43 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Slave address: specifies the address sent from MODBUS message to MODBUS slave,corresponds to the

first byte of MODBUS message.

Start address:this example specifies the 3XXXX start address to be read,attention:register start address 0000

in the message corresponds to 30001 address in the facility。

▼“MODBUS slave address: 0”⇒“10”, input MODBUS slave address, figure 5-23。

▼“start address start address: 0” ⇒ “2”, input input register 3xxxx start address to be read,figure5-24。

Input MODBUS slave address

Fig 5-23

Input input register 3xxxx start address

Fig 5-24
tel: 010-62054940 44 web: www.c-profibus.com.cn
Beijing D&S Fieldbus Technologe Co. td

Relationship of PROFIBUS address and MODBUS address:

Figure 5-23, I256..I263 are PROFIBUS address total 8 bytes distributed to this module by PROFIBUS

master,corresponging to this MODBUS message has read 4 Words (3xxxx),figure 5-25:

S7-300/CPU315-2DP PB-B-MM/V32 MODBUS


facility
PROFIBUSinput area PROFIBUS MODBUS
I256: input area read dataarea 0xxxx
I257: 3:
1xxxx
I258: PROFIBUS 4: 4 Words
RS232
I259: 5: (3xxxx) 3xxxx
I260: 6:
4xxxx
I261: 7: Send 04H
I262: 8: command
I263: 9:
10:

Fig 5-25
⑷ example for inserting “Write 16 bits (0xxxx)”into 4# slot

This MODBUS module corresponds to MODBUS 0Fh function, foce 16 continue loops 0XXXX to

ON/OFF state。

▼step1 : select 4# slot,double-click“Write 16 bits (0xxxx)”。Insert “16DO Write 16 bits (0xxxx) 1..2”

to 4# slot figure5-26:

Insert “Write 16 bits (0xxxx)”into 4# slot, Q1…Q2 are 2


bytes output address distributed by PROFIBUS
master,corresponding to MODBUS has write 16 bits (0xxxx).

tel: 010-62054940 45 web: www.c-profibus.com.cn


Fig 5-26
Beijing D&S Fieldbus Technologe Co. td

▼step2: more set MODBUS parameters:double-click “Write 16 bits (0xxxx)” in the 4# slot,select

“Parameter Assigement”, complete“slave address”、


“start address”and“count”parameter set。Figure 5-27

Fig 5-27

slave address: specifies the address of MODBUS slave received form the MODBUS telegram, corresponds to

the first byte of MODBUS telegram.


start_ address: the example specifies the 0xxxx start address to be written, attention:coil start address 0000 in
the telegram corresponds to 00001 address in the device 。
numbers: the number of bits to be written in 0xxx from the telegram.
ATTEMTION: (this example) numbers=0~16, fault=16.
▼“MODBUS slave address: 0”⇒“10”, input MODBUS slave address⇒“OK”. See Fig 5-28。

MODBUS slave address

Fig 5-28

tel: 010-62054940 46 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

▼“start address: 0” ⇒ “20”, input output-coil 0xxxx start address to be written. See Fig 5-29。

output-coil 0xxxx start address to be written.

Fig 5-29
▼“numbers 16” ⇒ “16”, input the numbers of output-coil to be written ⇒“OK” .See Fig 5-30:

The numbers of output-coil to be written

Fig 5-30

Relationship of PROFIBUS address and MODBUS address:


See Fig 5-26, Q1,Q2 are PROFIBUS output address of this MODBUS module which are distributed by
PROFIBUS master, there are two Bytes, corresponding to 16 coils of MODBUS device which is written
by this MODBUS module. This MODBUS module write the value of two Bytes of Q1,Q2 of RPOFIBUS
master into 0xxx data area of MODBUS device, in this example, start address is 00020;It means that
write the Q1,Q2 of PROFIBUS into 00021~00032 of MODBUS device. See Fig 5-31:

tel: 010-62054940 47 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

S7-300/CPU315-2DP PB-B-MM/V32 MODBUS


device
PROFIBUS output area PROFIBUS PROFIBUS MODBUSj
Q1: output area input area RS232 0xxxx
Q2: 0: 16 bits
1: (0xxxx) 1xxxx
Send 0FH 3xxxx
command
4xxxx

Fig 5-31

⑸ example for inserting “write 4 Words (4xxxx)”into #5 slot.

This MODBUS module corresponds to MODBUS 10h function, preset 4 retain registers of slave 4xxxx..

▼ Step 1: select #5 slot,then double click “write 4 Words (4xxxx)”. “4AO write 4 Words (4xxxx)

Q256…Q263” is placed in #5 slot.See Fig 5-32.

“write 4 Words (4xxxx)”is placed in #5 slot, Q256..Q263


are 8 Bytes output addresses of the MODBUS module
which are distributed by PRFIBUS master.

Fig 5-32

▼Step 2:Set parameters of MODBUS: double click “write 4 Words (4xxxx)”in #5 slot, select “Parameter
Assigement”, complete the setting of parameters of “slave address” and “start address”. See Fig 5-33.
slave address: specifies the address of MODBUS slave received form the MODBUS telegram, corresponds to

the first byte of MODBUS telegram.


start_ address: the example specifies the 4xxxx start address to be written, attention:retain register start
address 0000 in the telegram corresponds to 40001 address in the device 。
▼“MODBUS slave address: 0”⇒“10”, input MODBUS slave address⇒“OK”. See Fig 5-34。

▼“start address: 0” ⇒ “20”, input retain register 4xxxx start address to be written⇒“OK”. See Fig 5-35。

tel: 010-62054940 48 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Fig 5-33

MODBUS slave address

Fig 5-34

tel: 010-62054940 49 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Retain register 4xxxx start address to be written.

Fig 5-35
Relationship of PROFIBUS address and MODBUS address:
See Fig 5-32. Q256..Q263 are PROFIBUS output addresses of the MODBUS module which are
distributed by PRFIBUS master, there are 8 Bytes, corresponding to 4 Words (4xxxx) of MODBUS device
which is written by the MODBUS telegram. See Fig 5-36

S7-300/CPU315-2DP PB-B-MM/V32 MODBUS


device
PROFIBUS output area PROFIBUS MODBUS
Q256: output area intput area 0xxxx
Q257: 2:
Q258: 3: 1xxxx
PROFIBUS
Q259: 4: 3xxxx
Q260: 5: 4 Words RS232
Q261: 6: (4xxxx) 4xxxx
Q262: 7:
Q263: 8: Send 10H
9: command

Fig 5-36

⑹ example for inserting “Force single bit (05H Command)”into #6 slot.

This MODBUS module corresponds to MODBUS 05h function, force salve single coil 0xxx.

▼ Step 1: select #6 slot, then double click “Force single bit (05H Command)”, “8DO Force single bit

(05H Command) ” is placed in #6 slot.See Fig 5-37.

tel: 010-62054940 50 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

“8DO Force single bit (05H Command) ” is placed in #6


slot, Q3 is 1 Byte output addresses of the MODBUS module
which are distributed by PRFIBUS master, corresponding to 1 bit
(0xxx) written by MODBUS

Fig 5-37
▼Step 2:Set parameters of MODBUS: double click “Force single bit (05H Command)”in #6 slot, select
“Parameter Assigement ”, complete the setting of parameters of “slave address” and “start address”. See Fig
5-38:

Fig 5-38

tel: 010-62054940 51 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

slave address: specifies the address of MODBUS slave received form the MODBUS telegram, corresponds to

the first byte of MODBUS telegram.


start_ address: the example specifies the 0xxxx start address to be written, attention:coil start address 0000 in
the telegram corresponds to 00001 address in the device 。
▼“MODBUS slave address: 0”⇒“10”, input MODBUS slave address⇒“OK”. See Fig 5-39。

▼“start address: 0” ⇒ “23”, input single coil 0xxxx start address to be forced ,. See Fig 5-39。

MODBUS slave address

input single coil 0xxxx start address to be forced

Fig 5-39

Relationship of PROFIBUS address and MODBUS address:

See Fig 5-37, Q3 is PROFIBUS output address of this MODBUS module which are distributed by

PROFIBUS master, there is 1 Byte, corresponding to the single coil 0xxxx of MODBUS device which is

written by this MODBUS module. This MODBUS module send MODBUS/05H command according to

the value of Q3, then set single coil 0xxxx of MODBUS device 1 or 0. In this example, single coil start

address is 00023 (See Fig 5-39). If Q3=0, the module would send command of setting single coil 0; If Q3≠0,

it would send command of setting single coil 1.See Fig 5-40:

tel: 010-62054940 52 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

S7-300/CPU315-2DP PB-B-MM/V32 MODBUS


device
PROFIBUS output area PROFIBUS PROFIBUS MODBUS
Q3: output area input area RS232 0xxxx
10: 1 BIT
(0xxxx) 1xxxx
Send 05H 3xxxx
command
4xxxx

Fig 5-40

⑺ example for inserting “set single word (06H command)”in #7 slot.

This MODBUS module corresponds to MODBUS 06h function, preset single retain register of slave

4xxxx..

▼ Step 1: select #7 slot ,then double click “set single word (06H command)”. “1AO set single word

(06H command) Q264…Q265”is placed in #7 slot . See Fig 5-41.

“ set single word (06H command)” is placed in #7 slot,


Q264..Q265 are 2 Bytes output addresses of the MODBUS module
which are distributed by PRFIBUS master, corresponding to 1
word (4xxxx) written by MODBUS.

Fig 5-41

▼Step 2:Set parameters of MODBUS: double click “Force single bit (05H Command)”in #7 slot, select
“Parameter Assigement ”, complete the setting of parameters of “slave address” and “start address”. See Fig
5-42:

tel: 010-62054940 53 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Fig 5-42

slave address: specifies the address of MODBUS slave received form the MODBUS telegram, corresponds to

the first byte of MODBUS telegram.


start_ address: the example specifies the 4xxxx start address to be written, attention:retain register start
address 0000 in the telegram corresponds to 40001 address in the device 。
▼“MODBUS slave address: 0”⇒“10”, input MODBUS slave address.

▼“start address: 0” ⇒ “20”, input retain register 4xxxx start address to be written. See Fig 5-43。:

键入 MODBUS 从站地址

Retain register 4xxxx start address to be written.

Fig 5-43

Relationship of PROFIBUS address and MODBUS address:

tel: 010-62054940 54 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

See Fig 5-41, Q264..Q265 are PROFIBUS output address of this MODBUS module which are

distributed by PROFIBUS master, there are 2 Bytes, corresponding to 1 Word (4xxxx) of MODBUS

device which is written by this MODBUS telegram. See Fig 5-44:

S7-300/CPU315-2DP PB-B-MM/V32 MODBUS


device
PROFIBUS output area PROFIBUS PROFIBUS MODBUS
Q256: output area input area 0xxxx
Q257: 11: 1 Word RS232
12: (4xxxx) 1xxxx
send06H 3xxxx
command
4xxxx

Fig 5-44

(Ⅴ) “Save and Compile”complete the configuration of system

Now, the configuration of system is completed, then “Save and Compile” →quit. See Fig 5-45:

Fig 5-45 MODBUS PB-B-MM/V32 configuration complete


3.The bytes used for communication control and status
In the hardware configuration of PB-B-MM/V32, 0# slot, 1# slot are occupied by interface.The 0# slot is

one byte input used as communication status byte. In this example, it occupies the PROFIBUS input address I0.

The 1# slot is one byte output used as communication control byte. In this example, it occupies the PROFIBUS

tel: 010-62054940 55 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

output address Q0. See Fig5-46:

Status byte
Control byte

Fig 5-46
⑴ format of communication status byte

D7:oe_er D6:CRC_er D5 Tmdr_O D4~D1:M_ER_CODE D0:re_tr

Parity error CRC Time of M MODBUS error code Receive/Send

① receive complete/send permit :re_tr

Send Wait for Receive Process Get ready


telegram receive telegram to send

1 1
Power on
value :1
0 0

Start to send Stare to receive

Fig 5-47 Transition graph of receive/send re-tr status

tel: 010-62054940 56 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

re_tr=1: the interface is receiving or processing telegram or getting ready for send. This manual descript the

product PB-B-MM/V32, Since it is used as MODBUS slave, the interface is in the state of “receive/send

re_tr=1 ”after power on.

re_tr=0: the interface is in the state of sending telegram, waiting for receive.

② M_ER_CODE

After the interface sends a MODBUS telegram, the slave can receive the telegram from without error.

However, if the slave cannot process the command or cannot reply it correctly, it will reply with M_ER_CODE.

Attention: The max number of 37 MODBUS telegram in a MODBUS telegram sequence is 37,but there is

only one communication status byte .Therefore, when the slave cannot reply several telegram correctly, the

M_ER_CODE of communication status byte is scrolled.

③ Tmdr_O

Bus-bridge would wait for the reply of MODBUS device according to the configuration of “Time of

Replay” after sending MODBUS telegram. If “Time of Replay” is time out, Tmdr_O=1.MODBUS scan would

send next MODBUS telegram.

④ CRC_er

CRC_er=1:When the interface receive a MODBUS telegram, there is some parity errors in CRC

checking, the product considers the MODBUS telegram is not credibility, no reply is provided.

⑤ oe_er

there is some parity errors in the receiving characters from serial port,the product considers the

MODBUS telegram is not credibility, no reply is provided.

⑵ format of communication control byte

D7: D6: escape_M D2: D1: D0:


D5: clear_er D4-D3
reset_M M_w_en M_r_en start_M
escape_M

Force MODBUS Stop waiting Clear the Not MODBUS MODBUS Start MODBUS
scan to reset Write permit Read permit scan
error mark used

① Start up scanning time of MODBUS D0:start_M

Start up MODBUS scanning. MODBUS scanner begins scanning at the current pointer of the scanner,and 从当

sends MODBUS telegram, see Table 5-2。

② MODBUS read permit D1:M_r_en

It only sends reading commands of MODBUS telegram sequence. That is 01H、02H、03H、04H

tel: 010-62054940 57 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

commands,see Table 5-2。

③ MODBUS write permit D2:M_w_en

It only sends writing commands of MODBUS telegram sequence. That is 05H、06H、0FH、10H

commands,see Table 5-2。

If the three control bit(start_M、M_r_en、M_w_en)are used correctly,the master can complete “read

(status of device)→decision→write(control device)and more complicated function..

Table 5-2 three control bit(M_w_en、M_r_en、start_M)control function


D2:M_w_en D1:M_r_en D0:start_M function
MODBUS writep MODBUS read Start MODBUS
permit permit scan
× × 0 Stop MODBUS scan
0 0 1 Start MODBUS scan ,send all MODBUS write\read
1 1 1 commands
0 1 1 Stare MODBUS scan , only send MODBUS read
commands
1 0 1 Start MODBUS scan , only send MODBUS write
commands

④Clear the error mark D5:clear_er

clear_er=1:Bus-bridge clear the error bit D7~D1 of the communication control byte,

⑤ stop waiting D6:escape_M

escape_M=1:MODBUS scan wait for reply from MODBUS device after sending a MODBUS telegram。In this

state, if escape_M=1,scan stops waiting, goes on scanning next MODBUS telegram .The function always used

with “Time of Replay: wait for reply all the time.”.

Attention 1:If escape_M retain 1,after sending a telegram, there is no time to wait, the MODBUS scan would

send next telegram. Therefore , escape_M should be used with start_M.. See several commands:



MODBUS scan is in the state of waiting for reply
start_M=0;
escape_M=1;
escape_M=0;
start_M=1;
MODBUS scan stops to waiting,sends next MODBUS telegram .


⑥ Force MODBUS scan to reset D7:reset_M

reset_M=1:Force MODBUS scan index to return to the first MODBUS telegram, MODBUS scan is in the state

tel: 010-62054940 58 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

of reset, start_M is in vain when starting MODBUS scan.


reset_M=0:“Force MODBUS scan to reset”is in vain.
Attention 2:It is in vain that reset_M and escape_M work at the same time.
reset_M escape_M function
0 0 no effect
0 1 Stop waiting
1 0 Force MODBUS scan to reset
1 1 No effect

⒋ PB-B-MODBUS/V32 work state and transfer


⑴ work state flow chart

To use our product correctly, user should comprehend the flow chart of PB-B-MS/V3. See Fig 5-48:

tel: 010-62054940 59 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Power on

PROFIBUS Initiation

NO
Wait, Connect to PROFIBUS?

YES

Download configuration via PROFIBUS:1、Initialize RS232/485 COM;2、Form MODBUS telegram queue;

Exchange data with PROFIBUS Master via PROFIBUS DP。

YES
reset_M=1? MODBUS scan pointer returns back to original position.
NO
YES
escape_M=1? MODBUS scan pointer points to next position.
Clear communicational
YES NO
error flag.
clear_er=1?
Interrupt service

Serial port sends MODBUS telegrams.


NO
Start up MODBUS scan

NO
Request to dispose MODBUS? Serial port switches to receive
MODBUS reply telegrams.
YES

When the waiting reply time MODBUS reply finishing receive,


of 10~50ms comes: Dispose MODBUS reply telegrams.
MODBUS scan pointer
points to next position. At Evry MD End
The mode of PB and MD update data?

At MD_scan End
NO
Finish scanning MODBUS telegram queue?

YES
MODBUS scan pointer
points to next position. MODBUS exchanges data with PROFIBUS data area.

Fig 5-48 PB-B-MODBUS/V32 Work State Flow Chart

tel: 010-62054940 60 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

⑵ After Power on, MODBUS starts

If users want to start MODBUS scan after power on,at first ”Connect to PROFIBUS”, then start as ”Start

Method”. Fig 5-49。

Power on

NO
Don’t Initialize Connect to PROFIBUS?
MODBUS,Can’t start.
YES
NO
Start method:
(Start_M=1) and (reset_M=0) and(escape_M=0)?

YES

The start method wrong:


MODBUS scan operation that can’t
MODBUS scan starts successfully.
be started or lead errors.

Fig 5-49 Start MODBUS scan after power on

⑶ several errors, failure states and solutions

① MODBUS scan waiting for reply in endless time

Ⅰ、Reasons:If users choose “endless Waiting…..” as configuring “Waiting Time of Replay”in

PROFIBUS,when MODBUS scan sends a MODBUS telegram, if the telegram corresponding MODBUS

equipments(because of telegram errors、equipments failures and other factors)does not reply,MODBUS scan

stays in endless Waiting for reply。


Ⅱ、Phenomenon:Communication state word“receive end/send permit reok_tren=0”
,MODBUS scan Waiting
for reply。
Ⅲ、Solution:Users according to needs choose two methods of relieving waiting as below。

(ⅰ) Use “Stop waiting D6:escape_M” to cause MODBUS scan to stop waiting,switch to send next

MODBUS telegram。


MODBUS scan stays in endless Waiting for reply…………..
start_M=0;
escape_M=1;
escape_M=0;
start_M=1;
MODBUS scan stops waiting,switches to send next MODBUS telegram………

tel: 010-62054940 61 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td



(ⅱ) Use“Set by force MODBUS scan reset D7:reset_M”,make MODBUS scan stop waiting,scan pointer

returns back to start position,send the first MODBUS telegram。



MODBUS scan stays in endless Waiting for reply…………..
start_M=0;
reset_M=1;
reset_M=0;
start_M=1;
MODBUS scan stops waiting、resets、sends the first MODBUS telegram………


② Because D7:reset_M remains efficiency, it causes MODBUS scan pointer to return back to original

position again and again.

Ⅰ、reasons:For example Users use the start operation as fig 5-50:

reset_M=1;
start_M=1;
reset_M=1:MODBUS scan resets


start_M=1:Start MODBUS scan,send Start serial port
the first MODBUS telegram。 to send data。

Others

Fig 5-50

Ⅱ、Phenomenon:Serial port may not send data completely,MODBUS scan resets again,restarts sending the

first MODBUS telegram。Again and again。

Ⅲ、Solution:Use right start method,when start, use commands of (reset_M=0) and (escape_M=0)。

③ Because D6:escape_M remains efficiency, it causes MODBUS scan does not wait but jump to next

position.

Ⅰ、reasons:For example Users use the start operation as fig 5-51:

tel: 010-62054940 62 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

escape_M=1;
start_M=1;

escape_M=1: MODBUS scan pointer move rearwards

start_M=1:Start MODBUS scan , Start serial port


send MODBUS telegrams。 to send data。

Others

Fig 5-51

Ⅱ、Phenomenon:Serial port may not send data completely,MODBUS scan makes the pointer move

rearwards,restart sending next MODBUS telegram。Again and again。

Ⅲ、Solution:Use right start method,when start, use commands of (reset_M=0) and (escape_M=0)。

④ MODBUS abnormal reply

Ⅰ、reasons:The telegrams received from MODBUS slave are not wrong,but the slave can’t run master’s

command correctly or can’t reply correctly;

Ⅱ、Phenomenon:The slave will answer “abnormal reply”。See “Chapter 3 MODBUS technology introduction

3. abnormal reply”。Communication state words D4~D1 are MODBUS abnormal codes。

Notice: The whole MODBUS telegram queue at most has 37 MODBUS telegrams,but has only one

Communication state word,therefore,when much MODBUS appears abnormal reply, abnormal reply

codes of Communication state word are rolling。

Ⅲ、Solution:Find the meaning of abnormal codes,eliminate errors。Generally MODBUS equipments running

state change causes MODBUS replies abnormally。

⑤ Communication Parity Error 与 CRC Error

Ⅰ、reasons:MODBUS reply telegrams received from FROFIBUS bridge contain character check error or CRC

check error。

Ⅱ、Phenomenon:If MODBUS reply telegrams received from FROFIBUS bridge contain character check error

or CRC check error,PROFIBUS Bridge will think the reply telegram data is uncertainty,refuses to write

reply data to MODBUS Read Data Area,refuses to update PROFIBUS input data,regards the

communication invalid , continues to scan next MODBUS telegram 。 At the same time make

communication state word parity check error D7:oe_er set 1 or make CRC check error D6: CRC_er set 1。

Ⅲ、Solution:character check error or CRC check error does not influence MODBUS scan running,but error

tel: 010-62054940 63 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

flag will retain。We can use control word“Clear Error Flag”clear_er=1 to clear error flag。clear_er=1 does

not influence MODBUS scan。clear_er retains 1. Make the function of retain clear error flag in effect。
5.How to start to read/write MODBUS communication data in PROFIBUS Master
Programs in the master must base on I/O addresses of hardware configuration。For the sake of

convenience,We take the hardware configuration of chapter “Product configuration and instances of

communication methods” to copy here,See as fig 5-1:Instances of communication methods、fig 5-2:All

examples of addresses corresponding collection table、fig 5-52:MODBUS modules’ PROFIBUS I/O addresses

in PB-B-MM/V32、fig 5-53:8DI、8DO I/O Addresses in S7-300 PLC。

PC1: MPI prog. Cable S7-300


STEP 7 CPU315-2DP
+8DI+8DO

PROFIBUS

K0
PB-B-MODBUS/232/V32 L0
K1
L1
RS232 K2
L2
MODBUS Equipments
MODICON PLC ….. …..
140 CPU 534 14
L7 K7

Fig 5-1 example of configuration and comm.

Fig 5-52 MODBUS Modules’PROFIBUS I/O addresses in PB-B-MM/V32

tel: 010-62054940 64 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Fig 5-2 All example of addresses corresponding collection table


Slot Module name PROFIBUS MODBUS MODBUS
Num address configuration command
2# read 24 bits Input I1~~I3 Station Send the command 01H to read coil
(0xxxx) 8bytes=24 bits Num:10 00001~~00024,
Original Store in IB1~IB3。
Address:0
3# read 4 Words IW256~~IW262: Station Send the command 04H to read disperse input
(3xxxx) 4 Words input Num:10 30001~~30004,
Original Store in IW256~~IW262。
Address:0
4# write 16 bits Q1~~Q2: Station Send the command 0FH,
(0xxxx) 2 × 8=16 bits Num:10 Write Q1~~Q2 to coil 00001~~00016。
output Original
Address:0
5# Write 4 Words QW256~~QW262: Station Send the command 10H , Write
(4xxxx) 4 Words output Num:10 QW256~~QW262
Original To Hold register 40001~~40004
Address:0
6# force single bit Q3: 1 Byte output Station Send the command 05H,according to Q3 set
(05H Command) Num:10 coil 00024
Original
Address:23
7# set single word QW264: Station Send the command 06H,
(06H Command) 1 Word output Num:10 Write QW264 To Hold register 40040
Original
Address:39
8# Read 40 Words IW264~~IW342: Station Send the command 03H to read Hold register
~ (4xxxx) 40 Words input Num:10 40001~40040,
10# Original Store in IW264~~IW342。
Address:0

Fig 5-53 8DI、8DO I/O Addresses in S7-300 PLC

⑴ The corresponding relation between Equipments and Addresses

Fig 5-3 The corresponding relation table between Equipments and Addresses

tel: 010-62054940 65 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Button I/O Address Indicator light I/O Address


K0 I4.0 L0 Q4.0
K1 I4.1 L1 Q4.1
K2 I4.2 L2 Q4.2
K3 I4.3 L3 Q4.3
K4 I4.4 L4 Q4.4
K5 I4.5 L5 Q4.5
K6 I4.6 L6 Q4.6
K7 I4.7 L7 Q4.7

⑵ The corresponding relation of Communication state word, communication control word and

PROFIBUS Addresses

Fig 5-4 The corresponding relation table of Communication state word, communication control word and

PROFIBUS Addresses
PB-B-MM/V32 PROFIBUS Address PB-B-MM/V32 communication control I/O
Communication state word word Address
Receive/Send re_tr I0.0 Start MODBUS scan start_M Q0.0
Abnormal reply code I0.1~I0.4 Clear error flag clear_er Q0.5
M_ER_CODE
CRC efficacy error CRC_er I0.6 Stop waiting escape_M Q0.6
Odd/even error oe_er I0.7 Set by force MODBUS scan reset Q0.7
reset_M

⑶ How to get communication state word


As Network 1 in the ladder diagram,After starting MODBUS scan,we can see L0=Q4.0=I0.0= Receive/Send
re_tr twinkling。

⑷ How to make MODBUS start、reset、stop waiting、clear error flag in PROFIBUS Master

From Network 2~5 in the ladder diagram we can see:

tel: 010-62054940 66 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Button K7 can make MODBUS scan reset reset_M;

Button K6 can make stop waiting escape_M;

Button K5 can make clear error flag clear_er;

Button K0 can make MODBUS scan start start_M

As for the method of starting、resetting、stopping waiting、clearing and description of notice proceeding,See

“ ⒋ PB-B-MODBUS/V32 work state and converse ⑶ several errors and failure state and the

solutions。”

⑸ How to write data to MODBUS data area 0XXXX、4XXXX in PROFIBUS Master


① Set Q1~Q2, 4# Slot MODBUS writes Q1~Q2 to MODBUS coil 00001~00016 by the command 00FH。

tel: 010-62054940 67 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

② By K1 make Q3 set 00/FF, 6# Slot MODBUS command 05H,according to Q3=00/FF,make coil 00024 set
0/1。

② Use K2 to set MW10~MW16 value, Use SFC15 to make MW10~MW16 transmit to QW256~QW262;5#
Slot MODBUS writes QB256~QB263 to MODBUS Hold register 40001~40004 by command 10H。

tel: 010-62054940 68 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

④ Use K3 to set QW264 value;7# Slot MODBUS writes QW264 to MODBUS Hold register 40040 by
command 06H。

tel: 010-62054940 69 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

⑹ How to get the data 0XXXX、1XXXX、3XXXX、4XXXX in MODBUS data area in PROFIBUS Master

① With PC1 online monitor we can see the data of IB1~IB3,as below chart 5-54:

Fig 5-54

The data AA55 is the value Network 6 sets QB1~QB2,by 4# Slot MODBUS command 0FH write

QB1~QB2 to MODBUS coil 00001~00016。2# Slot MODBUS reads MODBUS coil 00001~00024 by the

command 01H,transmit to IB1~IB3 correspondingly,So from PC1 online monitor, we can see the data AA、

55 of IB1~IB2。

In addition,6# Slot MODBUS command 05H function is:if QB3=0,set 0 on coil 00024(Original address

in configuration=00023)0;if QB3=FF,set 1 on coil 00024 1。In network 7 we use button K1 choose to set

QB3=00/FF。Therefore,once press K1 we can see I3.7=coil 00024 change,as below fig 5-55:

Fig 5-55
② Use SFC14 make IW256~IW262 transmit to MW20~MW26;The data of IW256~IW262 is that 3# Slot

MODBUS reads from MODBUS Input Register 30001~30004 by the command 04H。From PC1 online monitor,

we can see the data of MW20~MW26。

From PC1 online monitor, we can see the data of MW20~MW26:1234、5678、9ABC、DEF1;the group of

data is from MODBUS 30001~30004,by MODBUS Master posting。As fig 5-56:

tel: 010-62054940 Fig 5-56


70 web: www.c-profibus.com.cn
Beijing D&S Fieldbus Technologe Co. td

③ 8# Slot MODBUS reads MODBUS Hold register 40001~40040 storing in IW264~IW342(40 WOEDS) by

the command 03H。The command uses SFC14,making IW264~IW294(16 Words)transmit to MW30~MW60

Look back Network 8~9,Using K2、 SFC15 and 5# Slot MODBUS command 10H makes 99AA、BBCC、

DDEE、FF11 or 1122、3344、5566、7788 written to MODBUS Hold register 40001~40004。So from PC1 online

monitor, we can see the data of MW30~MW36(corresponding 40001~40004)。

From PC1 online monitor the data of MW30~MW36 ( MW30~MW36 ← ← IW264~IW270 ← ←

40001~40004←MW10~MW16),fig 5-57:

Fig 5-57

Press K2,we can see data change,fig 5-58:

Fig 5-58

④ Network 13 is next to Network 12 , use SFC14 , make IW296~IW326 ( 16 Words ) transmit to

MW62~MW92;Network 14 is next to Network 13,use SFC14,just make IW328~IW342(8 Words)transmit

to MW94~MW108;

tel: 010-62054940 71 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Notice:From PC1 online monitor the data of MW108(corresponding 40040)


:Network 10 uses K3 to set

1111/4040 on QW264;7# Slot MODBUS command 06H writes QW264 to MODBUS Hold register 40040。So

the data of MW108(corresponding 40040)from PC1 is 1111,As below fig:

After pressing K3 the data changes to 4040;As below fig:

tel: 010-62054940 72 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Appendix 1:V33 new function introduce


1、the status monitor function of MODBUS Slave
When PB-B-MM/V33 is master, and connects to several of modbus slave device, the PROFIBUS master

can monitor the communication status of Modbus slave device, via PB-B-MM/V33(Fig 1).The slave devices

address are set to 02H、0CH、04H、0FH、10H respectively.

PC
PROFIBUS Master

In PROFIBUS master
We can monitor MODBUS
PROFIBUS-DP slaves(02H#~10H#)
communication status。
PB-B-MM/V33

MODBUS-485

02H# 0CH# 04H# 0FH# 10H#


MODBUS slave device

Fig 1 the PROFIBUS master can monitor the communication status of Modbus
slave device, via PB-B-MM/V33
2、Example 1:The communication status bit monitor of MODBUS slave
In this example, the interface PB-B-MM/V33 connects to five MODBUS slave device(02H#、0CH#、

04H#、0FH#、10H#),and the PROFIBUSmaster can monitor the communication status bit of Modbus slave.

The first step:Select status monitor of slave device(8 bits),as show Fig 2. Default:no status monitor.

图3 每个从站配置两条报文

Select status monitor of slave device(8 bits)

tel: 010-62054940 Fig 2 Select status monitor


73 of slave device(8 bits) web: www.c-profibus.com.cn
Beijing D&S Fieldbus Technologe Co. td

The second step:Configurate the telegram of MODBUS.Each of slave station need configure two telegram:

read 2 Words(4xxxx) and force single bit(05h Command).Notice: All of telegram need set the of MODBUS

slave address, as show Fig 3.

Double click This telegram sends to


02#MODBUS slave

Fig 3 Each of slave station need configure two telegram

The third step:Insert the status table of MODBUS slave (8 bits),and input the address table of MODBUS slave:

02、0C、04、0F、10,as show in Fig4. The others can be set randomly.

Input the address table of MODBUS slave

Must insert after all of MODBUS telegram

Fig 4 Insert the status table of MODBUS slave(8 bits),and input the address table of
MODBUS slave: 02、0C、04、0F、10

tel: 010-62054940 74 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

Notice:The status table of MODBUS slave(8 bits) must insert after all of MODBUS telegram.

The fourth step:After running, the PROFIBUS address IB1 can show the communication status of the

MODBUS slave: 02、0C、04、0F、10:

IB1:
D7 D6 D5 D4 D3 D2 D1 D0
reserve reserve reserve the the the the the
communication communication communication communication communication
status of 10H status of 0FH status of 04H status of 0CH status of 02H
station station station station station

The communication status of D0 = 02H station:

D0=0:When MODBUS master sends telegram to 02H slave station ,the MODBUS master(PB-B-MM/V33)

doesn’t receive the answer telegram of 02H slave station until the timeout of Tsdr, or 02H slave station can’t

answer the MODBUS master telegram. Tsdr refers to Chapter 5---2、system configuration----(三) configure

PB-B-MM/V32 as PROFIBUS slave----(4)configure Time of Replay.

D0=1:The 02H slave station responses the MODBUS master(PB-B-MM/V33)telegram within the time of

Tsdr,and the MODBUS master(PB-B-MM/V33)receive it correctly.

D1-D4:The same as D0。


3、Example 2:The communication status byte monitor of MODBUS slave
In this example, the interface PB-B-MM/V33 connects to five MODBUS slave device(02H#、0CH#、

04H#、0FH#、10H#), and the PROFIBUSmaster can monitor the communication status byte of Modbus slave.

The first step:Select “status monitor of slave station”, as show in Fig 5. Default: no status monitor of slave.

Select “status monitor of slave

Fig 5 Select“status monitor of slave station(8 bits)”

tel: 010-62054940 75 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

The second step:Configure MODBUS telegram. Each of slave station configure two telegram: read 2

Words(4xxxx),and force single bit(05h Command).

Notice:Every telegram need set the of MODBUS slave address, as show in Fig 6.

Double click This telegram sends to 02#MODBUS

Fig 6 Each of slave station configure two telegram

The third step:Insert the status table of MODBUS slave (8 bits),and input the address table of MODBUS slave:

02、0C、04、0F、10,as show in Fig 7. The others can be set randomly.

Input the MODBUS slave address table

Must insert after all of MODBUS telegram

Fig 7 Insert the status table of MODBUS slave (8 bits),and input the address table of
tel: 010-62054940 76
MODBUS slave: 02、0C、04、0F、10 web: www.c-profibus.com.cn
Beijing D&S Fieldbus Technologe Co. td

Notice:The status table of MODBUS slave(8 bits) must insert after all of MODBUS telegram.

The fourth step:After running, the PROFIBUS master IB4~IB8 can show the communication status byte of

MODBUS slave 02、0C、04、0F、10.

IB4:The status byte of MODBUS slave 02H.


D7:oe_er D6:CRC_er D5 D4~D1:M_ER_CODE D0: Tmdr_O
Parity error CRC check error Not MODBUS error code MM time of replay
used overtime

① D0: Tmdr_O = MM time of replay overtime:

D0=0:When MODBUS master sends telegram to 02H slave station ,the MODBUS master(PB-B-MM/V33)

doesn’t receive the answer telegram of 02H slave station until the timeout of Tsdr, or 02H slave station can’t

answer the MODBUS master telegram.Tsdr refers to Chapter 5---2、system configuration----(三) configure

PB-B-MM/V32 as PROFIBUS slave----(4)configure Time of Replay.

D0=1:The 02H slave station responses the MODBUS master(PB-B-MM/V33)telegram within the time of

Tsdr,and the MODBUS master(PB-B-MM/V33)receive it correctly.

② D4~D1:M_ER_CODE= MODBUS error code:

After MODBUS master(PB-B-MM/V33)sends a telegram, the MODBUS slave 02H receive the telegram

correctly, but 02H can’t response correctly, and will response “M_ER_CODE”,referring to Chapter 3 The

Introduction of MODUBS technology---- MODBUS error code.


③ D6:CRC_er =CRC check error
CRC_er=1:Receiving a answer telegram with CRC check error, the MODBUS master(PB-B-MM/V33)

considers the MODBUS telegram is not credibility, no reply is provided.


④ D7:parity error oe_er
Receiving a answer telegram with parity error, the MODBUS master(PB-B-MM/V33)considers the

MODBUS telegram is not credibility, no reply is provided.


The others of MODBUS status byte:
IB5:status byte of MODBUS slave 0CH:
D7:oe_er D6:CRC_er D5 D4~D1:M_ER_CODE D0: Tmdr_O
Parity error CRC error Not MODBUS error code Time of replay out
used
IB6:status byte of MODBUS slave 04H:
D7:oe_er D6:CRC_er D5 D4~D1:M_ER_CODE D0: Tmdr_O
Parity error CRCerror Not MODBUS error code Time of replay out
used

tel: 010-62054940 77 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

IB7:status byte of MODBUS slave 0FH:


D7:oe_er D6:CRC_er D5 D4~D1:M_ER_CODE D0: Tmdr_O
Parity error CRCerror Not MODBUS error code Time of replay out
used
IB8:status byte of MODBUS slave 10H:
D7:oe_er D6:CRC_er D5 D4~D1:M_ER_CODE D0: Tmdr_O
Parity error CRCerror Not MODBUS error code Time of replay out
used

4、Particular case
(1)If configure the telegram of MODBUS slave 02H(Fig 3 or Fig 6), but not insert the 02H address in the

MODBUS slave address table(Fig 4 or Fig 7),the MODBUS master(PB-B-MM/V33)will set D4~D1 to F in

IB0 and not change the slave status monitor(bit or byte) ,when MODBUS master(PB-B-MM/V33) sends

telegram to 02H,not finding the 02H in the MODBUS slave address table.
总状态字 IB0
D7:oe_er D6:CRC_er D5: Tmdr_O D4~D1:MODBUS error code D0:re_tr
Parity error CRC check error Waiting for time of 1111 Receive/send
replay out

(2)If receiving a answer telegram with MODBUS error code, the MODBUS master(PB-B-MM/V33)

will search the telegram MODBUS address in the MODBUS slave address table,and write the MODBUS error

code in the communication status byte of MODBUS slave.When not finding the telegram addres, the MODBUS

master will set D4~D1 to F in IB0, and not change the communication status byte of MODBUS slave.

(3)If receiving a answer telegram with parity error or CRC check error, the MODBUS master

(PB-B-MM/V33)will search the telegram MODBUS address in the MODBUS slave address table,and set the

communication status byte of MODBUS slave. When not finding the telegram addres, the MODBUS master

will set D4~D1 to F in IB0, and not change the communication status byte of MODBUS slave.
5、matters need attention—configure the max number of MODBUS slave telegram
PB-B-MM/V33 products add to new function of MODBUS slave status monitor in comparison with V32,

configuring MODBUS slave status monitor table in the last of slot. The monitor table costs definite bytes of

PROFIBUS user parameter, that decreases the number of telegram of slave station. So in addition to require

the max number of slot is to be 39, and the max amount bytes of input/output is less than 233,the telegram in

PB-B-MM/V33 configuration is also related to the number of user parameter bytes. When users select

different types of slave status monitor, the max number of MODBUS slave telegram is different, as show

below:

tel: 010-62054940 78 web: www.c-profibus.com.cn


Beijing D&S Fieldbus Technologe Co. td

The table of the type of slave status monitor and the max number of MODBUS slave telegram

The type of slave status The max number of The type of slave status The max number of

monitor MODBUS slave telegram monitor MODBUS slave telegram

The type of slave status The type of slave status


36 36
monitor(8 bits) monitor(8 bytes)

The type of slave status The type of slave status


34 34
monitor(16 bits) monitor(16 bytes)

The type of slave status The type of slave status


33 33
monitor(24 bits) monitor(24 bytes)

The type of slave status The type of slave status


32 32
monitor(32 bits) monitor(32 bytes)

CPCC
Beijing D&S Fieldbus Technologe Co. td
Tel:010-82078264、010-62054940 Fax:010-82078264
Address:No.1 Jiaochangkou Deshengmenwai Being China Post code:100011
Web:www.c-profibus.com.cn Email: tangjy@c-profibus.com.cn

tel: 010-62054940 79 web: www.c-profibus.com.cn

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy