Hello. I am using codesys 3.5. I would like to know if it is possible to set a variable to an output without declaring in. I have defined a STRUCT and within this struct I have a Struct for inputs called I and a struct for outputs called O.
I have declared a variable of the type of this Struct, I would like to set or alias the value in this variable to an input/output value of an IO block that has a module on the ethernet tree.
Is it possible to copy the contents of %IW0 -> STRUCT.I ? The size of both of these is 2 bytes.
I understand that I can declare a variable with the input like Input01 AT %IX0.0 : BOOL;
However how can I make STRUCT.I.D00 AT %IX0.0?
Is this possible?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello. I am using codesys 3.5. I would like to know if it is possible to set a variable to an output without declaring in. I have defined a STRUCT and within this struct I have a Struct for inputs called I and a struct for outputs called O.
I have declared a variable of the type of this Struct, I would like to set or alias the value in this variable to an input/output value of an IO block that has a module on the ethernet tree.
Is it possible to copy the contents of %IW0 -> STRUCT.I ? The size of both of these is 2 bytes.
I understand that I can declare a variable with the input like Input01 AT %IX0.0 : BOOL;
However how can I make STRUCT.I.D00 AT %IX0.0?
Is this possible?
Thanks