Access From The User Program; Control And Status Word - Beckhoff KS6031 Documentation

Serial interface terminals
Table of Contents

Advertisement

Access from the user program

5
Access from the user program
5.1

Control and status word

Control word
The control word (CW) is located in the output process image, and is transmitted from the controller to the
terminal.
Bit
CW.15 CW.14 CW.13 CW.12 CW.11 CW.10 CW.9 CW.8 CW.7 CW.6 CW.5 CW.4 CW.3 CW.2 CW.1 CW.0
Name OL7
OL6
OL5
Bits CW.15 to CW.8 are only shown if the large process image is used.
If the small or medium process image is used, only bits CW.7 to CW.0 are shown as control bytes! The
number of output bytes available for transfer from the controller to the terminal is displayed by bits
OL2* ... OL0*.
Key
Bit
Name
CW.15
OL7 ... OL0
...
(OutLenght)
CW8
CW.7
-
CW.6 
OL2* ... OL0*
...
(OutLenght*)
CW.4
CW.3
SC
(SendContinious)
CW.2
IR
(InitRequest)
CW.1
RA
(ReceiveAccepted)
CW.0
TR
(TransmitRequest)
Status word
The status word (SW) is located in the input process image, and is transmitted from terminal to the controller.
Bit
SW.15 SW.14 SW.13 SW.12 SW.11 SW.10 SW.9
Name IL7
IL6
IL5
Bits SW.15 to SW.8 are only shown if the large process image is used.
If the small or medium process image is used, only bits SW.7 to SW.0 are shown as status bytes! The
number of input bytes available for transfer from the terminal to the controller is displayed by bits IL2* ... IL0*.
34
OL4
OL3
OL2
OL1
Description
1
... 22
If the large process image is used: Number of output bytes () available for transfer from
dec
dec
the controller to the terminal.
-
If the small/medium process image is used: not shown
0
reserved
bin
0
If the large process image is used: reserved
1 ... 6
If the medium process image is used: Number of output bytes available for transfer from
the controller to the terminal.
1 ... 4
If the small process image is used: Number of output bytes available for transfer from
the controller to the terminal.
rise
Continuous sending of data from the FIFO.
The send buffer is filled (up to 128 bytes) by the controller. The buffer content is sent
with rising edge of bit SC. The terminal acknowledges the data transfer to the controller
through setting of bit SW.2. SW.2 is cancelled with CW.3.
1
The controller requests terminal for initialization. The send and receive functions are
bin
blocked, the FIFO pointers are reset and the interface is initialized with the values from
the relevant registers (R32-R35 [} 39], R18 [} 39]). The terminal acknowledges com-
pletion of the initialization via bit SW.2 [} 34] (IA).
0
The controller once again requests the terminal to prepare for serial data exchange.
bin
toggle
The controller acknowledges receipt of data by changing the state of this bit. Only then
new data can be transferred from the terminal to the controller.
toggle
Via a change of state of this bit the controller notifies the terminal that the DataOut bytes
contain the number of bytes indicated via the OL bits. The terminal acknowledges re-
ceipt of the data in the status byte via a change of state of bit SW.0 [} 34] (TA). Only
now new data can be transferred from the controller to the terminal.
IL4
IL3
IL2
IL1
Version: 2.1.0
OL0
-
OL2*
OL1*
SW.8
SW.7
SW.6
SW.5
IL0
-
IL2*
IL1*
KL6031/KS6031, KL6041/KS6041
OL0*
SC
IR
RA
SW.4 SW.3
SW.2 SW.1
IL0*
BUF_F
IA
RR
TR
SW.0
TA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Kl6031Kl6041Ks6041

Table of Contents