EasyManua.ls Logo

Mitsubishi Electric FX Series - Functions and Function Blocks; Functions; Example: Creating a Function

Mitsubishi Electric FX Series
284 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 Functions and Function Blocks
Below is a table illustrating the comparison between ‘Functions’ and ‘Function Blocks’:
Functions are part of the instruction set.
Functions are included in the standard and manufacturers libraries. i.e. TIMER_M is a
function, as is MOV_M, PLUS_M etc.from the Mitsubishi Instruction Set in the Manufactur
-
ers Library.
User defined functions can easily be created out of tested program parts.
This means that functions can be created i.e. for system/process calculations, and can be
stored in libraries and reused many times, with different variable declarations. This would
be in the same way that i.e. a MOV instruction would be used but with the advantage of be-
ing user specific.
6.1 Functions
Most control programs have some form of maths within them, i.e. for analogue signal condition-
ing, displaying engineering units etc. These are frequently reused within the program structure.
By using user defined functions, program design time can be dramatically reduced.
6.1.1 Example: Creating a Function
Objective:
Build a Function to change Fahrenheit to Centigrade.
Formula is:
()
Centigrade
Fahrenheit
=
32 5
9
The Function will be named “Centigrade” and the input variable will be named “Fahrenheit”.
Functions and Function Blocks Functions
Training Manual GX IEC Developer 6 - 1
Item Function Block Function
Internal variable storage Storage No storage
Instancing Required Not required
Outputs
No output
One output
Multiple outputs
One output
Repeated execution with same input
values
Does not always deliver the same
output value.
Always delivers the same output
value.

Table of Contents

Related product manuals