PeterW
Member
The Byte address takes up Bytes 7 (3 bits of it), all 8 and half of byte 9.
If you put the address of the byte into word 8, firstly it is over-writing you bit address that you have already loaded into byte 9, no great shakes as your example and 100% of the jobs I have worked on you have zero for the bit when using an ANY.
So the only reason your code works is:
1. All your bit addresses (as mine) are zero.
and
2. Your byte address is less than the value which would overflow into byte 7 (4095 or less).
Look at post 11 in this thread, I copied the format of the pointer from the siemens help pages.
If you put the address of the byte into word 8, firstly it is over-writing you bit address that you have already loaded into byte 9, no great shakes as your example and 100% of the jobs I have worked on you have zero for the bit when using an ANY.
So the only reason your code works is:
1. All your bit addresses (as mine) are zero.
and
2. Your byte address is less than the value which would overflow into byte 7 (4095 or less).
Look at post 11 in this thread, I copied the format of the pointer from the siemens help pages.
Last edited: