Search code examples
plcsiemensladder-logic

Setting single bit Siemens ladder


I have a value stored in MW20 and I need to set to most significant bit to 0 without using bit operations but I don't find how I need to do this. I know this:

     ----> MB20 = D7
    /
MW20 = D7C5
    \
     ----> MB21 = C5

So I need to set the last bit of MB20 to 0. I thought this was going to be as easy of doing a move from 0 to M20.7 but no I get this error:

enter image description here

I don't understand that it is this hard to set an individual bit. I have searched far and wide but can't find a solution. As a reminder I cannot use bit operations and I'm use LADDER on Siemens PLC.


Solution

  • You could use a standard coil tied to the bit in question.

    enter image description here