Infosys在阅读器中打开 / AI 翻译

KL5121/KS5121 | Incremental encoder interface with programmable outputs for a linear path control · 0 次阅读

Register description

The registers can be read or written via the register communication. They are used for the parameterization of the terminal.

General description of registers

Complex terminals that possess a processor are able to exchange data bi-directionally with the higher-level controller. These terminals are referred to below as intelligent Bus Terminals. These include the analog inputs (0 to 10 V, -10 to 10 V, 0 to 20 mA, 4 to 20 mA), the analog outputs (0 to 10 V, -10 to 10 V, 0 to 20 mA, 4 to 20 mA), serial interface terminals (RS485, RS232, TTY, data exchange terminals), counter terminals, encoder interfaces, SSI interfaces, PWM terminals and all other parameterizable modules.

The main features of the internal data structure are the same for all the intelligent terminals. This data area is organized as words, and includes 64 memory locations. The important data and parameters of the terminal can be read and set through this structure. It is also possible for functions to be called by means of corresponding parameters. Each logical channel in an intelligent terminal has such a structure (so a 4-channel analog terminal has 4 register sets).

This structure is divided into the following areas:

Range

Register number

Process variables

0 to 7

Type register

8 to 15

Manufacturer parameters

16 to 30

User parameters

31 to 47

Extended user area

48 to 63

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.

  • R0 to R5: reserved
  • R0 to R3
    Pulse for speed correction of channels 1-4
  • R4 to R7: no function
  • 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

  • R14: reserved
  • 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.

  • R17 to R30: not used

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.

Register description 1:

• 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
    This register specifies the operation modes of the terminal. Thus, for instance, a user-specific scaling can be enabled for the analog I/Os.
    This register describes the hardware settings for channels 1-4 [0x0062]
    The default values are shown in square brackets.

Feature bit no.

 

Description of the operation mode

Bit 0

0/1

0: encoder operating mode with 4-fold evaluation [0]
1: up/down counter (pulse generator) with A as counter input and B as U/D input

Bit 1

0/1

Latch input:
0: rising edge is ignored
1: evaluate positive edge as start signal [1]

Bit 2

0/1

Latch input:
0: falling edge is ignored [0]
1: evaluate negative edge as start signal

Bit 3

0/1

0: the outputs are switched according to positive logic [0]
1: the outputs are switched according to negative logic

Bit 4

0/1

0: watchdog timer active [0]
1: watchdog timer active. If the terminal does not receive any process data from the K-bus for 100 ms the outputs are reset

Bit 5

1

1: workpiece encoder input (latch) is active [1] when there is a positive level at the enable input (gate)

Bit 6

1

1: workpiece encoder input (latch) is active [1] when there is a negative level at the enable input (gate)

Bit 7 - 11

-

not used

Bit 12 - 15

0000

0001

Pulse operation (R33-R35 activated) [0000]

Line operation (not yet implemented)

  • R33 - R47
    Registers that depend on the terminal type.
  • R33: Pulse duration Ti for channel 1
    [0x01F4] = 0.5 ms
    Ti defines the pulse duration in pulse mode of channel 1 [µs]
  • R34: Rate time Tv for channel 1
    [0x1388] = 5 ms
    The pulses counted over the rate time Tv are calculated during the velocity correction [µs]
  • R35: Period Td for channel 1
    [0x4E20] = 20 ms
    Period Td for the channel 1 nozzle test
  • R40 - R43: Channel 2 register
  • R47 - R63
    Extended registers with additional functions.
  • R48 - R51: Channel 3 register
  • R56 - R59: Channel 4 register