MVM problem

from here it looks like there is a value of ONE in the bit/box B3:1/9 ...

and ...

the MASK pattern that you're using isn't allowing the MVM instruction to "monkey with" that particular bit position ...

and ... the value of bit/box N7:6/9 is also showing a value of ONE ... since the MASK doesn't alter the value of that particular bit, it apparently is just keeping its current ONE status ...

if this doesn't help you solve your problem, then you might consider attaching your ENTIRE project file to another post ...

good luck with it ...
 
Last edited:
There is a one there. Shouldn't that mask DBh or 11011011 block everything to the left of bit B3:1/7
 
it really depends on what you mean by "block everything" ... if you mean "write zeros to the bit boxes at the left end" - then that is NOT what the mask does ...

yes, your mask actually does have ZEROS in all of the positions to the left of bit/box number 9 ... but ... those zeros do not tell the MVM to write zeros into the destination ...

instead, MASK positions which have ZEROs are telling the MVM to "just leave those positions in their current state" ... or in other words, "MVM, don't monkey with those particular bit positions" ...

so ... based on what you've posted so far - there is nothing telling either the bit/box B3:1/9 - or the bit/box N7:6/9 - to change to a value of ZERO ...
 
Last edited:
Yes your right Ron, I did not notice there was a 1 already in N7:6/9 and did not look because N7:6 is not used anywhere else. I just enabled it today in properties for these rungs. I must have accidentally put it in there.
 
Since the destination contains the same bit set as the source, I'm guessing that the MVM could have been changed from a MOV, and that no-one cleared the bit that was inadvertently MOV'd.

MVM is most useful when you need to merge bits into a word of bits that could be used for other purposes. Predominantly used to set a specific pattern of bits into an Output data word (eg. for actuators or relays), without overwriting the contents of the other bits, that could be used for other devices.

If you genuinely want ONLY the bits specified by the Mask value copied to the destination, then consider using the AND instruction, with Source A as your data, and Source B as your mask. This would automatically clear any bits in the destination that you aren't interested in.

Without knowing more about your data-handling, and what you are expecting, it is hard to advise conclusively.
 

Similar Topics

I'm having to make an AOI to use with a generic ethernet device because the manufacturer does not provide an AOP. I just want to do a sanity check...
Replies
13
Views
1,251
Hi All, I know this is probably a strange question, but does anyone know what would be faster between a MVM and AND instruction? I...
Replies
5
Views
1,425
hi all, i have another problem with my unity conversion from rslogix500. i have a MVM (masked move) that i need to program into my unity program...
Replies
2
Views
1,249
Seeing some irregular behavior with my MVM instruction Either that or i dont get how it works? :) I am moving an INT Lets say for arguments sake...
Replies
12
Views
3,259
In an effort to configure BCD switches on my CompactLogix input module. I thought the MVM (masked move), in Studio 5000, instruction might be the...
Replies
12
Views
4,226
Back
Top Bottom