423
Inputting Numeric Values
Section 7-12
<Relationship between input numeric values and contents of host words>
Wheninputting a numeric valueto a numeral memory table allocated to a wordat
the host, the value is first converted to signed hexadecimal in accordance with
the settings for “Display Type” and “Display Sign” settings and stored in the nu-
meral memory table, and then written to the host word in accordance with the
“Words” and “Storage Type” settings for the numeral memory table. Therefore
the result also differs according to the settings made for “Words” and “Storage
Type” (“BCD” or “Binary”).
Input
numeric
value
“Display
Type”
Sign
Numeric value
stored in numeral
memory table
Words
“Storage
Type”
Contents of
word at host
1234 000004D2 1word 1234
123
Unsigned
0000007B 1word 0123
1234
FFFFFB2E 2 words F0001234
000004D2 000004D2 1word 1234
FFFFFF85
Hexadecimal –
FFFFFF85 1word F123
FFFFFB2E FFFFFB2E 2 words F0001234
4660
8000
$
268430796
F0001234 2 words
Binary
F0001234
1234 00001234 1word 1234
F123
Hexadecimal –
FFFFF123
(0000F123)*
1word F123
F0001234 F0001234 2 words F0001234
* The figures in parentheses are the values immediately after input. When data is
read from the host after input, it is converted to a 32-bit negative number and the
value in the numeral memory table changes.
Reference:
When the “Storage Type” is “BCD”, the signed binary data (hexadecimal number)
is converted to data for storage in the host word (BCD data) and written to the host.
If the value is negative the most significant digit in the word is set as “F”. This
means that the maximum number of digits for a negative number (integer part +
decimal fraction part) is seven.
When the “Storage Type” is “Binary”, the contents of the numeral memory table
are written without alteration to the host word.
However, when a negative number is written to a numeral memory table whose
number of allocated words at the host is one, it is stored immediately after input as
a 16-bit negative number.
When the data is read from the host subsequently, it is converted to a 32-bit nega-
tive number and the numeric value is changed.