Addressing

Previous chapterNext chapter Show allShow all    Hide allHide all

Variable addressing is name-based.

The following limitations for variable names must be considered:

The following characters are not allowed in names: "(*", "*)", "//", "{" und "}".
Not allowed at the start of variable names: "__" (=double underscore).

There are no further limitations for global variables of simple data types.

Structures and array variables must have IEC-compliant names. Exception: the structure/array names are put within curled brackets.
Example: {nonIECconform}.
The variable names must be put into curled brackets in the straton as well.

In straton, the limitation for local variables in the textbased programming languages ST(Structured Text) and IL(Instruction List) applies. Non IEC-compliant variables must be put into curled brackets as well.

Settings for the unique addressing of variables

Property

Description

Name

Any name may be chosen. ATTENTION: the name must be unique within every control system project. If the variables are not created via the integrated solution, you need to take care that the variables get exactly the same names like in the STRATON project they were created in (Remember case sensitivity!)

Identification

Any text can be entered here, e.g. for resource labels, comments ...

Net address

not used for this driver

Data block

not used for this driver

Offset

not used for this driver

Alignment

not used for this driver

Bit number

not used for this driver

String length

Only available for String variables: Maximum number of characters that the variable can take.

Please make sure that, depending on String length, the following offsets are empty in order to prevent overlappings. A String variable requires "Number of Characters / 2" Offsets.

Driver object type

Depending on the employed driver, an object type is selected during the creation of the variable; the type can be changed here later.

Data type

Data type of the variable, which is selected during the creation of the variable; the type can be changed here later.
ATTENTION: If you change the data type later, all other properties of the variable must be checked and adjusted, if necessary.

Driver variables

Name

Offset

Typ

Description

DRVVAR_STRATON_APPNAME

1000

STRING

Name of current application

DRVVAR_STRATON_STATUS

1001

DWORD (UDINT)

State of application

DRVVAR_STRATON_CURRENT_CYCLETIME

1002

DWORD (UDINT)

Current calculation time [ms]

DRVVAR_STRATON_PROGRAMMED_CYCLETIME

1003

DWORD (UDINT)

Programmed cycle time [ms]

DRVVAR_STRATON_MAXIMUM_CYCLETIME

1004

DWORD (UDINT)

Maximum calculation time [ms]

DRVVAR_STRATON_OVERFLOW_CYCLETIME

1005

DWORD (UDINT)

Number of exceeding of cycle time

Results of DRVVAR_STRATON_STATUS (Offset 1001):

Value [DWORD/DINT]

- Internal

 

0

K5NETAPPST_RUN

Application runs

1

K5NETAPPST_STOP

Step mode
Either the application is in "cycle by cycle" or "step by step" mode

2

K5NETAPPST_SFCBREAK

Reserved

3

K5NETAPPST_ERROR

Step mode concerning errors

4

K5NETAPPST_INVALID

Undefined status
No application is executed on target system.
Possible states:

• No working communication with the target system (e.g. failure in driver configuration)

• The target system has no application or the application has been stopped.