UniLogic uses lexical Data Tags in compliance with IEC 61131-3.
To create a Data Tag, you create a lexical name and link it to a Data Type.
The device's memory is dynamically allocated depending on the data tags you create and the data type you link to your tags. When you link tags to elements and functions in your program, a powerful Intellisense algorithm filters the tag list as you type.
Data Tags are shown by default at bottom of the UniLogic interface. Click the tabs at the bottom of the window to see the different types of tags.
Data Tags have a Scope property. This determines where you can use the tag in your program.
Automatically-created Tags
System |
Linked to elements within the UniStream operating system. System tags are global by definition, and are read-only. They are Global in scope by definition, and are organized into structs. |
I/O |
Linked to structs that are automatically created when you include I/O modules in your Hardware Configuration. They are Global in scope by definition. |
User-created Tags
Tags that you create and link to Data Types. The Global scope property means that you can use Global tags throughout your program, in both your HMI and Ladder applications. Note that you can also organize Global tags in Groups.organize Global tags in Groups.
|
||
Tags that you create within a specific Ladder function. They are only visible and available within that function. This means that, if your application requires, you can use the same tag names in different functions. Note that Local tags cannot: |
||
Note |
|
|
FunctionIn |
You can assign the FunctionIn property to a Local tag of any Data Type in order to transfer values into the function it belongs to. When the function is dragged into another function as a UDFB, the FunctionIN tags appear on the left. Note that FunctionIN tags cannot: |
|
FunctionOut |
You can assign the FunctionOut property to a Local tag of any Data Type in order to transfer values out of the function it belongs to. When the function is dragged into another function it appears on the right of the function as an output parameter. Note that FunctionOut tags cannot: |
Via the Project tab, you can create a project containing pre-defined operand addresses that are already linked to data types.
You can also create arrays of operands, and Structs.
Arrays |
User-defined |
The user may include operands of the same data type which may be handled as a sequential block of data. |
Structs |
User-defined |
The user may mix other operand types, or arrays of operands, into a structure, which may be handled as a sequential block of data. |
Retain Value, Power-up and Initial Values
'Retain' and 'Power-up' Values are mutually exclusive. You can select one or the other.
Only Global tags can be checked as 'Retain', enabling them to have their value backed up by the controller's battery. When you check Retain, you have the option of entering an Initial Value. |
|
If you
Note that if you change a tag's Data Type, the tag will be initialized to 0 at download. |
An entire array can be checked 'Retain', as can the members of a struct. |
|
|
Power-up values can be assigned to individual tags, and to members of arrays and structs. |
|
|
Notes |
|
Alias Names
Alias names enable you to assign tags with easy-to-remember names. You can use an actual or an Alias name to address elements.
Alias names may be used with I/O tags, Global arrays, and the members of Structs after they have been declared in a function.
The following example shows how to assign an Alias to I/O tags.
Click any blue, underlined tag to open the editor.
Enter an Alias Name and a Description.
Click individual elements to rename them or to enter an Alias Name.
When you use the I/Os in your application, you can search for them using either:
the name of the module as shown on the left side of the following figure,
or
Note that you can always display full information for the tag by mousing over it in the Ladder.