YASKAWA MP3000 Series Setup Manual page 178

Machine controller system
Hide thumbs Also See for MP3000 Series:
Table of Contents

Advertisement

 Local Registers within a User Function
In addition to # registers and D registers, there are local registers that can be used only within
individual user functions.
Type
Name
Designation Methods
XBnnnnnh,
XWnnnnn,
Function input
XLnnnnn,
X
registers
XQnnnnn,
XFnnnnn,
XDnnnnn
YBnnnnnh,
YWnnnnn,
Function output
YLnnnnn,
Y
registers
YQnnnnn,
YFnnnnn,
YDnnnnn
ZBnnnnnh,
ZWnnnnn,
Function internal
ZLnnnnn,
Z
registers
ZQnnnnn,
ZFnnnnn,
ZDnnnnn
ABnnnnnh,
AWnnnnn,
Function exter-
ALnnnnn,
A
nal registers
AQnnnnn,
AFnnnnn,
ADnnnnn
Note: n: decimal digit, h: hexadecimal digit
User functions can be called from any programs, any number of times.
Important
 Precautions When Using Local Registers within a User Function
When you call a user function, consider what values could be in the local registers, and perform
initialization as needed.
Name
If input values are not set, the values will be uncertain.
X registers (function
Do not use X registers that are outside of the range that is specified in the input defi-
input registers)
nitions.
If output values are not set, the values will be uncertain.
Y registers (function
Always set the values of the range of Y registers that is specified in the output defini-
output registers)
tions.
When the function is called, the previously set values will be lost and the values will be
uncertain.
Z registers (function
These registers are not appropriate for instructions if the previous value must be
internal registers)
retained.
Use them only after initializing them within the function.
# registers
These are constant registers. Their values cannot be changed.
When the function is called, the previously set values are preserved.
If a previous value is not necessary, initialize the value, or use a Z register instead.
D registers retain the data until the power is turned OFF.
D registers
The default value after startup depends on the setting of the D Register Clear when
Start option. Refer to the following section for details.
These registers are used for inputs to functions.
• Bit inputs: XB000000 to XB00000F
• Integer inputs: XW00001 to XW00016
• Double-length integers: XL00001 to XL00015
• Quadruple-length integers: XQ00001 to XQ00013
• Real numbers: XF00001 to XF00015
• Double-precision real numbers: XD00001 to XD00013
These registers are used for outputs from functions.
• Bit outputs: YB000000 to YB00000F
• Integer outputs: YW00001 to YW00016
• Double-length integers: YL00001 to YL00015
• Quadruple-length integers: YQ00001 to YQ00013
• Real numbers: YF00001 to YF00015
• Double-precision real numbers: YD00001 to YD00013
These are internal registers that are unique within each
function. You can use them for internal processing in
functions.
These are external registers that use the address input
value as the base address.
When the address input value of an M or D register is pro-
vided by the source of the function call, then the registers
of the source of the function call can be accessed from
inside the function by using that address as the base.
Setting the D Register Clear When Start Option (page 4-46)
4.1 User Program Types and Execution Timing
Description
Precautions
4.1.5 Registers
4
4-45

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mp3200Mp3300

Table of Contents