
Access from the user program
Bit
SB1.7
SB1.6
SB1.5
SB1.4
SB1.3
SB1.2
SB1.1
SB1.0
Name
RegAcces
s
-
-
StGate
StLatchC SetCnt
ReadLatc
h
ValLatchC
Legend
Bit
Name
Description
SB1.7
RegAccess
0
bin
Acknowledgement for process data mode
SB1.6
-
reserved
SB1.5
-
reserved
SB1.4
StGate
KL5151-0000: Status of the external
gate/latch input [
}
18]
KL5152-0000 (KL5151-0050): reserved
SB1.3
StLatchC
KL5151-0000: Status of the zero input (
input C [
}
18]
)
KL5152-0000 (KL5151-0050): reserved
SB1.2
SetCnt
Acknowledgement that the data for setting the counter has been adopted by
the terminal.
SB1.1
ReadLatch
0
bin
The current value of the 32 bit counter has been mapped to the
process data.
1
bin
The 32 bit value stored in the latch counter has been mapped
to the process data.
SB1.0
ValLatchC*
1
bin
A zero-point latch has occurred: a rising edge at the zero input
(
input C [
}
18]
) has caused the current counter value to be
stored in the latch register as a reference mark.
Subsequent pulses do not have any effect on the latch register.
To reactivate the
gate/latch input [
}
18]
you must:
• set bit 0 (EnLatchC) in the control byte to 0
bin
.
• wait until this change has been acknowledged by
resetting bit 0 (ValLatchC) in the status byte.
• set bit 0 (EnLatchC) in the control byte to 1
bin
again.
*) Does not apply to KL5152-0000 (KL5151-0050), since the latch input and zero input are not available in
this case.
Register communication
Control byte 1 in register communication
Control byte 1 (CB1) is located in the output image, and is transmitted from the controller to the terminal.
Bit
CB1.7
CB1.6
CB1.5
CB1.4
CB1.3
CB1.2
CB1.1
CB1.0
Name
RegAccess R/W
Reg. no.
Legend
Bit
Name
Description
CB1.7
RegAccess
1
bin
Register communication switched on
CB1.6
R/W
0
bin
Read access
1
bin
Write access
CB1.5 to
CB1.0
Reg. no.
Register number:
Enter the number of the
register [
}
44]
that you
- want to read with input data word 0 or
- write to with output data word 0.
KL5151/KS5151, KL5152/KS5152
30
Version: 2.0.0
Summary of Contents for KL5151-0000
Page 2: ......