BECKHOFF KL1512 User Manual

Documentation for
KL1512
Up/Down-Counter Terminal, 24 VDC, 1 kHz
Version: 1.0.3 Date: 2006-10-20
Table of Contents
Table of Contents
1 Foreword 1
1.1 Notes on the documentation 1
1.1.1 Liability Conditions 1
1.1.2 Delivery conditions 1
1.1.3 Copyright 1
1.2 Safety Instructions 2
1.2.1 State at Delivery 2
1.2.2 Description of safety symbols 2
2 Product Overview 3
2.1 Technical data 3
2.2 Functional Description 4
3 Terminal configuration 4
3.1 Register Overview 6
3.2 Register description 6
3.2.1 General register description 6
3.2.2 Terminal-specific register description 9
3.3 Control and Status Byte 9
3.4 Register communication with KL1512 10
3.4.1 Examples for Register Communication 11
4 Appendix 12
4.1 Mapping in the bus coupler 12
4.2 Support and Service 13
4.2.1 Beckhoff Support 13
4.2.2 Beckhoff Service 13
4.2.3 Beckhoff company headquarters 13
KL1512
Foreword
1 Foreword
1.1 Notes on the documentation
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 following notes and explanations are followed when installing and commissioning these components.
1.1.1 Liability Conditions
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. The documentation has been prepared with care. The products described are, however, constantly under development. For that reason the documentation is not in every case checked for consistency with performance data, standards or other characteristics. None of the statements of this manual represents a guarantee (Garantie) in the meaning of § 443 BGB of the German Civil Code or a statement about the contractually expected fitness for a particular purpose in the meaning of § 434 par. 1 sentence 1 BGB. In the event that it contains technical or editorial errors, we retain the right to make alterations at any time and without warning. 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.
1.1.2 Delivery conditions
In addition, the general delivery conditions of the company Beckhoff Automation GmbH apply.
1.1.3 Copyright
©
This documentation is copyrighted. Any reproduction or third party use of this publication, whether in
whole or in part, without the written permission of Beckhoff Automation GmbH, is forbidden.
KL1512 1
Foreword
i
1.2 Safety Instructions
1.2.1 State at Delivery
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.
1.2.2
The following safety symbols are used in this documentation. They are intended to alert the reader to the associated safety instructions..
Description of safety symbols
This symbol is intended to highlight risks for the life or health of personnel.
Danger
This symbol is intended to highlight risks for equipment, materials or the
Attention
Note
environment. This symbol indicates information that contributes to better understanding.
2 KL1512
Product Overview
2 Product Overview
Product name KL1512
Number of counters
Rated load voltage
‘0’ signal voltage ‘1’ signal voltage
Input current
Counting frequency
Counter depth
Current consumption from K-Bus
Electrical isolation
Bit width in the process image
Configuration
Operating temperature
Storage temperature
Relative humidity
Vibration / Shock resistance
EMC resistance burst / ESD
Installation position
Type of protection
2.1 Technical data
2 24 VDC (-15% / +20%)
-3 V ... 5 V (EN61131-3, Typ 1) 15 V ... 30 V(EN61131-3, Typ 1) typical 8 mA. (EN61131-3, Typ 1) maximum 1 kHz 16 bit typical 50 mA 500 Vrms (K-Bus / field voltage) 2 x 16 bits data, 2 x 8 bits control/status no address settings, configuration via Control and Status Byte
Weight
app. 55 g 0°C ... +55°C
-25°C ... +85°C 95%, no condensation conforms to EN 60068-2-6 / EN 60068-2-27, EN 60068-2-29 conforms to EN 61000-6-2 / EN 61000-6-4 any IP20
KL1512 3
Terminal configuration
i
Offset Terminal1 Channel1 = 0
Offset Terminal2 Channel1 = 4
Offset Terminal2 Channel2 = 8
User data allocation depending
To the bus terminal
The input terminal KL1512 counts binary pulses and transmits the current
LED display The LEDs indicate the states of inputs 1 and input 2. Process data
Standard output format
2.2 Functional Description
value to the higher-level control system. The maximum input frequency is limited to 1 kHz. The minimum pulse
width of the input signal is 500 microseconds. 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.
6 bytes (2 bytes of user information data and 1 control/status byte per channel ) are mapped. The process data presents themselves as follows per channel:
1 Byte Control/Status
16 Bit unsigned Integer
Mapping of the terminal is described in further detail in the appendix.
3 Terminal configuration
The terminal can be configured and parameterized by way of the internal
Note
Contrary to the analog and output terminals, in the case of the KL1512 the
Lightbus coupler BK2000 When using the Lightbus coupler BK2000, the KL1512 is automatically
register structure. Each terminal channel is mapped in the bus coupler. The terminal’s data is mapped differently in the bus coupler’s memory depending on the type of the bus coupler and on the set mapping configuration (e.g. Motorola/Intel format, word alignment etc.).
control and status byte is always also mapped, regardless of the field bus system used.
mapped with 6 bytes of input data and 6 bytes of output data.
Beckhoff-Lightbus bus coupler BK2000
The terminal is mapped in the bus coupler.
Data H Data L
D1 - 1
D1 - 0
0
C/S
C/S
Data LData H
C/S D0 - 1 C/S - 1 D0 - 0 C/S - 0
on mapping
KL1512
4 KL1512
LH
K-Bus
Terminal configuration
Offset Terminal1 Channel1 = 0
Offset Terminal1 Channel2 = 3
Offset Terminal2 Channel1 = 6
To the bus terminal
Offset Terminal1 Channel1 = 0
Offset Terminal1 Channel2 = 3
Offset Terminal2 Channel1 = 6
To the bus terminal
i
Profibus coupler BK3000 When using the Profibus coupler BK3000, the KL1512 is automatically
mapped with 6 bytes of input data and 6 bytes of output data.
Profibus bus coupler BK3000
The terminal is mapped in the bus coupler.
Data L Data H
C/S D0 - 1 D1 - 1
C/S - 1
D0 - 0 D1 - 0
C/S - 0
0
The control-/status byte must be inserted for parameterization.
KL 1512 Channel 2
KL 1512 Channel 1
K-Bus
Interbus coupler BK4000 When using the Interbus coupler BK4000, the KL1512 is automatically
mapped with 6 bytes of input data and 6 bytes of output data.
Profibus bus coupler BK3000
The terminal is mapped in the bus coupler.
Data L Data H
C/S D0 - 1 D1 - 1
C/S - 1
D0 - 0 D1 - 0
C/S - 0
0
The control-/status byte must be inserted for parameterization.
KL 1512 Channel 2
KL 1512 Channel 1
K-Bus
Other bus couplers and further information
Note
Parameterization with the KS2000 software
You will find further information on the mapping configuration of bus couplers in the annex of the respective bus coupler manual under the heading of Configuration of masters.
In the appendix it exists an outline of the possible mapping configurations in dependency of the adjustable parameters.
Using the KS2000 configuration software, the parameterization operations can be carried out independently of the field bus system via the bus couplers serial interface.
KL1512 5
Terminal configuration
3.1 Register Overview
Register No. Description Default R/W Storage medium
R0
not used 0x0000 R
...
... ... ... ...
R5
not used 0x0000 R
R6
Diagnostic register – not used 0x0000 R
R7
Command register - not used 0x0000 R
R8
Terminal type 0x05E8 (1512) R ROM
R9
Software version number 0x???? R ROM
R10 R11 R12 R13 R14 R15 R16 R17
R30 R31 R32 R33
R63
Multiplex-shift register 0x0130 R ROM Signal channels 0x0228 R ROM minimum data length 0x1818 R ROM Data structure 0x0004 R ROM not used 0x0000 R Alignment-register variable R/W RAM Hardware version number 0x???? R/W SEEROM not used 0x0000 R/W SEEROM
...
... ... ... ...
not used 0x0000 R/W SEEROM Code word register variable R/W RAM not used 0x0000 R/W SEEROM not used 0x0000 R/W SEEROM
...
... ... ... ...
not used 0x0000 R/W SEEROM
3.2 Register description
The complex terminals can be adjusted to different operating modes or
functionalities. The General Description of Register describes the contents of the registers, which are identical for all complex terminals.
The terminal-specific registers are explained in the section following to it. The access to the internal registers of the terminal is described in the
section Register Communication.
3.2.1 General register description
Complex terminals that possess a processor are capable of bidirectionally
ex-changing data with the higher-level control system. Below, these terminals are referred to as intelligent bus terminals. They include the analog inputs, the analog outputs, serial interface terminals (RS485, RS232, TTY etc.), counter terminals, encoder interfaces, SSI interfaces, PWM terminals and all other parameterizable terminals.
Internally, all intelligent terminals possess a data structure that is identical in terms of it's essential characteristics. This data area is organized in words and embraces 64 registers. The essential data and parameters of the terminal can be read and adjusted by way of the structure. Function calls with corresponding parameters are also possible. Each logical channel of an intelligent terminal has such a structure (therefore, 4-channel analog terminals have 4 register sets.
6 KL1512
Terminal configuration
This structure is broken down into the following areas:
Register Application
0 to 7
8 to 15 16 to 30 31 to 47 48 to 63
Process variables Type register Manufacturer parameters User parameters Extended user area
Process variables
R0 to R7: Registers in the terminal’s internal RAM
The process variables can be used in additional to the actual process image and their functions are specific to the terminal.
R0 to R5: Terminal specific registers
The function of these registers depends on the respective terminal type (see terminal-specific register description).
R6: Diagnostic register
The diagnostic register may contain additional diagnostic information. In the case of serial interface terminals, for example, parity errors that have occurred during data transfer are indicated.
R7: Command register
High-Byte_Write = function parameter Low-Byte_Write = function number High-Byte_Read = function result Low-Byte_Read = function number
Type registers
R8 to R15: Registers in the terminal’s internal ROM
The type and system parameters are programmed permanently by the manufacturer and can only be read by the user but cannot be modified.
R8: Terminal type:
The terminal type in register R8 is needed to identify the terminal.
R9: Firmware version X.y
The firmware version can be read as an ASCII character string.
3.2.1.1 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
In comparison with R10, the number of logically existing channels is located here. For example, one physically existing shift register may consist of several signal channels.
R12: Minimum data length
The respective byte contains the minimum data length of a channel to be transferred. If the MSB is set, then the control/status byte is not necessarily needed for the function of the terminal and, with appropriate configuration of the coupler, is not transferred to the control system.
KL1512 7
Terminal configuration
i
Manufacturer parameters
User parameters
Note
Extended application area
R13: Data type register
Data type register
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x11 0x12
0x13 0x14
0x15 0x16
Terminal without valid data type Byte array 1 byte n bytes structure Word array 1 byte n words structure Double word array 1 byte n double words structure 1 byte 1 double word structure 1 byte 1 double word structure Byte-array with a variable logical channel length 1 byte n bytes structure with a variable logical channel
length (eg 60xx) Word-array with a variable logical channel length 1 byte n words structure with a variable logical channel
length Double word array with a variable logical channel length 1 byte n double words structure with a variable logical
channel length
R14: not used R15: Alignment bits (RAM)
The analog terminal is set to a byte limit in the terminal bus with the alignment bits.
R16 to R30: Manufacturer parameter area (SEEROM)
The manufacturer parameters are specific to each terminal type. They are programmed by the manufacturer but can also be modified from the control system. The manufacturer parameters are stored permanently in a serial EEPROM and are therefore not destroyed by power failures. These registers can only be modified after setting a code word in R31.
R31 to R47: User parameter area (SEEROM)
The user parameters are specific to each terminal type. They can be modified by the programmer. The user parameters are stored permanently in a serial EEPROM in the terminal and cannot be destroyed by power failures. The user area is write protected over a Codeword.
R31: Code word register in the RAM
The code word 0x1235 must be entered here to enable modification of parameters in the user area. Write-protection is set if a different value is entered in this register. When write protection is inactive, the code word is returned during reading of the register. The register contains the value zero when write protection is active.
R32: Feature-register
This register defines the operating modes of the terminal. For example, a user-specific scaling can be activated for the analog I/Os.
R33 to R47
Registers that depend on the terminal type
R47 to R63
These registers have not yet been implemented.
8 KL1512
Terminal configuration
3.2.2 Terminal-specific register description
The KL1512 has no terminal specific registers!
3.3 Control and Status Byte
The control byte is transmitted from the controller to the terminal. It can be
used
- in register mode (REG = 1
- during process data exchange (REG = 0
bin
) or
bin
).
Control byte during process data exchange
The control byte triggers various actions in the counter terminal KL1512
during process data exchange:
Bit Name
7 6 5 4 3 2 1 0
REG=0 0 CNT_SET CNT_INH 0 CNT_OVL CNT_CLR CNT_DEC
Bit Name Function
7 REG 6 0 5 CNT_SET
4 CNT_INH
3 0 2 CNT_OVL
1 CNT_CLR
0 CNT_DEC
0 for Process data mode not used The counter is set to the value that is specified via the
process data. Setting of the counter is edge controlled. If this bit is set, the counter is stopped. The present
counter value is saved. not used If this bit is set, the counter is stopped,
- if it reaches 0xFFFF while counting forwards
- if it reaches 0x0000 while counting backwards The counter is set to the value 0x0000. Setting of the
counter is edge controlled. If this bit is set, the counter is decremented with every
positive edge.
Status byte during process data exchange
The status byte is transferred from the terminal to the control system. It
acknowledges the bits of the control byte.:
Bit Name
7 6 5 4 3 2 1 0
REG=0 0 SET_ACK INH_ACK 0 OVL_ACK CLR_ACK DEC_ACK
Bit Name Function
7 REG 6 0 5 SET
4 INH
3 0 2 OVL
1 CLR
0 DEC
_ACK
_ACK
_ACK
_ACK
_ACK
0 for Process data mode not used Acknowledgement for CNT_SET: The data for setting
the counter was taken over by the terminal. Acknowledgement for CNT_INH: The counter is
stopped. not used 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 Acknowledgement for CNT_CLR: The counter is set to
the value 0x0000. Setting of the counter is edge controlled.
Acknowledgement for CNT_DEC: If this bit is set, the counter is decremented with every positive edge.
KL1512 9
Terminal configuration
0
63
Terminal´s
HHL
L
3.4 Register communication with KL1512
Register access via process data transfer Bit 7=1: register mode
When bit 7 of the control byte is set, the first two bytes of the user data are not used for process data transfer, but are written into or read out of the terminal’s register.
Bit 6=0: read Bit 6=1: write
In bit 6 of the control byte, you define whether a register is to be read or written. When bit 6 is not set, a register is read without modification. The value can be taken from the input process image.
When bit 6 is set, the user data is written into a register. The operation is concluded as soon as the status byte in the input process image has supplied an acknowledgement (see examples).
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 the register mode
Bit Name
7 6 5 4 3 2 1 0
REG=1 W/R A5 A4 A3 A2 A1 A0
REG = 0: Process data transfer
REG = 1: Access to register structure W/R = 0: Read register W/R = 1: Write register A5...A0 = Register address A total of 64 registers can be addressed with the addresses A5...A0.
To the bus coupler
K-Bus
Control-/ status byte
C/S-bit 7
If control bit 6=0: read If control bit 6=1: write
User data
2 or mors bytes
If control bit 7=0: input/output
If control bit 7=1: register­configuration
If control bit 7=1: adress in the control bit 0-5
register set 64 words
Complex bus terminal
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 to the rule: here, an unused data byte is inserted after the control or status byte, thus setting the register value to a word limit).
10 KL1512
Terminal configuration
3.4.1 Examples for Register Communication
Example 1 Reading register 8 in the BK2000 with a Kl3022 and the end terminal.
If the following bytes are transferred from the controller to the terminal,
Byte Name Value
Byte3 Byte2 Byte1 Byte0 Data OUT, low byte Data OUT, high byte Not used Control 0xXX 0xXX 0xXX 0x88
the terminal returns the following type designation (0x0BCE corresponds to
the unsigned integer 3022).
Byte Name Value
Byte3 Byte2 Byte1 Byte0 Data IN, low byte Data IN, high byte Not used Status 0xCE 0x0B 0x00 0x88
Example 2 Writing register 31 in the BK2000 with an intelligent terminal and the end
terminal. If the following bytes (user code word) are transferred from the controller to
the terminal,
Byte Name Value
Byte3 Byte2 Byte1 Byte0 Data OUT, low byte Data OUT, high byte Not used Control 0x35 0x12 0xXX 0xDF
the user code word is set and the terminal returns the register address with
the bit 7 for register access and the acknowledgement.
Byte Name Value
Byte3 Byte2 Byte1 Byte0 Data IN, low byte Data IN, high byte Not used Status 0x00 0x00 0x00 0x9F
KL1512 11
Appendix
4 Appendix
As already described in the chapter terminal configuration, each bus
terminal is mapped in the bus coupler. In the standard case, this mapping is done with the default setting in the bus coupler / bus terminal. This default setting can be modified with the KS2000 configuration software or using master configuration software (e.g. ComProfibus or TwinCAT System Manager). The following tables provide information on how the KL1512 maps itself in the bus coupler depending on the set parameters.
The KL1512 is mapped in the bus coupler with 5 bytes input and 5 bytes
Default Mapping for CAN, DeviceNet, ControlNet, Modbus, RS232 and RS485 Coupler
Default-Mapping for Profibus and Interbus Coupler
Default-Mapping for Lightbus and Ethernet Coupler and Bus Terminal Controller (BCxxxx, BXxxxx)
Key Complete evaluation:
4.1 Mapping in the bus coupler
output data. Conditions Word offset High Byte Low Byte
Complete evaluation: don’t care Motorola format: no Word alignment: no
Conditions Word offset High Byte Low Byte Complete evaluation: don’t care
Motorola format: yes Word alignment: no
Conditions Word offset High Byte Low Byte Complete evaluation: don’t care
Motorola format: no Word alignment: yes
Conditions Word offset High Byte Low Byte Complete evaluation: don’t care
Motorola format: yes Word alignment: yes
3 Ch2 D0 Ch2 D1
The terminal is mapped with control and status byte. Motorola format:
Motorola or Intel format can be set. Word alignment:
The terminal is at word limit in the Bus Coupler. Ch n SB: status byte for channel n (appears in the input process image).
Ch n CB: control byte for channel n (appears in the output process image). 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) res.: reserved:
This byte occupies process data memory, although it is not used.
0 Ch1 D0 Ch1 CB/SB 1 Ch2 CB/SB Ch1 D1 2 Ch2 D1 Ch2 D0
0 Ch1 D1 Ch1 CB/SB 1 Ch2 CB/SB Ch1 D0 2 Ch2 D0 Ch2 D1
0 res. Ch1 CB/SB 1 Ch1 D1 Ch1 D0 2 res. Ch2 CB/SB 3 Ch2 D1 Ch2 D0
0 res. Ch1 CB/SB 1 Ch1 D0 Ch1 D1 2 res. Ch2 CB/SB
12 KL1512
Appendix
Beckhoff and their partners around the world offer comprehensive service
4.2 Support and Service
and support, making available fast and competent assistance with all questions related to Beckhoff products and system solutions.
4.2.1 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:
world-wide support
design, programming and commissioning of complex automation
systems
and extensive training program for Beckhoff system components
Hotline: Fax: e-mail:
4.2.2 Beckhoff Service
The Beckhoff Service Centre supports you in all matters of after-sales service:
Hotline: Fax: e-mail:
You will find further support and service addresses on our Internet pages under: http://www.beckhoff.com.
4.2.3 Beckhoff company headquarters
Beckhoff Automation GmbH Eiserstr. 5 D-33415 Verl Germany
Phone: Fax: e-mail:
The addresses of Beckhoff’s branch offices and representatives round the world can be found on the internet pages: http://www.beckhoff.com You will also find further documentation for Beckhoff components there.
+49(0)5246/963-157
on-site service
repair service
spare parts service
hotline service
+49(0)5246/963-9157 support@beckhoff.com
+49(0)5246/963-460 +49(0)5246/963-479 service@beckhoff.com
+49(0)5246/963-0 +49(0)5246/963-198 info@beckhoff.com
KL1512 13
Loading...