primary purpose of a masked move

jjlaughlin

Member
Join Date
Mar 2005
Posts
1
what is the most practical purpose of a masked move in relation

to a limited amount of I/O's i.e. AB micrologix 1000
 
To move data from a source file to the I/O file or from an I/O file
to the source file allowing only desired bits to go through and disallowing or masking off the bits that will not be used.

I want an "A" for this answer.

This is actually a good practice question for a student.
 
Actually, this is a pretty good question! There's several levels of distinction between swinging a hammer, using a hammer, and wondering "what is this thing with the wooden handle and metal head?".

I've sometimes wondered about the usefulness of some of the more esoteric (well, to me, anyway) commands in the typical instruction set. Masked Move MMV can be duplicated in most PLCs with an AND logic instruction, so it's got a wide implementation. Perhaps there are places in my own programming that I could use it more effectively if I had a better idea of where to put it to work!

I still think back fondly to Peter's post, many moons ago, that demonstrated to me that XOR has a practical purpose besides filling out the instruction set! So let's open this one up and take a better look at it.

Personally, the only use I can envision for a masked move would be a sequencer or drum-style program, turning the outputs on and off. I used it once, long ago, for a program to control a series of blinking lights on an operator panel, choosing one made the others go off and that one come on solid. Took alot less programming than a mess of inidividual bits.

Anybody else? Or do you have a little secret in your personal bag of tricks you want to share?

TM
 
Ok. You want examples I will give you three.

1. Consider having a servo drive that stores 8 different indexes. You use 3 bin data lines and a strobe line to initiate an index. In order to identify and display indexes on an HMI you would want to put an index number into an integer file. Out of this file you move the number to the I/O by using masked move. Of course you can do it some other way too.

2. Use Masked moves to calibrate variaty of AB's intelligent modules. i.e when you need to set up several bits but not the whole word.

3. If you need to move one ASCII char into an N file while
preserving the other byte.

By the way there is a big difference between ANDing and doing MMV!
 
I just learned masked move - incidentally with a sequencer -- but am left wondering gee that is kinda neat but what do you really need it for?

OK so it reduces the amount of data moved around which I guess in a really large program may be important to keep overall size and process time down.

BUT the bits you took out of one 16 bit word end up in a new 16 bit word so is there any real savings ??

I sure am glad to see you guys asking the same question as I.
 
The example I was given in an Allen Bradley class was a silk screening process.
If you had a picture under a screen and only wanted part of the picture to be red then mask off
that part you didn't want red and pour the paint over the screen. Then you might want another part blue
just mask off everything you didn't want blue and pout away.
 
I am familiar with silk screening and can easily see the comparison to the masking ie masked move in RS Logix.
The question is
what are some good uses for it??
What are the advantages of doing it??
Where is the payoff??

Dan Bentler
 
QUOTE
It can also be used for a trouble shooting routine,Where you have a I/O move bits through the mask to to the sections you want for trouble shooting.
Regards, Tom B.

Tom
Am a student and am learning. Since I am learning and make mistakes making troubleshooting easier is important to me.
Can you give an example of how (or when?) you would do this for trouble shooting??

Thanks

Dan Bentler
 
Timothy Moulder,
Consider my example 3. For instance if you had an N file containing
ASCII chars A and B but you would like to replace the B with C you can do that with just one MMV instruction. How will you do that with one AND ? Without MMV you will first have to AND &HF0 and
then OR &H0C.

Leitmotif,
I have a feeling I am just talking to myself? You ought to read my post.
 
Well think about it for a moment. When you use it in the sequencer you used a input to make different things happen. Look at the way the mask was used. To make different things happen without other thing happening as they did in the step before. you can set it up to where you use the mask to keep certian events from becoming true while the ones you want to check are true. Although it can make for a big prob if not watching out for you could make a event happen that would destroy the machine you were working on. I used it most on feed units on a punch press so you could run the feed unit witout the punch press making a stroke.
Regards,
Tom
 
The primary purpose is to accomplish a job easily.

This is what a masked move does.

Dst:= ( Dst and not Mask ) or ( Src and Mask )

I do this sort of thing all the time in microcontrollers and DSPs when setting bit fields in output registers. The Rockwell guys probably had a lot of questions from users about how to do this with OR, AND and NOT instructions so they made it easy. The question you have to ask yourself is "is there another instruction you would rather have?" I would answer YES.
 
I use the MVM with Alarm Bits. Let say you have a B file word that is used to store 16 individual alarm bits. You can acknowledge and clear the bits individually by passing thru the MVM instruction using the source A as the word containing the acknowledge bit then use this SAME ADDRESS WORD as the MASK word. Since Source A has just one bit set ( the bit you are acknowledging) and by using this word as MASK - only that specific bit will be passed thru the instruction to the destination word address so as NOT to clear any other alarm that may be present in the ALARM WORD ADDRESS. This way you clear multiple alarms one at a time.
 

Similar Topics

Hi, does anyone know how to tell in Aveva InTouch (v2020) whether the primary or secondary data source is active (i.e is failover active or...
Replies
3
Views
578
Does anyone have any experience in this? I have a lead lag pump setup for water that is maintained by pressure using VFDS, the idea is to have...
Replies
6
Views
1,833
Hi All I have several FactoryTalk HMI servers that are sharing one ODBC data source for data logging in Oracle. But when I'm running...
Replies
0
Views
1,272
According to UL, NEC, OSHA, etc. Do machine primary disconnects have to be switchable from outside the panel? Or can I have a din rail mount...
Replies
6
Views
1,633
Good afternoon all, I'm looking at the PSB24-120S-3 power supply from automation direct. The recommended circuit breaker size on primary size is...
Replies
13
Views
6,804
Back
Top Bottom