![background image](http://html1.mh-extra.com/html/omron/nt21-series/nt21-series_reference-manual_744543318.webp)
3-5
Section
Changing Numeral and Character String Display
309
PC Program
Make a PC ladder program as shown below.
The program must also be made so that the value of ACHIEVED is stored to
D0010 and the value of TARGET is stored to D0011.
@INC (38)
DM0000
00100
00101
@DEC (39)
DM0000
Numeral memory table No. used
in indirect specification
Numeral memory table No. used
in indirect specification
(1)
(2)
Program Operation
1, 2, 3...
1. When TARGET (touch switch No. 10) is pressed, the contents of numeral
memory table No. 101 (the value of the target production) is displayed.
2. When ACHIEVED (touch switch No. 11) is pressed, the contents of numeral
memory table No. 100 (the value of the production actually achieved) is dis-
played.
In this example, the contents of numeral memory table No. 51, which is refer-
enced in indirect specification is not checked. If the program is actually tested,
the contents of numeral memory table No. 51 must not be outside the range of
0100 to 0101.
By using the lamp bit of the touch switch, it is possible to identify which of the
numeral memory tables is used for display. For details, refer to 2-7
Touch
Switches (page 110).
Changing the Contents of the Character String Memory Table Allocated Word
By allocating a character string table to a word in the host, changes made at the
word in the host can be easily reflected to the character string memory table.
With this method, however, the contents of a memory table allocated word can
only be read out when the character string memory table is being used for an
element that is currently displayed by the PT. The contents of an allocated word
which is not related to the display is not read out.
When a character code is written to a word at the host, the character code is
stored without change in the character string memory table. By specifying FF20
to FFF
H
, it is possible to include marks in character strings.
Character codes stored in words at the host are stored in the following sequence
in character string memory tables.
4
1
4
2
4
3
4
4
F
F
0
1
4
5
4
6
ABCD
Y
EF
A = 41
H
, B = 42
H
First word
C = 43
H
, D = 44
H
First word + 1
Y
= FF01
H
First word + 2
E = 45
H
, F = 46
H
First word + 3
When the code for mark data straddles two words:
4
1
4
2
4
3
F
F
0
1
4
4
4
5
4
6
ABC
Y
DEF
A = 41
H
, B = 42
H
First word
C = 43
H
First word + 1
Y
= FF01
H
First word + 2
D = 44
H
, E = 45
H
,
First word + 3
F = 46
H
electronic components distributor
Summary of Contents for NT21 Series
Page 3: ...iv Downloaded from Elcodis com electronic components distributor...
Page 5: ...vi Downloaded from Elcodis com electronic components distributor...
Page 463: ...Downloaded from Elcodis com electronic components distributor...
Page 465: ...Downloaded from Elcodis com electronic components distributor...