3-5SectionChanging Numeral and Character String Display
318
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 entry number
used in indirect specification
Numeral memory table entry number
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 entry 101 (the value of the target production) is displayed.
2. When ACHIEVED (touch switch No. 11) is pressed, the contents of numeral
memory table entry 100 (the value of the production actually achieved) is
displayed.
In this example, the contents of numeral memory table entry 51, which is refer-
enced in indirect specification, is not checked. If the program is actually tested,
the contents of numeral memory table entry 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 table entries is used for display. For details, refer to 2-7 Touch
Switches (page 119).
Changing the Contents of the Character String Memory Table Allocated Word
By allocating words for a character string table entry in the host, changes made
at the word in the host can be easily reflected to the character string memory
table entry.
With this method, however, the contents of a memory table allocated word can
only be read out when the character string memory table entry is being used for
an element that is currently displayed by the PT. The contents of an allocated
word that 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 entry. 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 table entries.
4142
4344
FF01
4546
ABCDEF
A = 41H, B = 42H First word
C = 43H, D = 44H First word + 1
 = FF01
H First word + 2
E = 45H, F = 46H First word + 3
When the code for mark data straddles two words:
4142
43FF
0144
4546
ABCDEF
A = 41H, B = 42H First word
C = 43H First word + 1
 = FF01
H First word + 2
D = 44H, E = 45H, First word + 3
F = 46
H