background image

MODBUS 

 

 

22 

BC7300 

 

 

MODBUS Process Image 

 

Terminals

 

Functions 

Offset

 

Length

 

POS 1. Terminal 2 digital inputs 

4, 23 

0x0802 

16 bit 

 

0x0000 
0x0001 

1 bit 
1 bit 

POS 3. Terminal 2 digital outputs 

3, 6, 16, 23 

0x0002 

16 bit 

 

1, 5, 15 

0x0000 
0x0001 

1 bit 
1 bit 

POS 5. Terminal 2 analog inputs 

4, 23 

0x0800 
0x0801 

16 bit 
16 bit 

POS 8. Terminal 2 analog outputs 

3, 6, 16, 23 

0x0000 
0x0001 

16 bit 
16 bit 

PLC variables 16 byte inputs 

4, 23 

0x0803 
0x0804 
0x0805 
0x0806 
0x0807 
0x0808 
0x0809 
0x080A 

16 bit 
16 bit 
16 bit 
16 bit 
16 bit 
16 bit 
16 bit 
16 bit 

 
MODBUS example 

PLC variables 16 byte outputs 

3, 6, 16, 23 

0x0003 
0x0004 
0x0005 
0x0006 
0x0007 
0x0008 
0x0009 
0x000A 

16 bit 
16 bit 
16 bit 
16 bit 
16 bit 
16 bit 
16 bit 
16 bit 

 

 
 

 

BC7300 Process Image 

 

Byte address 

Terminal 

Inputs 

Terminal 

Outputs 

Status 

Control 

Data 0  

Data 0 

Data 1 

Data 1 

Status 

Control 

Data 0 

Data 0 

KL3002 (POS 6) 

Data 1 

KL3002 
(POS 6) 

Data 1 

Data 0 

Control 

Data 1 

10 

Data 0 

Data 0 

11 

KL3002 (POS 7) 

Data 1 

Data 1 

12 

Status 

Control 

13 

14 

Data 0  

Data 0 

15 

Data 1 

KL4032 
(POS 9) 

Data 1 

16 

Status 

Data 0 

17 

Data 1 

18 

Data 0 

Data 0 

19 

KL4032 (POS 9) 

Data 1 

KL4032 
(POS 10) 

Data 1 

20 

Bit 0/1 

Bit 0/1 

21 

KL1012 (POS 2) 

KL2112 
(POS 4) 

Example for the BC7300 

128..143 

PLC Variables 

 

PLC 
Variables 

 

 

Содержание BC7300

Страница 1: ...MODBUS Bus Terminal Controller BC7300 Version 1 5 Last change 2006 11 06...

Страница 2: ...pment For that reason the documentation is not in every case checked for consistency with performance data standards or other characteristics and does not represent an assurance of characteristics in...

Страница 3: ...errors 18 3 MODBUS 19 Basic Principles 19 Bus Topology 19 Process Data and Memory Map 20 MODBUS Process Image 22 BC7300 Process Image 22 Assignment of the Bus Terminals 23 Setting and Parameterisatio...

Страница 4: ...als 42 List of references 42 Firmware 42 Table 42 Example Program 43 Explanation of the Program 43 The Program in the Bus Terminal Controller 43 Creating the BOOT Program 44 MODBUS Communication 44 6...

Страница 5: ...cked for consistency with performance data standards or other characteristics None of the statements of this manual represents a guarantee Garantie in the meaning of 443 BGB of the German Civil Code o...

Страница 6: ...ed and nullify the liability of Beckhoff Automation GmbH Description of safety symbols The following safety symbols are used in this documentation They are intended to alert the reader to the associat...

Страница 7: ...ndustrial PC as the controller means that the operating and observing element can be implemented in the controller s hardware The controller can therefore be located at an operating panel in a control...

Страница 8: ...rinciple of the Bus Terminal 02 01 PE PE WD RX TX PLC MODBUS BECKHOFF 24V 0V 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 K Bus End Terminal Potential isolation Potential input terminal Power contacts Bus...

Страница 9: ...inals can be used to feed the supply for the peripherals The spring loaded terminals are joined in pairs to a power contact The feed for the power contacts has no connection to the voltage supply for...

Страница 10: ...Bus Contacts 6 contacts on the side In order to connect the Bus Coupler and Bus Terminals the Bus Coupler has gold contacts on the right hand side When the Bus Terminals are pushed together the gold c...

Страница 11: ...us Terminal Controller enters the STOP state Once the start up has completed without error the Bus Terminal Controller enters the fieldbus start state Start up behaviour of the Bus Terminal Controller...

Страница 12: ...upler for example Maximum number of terminals Up to 64 Bus Terminals can be attached to the Bus Coupler on the right hand side When plugging the components together be sure to assemble the housings wi...

Страница 13: ...sons this contact mates first when plugging together and can ground short circuit currents of up to 125 A Note that for reasons of electromagnetic compatibility the PE contacts are capacitatively coup...

Страница 14: ...ms to EN 50082 ESD Burst EN 50081 Installation position any Type of protection IP20 PLC data Programmability via programming interface TwinCAT BC TwinCAT Program size approx 3000 PLC statements Progra...

Страница 15: ...are represented in SIGNED INTEGER or two s complement format The number 0 stands for the input output value 0 V 0 mA or 4 mA The maximum value of an output or input value is represented according to t...

Страница 16: ...nterfaces Those chapters of this manual that deal with the fieldbus refer to the most widespread interfaces Complex signal processing All the byte oriented signal channels such as RS232 RS485 or incre...

Страница 17: ...nal n 0 coupler Check whether the n 1 Bus Terminal is correctly connected replace if necessary Check whether the Bus End Terminal 9010 is connected 5 pulses n K Bus error with register communication w...

Страница 18: ...flashes while a boot project is being created WD RX TX PLC MODBUS If a K Bus error occurs during operation the procedures for reaction to a K Bus error are executed in accordance with the parameterisa...

Страница 19: ...7 6 5 4 3 2 1 BK 7300 02 01 02 01 PE PE 02 01 PE PE 02 01 PE PE 02 02 01 01 PE PE PE PE RUN RX TX MODBUS BECKHOFF 24V 0V 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 BK 7300 02 01 02 01 PE PE 02 01 PE PE...

Страница 20: ...er is the process image on the Bus Terminal Controller Bus Terminals can be assigned to one or the other process image The PLC variables offer an interface between these two process images MODBUS The...

Страница 21: ...ses I128 and Q128 Example 02 PE PE PE PE RUN RX TX MODBUS BECKHOFF 24V 0V 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 BC 7300 PE PE PE PE PE PE PE PE PLC PE PE PE PE PE PE PE PE POS 1 KL1012 MODBUS termin...

Страница 22: ...bit 16 bit MODBUS example PLC variables 16 byte outputs 3 6 16 23 0x0003 0x0004 0x0005 0x0006 0x0007 0x0008 0x0009 0x000A 16 bit 16 bit 16 bit 16 bit 16 bit 16 bit 16 bit 16 bit BC7300 Process Image...

Страница 23: ...oriented Bus Terminal means that only the user data is transmitted Example a KL3xx2 has 2 input words and a KL4xx2 has 2 output words Complex Complex evaluation of a byte oriented Bus Terminal means...

Страница 24: ...ve all the terminals except the KL9010 end terminal 3 Set the x10 address selection switch to 0 and the x1 switch to 3 4 Switch on the Bus Coupler s 24 V supply again The coupler indicates the set bau...

Страница 25: ...stop bits 8 8 data bits no parity two stop bits 9 8 data bits even Parity two stop bits 10 8 data bits odd Parity two stop bits 11 7 data bits even Parity two stop bits Frame 2 12 1 7 data bits odd P...

Страница 26: ...LRC END ASCII frame 1 charact er 2 charact ers 2 charact ers n charact ers 2 charact ers 2 charact ers CRLF RTU In RTU mode the protocol starts with a pause of 3 5 characters and finishes in the same...

Страница 27: ...ta outputs GPRs GPR General Preset Register see Modbus Interface The functions are briefly described in the next section and clarified with the aid of an example Read Digital Outputs Function 1 READ C...

Страница 28: ...0x0A 10 0x31 0x30 Error Check LRC CRC 0xF8 0xA7 E3 0x45 0x33 End of frame t1 t2 t3 CRLF 0xD 0xA Response The Bus Terminal Controller answers with byte count 2 i e 2 bytes of data are returned The quer...

Страница 29: ...low byte 255 0xFF FF 0x46 0x46 Data 2 high byte 0 0x00 00 0x30 0x30 Data 2 low byte 0 0x00 00 0x30 0x30 Error Check LRC CRC 0xC6 0xC1 B0 0x42 0x30 End of frame t1 t2 t3 CRLF 0xD 0xA Read Analog Inputs...

Страница 30: ...must contain 0x00 hex Query Byte Name Example RTU ASCII Start frame 0x3A Slave address 11 0x0B 0B 0x30 0x42 Function code 5 0x05 05 0x30 0x35 Start address high 0 0x00 00 0x30 0x30 Start address low 2...

Страница 31: ...a low 255 0xFF FF 0x46 0x46 Error Check LRC CRC 0xDA 0xB0 A9 0x41 0x39 End of frame t1 t2 t3 CRLF 0xD 0xA Writing a Number of Digital Outputs Function 15 FORCE MULTIPLE COILS Function 15 can be used t...

Страница 32: ...Start address low 0 0x00 00 0x30 0x30 Data high 0 0x00 00 0x30 0x30 Data low 20 0x14 14 0x30 0x34 Error Check LRC CRC 0xDA 0xB0 D2 0x44 0x32 End of frame t1 t2 t3 CRLF 0xD 0xA Writing a Number of Anal...

Страница 33: ...th high 0 0x00 00 0x30 0x30 Length low 2 0x02 02 0x30 0x32 Error Check LRC CRC 0x43 0x02 DB 0x44 0x42 End of frame t1 t2 t3 CRLF 0xD 0xA Writing and Reading Analog Outputs and Inputs Function 23 READ...

Страница 34: ...ount The data information follows In this example the first word contains 0x0038 hex while the second word contains 0x3F0B Byte Name Example RTU ASCII Start frame 0x3A Slave address 11 0x0B 0B 0x30 0x...

Страница 35: ...ses the data that is sent to the slave by the master to be returned Bus Coupler Reset Sub Function 1 Sub function 1 re initialises the BC7300 Error counters are reset and the coupler executes a self t...

Страница 36: ...nction 15 Contains the number of answers that the slave has not sent For example the slave does not send an answer to a broadcast message Sub function Data field query Data field response 00 0F 00 00...

Страница 37: ...Invalid address or length 3 ILLEGAL DATA VALUE Invalid parameter Diagnostic functions Incorrect number of read write accesses to the register 4 SLAVE DEVICE ERROR Watchdog or K Bus error Example The...

Страница 38: ...udes that required for the K Bus update This results in a connection between the number of terminals that are inserted and the cycle time Before initiating the program the Bus Terminal Controller exec...

Страница 39: ...e same area as the Retain Variables and also start at MB0 You first have to enable Retain Variables in order to achieve a storage increase through the Persistent Data By default no Persistent Variable...

Страница 40: ...bit is set to 1 if a write telegram has been processed and no new write telegram is sent to the Bus Terminal Controller within the watchdog time No other bits have any function K Bus diagnostics K Bus...

Страница 41: ...e complex terminals and Bus Coupler registers can both be read or written using the 2 byte PLC interface The complex terminal registers are described in the associated terminal documentation The Bus C...

Страница 42: ...KL9110 KL9160 KL9210 KL9260 List of references Modicon MODBUS Protocol Reference Guide http www modicon com Software Win TECH http www win tech com Firmware The label under the coupler will tell you...

Страница 43: ...his is included when TwinCAT BC or KS2000 is supplied The first step is to create a program in the BC7300 For this purpose the address selection switch is set to 00 This it the programming mode for th...

Страница 44: ...eate boot project The PLC LED flashes while the boot project is being created Now set the MODBUS slave address and switch the Bus Terminal Controller off and then on again Remove the programming cable...

Страница 45: ...Controller answers with byte count 4 i e 4 bytes of data are returned The query was for 2 input words and these are now distributed over 4 bytes Byte Name Example RTU Description Start frame Slave add...

Страница 46: ...QB0 QB7 in the memory The digital output terminal would now map to QX8 0 and QX8 1 As soon as you now plug another byte oriented Bus Terminal the process image of the digital Bus Terminal is moved to...

Страница 47: ...000 8 List of references 40 Manufacturer s setting 44 Mapping of digital Bus Terminals 44 Mechanical structure 9 Parameterisation 22 Parameterisation Table 23 Persistent Data 37 PLC Cycle Time 36 PLC...

Страница 48: ...mponents there Beckhoff Headquarters Beckhoff Automation GmbH Eiserstr 5 33415 Verl Germany phone 49 0 5246 963 0 fax 49 0 5246 963 198 e mail info beckhoff com web www beckhoff com Beckhoff Support S...

Отзывы: