3 user functions, 1 what is a user function – Yaskawa MP900 Series Ladder Programming Manual User Manual
Page 48

4.3 User Functions
4.3.1 What Is a User Function?
4-7
Programming
4
4.3 User Functions
4.3.1 What Is a User Function?
( 1 ) Overview of User Functions
A user function contains a function definition (program number and I/O definitions) and processing instructions that
are defined by the user.
The following figure shows an example of a function definition.
The processing to be performed by a function is created using a ladder program.
Functions are executed when they are called from a parent, child, or grandchild drawing with the FUNC instruction.
You can call a user function freely from any drawing. You can also simultaneously call the same function from differ-
ent types or different levels of drawings. You can also call user functions from other user functions.
The use of functions provides the following advantages.
• Easy user program modularization
• Easy user programming and program maintenance
User functions can be called from any programs, any number of times.
When you call a user function, consider what values could be in the variables in each function, and perform
initialization as needed.
Refer to 4.4.2 ( 3 ) Precautions When Using Local Registers within a User Function for details.
Program Number
Function Input Definition
• Number of inputs
• Data type
• Comments
Function Input Definition
• Number of inputs
• Data types
• Comments
Function Address Definition
• Presence of definition
• Comments
IMPORTANT