HMI Bug: Two-dimensional array references with index as variable
The HMI-application crashes when attempting to reference a variable which is an array like this:
MyArray[M][1] where M is a parameter input to a HMI page:
A dynamic is used to launch an HMI-page as a dialog. The parameter M is used to customize the dialog to one particular module (nr 4 in this case).
A standard button (or any other symbol) is used to reference the array: (in this particular example I am working on debugging code where I can bypass parts of a start-sequence, hence the "cheat"-variable name. In case you were curious).
Replacing the parameter M with a number 1 will prevent the crash.
The resulting crash:
@Martin PLCnext Team please dispatch this to the HMI team, along with the other bug i recently reported.
Comments
The funny thing is that this two-dimensional array is a work-around for the previous bug which prevents me from accessing bits in a word, so this is getting frustrating.
Originally, I would have created an array of Words and accessed each bit like this MyWord[M].%X0, but as this doesn't work, I had to translate the word into an array (where MyWord[M].%x0 becomes MyArray[M][0]), but now this also fails.
Now it seems like I have to create individual bits or some other code to bypass these bugs.
Further troubleshooting has revealed that Dialogs in general have an issue with variables:
If an HMI-page is loaded as a page, there are no problems, but if it is loaded as a dialog, it cannot refer to non-parameter variables: