
6. FUNCTIONS OF THE MACRO
EXECUTOR
B–61803E–1/10
PROGRAMMING
76
(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
Dd → Data command
Pp → Block number command
Kk → Null code command
Cc → 1-character command
See screen display control code G243 (character display) for string
commands 1 and 2 and address F, Z, D, P, and K commands since
they are similar.
The commanded string is converted into either ASCII or ISO code
and is transmitted by the specification on opening.
However, the code output by address K is not the space but the null
code (no punching).
In the one-character command by address C, no code conversion
processing is carried out.
Use it when the code is output other than the control code (DC1 -
DC4) or ASCII/ISO code.
Example)
G336 C18 K20 (FANUC) K20 C20;
IF [#8539 NE 0] GOTO900;
Transmission processing ended
N900 error processing;
The following data is transmitted in the circuit by this command:
C18 → DC2 (12hex)
K20 → Null code 20 (Feed)
(FANUC) → ”FANUC” (ASCII/ISO)
K20 → Null code 20 (Feed)
C20 → DC4 (14hex)
When the circuit is opened in the reading control mode, no control of
data transmission is carried out (End code = 8).
Macro variable data input and output can be conducted simply by an
instruction via reader puncher interface. Instruct the control with the
following G code.
G337 → macro variable data input
G338 → macro variable data output
An end code #8539 is provided to check that input and output processing
runs correctly or not. Check the end code #8539 after running G337,
G338.
#8539 ! end code (read only)
6.4.3
Inputting and Outputting
Macro Variables