background image

Access from the user program

KL6781

24

Version: 2.0.0

R9: Firmware version

Register R9 contains the ASCII coding of the terminal's firmware version, e.g. 

0x3141 = '1A'.

 The 

'0x31'

corresponds here to the ASCII character 

'1'

, while the 

'0x41'

 represents the ASCII character 

'A'

.

This value cannot be changed.

R16: Hardware version

Register R16 contains the hardware version of the terminal.

R29: Terminal type - special identification

The name of the special type of the terminal is contained in register R29. KL6781-0000: 0x0000 (0000

dec

)

R31: Code word register

• If you write values into the user registers without first entering the user code word (0x1235) into the

code word register, the terminal will not accept the supplied data.

• If you write values into the user registers and have previously entered the user code word (0x1235) in

the code word register, these values are stored in the RAM registers and in the SEEPROM registers
and are therefore retained when the terminal is restarted.

The code word is reset when the terminal is restarted.

R32: Baud rate register

Bit

R32.15

R32.14

R32.13

R32.12

R32.11

R32.10

R32.9

R32.8

Name

-

-

-

-

-

-

-

-

Bit

R32.7

R32.6

R32.5

R32.4

R32.3

R32.2

R32.1

R32.0

Name

-

-

-

-

-

Baud rate

Key

Bit

Name

Description

default

R32.15 - R32.3 -

reserved

0

bin

R32.2 - R32.0

Baud rate

110

bin

9600 baud

100

bin

101

bin

4800 baud

100

bin

2400 baud (default)

11

bin

1200 baud

010

bin

600 baud

001

bin

300 baud

Содержание KL6781

Страница 1: ...Documentation KL6781 M Bus Master Terminals 2 0 0 2018 01 16 Version Date...

Страница 2: ......

Страница 3: ...d mechanical load capacity 13 3 3 Connection 14 3 3 1 Connection system 14 3 3 2 Wiring 16 3 3 3 Connection 17 4 Access from the user program 18 4 1 Register Overview 18 4 2 Control and status word 19...

Страница 4: ...Table of contents KL6781 4 Version 2 0 0...

Страница 5: ...e data diagrams and descriptions in this documentation Trademarks Beckhoff TwinCAT EtherCAT Safety over EtherCAT TwinSAFE XFC and XTS are registered trademarks of and licensed by Beckhoff Automation G...

Страница 6: ...iliar with the applicable national standards Description of symbols In this documentation the following symbols are used with an accompanying safety instruction or note The safety instructions must be...

Страница 7: ...on extended M bus chapter added Programming chapter extended 1 0 0 First release Firmware and hardware versions Documentation Version KL6781 Firmware Hardware 2 0 0 1C 03 1 4 0 1B 01 1 3 0 1B 01 1 2 0...

Страница 8: ...icity water gas or energy meters The KL6781 does not contain the M bus protocol but converts the K bus data to an M bus compliant format On the K bus 24 bytes are available for this purpose for each M...

Страница 9: ...e process image input output 24 bytes Configuration TwinCAT PLC M bus function blocks Rated voltage 24 VDC 15 20 Input voltage 24 VDC 15 20 Weight approx 60 g Mounting 11 on 35 mm mounting rail confor...

Страница 10: ...his LED indicates the terminal s operating state on Normal operation off The RUN LED goes out if no process data is transmitted to the terminal from the Bus Coupler for 100 ms Error red General error...

Страница 11: ...ieldbus Coupler Join the compo nents with tongue and groove and push the terminals against the mounting rail until the lock clicks onto the mounting rail If the Terminals are clipped onto the mounting...

Страница 12: ...s The six spring contacts of the K Bus E Bus deal with the transfer of the data and the supply of the Bus Terminal electronics The power contacts deal with the supply for the field electronics and thu...

Страница 13: ...nts for testing these Power Feed Terminals can be released and pulled at least 10 mm from the group of terminals WARNING Risk of electric shock The PE power contact must not be used for other potentia...

Страница 14: ...lief and the wire connection should be kept as short as possible A distance of approx 10 cm should be maintained to the cable duct 3 3 Connection 3 3 1 Connection system WARNING Risk of electric shock...

Страница 15: ...ion wires when the connector is removed Conductor cross sections between 0 08 mm2 and 2 5 mm2 can continue to be used with the proven spring force technology The overview and nomenclature of the produ...

Страница 16: ...t toggle 2 The wire can now be inserted into the round terminal opening without any force 3 The terminal point closes automatically when the pressure is released holding the wire securely and permanen...

Страница 17: ...5 mm2 Wire stripping length 8 9 mm 3 3 3 Connection Fig 10 Connection Terminal point Name Signal 1 reserved 2 M bus M bus plus internally connected to terminal point 6 3 M bus M bus minus internally...

Страница 18: ...R3 Number of framing errors 0x0000 0dec R R4 reserved 0x0000 0dec R R5 reserved 0x0000 0dec R R6 23 Diagnostic register variable variable R RAM R7 23 Command register 0x0000 0dec R W RAM R8 23 Termin...

Страница 19: ...ions are disabled the FIFO pointers are reset and the interface is initialized with the values in the appropriate registers The terminal acknowledges completion of the initialization via bit SW 2 19 I...

Страница 20: ...of this bit Only then new data can be transferred from the terminal to the controller Register communication Control word in register communication The control word CW is located in the output process...

Страница 21: ...cess data mode operation of the terminal The KL6781 is represented with its complex process image even if you set your Bus Coupler to a compact process image The KL6781 is represented in the process i...

Страница 22: ...d with a compact process image without control and status word since the control and status words are required for meaningful process data mode operation of the terminal The KL6781 is represented with...

Страница 23: ...bus master terminal They can be read or written by means of the register communication R0 Number of data bytes in the send buffer Register R0 contains the number of data in the transmit FIFO R1 Numbe...

Страница 24: ...hout first entering the user code word 0x1235 into the code word register the terminal will not accept the supplied data If you write values into the user registers and have previously entered the use...

Страница 25: ...eturns the firmware version 0x3341 in the input data word byte 1 and byte 2 This is to be interpreted as an ASCII code ASCII code 0x33 represents the digit 3 ASCII code 0x41 represents the letter A Th...

Страница 26: ...Byte 1 DataIN1 high byte Byte 2 DataIN1 low byte 0x9F 1001 1111bin 0x12 0x35 Explanation The terminal returns the value of the control byte as a receipt in the status byte The terminal returns the cu...

Страница 27: ...yte 0 Status byte Byte 1 DataIN1 high byte Byte 2 DataIN1 low byte 0xA0 1010 0000bin 0x00 0x02 Explanation The terminal returns the value of the control byte as a receipt in the status byte The termin...

Страница 28: ...re line that is protected against polarity reversal With primary addressing up to 250 slaves can be connected in star strand or tree topologies Ring structures are not permitted Devices from different...

Страница 29: ...tar line and tree topology Fig 12 Star line and tree topology Ring topology Fig 13 Ring topology Note Ring topology is not supported Although ring topology is possible with the M bus it is not recomme...

Страница 30: ...Programming KL6781 30 Version 2 0 0 6 Programming 6 1 TwinCAT libraries Software documentation in the Beckhoff Information System TwinCAT 2 TwinCAT 2 PLC Lib M bus TwinCAT 3 TwinCAT 3 PLC Lib Tc2_MBus...

Страница 31: ...components there Beckhoff Headquarters Beckhoff Automation GmbH Co KG Huelshorstweg 20 33415 Verl Germany Phone 49 0 5246 963 0 Fax 49 0 5246 963 198 e mail info beckhoff com Beckhoff Support Support...

Страница 32: ...rail 11 Fig 4 Disassembling of terminal 12 Fig 5 Power contact on left side 13 Fig 6 Standard wiring 14 Fig 7 Pluggable wiring 15 Fig 8 High Density Terminals 15 Fig 9 Connecting a cable on a terminal...

Отзывы: