63
4. Select the desired programming Language. Depending on your
system configuration, some programming language are possibly
not available.
5. Enter a PLC type and/or a Process type if required.
6. Click OK, the new POU is inserted in the project tree. It contains
one code worksheet in the chosen language, a variable worksheet
and a description worksheet.
7. Expand the POU, and double-click the code worksheet, the
workplace appears.
8. Drag the target function or function block from the Edit Wizard
pane, and the function or function block is displayed.
9. Double-click the pin-outs of the function or function block, the
Variable Properties dialog appears.
10. Accept the proposed name, or enter a new name or select an
already existing name from the Name combo box.
11. Select the Data Type and Usage from the drop-down lists.
l If you are creating a Program, there are two options for Usage:
VAR and VAR_GLOBAL.
l If you are creating a Function Block, there are five options for
Usage: VAR, VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT and VAR_
GLOBAL.
l If you are creating a Function, there are two options for Usage:
VAR and VAR_INPUT.
See the following table for the description of variables.
Variable Description
VAR Local variable
VAR_GLOBAL Global variable
VAR_INPUT Local FB input variable
VAR_OUTPUT Local FB output variable
VAR_IN_OUT Local input/output variable
12. Assign the initial value and I/O address.
13. It is optional to select the target group from Global Variable Groups.
Click OK and the new variables are added to the selected groups.
Chapter 4 - Software