Omron C200H-ASC11 Manual page 206

Ascii units
Hide thumbs Also See for C200H-ASC11:
Table of Contents

Advertisement

Details of BASIC Commands
A Format
S Format
With the A format, many words of data from the PC can be stored in a single ASCII Unit variable,
although a maximum of 127 words can be transferred at one time.
Except for the A and S formats, and where a character variable is used as the variable, there must
be a one-to-one correspondence between each word and variable. With the A format, one format
must be used with each variable. With the S format, one format must be used with the variables in
each array.
Except for the A and S formats, and where a character variable is used as the variable, more than
one variable can be associated with a single format.
If the "m" setting is omitted, the default setting is 1 word. The setting range for "m" is 1 to 255.
For numerals it is 1 to 255, for characters it is 1 to 64.
String variables can be used to specify the format, but be sure to use uppercase characters when
specifying the format.
<variable> is any valid variable name. It must be of the same type as specified in the format string
and have as many elements as the number of words specified in the
As an option, the
READ
carried out and the data is written successfully. If the <result> is -1 then the
carried out, perhaps because another data transfer was being performed.
When the ASCII Unit receives a
data from the data area location specified in IR n+3 and IR n+4 is read and stored in the specified
variables with the indicated pc format. The data is transferred at the next I/O refreshing cycle, and
the ASCII Unit will pause execution of the BASIC program until the data transfer has been
completed.
Refer to 6.3 Details of the Data Exchange Methods for more details on how to use the
statement.
m A n
Treats the m words as ASCII data and stores the specified
character(s) in the string variable.
m : the number of words
n : the specified byte(s)
S m X n
Treats the m words as the kind of data indicated by X (I, H, O, or
B) and stores each word's data in the n
m : the number of words
X : Data type (I, H, O or B as described above)
n : the number of elements (as described above)
statement can return a <result>. This <result> indicates whether the
PC READ
statement was successful or not. If the <result> is 0 then the command was successfully
8
bit 8
9
bit 9
10
bit 10
11
bit 11
12
bit 12
13
bit 13
14
bit 14
15
bit 15
n
Byte(s) read
1
byte 1 (bits 0-7)
2
byte 2 (bits 8-15)
3
bytes 1-2 (bits 0-15)
request from the CPU Unit (through bit 1 of IR n), the
PC READ
Section
th
array variable.
statement.
PC READ
could not be
PC READ
PC READ
7-6
PC
197

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200h-asc21C200h-asc31

Table of Contents