Examples of Register Communication .................... 45 5.5.1 Example 1: reading the firmware version from Register 9 .......... 45 5.5.2 Example 2: Writing to an user register ................ 45 Operation with TwinCAT PLC software................... 49 6 Appendix .............................. 50 Support and Service........................ 50 KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
Page 4
Table of contents Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
, XTS and XPlanar are registered trademarks of and licensed by Beckhoff Automation GmbH. Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners. Patent Pending...
All the components are supplied in particular hardware and software configurations appropriate for the application. Modifications to hardware or software configurations other than those described in the documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG. Personnel qualification This description is only intended for trained specialists in control, automation and drive engineering who are familiar with the applicable national standards.
• Correction - C/S word • Supplement added to description of operation with TwinCAT • Description added to operation with TwinCAT PLC software • first provisional documentation for KL6031 and KL6041 Firmware and hardware versions Documentation KL6031, KS6031 KL6041, KS6041 Version Firmware Hardware Firmware Hardware 2.1.0...
A watchdog timer overflow has occurred. The RUN LED goes out if no process data is transmitted to the terminal from the Bus Coupler for 100 ms. green State of the transmit signal line green State of the receive signal line Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Shield Shield (internally bridged with terminal 8) Shield Shield (internally bridged with terminal 4) KL6031 - Technical data Technical data KL6031, KS6031 Data transfer channels 2 (1/1), TxD and RxD, full duplex Data transfer rate 9600 bit/s, 8 data bits, no parity and one stop bit are pre-set (max.
Bus Coupler. By changing the parameters of the KL6031, up to 5 bytes of user data can be transferred. Reference The chapter "Access from the user program" provides an overview of the possible mapping configurations [} 41] depending on the adjustable parameters. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Off – Watchdog timer overflow has occurred. If no process data is transmitted from the Bus Coupler for 100 ms, the green LED goes out. The TxD and RxD LEDs indicate the states of the signal lines. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
The data are transmitted in full duplex in the RS422 operation mode. Only peer-to-peer connections can be established. Fig. 4: RS422 Reference The chapter on Access from the user program contains an overview of possible mapping configurations [} 41], depending on the configurable parameters. KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
• Each assembly must be terminated at the right hand end with a KL9010 bus end terminal, to ensure the protection class and ESD protection. Fig. 5: Spring contacts of the Beckhoff I/O components Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
To mount the mounting rails with a height of 7.5 mm under the terminals and couplers, you should use flat mounting connections (e.g. countersunk screws or blind rivets). KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
EL91xx, EL92xx) interrupt the power contacts and thus represent the start of a new supply rail. PE power contact The power contact labeled PE can be used as a protective earth. For safety reasons this contact mates first when plugging together, and can ground short-circuit currents of up to 125 A. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Products marked with a crossed-out wheeled bin shall not be discarded with the normal waste stream. The device is considered as waste electrical and electronic equipment. The national regulations for the disposal of waste electrical and electronic equipment must be observed. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Insert the new component and plug in the connector with the wiring. This reduces the installation time and eliminates the risk of wires being mixed up. The familiar dimensions of the terminal only had to be changed slightly. The new connector adds about 3 mm. The maximum height of the terminal remains unchanged. KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
(ultrasonically welded) conductors. In this case, please note the tables concerning the wire-size width [} 21]! 3.5.2 Wiring WARNING Risk of electric shock and damage of device! Bring the bus terminal system into a safe, powered down state before starting installation, disassembly or wiring of the bus terminals! Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
80°C at the wire branching points, then cables must be selected whose tempera- ture data correspond to the actual measured temperature values! • Observe the permissible ambient temperature range of -25 to 60°C for the use of Beckhoff fieldbus com- ponents with extended temperature range (ET) in potentially explosive areas! •...
Pay also attention to the continuative documentation Ex. Protection for Terminal Systems Notes on the use of the Beckhoff terminal systems in hazardous areas according to ATEX and IECEx, that is available for download within the download area of your product on the Beckhoff homepage www.beckhoff.com!
Fieldbus Box modules with the aid of which settings can be modified easily. Alternatively, you have full access to all internal registers of the bus couplers and intelligent terminals. Refer to the register description for the meanings of the registers. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
In the example shown, this is • a BK9000 Bus Coupler for Ethernet • a KL1xx2 Digital Input Terminal • a KL6041 single-channel serial interface terminal • a KL6031 single-channel serial interface terminal • a KL9010 Bus End Terminal KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
For the KL6031 or KL6041, the branches Register, Settings and ProcData are displayed: • Register [} 27] enables direct access to the KL6031/KL6041 registers. • Dialog masks for the parameterization of the KL6031/KL6041 can be found under Settings [} 28]. • ProcData [} 32] displays the KL6031/KL6041 process data. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
KS2000 Configuration Software Register Under Register you can directly access the registers of the KL6031/KL6041. The meaning of the register is explained in the Register Overview [} 37]. Fig. 16: Register view in KS2000 KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
Here, you can set the user data length (3, 5 or 22 bytes) of the process data image (default: 22 bytes). Set Factory Settings (R7 [} 38]) Here, you can restore the terminal's factory settings and save them with "Apply". KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
Page 30
(default: deactivated) • Point to point connection (R34.5 [} 39]), (default: deactivated) • Send FIFO data continuously (R34.6 [} 39]), (default: deactivated) • Extended process data interface (R34.7 [} 39]), (set automatically) • Transfer rate optimization (R34.8 [} 39]), (default: activated) Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
You can set the baud rate for the terminal here (default: 9600 bit/s). Data format (R33 [} 39]) Data format setting (default: 8 data bits, no parity). Stop bits (R33.3 [} 39]) Setting 1 or 2 stop bits via register R33, bit 3 (default: 1 stop bit). KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
The spectacles mark the data that are currently graphically displayed in the History field. Fig. 21: History field The current input value is displayed numerically in the Value field. Fig. 22: Value field Output values can be modified through direct input or by means of the fader control. Fig. 23: Value field Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
After pressing the Settings button you can set the format of the numerical display to hexadecimal, decimal or binary. Fig. 24: Settings KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
If the small or medium process image is used, only bits SW.7 to SW.0 are shown as status bytes! The number of input bytes available for transfer from the terminal to the controller is displayed by bits IL2* ... IL0*. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Page 35
0000 001x Acknowledgement: Controller has received 3 bytes from the receive FIFO xxxx xxxx 0000 001x 0001 0110 0000 000x The terminal requests transfer of 22 bytes from the controller xxxx xxxx 0000 000x 0001 0110 0000 000x Acknowledgement: Controller has received 22 bytes from the receive FIFO KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
Page 36
Command is executed: Terminal initialization is complete 0000 0000 0000 0000 0000 0000 0000 0100 The controller requests the terminal to prepare for serial data exchange 0000 0000 0000 0000 0000 0000 0000 0000 Command is executed: Terminal is ready for serial data exchange Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Register R9 contains the ASCII coding of the terminal's firmware version, e.g. 0x3143 = '1C'. The '0x31' corresponds here to the ASCII character '1', while the '0x43' represents the ASCII character 'C'. This value cannot be changed. R16: Hardware version number Register R16 contains the hardware version of the terminal. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Page 39
: 1 stop bit; 1 : 2 stop bits 7 data bits, odd parity reserved : 1 stop bit; 1 : 2 stop bits 7 data bits, even parity R34: Feature register R34 defines the operation mode of the terminal. KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
Page 40
KL6031: RTS, CTS deactivated KL6041: Full duplex KL6031: RTS, CTS activated KL6041: Half duplex R35: Number of data bytes mapped in the Bus Coupler R35 defines the number of data bytes mapped in the Bus Coupler. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Page 42
Output data Conditions Word offset High byte Low byte High byte Low byte Complex evaluation: yes DataIn 1 DataOut 1 Motorola format: yes DataIn 3 DataIn 0 DataOut 3 DataOut 0 Word alignment: no DataIn 5 DataIn 2 DataOut 5 DataOut 2 reserved DataIn 4 reserved DataOut 4 Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Page 43
KL6031 / KL6041 will still be represented with a complete process image! Complex evaluation: In addition to the process data, the control and status bytes are also mapped into the address space. Motorola format: Motorola or Intel format can be set. KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
Page 44
SB / SW: Status byte / Status word for channel n (appears in the input process image) CB / CW: Control byte for channel n (appears in the output process image) reserved: This byte is assigned to the process data memory, although it has no function. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
0xDF (1101 1111 0x12 0x35 Explanation: • Bit 0.7 set means: Register communication switched on. • Bit 0.6 set means: writing to the register. • Bits 0.5 to 0.0 specify the register number 31 with 01 1111 KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
Page 46
• Bit 0.6 set means: writing to the register. • Bits 0.5 to 0.0 indicate register number 32 with 10 0000 • The output data word (byte 1 and byte 2) contains the new value for the feature register. Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
Page 47
• Bit 0.6 set means: writing to the register. • Bits 0.5 to 0.0 specify the register number 31 with 01 1111 • The output data word (byte 1 and byte 2) contains 0x0000 for reactivating write protection. KL6031/KS6031, KL6041/KS6041 Version: 2.1.0...
Page 48
• The terminal returns a value as a receipt in the status byte that differs only in bit 0.6 from the value of the control byte. • The input data word (byte 1 and byte 2) is of no importance after the write access. Any values still displayed are invalid! Version: 2.1.0 KL6031/KS6031, KL6041/KS6041...
KL6031 and KL6041 in 22-byte mode The Beckhoff KL6031 und KL6041 serial Bus Terminals are operated in the delivered standard version with a 24-byte process image (22 bytes of user data + 1 Control/Status word), so that 22 data bytes can be transferred both from and to the terminal.
Please contact your Beckhoff branch office or representative for local support and service on Beckhoff products! The addresses of Beckhoff's branch offices and representatives round the world can be found on her internet pages: https://www.beckhoff.com You will also find further documentation for Beckhoff components there.
Page 51
Fig. 2 KL6041............................Fig. 3 RS485 ............................Fig. 4 RS422 ............................Fig. 5 Spring contacts of the Beckhoff I/O components ................. Fig. 6 Attaching on mounting rail......................Fig. 7 Disassembling of terminal ......................Fig. 8 Power contact on left side ......................