Impermissible bit access to variable possible

Which products are affected?
ESP-HMI1-P (HMI Designer Version 1.2 and higher)

What happens?
A bit of a variable which does not exist in the variable due to the data type selected can be accessed via a direct command. Thus it is possible to access e. g. bit 31 of a variable of the data type Word whereas this data type has only 16 bits.
An error is not detected when compiling the HMI project.
The keypad ignores the execution of this direct command.

When does the problem occur?
A direct command can only be created or changed if the bit selected in the direct command is within the corresponding variable. Otherwise an error message is indicated.

However, it is possible to define a bit access to a variable of the Dword type via a direct command and to change the variable type to Word subsequently. If a bit between 16 and 31 is accessed in the direct command, this does not exist in the variable. This impermissible access to bits is not detected by the HMI Designer during compilation.

Possible diagnostics?
None.

Short-term measures/recommendations?
If you change subsequently the data type of a variable, check in the project component Direct commands whether all bit accesses to this variable are still permitted.

Evaluation:
The HMI Designer does not detect the access to a bit outside a variable during compilation. The keypad ignores such an access. A subsequent change of the data type is rather rare. The Word data type is used very rarely.

URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/200503209/1/
Contact form