Johnny T
Member
How do I address a bit directly within a dataword in S5.
I know in S7 I could have DB10.DBX50.0
But what is the equivalent in S5?
I'm trying to map a flag into 1 bit of a dataword. So I'm trying to do the following S7 code in S5 for instance..
A M10.0
= DB10.DBX50.0
I know in S5 its
C DB50
A F10.0
= D??50.0
Anyone any ideas whether this is possible or not?
I know I could just load a value into DW50 in order to set that bit but that isn't really what I'm wanting to do.
Also...
Am I right in thinking that in S5 DW0 and DW1 are two separate words and not overlapped like in S7.
In S7 DW0 encompasses byte 0 and byte 1 and DW1 encompasses byte 1 and byte 2 so if you were to write to DW0 and then write to DW1 you would be overwriting the least significant byte of DW0.. is this the same in S5 or not..
Many thanks
JT
I know in S7 I could have DB10.DBX50.0
But what is the equivalent in S5?
I'm trying to map a flag into 1 bit of a dataword. So I'm trying to do the following S7 code in S5 for instance..
A M10.0
= DB10.DBX50.0
I know in S5 its
C DB50
A F10.0
= D??50.0
Anyone any ideas whether this is possible or not?
I know I could just load a value into DW50 in order to set that bit but that isn't really what I'm wanting to do.
Also...
Am I right in thinking that in S5 DW0 and DW1 are two separate words and not overlapped like in S7.
In S7 DW0 encompasses byte 0 and byte 1 and DW1 encompasses byte 1 and byte 2 so if you were to write to DW0 and then write to DW1 you would be overwriting the least significant byte of DW0.. is this the same in S5 or not..
Many thanks
JT