Call Of Function Block - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

4 ST PROGRAM EXPRESSIONS

4.4 Call of Function Block

4 - 29
In an ST program, a function blocks (FB) can be used.
This section explains the method of using a user-created FB in an ST program. (For
the FB creating method, refer to the "GX Developer Version 8 Operating Manual
(Function Block)".
(1) Call of function block
When a created FB is to be used in an ST program, an FB name must be
defined first on the local variable setting screen. (Refer to REFERENCE .)
The FB can be used by describing the defined FB name (FB call) in the ST
program.
When calling the FB, describe all input variables and I/O variables. Also, always
specify values for the input variables and I/O variables.
For an output variable, its description can be omitted if the result of the output
variable is not needed.
[Description example]
When the following FB is created
FB data name
Input variable
Output variable
I/O variable
FB label name
The description example of a FB call is as given below.
FB1( I_Test : = D0, O _ Test : = D1, IO_Test : = D100):
(2) How to acquire the output result
By providing "." after the FB name to specify the output variable name, the
output of the FB can be acquired.
[Description example]
Describe as given below when assigning the result of the output variable to D1.
D1 := FB1.O_Test;
: LINE1_FB
: I_Test
: O_Test
: IO_Test
: FB1
The description of the output variable can be omitted.
4 - 29

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents