5238-E P-294
SECTION 12 USER TASK
[Function]
[Details]
•
GET statement:
First, the code read into the READ area by the READ statement is read out; the number of
characters designated in "K", counting from the position of the area read pointer (hereafter
"RRP") is read out. Then this read-out data is converted into numerical values and set in the
type of variable designated in "s". At this time, RRP is supplemented by the amount "K".
RRP is set at the beginning of the READ area when the READ statement is executed or the NC
is reset, and it is supplemented GET is executed. It cannot be returned.
Alarm B occurs in the following cases:
a.
When RRP exceeds the number of codes read by the READ statement
b.
When conversion into numerical data is impossible
Example: When there are more than two decimal points or code other than 0 to 9 exists
•
PUT statement:
When a common variable or local variable is designated in "s", the real type is used, and when
an input variable is designated, the integer type is used. For the system variables, data is
converted into JlS 8 letter codes in accordance with the attribute of the system variable. Then
the letter code is written to the WRITE area; the number of digits designated in "K", counting
from the position of the write-in pointer of the WRITE area (hereafter "WWP") are written. At
this time, WWP is supplemented by the amount "K".
WWP is set at the beginning of the WRITE area when the WRITE statement is executed or the
NC is reset, and it is supplemented when PUT is executed. It cannot be returned.
A character string or hexadecimal number can be used for "s" in a PUT statement. However,
the limit for the number of characters to be designated is 16. "*" must not be designated.
•
Expression of characters and hexadecimal numbers
LE33013R0301400380002
•
Alarm B occurs in the following cases:
•
When WWP exceeds 160
•
When NULL or % exists in hexadecimal number
•
Relationship between READ/WRITE and GET/PUT
Data communications are carried out through the read/write area using the variables (common
variables, system variables, local variables, input/output variables) and external devices.
GET statement
: This reads out the numerical data (JlS8 code) from the read area where the data
has been stored by the READ statement and sets it for the variable designated.
PUT statement
: This stores the numerical data and character string of the set variable in the write
area output by the WRITE statement. The data is stored in the JlS8 code.
Hexadecimal number :
Capital letters :
Lower case letters :
PUT
PUT
PUT
$0D0A
'ABCD'
'^ABCD'
Prefix with $
Finish with '
Start with ^
...............
...............
...............