Masked move instruction

mtyeakel

Member
Join Date
Feb 2017
Location
kansas
Posts
2
Hey I'm new to rs logic 5000 I have the basics but I'm getting confused with this mvm instruction. Can anybody bum it down for pls

Thanx in advance
 
Masked move means you compare a bit mask to a data structure.

Say you have an output in a word for a 16 point input as follows:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Now, you only want (reading from right to left) the first, third and fifth bits. Rather than copying each bit to where you want them, you can used masked move.

So, your mask would be something like:

0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1

Then you would move the first, third and fifth bits to the destination word, while leaving the rest of the bits in the destination word untouched, meaning the 0 in the mask says "don't overwrite me in the destination."

Now, you will likely be dealing with DINT since the Logix platforms are a 32 bit processor meaning they store their memory, move it and process it in 32 bit chunks.

Hope this helps, and let us know if you want further explanation. You can also highlight the instruction in your ladder and press F1 to bring up a help file.

EDIT: Also something that confused me when dealing with any data manipulation instructions in 5k is the length. Your length is how may "words" you are using. So if you are moving one address, such as in the above example, your length would be 1.
 
Last edited:
The way I look at it, when the MVM is executed, the bits in the middle (mask) select the whether the bits in the upper word or the bits in the lower word are stored in the lower word. If the mask bit is a 1, the top bit is stored. If the mask bit is 0, the bottom bit is stored.
 
Makes sense I did some searching on the web as well. I can see how this can make things simple for large scale manipulation. Thanx for the help guys. I have just got into the automation field. I have a decade of manufacturing experience six years of that in Mantinance. And now learning this. I'll be back hopefully one day I can contribute.
 

Similar Topics

Hello, I am using a UDT to track status from two different indexing lines that merge into one. Essentially, one indexing line is the part, and...
Replies
17
Views
3,682
So I'm using a 1769-L35E. I'm trying to move two INTS through Masked Move Instructions to create a DINT together. I'm fairly new to this so...
Replies
14
Views
6,754
can someone give me a plain english explaination of the MVM instruction and when to use it properly ...thank you ...
Replies
3
Views
3,787
What Does The "masked Move" Function Do?
Replies
2
Views
5,018
Whoever programed this micrologix used this masked move to delay a lift when it reached its upper limit (reed sw.) via a "thumb roll" pot.there...
Replies
8
Views
4,331
Back
Top Bottom