Hello All,
I am new to programming with Tia Portal and I am having difficulty with something that we have found "easy" in other programming software.
We are using an Array of Dints and we need to access individual bits of those Dints.
So for instance we have:
HMI.Buttons[0].%X0 := 1;
The above syntax works in Tia portal, however what we actually want to do is instead of using [0] and %X0 we would like to replace them with variables kind of like this:
HMI.Buttons[MyPage].MyButton := 1;
In AB we can do this using the syntax:
HMI.Buttons[MyPage].[MyButton] := 1;
In B&R we can do this using the syntax:
HMI.Buttons[MyPage].MyButton := 1;
I have tried both syntaxes, unfortunately without success.
Does anyone know the correct syntax for an S7-1200?
Thanks
Regards
Ian
I am new to programming with Tia Portal and I am having difficulty with something that we have found "easy" in other programming software.
We are using an Array of Dints and we need to access individual bits of those Dints.
So for instance we have:
HMI.Buttons[0].%X0 := 1;
The above syntax works in Tia portal, however what we actually want to do is instead of using [0] and %X0 we would like to replace them with variables kind of like this:
HMI.Buttons[MyPage].MyButton := 1;
In AB we can do this using the syntax:
HMI.Buttons[MyPage].[MyButton] := 1;
In B&R we can do this using the syntax:
HMI.Buttons[MyPage].MyButton := 1;
I have tried both syntaxes, unfortunately without success.
Does anyone know the correct syntax for an S7-1200?
Thanks
Regards
Ian