
B–62093E–1/02
6. FUNCTIONS OF THE MACRO
EXECUTOR
PROGRAMMING
65
The conversation macro function allows the reader/puncher interface to
be controlled.
The control is performed by combining the following four control codes.
When this function is used, always set the expansion function validity
(No. 9002.7, EXT1) to 1 in the parameter on compiling.
G330 → reader puncher interface open
G331 → reader puncher interface close
G335 → 1 byte read
G336 → Data transmit
G337 → input of macro variable
G338 → output of macro variable
Select either channel 1 as a circuit to be used by specification on opening.
In addition, when the normal I/O function is commanded on the channel
which is being used in this function, operation is not proper if the channel,
where the input of NC program is being executed by the I/O function, is
opened.
Select one control method out of the three methods shown in the
following by specification on opening a circuit.
(1) User macro control
The reader puncher interface is opened in the bidirectional mode and
no output control of control codes (DC1 to DC4) can be carried out
by the macro executor.
Use the macro executor when creating your own protocol.
When overflow of the reception buffer is detected, send the
transmission stop/restart message to the target device by switching
ON/OFF the control signal “RS”.
(2) Read control (DC1/DC3 automatic control)
The “DC1” code is automatically sent on opening, thus requesting
the target device to transmit data.
The “DC3” code is transmitted on closing.
In addition, when overflow of the reception buffer is detected, the
output of “DC3” and “DC1” is automatically controlled.
No control of data transmission (G336) can be performed when the
reader/puncher interface circuit is opened in the read control mode.
(End code = 8)
(3) Transmission control (DC2/DC4 automatic control)
The “DC2” code is automatically on opening, thus requesting the
target device to transmit data.
The “DC4” code is transmitted on closing.
The interruption and restart processing of transmission by the target
device using the “DC3” and “DC1” are also automatically carried out.
6.4
READER PUNCHER
INTERFACE
CONTROL BY
CONVERSATIONAL
MACRO
6.4.1
Outline