PrefixDefinition
class PrefixDefinition
With the PrefixDefinition object, customer-specific prefixes can be defined. Different types of prefixes can be defined: Variable prefixes, function prefixes, type prefixes and more.
Create PrefixDefinition object
To be able to define the automatically created prefixes, a corresponding configuration object must be created:
End with 'Finish'.
Configure prefixes
The possibility to define prefixes for different elements in the domain model is now available.
applyToControllerLocal / applyToControllerInterface
These two parameters determine whether the automatic prefixes for local variables and for variables in the controller interface should be applied.
standardType
Definition of the prefixes for all standard types available in the model.
Example (define prefix for type BOOL):
Creating a variable of type BOOL:
Result:
Further properties
array
Prefix for array variables.
The behaviour of the prefix can also be defined (replace or prefix the type prefix).
recordType
Definition of the prefix for a RecordType and for an instance of a RecordType
enumType
Definition of the prefix for an enum type, for the instance of an enum type and for a value element of an enum type.
functionBlock
Definition of the prefix for a function block and for the instance of a function block.
function
Definition of the prefix for a function.
functionVariable
Definition of the variables prefix of a function or function block.
inOutVariable
Definition of the prefix for digital and analog I/O variables.
globalVariable
Definition of the prefix for global variables.
Applying the automatic prefixes in libraries
To use the automatic prefixes in Datatype or Function Libraries, the functionality must be activated for each library with the attribute 'autoPrefix':