background image

Access from the user program

KL6781

19

Version: 2.0.0

4.2

Control and status word

Process data mode

Control word (in process data mode)

The control word (CW) is located in the 

output process image [

}

 21]

, and is transmitted from the controller

to the terminal.

Bit

CW.15 CW.14 CW.13 CW.12 CW.11 CW.10 CW.9

CW.8

CW.7

CW.6

CW.5

CW.4

CW.3

CW.2

CW.1

CW.0

Name

OL7

OL6

OL5

OL4

OL3

OL2

OL1

OL0

Reg

-

-

-

-

IR

RA

TR

Key

Bit

Name

Description

CW.15 ... CW.
8

OL7 ... OL0
(OutLenght)

1

dec

...

22

dec

Number of output bytes () available for transfer from the
controller to the terminal.

CW.7

Reg (RegAccess)

0

bin

Register communication off (process data mode)

CW.6 ... CW.3 -

0

bin

reserved

CW.2

IR
(InitRequest)

0

bin

The controller once again requests the terminal to prepare for
serial data exchange.

1

bin

The controller requests terminal for initialization. The
transmission and reception functions 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]

 (IA).

CW.1

RA
(ReceiveAccepted)

toggle

The controller acknowledges receipt of data by changing the
state of this bit. Only then new data can be transferred from
the terminal to the controller.

CW.0

TR
(TransmitRequest)

toggle

Via a change of state of this bit the controller notifies the
terminal that the DataOut bytes contain the number of bytes
indicated via the OL bits. The terminal acknowledges receipt
of the data in the status byte via a change of state of bit 

SW.0

[

}

 19]

 (TA). Only now new data can be transferred from the

controller to the terminal.

Status word (in process data mode)

The status word (SW) is located in the 

input process image [

}

 21]

, and is transmitted from terminal to the

controller.

Bit

SW.15 SW.14 SW.13 SW.12 SW.11 SW.10 SW.9

SW.8

SW.7

SW.6

SW.5

SW.4 SW.3

SW.2 SW.1

SW.0

Name

IL7

IL6

IL5

IL4

IL3

IL2

IL1

IL0

Reg

-

-

-

BUF_F

IA

RR

TA

Содержание 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...

Отзывы: