Mitsubishi Electronics FXCPU Welding System User Manual


 
3 Function Construction
3.1 Applied Function Expression and Execution Type
28
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.
_IN ( ) : An argument whose contents do not change even if the function is executed is called
"source", and expressed in this symbol.
*1 ( ) : An argument whose contents change when the function is executed is called "destination",
and expressed in this symbol.
K1 ( ) : Arguments not regarded as source or destination are expressed in "m", "n", etc.
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.
FX Structured Programming Manual (Device & Common)
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.
SHL_E
EN ENO
*1
D10D0 _IN
_NK1
s
d
n