background image

Access from the user program

KL6781

21

Version: 2.0.0

Key

Bit

Name

Description

SW.15 ... SW.8 RegData:

One byte of the data read from the register. The other byte is
transferred in the adjacent process data byte.

SW.7

RegAccess

1

bin

Acknowledgment for register access

SW.6

R

0

bin

Read access

SW.5 to SW.0

Reg. no.

Number of the register that was read or written.

4.3

Process image

Note

No compact process image

The KL6781 cannot be operated 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 its complex process image, even
if you set your Bus Coupler to a compact process image!

The KL6781 is represented in the process image with up to 24 bytes of input data and 24 bytes of output
data.

Format

Input data

Output data

Word

SW [

}

 19]

CW [

}

 19]

Byte

DataIn0

DataOut0

Byte

DataIn1

DataOut1

...

...

...

Byte

DataIn21

DataOut21

Key

SW: Status byte
CW: Control byte

DataIN 0 to DataIN 21: 22 bytes for the input data of the M-Bus
DataOUT 0 to DataOUT 21: 22 bytes for the output data of the M-Bus

• For the meaning of the control and status word please refer to the page 

Control and status word [

}

 19]

.

• Please refer to the 

Mapping [

}

 22]

 page for the assignment of the bytes and words to the addresses

of the controller.

Summary of Contents for KL6781

Page 1: ...Documentation KL6781 M Bus Master Terminals 2 0 0 2018 01 16 Version Date...

Page 2: ......

Page 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...

Page 4: ...Table of contents KL6781 4 Version 2 0 0...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Reviews: