Access from the user program
KL320x
34
Version: 4.4
5
Access from the user program
Different operating modes or functionalities may be set for the complex terminals. The
General Description of
Registers
explains those register contents that are the same for all complex terminals.
The terminal-specific registers are explained in the following section.
Access to the internal terminal registers is described in the
Register Communication
section.
5.1
Mapping
As already described in the Terminal Configuration section, each Bus Terminal is mapped in the Bus
Coupler. In the delivery state, this mapping occurs with the default settings of the Bus Coupler for this
terminal. The default setting can be changed with the KS2000 configuration software or with a master
configuration software (e.g. TwinCAT System Manager or ComProfibus).
If the terminals are fully evaluated, they occupy memory space in the input and output process image.
The following tables provide information about the terminal mapping, depending on the conditions set in the
Bus Coupler.
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 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)
• "-":
This byte is not used or occupied by the terminal.
• res.: reserved:
This byte occupies process data memory, although it is not used.
5.1.1
KL3201
Default mapping for:
CANopen, CANCAL, DeviceNet, ControlNet, Modbus, RS232, RS485
Conditions
Word offset
High byte
Low byte
Complete evaluation: no
Motorola format: no
Word alignment: any
0
Ch0 D1
Ch0 D0
1
-
-
2
-
-
3
-
-