
B–62093E–1/02
6. FUNCTIONS OF THE MACRO
EXECUTOR
PROGRAMMING
67
(2) Circuit closing (G331)
G331 ;
The circuit, which is currently open, is closed.
There is no end code for the circuit closing processing.
It always ends normally.
(3) 1 byte reading (G335)
G335 Pp ; p : Reading variable number
Data 1 byte received through circuit is read into the variable area
specified.
The received data is stored in the reception buffer (80 bytes)
temporarily and is read one byte at a time by this control code.
When there is no reception data, end code 255 is sent.
If the reception buffer is nearly overflowing due to delay of reading
processing for the reception data, either of the following processing
is carried out according to the opening specification of control
method.
(a) In the case of user macro control
When overflow of the reception buffer is detected, the
transmission stop is requested to the target by the turning OFF of
control signal “RS”.
Then, when there is an empty reception buffer area by reading,
the signal (RS) is turned ON, thus requesting the target device to
continue transmission.
(b) In the case of reading control (DC1/DC3 automatic control)
When overflow of the reception buffer is detected, the “DC3”
code is output automatically, thus requesting the target device to
stop transmission.
Then, when there is an empty reception buffer area by reading,
the “DC1” code is output, thus requesting the target device to
continue transmission.
(c) In the case of transmission control (DC2/DC4 automatic control)
When the circuit is opened in the transmission control mode, no
control of 1 byte reading is carried out (end code = 8).
Example)
N100 G335 P100;
IF [#8539 EQ 255] GOTO100;
IF [#8539 NE 0] GOTO900;
Reading processing ended
(#100: Received data)
N900 error processing
(4) Data transmission (G336)
G336 transmission data;
The following commands of transmission data are available:
(c...) → String command 1
(
*
hh..
*
) → String command 2
Ff → Data format command
Zz → Zero suppress command