2 function call instruction (func) – Yaskawa Ladder Works Programming Manual User Manual

Page 68

Advertising
background image

4.2 FUNCTION CALL Instruction (FUNC)

4-3

4.2 FUNCTION CALL Instruction (FUNC)

[Outline]

The FUNC instruction is used to call a user function or system function from a drawing, sub-drawing,
or user function. The user function to be called must be defined in advance. (System functions do not
have to be defined by the user because they are already defined by the system.)

[Format]

Symbol : FUNC
Full Name : User Function
Category : CONTROL
Icon :

[Parameter]

Parameter Name

Setting

Name Program

name

INPUT

Input parameter (the data type depends on function definition)

ADRESS

Address parameter (Address type register)

OUTPUT

Output parameter (the data type depends on function definition)

The forms of parameter input and output are shown in below.

Input Data Form Input Designation

Description

Bit input

B-VAL

Designates the output to be of a bit type. The bit type data become the
input to the function.

I-VAL

Designates the input to be of an integer type. The contents (integer
data) of the register with the designated number become the input to the
function.

Integer type
input

I-REG

Designates the input to be the contents of an integer type register. The
number of the integer type register is designated when referencing the
function. The contents (integer data) of the register with the designated
number become the input to the function.

L-VAL

Designates the input to be of a double-length integer type register.
When reference the function, the contents (double-length integer data)
of the register with the designated number become the input to the
function.

Double-length
integer type input

L-REG

Designates the input to be the contents of a double-length integer type
register. When reference the function, the contents (double-length
integer data) of the register with the designated number become the
input to the function.

F-VAL

Designates the input to be of a real number type. The contents (real
number data) of the register with the designated number become the
input to the function.

Real number
type input

F-REG

Designates the input to be the contents of a real number type register.
The number of the real number type register is designated when
referencing the function. The contents (real number data) of the
register with the designated number become the input to the function.

Address input

––

Hands over the address of the designated register (an arbitrary integer
register) to the function. Only 1 input is allowed in the case of a user
function.


Advertising