naturephoenix
Member
http://www.plccenter.cn/Siemens_Step7/Format_des_Parametertyps_POINTER.htm
Since I can not declare inside DB or UDT POINTER data type,
I made custom:
Address_P1 : DWORD;
Address_P2 : WORD;
These two variables combined should represent POINTER TAG.
Now I want to separate Address_P1 : DWORD to 3 variables
so they can be easily entered via HMI.
1. variable is Memory area and its size is 8 bits so
MemoryArea : Byte;
2. variable is Byte address and its size is 16 bits so
ByteAddress : WORD;
3. variable is bit address and its size is 3 bits...maybe i can make an array of 3 bools.
BitAddress : array [0..2] of bool;
How can I combine and separate these 3 variables to make possible something like this:
Address_P1 := MemoryArea + ByteAddress + BitAddress;
MemoryArea:= Address_P1+...;
ByteAddress:= Address_P1+...;
BitAddress := Address_P1+...;
Since I can not declare inside DB or UDT POINTER data type,
I made custom:
Address_P1 : DWORD;
Address_P2 : WORD;
These two variables combined should represent POINTER TAG.
Now I want to separate Address_P1 : DWORD to 3 variables
so they can be easily entered via HMI.
1. variable is Memory area and its size is 8 bits so
MemoryArea : Byte;
2. variable is Byte address and its size is 16 bits so
ByteAddress : WORD;
3. variable is bit address and its size is 3 bits...maybe i can make an array of 3 bools.
BitAddress : array [0..2] of bool;
How can I combine and separate these 3 variables to make possible something like this:
Address_P1 := MemoryArea + ByteAddress + BitAddress;
MemoryArea:= Address_P1+...;
ByteAddress:= Address_P1+...;
BitAddress := Address_P1+...;