
7-6
Section
Details of BASIC Commands
189
pc eget
Syntax:
[<result> = ]
PC EGET
#<common memory address> , <number>, “<pc format> {, <pc format>}”;
<variable> {, <variable>}
Description:
Statement. Reads data from the common memory area of the ASCII Unit.
Remarks:
<common memory address> gives the starting address in common memory area of the data to be
read. It is an integer with a valid range of : [0…89].
<number> is the number of words of data to read. It is an integer value with a range of : [1…90].
<pc format> gives the format of the variables that are retrieved. The allowable formats in the
format string are outlined in
PC READ
. Of course the complexity of the format string is ultimately
limited by the size of the input buffer allowed to enter a single program line.
<variable> is any valid variable name. It must be of the same type as specified in the format
string.
The
PC EGET
command can optionally return a <result> that can be assigned to a variable. This
<result> indicates the success, or otherwise of the
PC EGET
command. If the <result> is 0 then the
command was successfully carried out and the data read is valid. If the <result> is -1 then the
PC
EGET
could not be carried out because the common memory area was being used by another
PC
EGET
.
If the format string and the variable types do not match then a “FORMAT ERROR” (code B067)
will occur. Also if the format string specifies more memory than is allocated in the common
memory area then a “FORMAT ERROR” (code B067) will result.
The data in the common memory area should first be prepared by the IOWR #00xx command in
the PLC program. this command is used to write up to 90 words of data from the PLC to the
common data area of the ASCII Unit. There is no synchronization between the
PC EGET
command
in the BASIC program and the IOWR #00xx command in the PLC program.
For a detailed description of how to use the
PC EGET
statement and the IOWR #00xx PLC
command refer to 6.3. Details of the Data Exchange Methods.
Examples:
PC EGET #0, 4, “1H4, 1H4, 2H4”; A, B, C$
See also:
PC EPUT
,
PC GET
HEX 4 digits
HEX 4 digits
Summary of Contents for C200H-ASC11
Page 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Page 2: ...iv...
Page 4: ...vi...