Chapter 3. Program Data
58
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
3.11
Operands for Instructions
The operands for PACSystems instructions can be in the following forms:
▪
Constants
▪
Variables that are located in any of the PACSystems memory areas (%I, %Q, %M, %T, %G, %S,
%SA, %SB, %SC, %R, %W, %L, %P, %AI, %AQ)
▪
Symbolic variables, including I/O variables
▪
Parameters of a Parameterized block or C block
▪
Power flow
▪
Data flow
▪
Computed references such as indirect references or bit-in-word references
▪
BOOL arrays
An operand’s type and length must be compatible with that of the parameter it is being passed into.
PACSystems instructions and functions have the following operand restrictions:
▪
Constants cannot be used as operands to output parameters because output values cannot be
written to constants.
▪
Variables located in %S memory cannot be used as operands to output parameters because %S
memory is read-only.
▪
Variables located in %S, %SA, %SB, and %SC memories cannot be used as operands to numerical
parameters such as INTs, DINTs, REALs, LREALs, etc.
▪
Data flow is prohibited on some input parameters of some functions. This occurs when the
function, during the course of its execution, actually writes a value to the input parameter. Data
flow is prohibited in these cases because data flow is stored in a temporary memory and any
updated value assigned to it would be inaccessible to the user application.
▪
The arguments to EN, OK, and many other BOOLEAN input and output parameters are restricted
to be power flow.
▪
Restrictions on using Parameterized block or External block parameters as operands to
instructions or functions are documented in Chapter 2.
▪
References in discrete memory (I, Q, M, and T) must be byte-aligned.
Note the following:
▪
Indirect references, which are available for all WORD-oriented memories (%R, %W, %P, %L, %AI,
%AQ), can be used as arguments to instructions wherever located variables in the corresponding
WORD-oriented memory are allowed. Note that indirect references are converted into their
corresponding direct references immediately before they are passed into an instruction or
function.
▪
Bit-in-word references are generally allowed on contact and coil instructions other than legacy
transition contacts and coils (POSCON, NEGCON, POSCOIL and NEGCOIL). They are also allowed
as arguments to function parameters that accept single or unaligned bits.
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...