KL1501, KL1512 - Up/Down-Counter Terminal, 24 V DC
Home


Foreword

Foreword
Foreword
Additional information
•
Notes on the documentation
•
Safety instructions
•
Documentation issue status


Notes on the documentation

Foreword [image] Notes on the documentation
Notes on the documentation
Intended audience
This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the documentation and the following notes and explanations are followed when installing and commissioning these components.
It is the duty of the technical personnel to use the documentation published at the respective time of each installation and commissioning.
The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under development.
We reserve the right to revise and change the documentation at any time and without prior announcement.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, EtherCAT P®, Safety over EtherCAT®, TwinSAFE®, XFC® and XTS® 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
The EtherCAT Technology is covered, including but not limited to the following patent applications and patents: EP1590927, EP1789857, DE102004044764, DE102007017835 with corresponding applications or registrations in various other countries.
The TwinCAT Technology is covered, including but not limited to the following patent applications and patents: EP0851348, US6167425 with corresponding applications or registrations in various other countries.
EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.
Copyright
© Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


Safety instructions

Foreword [image] Safety instructions
Safety instructions
Safety regulations
Please note the following safety instructions and explanations!
Product-specific safety instructions can be found on following pages or in the areas mounting, wiring, commissioning etc.
Exclusion of liability
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.
Description of instructions
In this documentation the following instructions are used.
These instructions must be read carefully and followed without fail!
SmallWarningYellow DANGER
Serious risk of injury!
Failure to follow this safety instruction directly endangers the life and health of persons.
SmallWarningYellow WARNING
Risk of injury!
Failure to follow this safety instruction endangers the life and health of persons.
SmallWarningYellow CAUTION
Personal injuries!
Failure to follow this safety instruction can lead to injuries to persons.
Note
Damage to environment/equipment or data loss
Failure to follow this instruction can lead to environmental damage, equipment damage or data loss.
Tip or pointer
This symbol indicates information that contributes to better understanding.


Documentation issue status

Foreword [image] Documentation issue status
Documentation issue status
Version
Comment
3.1.0
▪
KL1512 added
▪
Technical data updated
▪
Structure update
3.0.0
▪
Migration
▪
Installation instructions for enhanced mechanical load capacity added
▪
Chapter "TwinCAT" including Link to FB_KL1501Config added
▪
Revision status updated
Firmware and hardware versions
Documentation Version | KL1501 |  | KL1512
 | Firmware | Hardware | Firmware | Hardware
3.1.0 | 3B | 08 | 1A | 09
3.0.0 | 3B | 08 |  |
The K-bus firmware and hardware version (delivery state) are indicated by the serial number printed at the side of the terminal.
Syntax of the serial number
Structure of the serial number: WW YY FF HH
WW - week of production (calendar week)
YY - year of production
FF - K-bus firmware version
HH - hardware version
Example with ser. no.: 49 05 1B 03:
49 - week of production 49
05 - year of production 2005
1B - firmware version 1B
03 - hardware version 03


Product overview

Product overview
Product overview
Additional information
•
KL1501 - Introduction
•
KL1512 - Introduction
•
KL1501, KL1512 - Technical data
•
KL1501, KL1512 - LED displays


KL1501 - Introduction

Product overview [image] KL1501 - Introduction
KL1501 - Introduction
KL1501
Up/Down-Counter Terminal, 24 VDC, 100 kHz
The KL1501 input terminal counts binary pulses and transfers the current value to the higher-level controller. In addition to the 32-bit up/down counter, a 32-bit gated counter and two 16-bit counters are available. In gated counter mode, a low or high level at the gate input disables the counting function of the terminal. If two 16-bit counters are active, the up/down input is the clock input for the second counter. In addition, two digital outputs can be set.
The maximum input frequency is limited to 100 kHz, the minimum pulse width of the input signal is approx. 1 microsecond. The counters respond to the rising edge of the input signal.
The following controller options are available via the control byte: setting the counter value, disabling the counting function of the terminal, enabling the outputs. In addition an internal function can be enabled, which enables automatic setting of the outputs for defined counter values.
The LEDs indicate the state of the up/down and clock inputs and of outputs 1 and 2.
The representation of the process data differs depending on the set function.
In the standard output format, 5 bytes (4 bytes user data and 1 control/status byte) are mapped. The representation of the process data differs depending on the set function.
▪
Up/down counter: 32 bit signed integer
▪
Gated counter: 32 bit unsigned integer
▪
Two active counters: 2 x 16 bit unsigned integer
If the alternative output format is selected, note that the output length (4 bytes or 6 bytes instead of 5 bytes) and the terminal mapping will change.
▪
Up/down counter: 24 bit signed integer
▪
Gated counter: 24 bit signed integer
▪
Two active counters: 1 x 8 bit counter 0 and 1 x 16 bit counter 1
The terminal mapping is described in more detail in chapter Mapping in the Bus Coupler.


KL1512 - Introduction

Product overview [image] KL1512 - Introduction
KL1512 - Introduction
KL1512
Up/Down-Counter Terminal, 1 kHz, 16 Bit
The KL1512 input terminal counts binary pulses and transfers the current value to the higher-level controller.
The maximum input frequency is limited to 1 kHz, the minimum pulse width of the input signal is approx. 500 microsecond. The counters respond to the rising edge of the input signal. This means, not mark nor space of the input signal may be shorter than 500 microseconds!
The counters react to the rising edge of the input signal.
The LEDs indicate the state of input 1 and input 2.
In the standard output format, 6 bytes (2 bytes user data and 1 Byte control/status byte) per channel are mapped. The representation of the process data differs depending on the set function.
–
1 Byte Control/Status
–
16 Bit unsigned Integer
The terminal mapping is described in more detail in chapter Mapping in the Bus Coupler.


KL1501, KL1512 - Technical data

Product overview [image] KL1501, KL1512 - Technical data
KL1501, KL1512 - Technical data
Technical data | KL1501 | KL1512
Connection technology | 1 x up/down counter, 2 x up or down counter
Specification | EN 61131-2, type 1, “0”: < 5 VDC, “1”: > 15 VDC, typ. 5 mA
Number of counters | 1 or 2
Rated load voltage | 24 VDC (-15 %/+20 %)
Signal voltage ‘0’ | -3 V…+5 V (EN 61131-2, type 1)
Signal voltage ‘1’ | 15 V…30 V (EN 61131-2, type 1)
Input current | typically 5 mA (EN 61131-2, type 1)
Switching frequency | max. 100 kHz (2 kHz for up/down switching) | max. 1 kHz
Counter depth | 32 bit or 2 x 16 bit | 16 Bit
Max. output current | 24 V / 0.5 A typ. (short-circuit-proof) per channel | -
K-bus current consumption | typically 50 mA
Current consumption power contacts | only load
Electrical isolation | 500 V (K-bus / field voltage)
Bit width in the process image | 40 I/O: 32 bit data, 8 bit control/status | 2 x 16 Bit data 2 x 8 Bit control/status
Configuration | no address setting, configuration via the Bus Coupler or the controller | no address setting, configuration via the control byte and status byte.
Special features | 2 additional outputs | Set counters
Weight approx. | 50 g
Permissible ambient temperature at operation | -25 °C ... +60 °C (extended temperature range)
Permissible ambient temperature at storage | -40 °C ... +85 °C
Permissible relative humidity | 95%, no condensation
Vibration / shock resistance | conforms to EN 60068-2-6 / EN 60068-2-27, see also Installation instructions for enhanced mechanical load capacity
EMC immunity/emission | conforms to EN 61000-6-2 / EN 61000-6-4
Installation position | any
Protection class | IP20
Approvals | CE, cULus, IECEx, ATEX | CE, cULus, ATEX


KL1501, KL1512 - LED displays

Product overview [image] KL1501, KL1512 - LED displays
KL1501, KL1512 - LED displays
KL1502, KL1512 - LEDs
KL1501
LED | Color | Meaning
Signal LED1 | green | Signal at up/down input (operation mode: up/down counter) Signal at gate input (operation mode: gated counter) Signal at clock1 input (operation mode: 2 counters)
Signal LED2 | green | Signal at clock input
Signal LED3 | green | Signal at output 1
Signal LED4 | green | Signal at output 2
KL1512
LED | Color | Meaning
Signal LED1 | green | Signal at input 1
Signal LED2 | green | Signal at input 2
Run LED | green | The RUN LED indicates cyclic data transfer with the higher-level controller. The RUN LED goes off if no process data is exchanged for 100 ms.


Mounting and wiring

Mounting and wiring
Mounting and wiring
Additional information
•
Installation on mounting rails
•
Installation instructions for enhanced mechanical load capacity
•
Connection system
•
KL1501, KL1512 - Connection
•
ATEX - Special conditions (extended temperature range)
•
ATEX Documentation


Installation on mounting rails

Mounting and wiring [image] Installation on mounting rails
Installation on mounting rails
SmallWarningYellow 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!
Assembly
Attaching on mounting rail
The bus coupler and bus terminals are attached to commercially available 35 mm mounting rails (DIN rails according to EN 60715) by applying slight pressure:
1.
First attach the fieldbus coupler to the mounting rail.
2.
The bus terminals are now attached on the right-hand side of the fieldbus coupler. Join the components 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 rail first and then pushed together without tongue and groove, the connection will not be operational! When correctly assembled, no significant gap should be visible between the housings.
Fixing of mounting rails
The locking mechanism of the terminals and couplers extends to the profile of the mounting rail. At the installation, the locking mechanism of the components must not come into conflict with the fixing bolts of the mounting rail. 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).
Disassembly
Disassembling of terminal
Each terminal is secured by a lock on the mounting rail, which must be released for disassembly:
1.
Pull the terminal by its orange-colored lugs approximately 1 cm away from the mounting rail. In doing so for this terminal the mounting rail lock is released automatically and you can pull the terminal out of the bus terminal block easily without excessive force.
2.
Grasp the released terminal with thumb and index finger simultaneous at the upper and lower grooved housing surfaces and pull the terminal out of the bus terminal block.
Connections within a bus terminal block
The electric connections between the Bus Coupler and the Bus Terminals are automatically realized by joining the components:
▪
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 thus represent a supply rail within the bus terminal block. The power contacts are supplied via terminals on the Bus Coupler (up to 24 V) or for higher voltages via power feed terminals.
Power Contacts
During the design of a bus terminal block, the pin assignment of the individual Bus Terminals must be taken account of, since some types (e.g. analog Bus Terminals or digital 4-channel Bus Terminals) do not or not fully loop through the power contacts. Power Feed Terminals (KL91xx, KL92xx or 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.
Power contact on left side
Note
Possible damage of the device
Note that, for reasons of electromagnetic compatibility, the PE contacts are capacitatively coupled to the mounting rail. This may lead to incorrect results during insulation testing or to damage on the terminal (e.g. disruptive discharge to the PE line during insulation testing of a consumer with a nominal voltage of 230 V). For insulation testing, disconnect the PE supply line at the Bus Coupler or the Power Feed Terminal! In order to decouple further feed points for testing, these Power Feed Terminals can be released and pulled at least 10 mm from the group of terminals.
SmallWarningYellow WARNING
Risk of electric shock!
The PE power contact must not be used for other potentials!


Installation instructions for enhanced mechanical load capacity

Mounting and wiring [image] Installation instructions for enhanced mechanical load capacity
Installation instructions for enhanced mechanical load capacity
SmallWarningYellow WARNING
Risk of injury through electric shock and damage to the device!
Bring the Bus Terminal system into a safe, de-energized state before starting mounting, disassembly or wiring of the Bus Terminals!
Additional checks
The terminals have undergone the following additional tests:
Verification | Explanation
Vibration | 10 frequency runs in 3 axes
 | 6 Hz < f < 60 Hz displacement 0.35 mm, constant amplitude
 | 60.1 Hz < f < 500 Hz acceleration 5 g, constant amplitude
Shocks | 1000 shocks in each direction, in 3 axes
 | 25 g, 6 ms
Additional installation instructions
For terminals with enhanced mechanical load capacity, the following additional installation instructions apply:
▪
The enhanced mechanical load capacity is valid for all permissible installation positions
▪
Use a mounting rail according to EN 60715 TH35-15
▪
Fix the terminal segment on both sides of the mounting rail with a mechanical fixture, e.g. an earth terminal or reinforced end clamp
▪
The maximum total extension of the terminal segment (without coupler) is:
64 terminals (12 mm mounting with) or 32 terminals (24 mm mounting with)
▪
Avoid deformation, twisting, crushing and bending of the mounting rail during edging and installation of the rail
▪
The mounting points of the mounting rail must be set at 5 cm intervals
▪
Use countersunk head screws to fasten the mounting rail
▪
The free length between the strain relief and the wire connection should be kept as short as possible. A distance of approx. 10 cm should be maintained to the cable duct.


Connection system

Mounting and wiring [image] Connection system
Connection system
SmallWarningYellow 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!
Overview
The Bus Terminal system offers different connection options for optimum adaptation to the respective application:
▪
The terminals of KLxxxx and ELxxxx series with standard wiring include electronics and connection level in a single enclosure.
▪
The terminals of KSxxxx and ESxxxx series feature a pluggable connection level and enable steady wiring while replacing.
▪
The High Density Terminals (HD Terminals) include electronics and connection level in a single enclosure and have advanced packaging density.
Standard wiring
Standard wiring
The terminals of KLxxxx and ELxxxx series have been tried and tested for years.
They feature integrated screwless spring force technology for fast and simple assembly.
Pluggable wiring
Pluggable wiring
The terminals of KSxxxx and ESxxxx series feature a pluggable connection level.
The assembly and wiring procedure for the KS series is the same as for the KLxxxx and ELxxxx series.
The KS/ES series terminals enable the complete wiring to be removed as a plug connector from the top of the housing for servicing.
The lower section can be removed from the terminal block by pulling the unlocking tab.
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.
A tab for strain relief of the cable simplifies assembly in many applications and prevents tangling of individual connection 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 product names for KSxxxx and ESxxxx series has been retained as known from KLxxxx and ELxxxx series.
High Density Terminals (HD Terminals)
High Density Terminals
The Bus Terminals from these series with 16 connection points are distinguished by a particularly compact design, as the packaging density is twice as large as that of the standard 12 mm Bus Terminals. Massive conductors and conductors with a wire end sleeve can be inserted directly into the spring loaded terminal point without tools.
Wiring HD Terminals
The High Density (HD) Terminals of the KLx8xx and ELx8xx series doesn't support steady wiring.
Ultrasonically "bonded" (ultrasonically welded) conductors
Ultrasonically “bonded" conductors
It is also possible to connect the Standard and High Density Terminals with ultrasonically "bonded" (ultrasonically welded) conductors. In this case, please note the tables concerning the wire-size width below!
Wiring
Terminals for standard wiring ELxxxx/KLxxxx and for pluggable wiring ESxxxx/KSxxxx
Mounting a cable on a terminal connection
Up to eight connections enable the connection of solid or finely stranded cables to the Bus Terminals. The terminals are implemented in spring force technology. Connect the cables as follows:
1.
Open a spring-loaded terminal by slightly pushing with a screwdriver or a rod into the square opening above the terminal.
2.
The wire can now be inserted into the round terminal opening without any force.
3.
The terminal closes automatically when the pressure is released, holding the wire securely and permanently.
Terminal housing | ELxxxx, KLxxxx | ESxxxx, KSxxxx
Wire size width | 0.08 ... 2,5 mm2 | 0.08 ... 2.5 mm2
Wire stripping length | 8 ... 9 mm | 9 ... 10 mm
High Density Terminals ELx8xx, KLx8xx (HD)
The conductors of the HD Terminals are connected without tools for single-wire conductors using the direct plug-in technique, i.e. after stripping the wire is simply plugged into the contact point. The cables are released, as usual, using the contact release with the aid of a screwdriver. See the following table for the suitable wire size width.
Terminal housing | High Density Housing
Wire size width (conductors with a wire end sleeve) | 0.14 ... 0.75 mm2
Wire size width (single core wires) | 0.08 ... 1.5 mm2
Wire size width (fine-wire conductors) | 0.25 ... 1.5 mm2
Wire size width (ultrasonically “bonded" conductors) | only 1.5 mm2 (see notice!)
Wire stripping length | 8 ... 9 mm
Shielding
Shielding
Analog sensors and actors should always be connected with shielded, twisted paired wires.


KL1501, KL1512 - Connection

Mounting and wiring [image] KL1501, KL1512 - Connection
KL1501, KL1512 - Connection
KL1502, KL1512 - Connection
KL1501
Terminal point |  | Description
Name | No.
Up/down CLOCK1 gate | 1 | Up/down counter input (operation mode: up/down counter) Input gate (operation mode: counter with gate function) CLOCK1 input (operation mode: 2 counters)
+24 V | 2 | +24 V (internally connected to terminal point 6 and positive power contact)
0 V | 3 | 0 V (internally connected to terminal point 7 and negative power contact)
Output 1 | 4 | Output 1
Clock | 5 | Clock input
+24 V | 6 | +24 V (internally connected to terminal point 2 and positive power contact)
0 V | 7 | 0 V (internally connected to terminal point 3 and negative power contact)
Output 2 | 8 | Output 2
KL1512
Terminal point |  | Description
Name | No.
Input 1 | 1 | Input 1
+24 V | 2 | +24 V (internally connected to terminal point 6 and positive power contact)
0 V | 3 | 0 V (internally connected to terminal point 7 and negative power contact)
n.c. | 4 | Not connected
Input 2 | 5 | Input 2
+24 V | 6 | +24 V (internally connected to terminal point 2 and positive power contact)
0 V | 7 | 0 V (internally connected to terminal point 3 and negative power contact)
n.c. | 8 | Not connected


ATEX - Special conditions (extended temperature range)

Mounting and wiring [image] ATEX - Special conditions (extended temperature range)
ATEX - Special conditions (extended temperature range)
SmallWarningYellow WARNING
Observe the special conditions for the intended use of Beckhoff fieldbus components with extended temperature range (ET) in potentially explosive areas (directive 94/9/EU)!
•
The certified components are to be installed in a suitable housing that guarantees a protection class of at least IP54 in accordance with EN 60529! The environmental conditions during use are thereby to be taken into account!
•
If the temperatures during rated operation are higher than 70°C at the feed-in points of cables, lines or pipes, or higher than 80°C at the wire branching points, then cables must be selected whose temperature 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 components with extended temperature range (ET) in potentially explosive areas!
•
Measures must be taken to protect against the rated operating voltage being exceeded by more than 40% due to short-term interference voltages!
•
The individual terminals may only be unplugged or removed from the Bus Terminal system if the supply voltage has been switched off or if a non-explosive atmosphere is ensured!
•
The connections of the certified components may only be connected or disconnected if the supply voltage has been switched off or if a non-explosive atmosphere is ensured!
•
The fuses of the KL92xx/EL92xx power feed terminals may only be exchanged if the supply voltage has been switched off or if a non-explosive atmosphere is ensured!
•
Address selectors and ID switches may only be adjusted if the supply voltage has been switched off or if a non-explosive atmosphere is ensured!
Standards
The fundamental health and safety requirements are fulfilled by compliance with the following standards:
▪
EN 60079-0:2012+A11:2013
▪
EN 60079-15:2010
Marking
The Beckhoff fieldbus components with extended temperature range (ET) certified for potentially explosive areas bear the following marking:
II 3G KEMA 10ATEX0075 X Ex nA IIC T4 Gc Ta: -25 … 60°C
or
II 3G KEMA 10ATEX0075 X Ex nC IIC T4 Gc Ta: -25 … 60°C


ATEX Documentation

Mounting and wiring [image] ATEX Documentation
ATEX Documentation
Notes about operation of the Beckhoff terminal systems in potentially explosive areas (ATEX)
Pay also attention to the continuative documentation

Notes about operation of the Beckhoff terminal systems in potentially explosive areas (ATEX)

that is available in the download area of the Beckhoff homepage http:\\www.beckhoff.com!


KS2000 Configuration software

KS2000 Configuration software
KS2000 Configuration software
Additional information
•
KS2000 - Introduction


KS2000 - Introduction

KS2000 Configuration software [image] KS2000 - Introduction
KS2000 - Introduction
The KS2000 configuration software permits configuration, commissioning and parameterization of bus couplers, of the affiliated bus terminals and of Fieldbus Box Modules. The connection between bus coupler / Fieldbus Box Module and the PC is established by means of the serial configuration cable or the fieldbus.
KS2000 configuration software
Configuration
You can configure the Fieldbus stations with the Configuration Software KS2000 offline. That means, setting up a terminal station with all settings on the couplers and terminals resp. the Fieldbus Box Modules can be prepared before the commissioning phase. Later on, this configuration can be transferred to the terminal station in the commissioning phase by means of a download. For documentation purposes, you are provided with the breakdown of the terminal station, a parts list of modules used and a list of the parameters you have modified. After an upload, existing fieldbus stations are at your disposal for further editing.
Parameterization
KS2000 offers simple access to the parameters of a fieldbus station: specific high-level dialogs are available for all bus couplers, all intelligent bus terminals and 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.
Commissioning
The KS2000 software facilitates commissioning of machine components or their fieldbus stations: Configured settings can be transferred to the fieldbus modules by means of a download. After a login to the terminal station, it is possible to define settings in couplers, terminals and Fieldbus Box modules directly online. The same high-level dialogs and register access are available for this purpose as in the configuration phase.
The KS2000 offers access to the process images of the bus couplers and Fieldbus Box modules.
▪
Thus, the coupler's input and output images can be observed by monitoring.
▪
Process values can be specified in the output image for commissioning of the output modules.
All possibilities in the online mode can be used in parallel with the actual fieldbus mode of the terminal station. The fieldbus protocol always has the higher priority in this case.


Access from the user program

Access from the user program
Access from the user program
Additional information
•
KL1501 - Terminal configuration
•
KL1512 - Terminal configuration
•
KL1501 - Mapping in the Bus Coupler
•
KL1512 - Mapping in the Bus Coupler
•
Register overview
•
Register description
•
Control and status byte
•
Examples of Register Communication
•
Data exchange, function (KL1501 only)


KL1501 - Terminal configuration

Access from the user program [image] KL1501 - Terminal configuration
KL1501 - Terminal configuration
The terminal can be configured and parameterized via the internal register structure. Each terminal channel is mapped in the Bus Coupler. Mapping of the terminal data in the Bus Coupler memory may differ, depending on the Bus Coupler type and the set mapping configuration (e.g. Motorola/Intel format, word alignment etc.).
In contrast to analog input and output terminals, in the KL1501 the control byte and the status byte are always mapped, irrespective of the fieldbus system used.
BK2000 Lightbus Coupler
In the BK2000 Lightbus Coupler, the control/status byte is always mapped, in addition to the data bytes. This is always located in the low byte at the offset address of the terminal channel.
KL1501 - Mapping in the Lightbus Coupler
BK3000 Profibus Coupler
In the BK3000 Profibus Coupler, the KL1501 is automatically mapped with 5 bytes of input data and 5 bytes of output data.
KL1501 - Mapping in the Profibus Coupler
BK4000 Interbus Coupler
By default, the BK4000 Interbus Coupler maps the KL1501 with 5 bytes of input data and 5 bytes of output data.
KL1501 - Mapping in the Interbus Coupler
Other Bus Couplers and further information
Further information about the mapping configuration of Bus Couplers can be found in the Appendix of the respective Bus Coupler manual under Master configuration.
The chapter on Mapping in the Bus Coupler contains an overview of possible mapping configurations, depending on the configurable parameters.
Parameterization with the KS2000 software
The KS2000 configuration software can be used for parameterizations via the serial interface of the Bus Coupler, independent of the fieldbus system.


KL1512 - Terminal configuration

Access from the user program [image] KL1512 - Terminal configuration
KL1512 - Terminal configuration
The terminal can be configured and parameterized via the internal register structure. Each terminal channel is mapped in the Bus Coupler. Mapping of the terminal data in the Bus Coupler memory may differ, depending on the Bus Coupler type and the set mapping configuration (e.g. Motorola/Intel format, word alignment etc.).
In contrast to analog input and output terminals, in the KL1512 the control byte and the status byte are always mapped, irrespective of the fieldbus system used.
BK2000 Lightbus Coupler
When using the Lightbus coupler BK2000, the KL1512 is automatically mapped with 6 bytes of input data and 6 bytes of output data.
KL1512 - Mapping in the Lightbus Coupler
BK3000 Profibus Coupler
When using the Profibus coupler BK3000, the KL1512 is automatically mapped with 6 bytes of input data and 6 bytes of output data.
KL1512 - Mapping in the Profibus Coupler
BK4000 Interbus Coupler
When using the Interbus coupler BK4000, the KL1512 is automatically mapped with 6 bytes of input data and 6 bytes of output data.
KL1512 - Mapping in the Interbus Coupler
Other Bus Couplers and further information
Further information about the mapping configuration of Bus Couplers can be found in the Appendix of the respective Bus Coupler manual under Master configuration.
The chapter on Mapping in the Bus Coupler contains an overview of possible mapping configurations, depending on the configurable parameters.
Parameterization with the KS2000 software
The KS2000 configuration software can be used for parameterizations via the serial interface of the Bus Coupler, independent of the fieldbus system.


KL1501 - Mapping in the Bus Coupler

Access from the user program [image] KL1501 - Mapping in the Bus Coupler
KL1501 - Mapping in the Bus Coupler
As already described in the Terminal Configuration chapter, each Bus Terminal is mapped in the Bus Coupler. This mapping is usually done with the default setting in the Bus Coupler / Bus Terminal. The KS2000 configuration software or a master configuration software (e.g. ComProfibus or TwinCAT System Manager) can be used to change this default setting.
The following tables shows the mapping of the KL1501 in the Bus Coupler, depending on the set parameters.
Additional information
•
Standard format
•
Alternative format


Standard format

Access from the user program [image] KL1501 - Mapping in the Bus Coupler [image] Standard format
Standard format
In the standard format, the KL1501 is mapped with 5 bytes of input data and 5 bytes of output data.
Default mapping for: CAN, DeviceNet, ControlNet, Modbus, RS232 and RS485 Couplers
Requirements | Word offset | High byte | Low byte
Complete evaluation: any Motorola format: no Word alignment: no | 0 | D0 | CB/SB
 | 1 | D2 | D1
 | 2 | Res. | D3
Default mapping for: Profibus and Interbus Coupler
Requirements | Word offset | High byte | Low byte
Complete evaluation: any Motorola format: yes Word alignment: no | 0 | D3 | CB/SB
 | 1 | D1 | D2
 | 2 | Res. | D0
Default mapping for: Lightbus & Ethernet coupler and Bus Terminal Controller (BCxxxx, BXxxxx)
Requirements | Word offset | High byte | Low byte
Complete evaluation: any Motorola format: no Word alignment: yes | 0 | Res. | CB/SB
 | 1 | D1 | D0
 | 2 | D3 | D2
Requirements | Word offset | High byte | Low byte
Complete evaluation: any Motorola format: yes Word alignment: yes | 0 | Res | CB/SB
 | 1 | D2 | D3
 | 2 | D0 | D1
Legend
Complete evaluation: | The terminal is mapped with control and status byte.
Motorola format | Motorola or Intel format can be set.
Word alignment | The terminal is positioned on a word boundary in the Bus Coupler.
CB | Control byte (appears in the process image of the outputs).
SB | Status byte (appears in the process image of the inputs).
D0 | Data byte 0
D1 | Data byte 1
D2 | Data byte 2
D3 | Data byte 3
Res. | This byte is assigned to the process data memory, although it has no function.


Alternative format

Access from the user program [image] KL1501 - Mapping in the Bus Coupler [image] Alternative format
Alternative format
In the alternatives format, the KL1501 is mapped with 4/6 bytes of input data and 4/6 bytes of output data.
Requirements | Word offset | High byte | Low byte
Complete evaluation: no Motorola format: no Word alignment: no | 0 | D0 | Cnt-CB/SB
 | 1 | D2 | D1
Requirements | Word offset | High byte | Low byte
Complete evaluation: no Motorola format: yes Word alignment: no | 0 | Cnt-CB/SB | D0
 | 1 | D1 | D2
Requirements | Word offset | High byte | Low byte
Complete evaluation: yes Motorola format: no Word alignment: no | 0 | Cnt-CB/SB | CB/SB
 | 1 | Res. | D0
 | 2 | D2 | D1
Requirements | Word offset | High byte | Low byte
Complete evaluation: yes Motorola format: yes Word alignment: no | 0 | D0 | CB/SB
 | 1 | Res. | Cnt-CB/SB
 | 2 | D1 | D2
Requirements | Word offset | High byte | Low byte
Complete evaluation: yes Motorola format: no Word alignment: yes | 0 | Res. | CB/SB
 | 1 | D0 | Cnt-CB/SB
 | 2 | Res. | Res.
 | 3 | D2 | D1
Requirements | Word offset | High byte | Low byte
Complete evaluation: yes Motorola format: no Word alignment: yes | 0 | Res. | CB/SB
 | 1 | Cnt-CB/SB | D0
 | 2 | Res. | Res.
 | 3 | D1 | D2
Legend
Complete evaluation: | The terminal is mapped with control and status byte.
Motorola format | Motorola or Intel format can be set.
Word alignment | The terminal is positioned on a word boundary in the Bus Coupler.
CB | Control byte (appears in the process image of the outputs).
SB | Status byte (appears in the process image of the inputs).
Cnt-CB | Control byte in process data exchange.
Cnt-SB | Status byte in process data exchange.
D0 | Data byte 0
D1 | Data byte 1
D2 | Data byte 2
Res. | This byte is assigned to the process data memory, although it has no function.


KL1512 - Mapping in the Bus Coupler

Access from the user program [image] KL1512 - Mapping in the Bus Coupler
KL1512 - Mapping in the Bus Coupler
As already described in the Terminal Configuration chapter, each Bus Terminal is mapped in the Bus Coupler. This mapping is usually done with the default setting in the Bus Coupler / Bus Terminal. The KS2000 configuration software or a master configuration software (e.g. ComProfibus or TwinCAT System Manager) can be used to change this default setting.
The following tables shows the mapping of the KL1512 in the Bus Coupler, depending on the set parameters.
Default mapping for: CANopen, CANCAL, DeviceNet, ControlNet, Modbus, RS232 and RS485 coupler
Conditions | Word offset | High byte | Low byte
Complete evaluation: any Motorola format: no Word alignment: no | 0 | Ch1 D0 | Ch1 CB/SB
 | 1 | Ch2 CB/SB | Ch1 D1
 | 2 | Ch2 D1 | Ch2 D0
 | 3 | - | -
Default mapping for: Profibus and Interbus Coupler
Conditions | Word offset | High byte | Low byte
Complete evaluation: any Motorola format: yes Word alignment: no | 0 | Ch1 D1 | Ch1 CB/SB
 | 1 | Ch2 CB/SB | Ch1 D0
 | 2 | Ch2 D0 | Ch2 D1
 | 3 | - | -
Default mapping for: Lightbus, EtherCAT & Ethernet coupler and Bus Terminal Controller (BCxxxx, BXxxxx)
Conditions | Word offset | High byte | Low byte
Complete evaluation: any Motorola format: no Word alignment: yes | 0 | Res. | Ch1 CB/SB
 | 1 | Ch1 D1 | Ch1 D0
 | 2 | Res. | Ch2 CB/SB
 | 3 | Ch2 D1 | Ch2 D0
Conditions | Word offset | High byte | Low byte
Complete evaluation: any Motorola format: yes Word alignment: yes | 0 | Res. | Ch1 CB/SB
 | 1 | Ch1 D0 | Ch1 D1
 | 2 | Res. | Ch2 CB/SB
 | 3 | Ch2 D0 | Ch2 D1
Key
Complete evaluation | The terminal is mapped with control and status byte.
Motorola format | Motorola or Intel format can be set.
Word alignment | The terminal is positioned on a word boundary in the Bus Coupler.
Ch n CB | Control byte for channel n (appears in the process image of the outputs).
Ch n SB | Status byte for channel n (appears in the process image of the inputs).
Ch n D0 | Channel n, data byte 0 (byte with the lowest value)
Ch n D1 | Channel n, data byte 1 (byte with the highest value)
"-" | This byte is not used or occupied by the terminal.
Res. | Reserved: this byte is assigned to the process data memory, although it has no function.


Register overview

Access from the user program [image] Register overview
Register overview
Address | Name | Default value | R/W | Storage medium
R0 | reserved | 0x0000 | R |
... | ... | ... | ... | ...
R5 | reserved | 0x0000 | R |
R6 | Diagnostic register - reserved | 0x0000 | R |
R7 | Command register - reserved | 0x0000 | R |
R8 | Terminal type | 1501 / 1512 | R | ROM
R9 | Software version number | 0x???? | R | ROM
R10 | Multiplex shift register | 0x0130 | R | ROM
R11 | Signal channels | 0x0128 / 0x0218 | R | ROM
R12 | Minimum data length | 0x2828 / 0x1818 | R | ROM
R13 | Data structure | 0x0000 / 0x0004 | R | ROM
R14 | reserved | 0x0000 | R |
R15 | Alignment register | variable | R/W | RAM
R16 | Hardware version number | 0x???? | R/W | SEEROM
R17 | reserved | 0x0000 | R/W | SEEROM
... | ... | ... | ... | ...
R30 | reserved | 0x0000 | R/W | SEEROM
R31 | Code word register | variable | R/W | RAM
R32 | Feature register | 0x0100 / 0x0000 | R/W | SEEROM
R33 | reserved | 0x0000 | R/W | SEEROM
... | ... | ... | ... | ...
R63 | reserved | 0x0000 | R/W | SEEROM


Register description

Access from the user program [image] Register description
Register description
The registers can be read or written via the register communication. They are used for the parameterization of the terminal.
R0 to R7: Registers in the internal RAM of the terminal
The process variables can be used in addition to the actual process image. Their function is specific to the terminal.
▪
R6: Diagnostic register
The diagnostic register can contain additional diagnostic information. Parity errors, for instance, that occur in serial interface terminals during data transmission are indicated here.
▪
R7: Command register
High-Byte_Write = function parameter
Low-Byte_Write = function number
High-Byte_Read = function result
Low-Byte_Read = function number
R8 to R15: Registers in the internal ROM of the terminal
The type and system parameters are hard programmed by the manufacturer, and the user can read them but cannot change them.
▪
R8: Terminal type
The terminal type in register R8 is needed to identify the terminal.
▪
R9: Software version (X.y)
The software version can be read as a string of ASCII characters.
▪
R10: Data length
R10 contains the number of multiplexed shift registers and their length in bits.
The Bus Coupler sees this structure.
▪
R11: Signal channels
Related to R10, this contains the number of channels that are logically present. Thus for example a shift register that is physically present can perfectly well consist of several signal channels.
▪
R12: Minimum data length
The particular byte contains the minimum data length for a channel that is to be transferred. If the MSB is set, the control and status byte is not necessarily required for the terminal function and is not transferred to the control, if the Bus Coupler is configured accordingly.
▪
R13: Data type register
Data type register | Meaning
0x00 | Terminal with no valid data type
0x01 | Byte array
0x02 | Structure 1 byte n bytes
0x03 | Word array
0x04 | Structure 1 byte n words
0x05 | Double word array
0x06 | Structure 1 byte n double words
0x07 | Structure 1 byte 1 double word
0x08 | Structure 1 byte 1 double word
0x11 | Byte array with variable logical channel length
0x12 | Structure 1 byte n bytes with variable logical channel length (e.g. 60xx)
0x13 | Word array with variable logical channel length
0x14 | Structure 1 byte n words with variable logical channel length
0x15 | Double word array with variable logical channel length
0x16 | Structure 1 byte n double words with variable logical channel length
▪
R15: Alignment bits (RAM)
The alignment bits are used to place the analog terminal in the Bus Coupler on a byte boundary.
R16 to R30: Manufacturer parameter area (SEEROM)
The manufacturer parameters are specific for each type of terminal. They are programmed by the manufacturer, but can also be modified by the controller. The manufacturer parameters are stored in a serial EEPROM in the terminal, and are retained in the event of voltage drop-out.
These registers can only be altered after a code word has been set in R31.
R31 to R47: User parameter area (SEEROM)
The user parameters are specific for each type of terminal. They can be modified by the programmer. The user parameters are stored in a serial EEPROM in the terminal, and are retained in the event of voltage drop-out. The user area is write-protected by a code word.
• R31: Code word register in RAM
The code word 0x1235 must be entered here so that parameters in the user area can be modified. If any other value is entered into this register, the write-protection is active. When write protection is not active, the code word is returned when the register is read. If the write protection is active, the register contains a zero value.
▪
R32: Feature register (KL1501 only)
KL1501: [0x0100], KL1512: not used
This register specifies the operation modes of the terminal.
Feature bit no. |  | Description of the operation mode
Bit 0 | - | no function
Bit 1 | 0/1 | Output format 0: Standard output [0] 1: Alternative output
Bit 2 | 1 | If two counters are active, the CNT_INH bit becomes CNT_SET for the second counter [0].
Bit 3 | 1 | The counter(s) is/are set if a positive edge of the CNT_SET bit in the control byte [0] is encountered
Bit 4 | 1 | The internal function for setting output A0 is active [0].
Bit 5 | 1 | The internal function for resetting output A0 is active [0].
Bit 6 | 1 | The internal function for setting output A1 is active [0].
Bit 7 | 1 | The internal function for resetting output A1 is active [0].
Bit 10, 9, 8 | 001 | 32-bit up/down counter [001]. 24-bit if alternative output format is active.
 | 010 | Standard output: 2 *16-bit up counter Alternative output: Counter 0 is 8 bits wide, counter 1 is 16 bits. The counting frequency is limited to approx. 5 kHz. [pulse width > 100 microseconds]
 | 100 | 32-bit gated counter 24-bit if alternative output format is active Gate input low: Counter is locked
 | 101 | 32-bit gated counter 24-bit if alternative output format is active Gate input high: Counter is locked
Bit 11 | 0/1 | Counting direction 0: Up [0] 1: Down
Bit 12 | 1 | Terminal bus access is polled if the bit is set [0]
Bit 15, 14, 13 | - | No function [0], do not change!


Control and status byte

Access from the user program [image] Control and status byte
Control and status byte
The control byte is transferred from the controller to the terminal. If can be used
▪
in register mode (REG = 1bin) or
▪
in process data exchange (REG = 0bin).
Additional information
•
KL1501 - Process data exchange
•
KL1512 - Process data exchange
•
Register communication


KL1501 - Process data exchange

Access from the user program [image] Control and status byte [image] KL1501 - Process data exchange
KL1501 - Process data exchange
Control byte in process data exchange (REG=0)
During process data exchange, the control byte is used to trigger various actions in the KL1501 counter terminal:
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | REG=0 | 0 | CNT_SET | CNT_INH | SET_A1 | SET_A0 | EN_A1 | EN_A0
Bit | Function
CNT_SET | The counter is set to the value that is specified via the process data. Setting of the counter can be edge-controlled or level-controlled (see R32.3).
CNT_INH | The counter is stopped, as long as this bit is active. The old counter value is maintained. If two counters are active, the second counter can be set with this bit.
SET_A1 | Sets the second output
SET_A0 | Sets the first output
EN_A1 | This bit enables the internal function that was activated via R32.
EN_A0 | This bit enables the internal function that was activated via R32.
▪
Setting outputs A0, A1
The control bits EN_A0 and EN_A1 can be used to activate the functions for setting the outputs. The control bits SET_A0 or SET_A1 are ignored if EN_A0, EN_A1 are set.
Status byte in process data exchange (REG=0)
The status byte is transferred from the terminal to the controller. The status byte contains various status bits of the KL1501 counter terminal
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | REG=0 | 0 | SET_ACC | INH_ACC | ST_A1 | ST_A0 | ST_V/R | ST_CLK
Bit | Function
SET_ACC | The data for setting the counter were accepted by the terminal.
INH_ACC | The counter is stopped as long as this bit is set.
ST_A1 | This bit indicates the state of output A1.
ST_A0 | This bit indicates the state of output A0.
ST_V/R | This bit indicates the state of the up/down input.
ST_CLK | This bit indicates the state of the CLOCK input.


KL1512 - Process data exchange

Access from the user program [image] Control and status byte [image] KL1512 - Process data exchange
KL1512 - Process data exchange
Control byte in process data exchange (REG=0)
During process data exchange, the control byte is used to trigger various actions in the KL1512 counter terminal:
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | REG=0 | 0 | CNT_SET | CNT_INH | 0 | CNT_OVL | CNT_CLR | CNT_DEC
Bit | Function
REG=0 | 0 for Process data mode
0 | Not used
CNT_SET | The counter is set to the value that is specified via the process data. Setting of the counter is edge-controlled.
CNT_INH | The counter is stopped, as long as this bit is active. The present counter value is saved.
0 | Not used
CNT_OVL | If this bit is set, the counter is stopped, if it reaches 0xFFFF while counting forwards if it reaches 0x0000 while counting backwards
CNT_CLR | The counter is set to the value 0x0000. Setting of the counter is edge controlled.
CNT_DEC | If this bit is set, the counter is decremented with every positive edge.
Status byte in process data exchange (REG=0)
The status byte is transferred from the terminal to the controller. The status byte contains various status bits of the KL1512 counter terminal
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Name | REG=0 | 0 | SET_ACK | INH_ACK | 0 | OVL_ACK | CLR_ACK | DEC_ACK
Bit | Function
REG=0 | 0 for Process data mode
0 | Not used
SET_ACK | Acknowledgement for CNT_SET: The data for setting the counter was taken over by the terminal.
INH_ACK | Acknowledgement for CNT_INH: The counter is stopped.
0 | Not used
OVL_ACK | Acknowledgement for CNT_OVL: If this bit is set, the counter is stopped, if it reaches 0xFFFF while counting forwards if it reaches 0x0000 while counting backwards
CLR_ACK | Acknowledgement for CNT_CLR: The counter is set to the value 0x0000. Setting of the counter is edge controlled.
DEC_ACK | Acknowledgement for CNT_DEC: If this bit is set, the counter is decremented with every positive edge.


Register communication

Access from the user program [image] Control and status byte [image] Register communication
Register communication
Register access via process data exchange
▪
Bit 7=1: Register mode
If bit 7 of the control byte is set, the first two bytes of the user data are not used for process data exchange but written into the register set of the terminal or read from it.
▪
Bit 6=0: read, bit 6=1: write
Bit 6 of the control bytes is used to specify whether a register should be read or written.
–
Bit 6=0: A register is read without changing it. The value can be found in the input process image.
–
Bit 6=1: The user data are written into a register. The process is complete once the status byte in the input process image has returned an acknowledgement (see example).
▪
Bits 0 to 5: Address
The address of the register to be addressed is entered in bits 0 to 5 of the control byte.
Control byte in register mode (REG=1)
MSB
REG=1
W/R
A5
A4
A3
A2
A1
A0
REG = 0: Process data exchange
REG = 1: Access to register structure
W/R = 0: Read register
W/R = 1: Write register
A5..A0 = register address
Addresses A5...A0 can be used to address a total of 64 registers.
Register mode control byte
The control or status byte occupies the lowest address of a logical channel. The corresponding register values are located in the following 2 data bytes. (The BK2000 is an exception: here, an unused data byte is inserted after the control or status byte, and the register value is therefore placed on a word boundary).


Examples of Register Communication

Access from the user program [image] Examples of Register Communication
Examples of Register Communication
The numbering of the bytes in the examples corresponds to the display without word alignment.
Additional information
•
Example 1: reading the firmware version from Register 9
•
Example 2: Writing to an user register


Example 1: reading the firmware version from Register 9

Access from the user program [image] Examples of Register Communication [image] Example 1: reading the firmware version from Register 9
Example 1: reading the firmware version from Register 9
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0x89 (1000 1001bin) | 0xXX | 0xXX
Explanation:
▪
Bit 0.7 set means: Register communication switched on.
▪
Bit 0.6 not set means: reading the register.
▪
Bits 0.5 to 0.0 specify the register number 9 with 00 1001bin.
▪
The output data word (byte 1 and byte 2) has no meaning during read access. To change a register, write the required value into the output word.
Input Data (answer of the bus terminal)
Byte 0: Status byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0x89 | 0x33 | 0x41
Explanation:
▪
The terminal returns the value of the control byte as a receipt in the status byte.
▪
The terminal returns 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
The firmware version is thus 3A.


Example 2: Writing to an user register

Access from the user program [image] Examples of Register Communication [image] Example 2: Writing to an user register
Example 2: Writing to an user register
Code word
In normal mode all user registers are read-only with the exception of Register 31. In order to deactivate this write protection you must write the code word (0x1235) into Register 31. If a value other than 0x1235 is written into Register 31, write protection is reactivated. Please note that changes to a register only become effective after restarting the terminal (power-off/power-on).
I. Write the code word (0x1235) into Register 31.
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0xDF (1101 1111bin) | 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 1111bin.
▪
The output data word (byte 1 and byte 2) contains the code word (0x1235) for deactivating write protection.
Input Data (answer of the bus terminal)
Byte 0: Status byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0x9F (1001 1111bin) | 0xXX | 0xXX
Explanation:
▪
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!
II. Read Register 31 (check the set code word)
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0x9F (1001 1111bin) | 0xXX | 0xXX
Explanation:
▪
Bit 0.7 set means: Register communication switched on.
▪
Bit 0.6 not set means: reading the register.
▪
Bits 0.5 to 0.0 specify the register number 31 with 01 1111bin.
▪
The output data word (byte 1 and byte 2) has no meaning during read access.
Input Data (answer of the bus terminal)
Byte 0: Status byte | 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 current value of the code word register in the input data word (byte 1 and byte 2).
III. Write to Register 32 (change contents of the feature register)
Output data
Byte 0: Control byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0xE0 (1110 0000bin) | 0x00 | 0x02
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 indicate register number 32 with 10 0000bin.
▪
The output data word (byte 1 and byte 2) contains the new value for the feature register.
SmallWarningYellow CAUTION
Observe the register description!
The value of 0x0002 given here is just an example!
The bits of the feature register change the properties of the terminal and have a different meaning, depending on the type of terminal. Refer to the description of the feature register of your terminal (chapter Register description) regarding the meaning of the individual bits before changing the values.
Input data (response from the Bus Terminal)
Byte 0: Status byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0xA0 (1010 0000bin) | 0xXX | 0xXX
Explanation:
▪
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!
IV. Read Register 32 (check changed feature register)
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0xA0 (1010 0000bin) | 0xXX | 0xXX
Explanation:
▪
Bit 0.7 set means: Register communication switched on.
▪
Bit 0.6 not set means: reading the register.
▪
Bits 0.5 to 0.0 indicate register number 32 with 10 0000bin.
▪
The output data word (byte 1 and byte 2) has no meaning during read access.
Input Data (answer of the bus terminal)
Byte 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 terminal returns the current value of the feature register in the input data word (byte 1 and byte 2).
V. Write Register 31 (reset code word)
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0xDF (1101 1111bin) | 0x00 | 0x00
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 1111bin.
▪
The output data word (byte 1 and byte 2) contains 0x0000 for reactivating write protection.
Input Data (answer of the bus terminal)
Byte 0: Status byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0x9F (1001 1111bin) | 0xXX | 0xXX
Explanation:
▪
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!


Data exchange, function (KL1501 only)

Access from the user program [image] Data exchange, function (KL1501 only)
Data exchange, function (KL1501 only)
Automatic setting of the outputs for defined counter values
The feature register R32 can be used to activate an internal function for setting the outputs.
▪
Up/down counter or gated counter:
–
When the counter reaches the value 0x80000000, the output A0 is set (feature bit 5) or reset (feature bit 6).
–
In the event of a counter overflow, the output is reset.
–
Output A1 is set in parallel with bit 15 (0x8000).
▪
Two counters active:
–
When the counter reaches the value 0x8000, the output (A1, A0) is set (feature bit 4,6) or reset (feature bit 5,7).
–
In the event of a counter overflow, the output is reset.
Example:
Feature register = 0x02AC i.e:
Two counters are active.
The counter is set via the positive edge of the CNT_SET bit.
The control bit CNT_INH deals with setting of the second counter.
A glass is to be filled with 200 ml of beer.
1 pulse corresponds to 0.01 ml => 1 glass corresponds to 20000 pulses (0x31E0 = 0x8000-20000).
First counter | Control byte | Status byte | Output data | Output A0 | Function
0x0000 | 0x00 | 0x00 | 0x0000 | Low | Power-on reset
0x0000 | 0x22 | 0x00 | 0x31E0 | Low | Counter is set, internal function enabled
0x31Ex | 0x02 | 0x28 | any | High | Beer is flowing.
… |  |  |  |  |
0x8000 | 0x02 | 0x00 | any | Low | The first glass is full.
… |  |  |  |  |
0x8000 | 0x22 | 0x00 | 0x31E0 | Low | Counter is set, internal function enabled
0x31Ex | 0x02 | 0x28 | any | High | Beer is flowing.
… |  |  |  |  |
0x8000 | 0x02 | 0x00 | any | Low | The second glass is full.
… |  |  |  |  |


TwinCAT

TwinCAT
TwinCAT
PLC and Motion Control on the PC
TwinCAT - The Windows Control and Automation Technology
The TwinCAT automation software converts any compatible PC into a real-time controller with multi-PLC, NC axis control, programming environment and operating station. TwinCAT replaces conventional PLC and NC controllers as well as operating devices:
▪
open, compatible PC hardware
▪
Embedding of IEC 61131-3 software PLC, software NC and software CNC in Windows NT/2000/XP, NT/XP Embedded, CE
▪
Programming and runtime systems optionally together on one PC or separated
▪
Connection to all common fieldbus systems
▪
PC interfaces are supported
▪
Data communication with user interfaces and other programs by means of open Microsoft standards (OPC, OCX, DLL, etc.)
TwinCAT architecture
TwinCAT consists of runtime systems for real-time execution of control programs and development environments for programming, diagnosis and configuration. Any Windows programs, for instance visualization programs or Office programs, can access TwinCAT data via Microsoft interfaces, or can execute commands.
A practically oriented software solution
TwinCAT offers a precise time-base in which programs are executed with the highest deterministic features, independently of other processor tasks. The real-time load on a PC is set with TwinCAT: This achieves a defined operating behavior. TwinCAT displays the system load for running programs. A loading threshold can be set, in order to assure a defined computing capacity for the operating programs and for Windows NT/2000/XP. If this threshold is exceeded, a system message is generated.
TwinCAT supports system diagnosis
The general use of hardware and software from the open PC world requires some checking: Unsuitable components can upset the PC system. Beckhoff integrates a handy display of the real-time jitter in order to provide administrators with a simple means of evaluating hardware and software. A system message during operation can draw attention to error states.
Start/stop behavior
Depending on the setting, TwinCAT is started and stopped manually or automatically. Since TwinCAT is integrated into Windows NT/2000/XP as a service, an operator is not needed to start the system: switching on is enough.
Restarting and data backup
When a program is started or restarted, TwinCAT loads programs and remanent data. To backup data, and to shut down Windows NT/2000/XP correctly, a UPS (uninterruptible power supply) is of great value.
TwinCAT and "Blue Screen"
The TwinCAT system can be configured such that real-time capability is maintained in the event of a BSOD (Blue-Screen-of-Death) operating system crash. Real-time tasks such as PLC and NC can thus continue to run and place the controlled process in a safe state. Ultimately, it is the decision of the programmer whether or not to utilize this feature, bearing in mind that data or programs may already have been destroyed by the BSOD.
World-wide connection through message routing - "remote" connection is inherent to the system
According to the requirement for operating resources, the TwinCAT software devices can be distributed: TwinCAT PLC programs can be executed on PCs and on Beckhoff Bus Terminal controllers. A "message router" manages and distributes all the messages, both in the system and via TCP/IP connections. PC systems can be connected to one another by TCP/IP; Bus Terminal controllers are connected via serial interfaces and fieldbus systems (EtherCAT, Lightbus, PROFIBUS DP, PROFINET, Interbus, CANopen, DeviceNet, RS232, RS485, Ethernet TCP/IP, Ethernet/IP).
World-wide access
Since standard TCP/IP services from Windows NT/2000/XP are used, this data exchange can take place worldwide. The system offers scalable communication capacity and timeout periods for the monitoring of communications. OPC provides a standardized means for accessing many different SCADA packets. The SOAP (Simple Object Access Protocol) enables a connection between two computers to be established by means of an internet connection via standard HTTP. A TwinCAT component is available for this purpose.
Beckhoff Information System
Further information on the TwinCAT automation software can be found in the Beckhoff Information System.
The setup for installing the Beckhoff Information System is available to you on the Beckhoff Products & Solutions DVD and on our website for download.
In addition, the online version of the Beckhoff Information System can be found at https://infosys.beckhoff.com.
Additional information
•
Programming
•
Function block FB_KL1501Config


Programming

TwinCAT [image] Programming
Programming
TwinCAT libraries
See software documentation in the Beckhoff Information System.
TwinCAT 2: TwinCAT PLC Lib: I/O functions
TwinCAT 3: TwinCAT 3 PLC Lib: Tc2_IoFunctions


Function block FB_KL1501Config

TwinCAT [image] Function block FB_KL1501Config
Function block FB_KL1501Config
The function block FB-KL1501Config can be used to configure the KL1501 terminal. A more detailed description can be found in the Beckhoff Information System:
TwinCAT2: TwinCAT PLC Lib: I/O functions/Bus Terminal configuration
TwinCAT3: TwinCAT 3 PLC Lib:Tc2_I/O functions/Function blocks/Bus Terminal configuration


Appendix

Appendix
Appendix
Additional information
•
Support and Service


Support and Service

Appendix [image] Support and Service
Support and Service
Beckhoff and their partners around the world offer comprehensive support and service, making available fast and competent assistance with all questions related to Beckhoff products and system solutions.
Beckhoff's branch offices and representatives
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:
http://www.beckhoff.com
You will also find further documentation for Beckhoff 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 offers you comprehensive technical assistance, helping you not only with the application of individual Beckhoff products, but also with other, wide-ranging services:
▪
support
▪
design, programming and commissioning of complex automation systems
▪
and extensive training program for Beckhoff system components
Hotline: | +49(0)5246/963-157
Fax: | +49(0)5246/963-9157
e-mail: | support@beckhoff.com
Beckhoff Service
The Beckhoff Service Center supports you in all matters of after-sales service:
▪
on-site service
▪
repair service
▪
spare parts service
▪
hotline service
Hotline: | +49(0)5246/963-460
Fax: | +49(0)5246/963-479
e-mail: | service@beckhoff.com