FXCPU Structured Programming Manual
(Application Functions)
3.
Function Construction
This chapter explains the construction of applied functions.
3.1
Applied Function Expression and Execution Type
Applied function and argument
• The name expressing the contents is given to each function.
For example, the function name "SHL (bit shift left)" is given.
• Each function consists of arguments which indicate I/O data used in the function.
D0
K1
_IN (
) : An argument whose contents do not change even if the function is executed is called
s
*1
(
) : An argument whose contents change when the function is executed is called "destination",
d
K1 (
) : Arguments not regarded as source or destination are expressed in "m", "n", etc.
n
Argument target devices
• The input variable (label or device) specifies the target.
• Bit device themselves such as X, Y, M and S may be handled.
• Bit devices may be combined in a way "KnX", "KnY", "KnM" and "KnS" to express numeric data.
• Current value registers of data registers (D), timers (T) and counters (C) may be handled.
• When handling 32-bit data in structured programs, you cannot specify 16-bit devices directly, different from
simple projects.
Use labels when handling 32-bit data.
You can specify 32-bit counters directly, however, because they have 32-bit length. Use global labels
when specifying devices.
When 32-bit data is handled, two consecutive 16-bit data registers D are combined.
For example, when data register D0 is defined as an argument of a 32-bit instruction by a label, 32-bit data
stored in D1 and D0 is handled. (D1 offers high-order 16 bits, and D0 offers low-order 16-bits.)
When the current value register of a timer or counter is used as a general data register, it is handled in the
same way.
28
SHL_E
EN
ENO
_IN
D10
*1
_N
"source", and expressed in this symbol.
and expressed in this symbol.
3.1 Applied Function Expression and Execution Type
→ FX Structured Programming Manual (Device & Common)
3 Function Construction