
6. FUNCTIONS OF THE MACRO
EXECUTOR
B–62093E–1/02
PROGRAMMING
62
The address functions are the functions to return the address of PMC or
the contents of the parameter as the function values. However, as the
address functions cannot be written, it is impossible to describe them on
the left side of an operation. Control code G310 is prepared for PMC
address writing.
The format of the address functions is as follows.
<Address><Address No.> or <Address><Address No.>.<Bit position>
or <Address><Address No.>.<Axis No.>
Address P indicates the parameter and the other addresses indicate PMC
addresses.
P100 returns the contents of the parameter No. 100 as function values
respectively.
Since the bit position cannot be specified for parameters, if it is required,
take the bit data using AND instruction.
Also, G100.1 returns the contents of the bit 1 of PMC address G100 ,and
G105 returns the contents of PMC address G105 as function values
respectively.
It is possible to describe <Address No.> and <Bit position>or<Axis No.>
with variables or
# [<Expression>] or [<Expression>], instead of numbering them with
numerical values directly.
For example, it is possible to describe as follows.
P#100
P#100.#101
G# [#100+1]
G [#100+1] .[[#100–1]/2]
The usable addresses are “P” for parameter and X, Y, F, G, R, D,T,C and
K of PMC addresses.
Format conforms to that used for ladder diagram.
Refer to the operator’s manual for the detail of parameters and to the PMC
programming manual for details of the PMC addresses.
NOTE
Refer to the section titled “PMC Address Write Control Code
(G310)” for writing data to the PMC addresses R,D,C, and
K.
6.2
ADDRESS
FUNCTIONS