Details On Functions - Omron NJ-series User Manual

Machine automation controller cpu unit software
Hide thumbs Also See for NJ-series:
Table of Contents

Advertisement

6-2-6

Details on Functions

Structure of Functions
In a ladder diagram, functions are represented as rectangular boxes as shown below. Refer to Express-
ing Functions in ST on page 6-18 for details about how to express functions in ST. A function consists of
the following parts.
Function in Ladder Diagram:
Input parameters
 Function Name or Instruction Name
This is the function name or instruction name assigned in the function definition when the function is
defined.
 Instance Name
Functions do not have instance names.
 Algorithm
You can code the algorithm either as a ladder diagram or in ST. You can use function instructions or
user-defined functions in the algorithm of a function. You cannot use any FB instructions or user-
defined function blocks. You also cannot use a differentiated instruction (e.g., R_TRIG or UP).
You cannot use the P_First_RunMode and P_First_Run system-defined variables.
Input parameter
NJ-series CPU Unit Software User's Manual (W501)
Function name or instruction name
EN input
MyFUN
EN
Para1
In1
Para2
In2
Input variables
Function
Local variable table
EN
Input
In-out
variable
variable
(return value)
Internal variables
Algorithm
FUN instruction
User-defined
function
ENO output
ENO
Return value
ret_val
Out1
Output1
Output parameter
Output variable
Output paramete
Output
variable
6 Programming
6
6-17

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents