![](/images/new-backgrounds/1256769/256769383x1.webp)
20 Custom Macro
– A subprogram or a macro can be called from the inside of a cycle. The cycles inside the subprogram or the user macro can again be nested up to three levels.
: |
|
DO1 |
|
: |
|
M98... | correct |
: |
|
G65... | correct |
: |
|
G66... | correct |
: |
|
G67... | correct |
: |
|
END1 |
|
: |
|
20.13.8 Data Output Commands
The control will recognize the following data output commands:
POPEN | periphery open |
BPRNT | binary data print (output) |
DPRNT | decimal data print (output) |
PCLOS | periphery close |
Those data output commands can be used for outputting characters and values of variables. The output may be accomplished to the memory of the control or to an external data storage device (through a serial channel).
Opening a peripheral - POPENn
Before issuing a data output command, the appropriate peripheral has to be opened, through which the data output is to be performed. The appropriate peripheral is selected by number n.
n = 1
A % character is also output to the peripheral simultaneously with the opening of the peripheral, i.e., each data output begins with a % character.
Binary data output - BPRNT[...]
BPRNT[ a #b [c] ... ]
number of digits below the decimal point
variable character
The command will send the characters in ISO or ASCII code (depending on the parameter setting); the variables will be output in binary form.
192