Operation With Twincat Plc Software - Beckhoff KS6031 Documentation

Serial interface terminals
Table of Contents

Advertisement

5.6

Operation with TwinCAT PLC software

Required TwinCAT version
These Bus Terminals are only supported from TwinCAT version 2.0 of the serial communication li-
brary (ComLibV2). In the case of Bus Terminals, the K-bus update time of the Bus Coupler must be
considered when selecting the cycle time. Further information on configuration and operation with
TwinCAT can be found in the Beckhoff Infosys at
http://infosys.beckhoff.com/.
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.
Three PLC cycles are required for the data exchange between the PLC and the Bus Terminal. The maximum
effective data transfer rate (bps) depends on the cycle time T of the PLC and the number of bits necessary to
transfer one data byte (LB):
bps = (LB x PA / 3) / T
LB = 1 start bit + n data bits + p parity bits + m stop bits
PA = number of user data in the process image
The maximum effective data transfer rate is upwardly limited by the physical bit/s rate configured in the Bus
Terminal.
bps = (10 bits x 22/3) / 0.010 s ≈ 7333 bps
KL6031 and KL6041 in 5-byte mode
The serial Bus Terminal can also be reconfigured in such a way that 5 data bytes can be transferred both
from and to the terminal in 5-byte mode (6-byte process image). 3 PLC cycles are still necessary for each
exchange. The effective data rate for a given cycle time of the PLC is thus 5/3 greater than in 3-byte mode.
bps = (10 bits x 5/3) / 0.010 s ≈ 1666 bps
The Bus Terminals cannot be re-programmed while the PLC is running, since the 3-byte and 5-byte modes
differ in the register mapping and in the TwinCAT System Manager configuration.
KL6031 and KL6041 in 3-byte mode
When operating the KL6031 + KL6041 in 3-byte mode, 3 data bytes (4-byte process image) can be
transferred to and received by the terminal in a bus telegram. Since every data exchange between the PLC
and the Bus Terminal requires 3 PLC cycles, the effective transfer rate is one byte per cycle.
bps = (10 bits x 3/3) / 0.010 s ≈ 1000 bps
Serial PC Interface
The serial PC interface (COM1, COM2 etc.) is handled by the TwinCAT system similarly to the serial bus
terminal, but use larger data transfer buffers than the serial bus terminal. COMlib uses a 64-byte buffer, so
up to 64 data bytes are transferred at once between the PLC and the interface driver. 3 PLC cycles are
again needed for the exchange of a data block with the serial PC interface.
bps = (LB x 64/3) / T
KL6031/KS6031, KL6041/KS6041
Version: 2.1.0
Access from the user program
49

Advertisement

Table of Contents
loading

This manual is also suitable for:

Kl6031Kl6041Ks6041

Table of Contents