11
Function Blocks Section 1-2
Pop-up Menu for Function Block Variable Tables
Pop-up Menu for Instances
Shortcut Keys
F Key: Pasting Function
Block Definitions in
Program
Move the cursor to the position at which to create the copied function block
instance in the Ladder Section Window, and press the F Key. This operation is
the same as selecting Insert - Function Block Invocation.
Enter Key: Inputting
Parameters
Position the cursor at the left of the input variable or input-output variable, or
at the right of the output variable and press the Enter Key. This operation is
the same as selecting Insert - Function Block Parameter.
1-2 Function Blocks
1-2-1 Outline
A function block is a basic program element containing a standard processing
function that has been defined in advance. Once the function block has been
defined, the user just has to insert the function block in the program and set
the I/O in order to use the function.
As a standard processing function, a function block does not contain actual
addresses, but variables. The user sets addresses or constants in those vari-
ables. These address or constants are called parameters. The addresses
used by the variables themselves are allocated automatically by the CX-Pro-
grammer for each program.
Pop-up menu Function
Edit Edits the variable.
Insert Variable Adds a variable to the last line.
Insert Variable Above Inserts the variable above the current cursor position.
Below Inserts the variable below the current cursor position.
Cut Cuts the variable.
Copy Copies the variable.
Paste Pastes the variable.
Find Searches for the variable. Variable names, variable comments, or all (text strings) can
be searched.
Replace Replaces the variable.
Delete Deletes the variable.
Rename Changes only the name of the variable.
Pop-up menu Function
Edit Changes the instance name.
Update Invocation When a function block definition’s input variables, output variables, or input-output vari-
ables have been changed after the instance was created, an error will be indicated by
displaying the instance’s left bus bar in red. This command updates the instance with
the new information and clears the error.
Monitor FB Ladder Instance When monitoring the program online, monitors I/O bit and word status (I/O bit monitor)
of the ladder diagram in the instance.
(Supported by CX-Programmer Ver. 6.0 and later only).
Monitor FB Instance When monitoring the program online, monitors ST variable status as well as I/O bit and
word status (I/O bit monitor) of the ladder diagram in the instance.
(Supported by CX-Programmer Ver. 6.1 and later only).
Register in Watch Window Displays the FB variables registration Dialog Box in order to register a variable from the
selected instance to the Watch Window.
Function Block Definition Displays the selected instance’s function block definition on the right side of the window.