Masked move

EDWARDO

Member
Join Date
Mar 2004
Posts
10
can some one give me a good example of using a masked move on a plc-5 processor. What the benefits are of using them. and how to set one up.

Thanks
 
The mask is the key

EDWARDO, there are several instructions/commands in the AB instruction set for PLC5/SLC/ML and others using the same or similar instruction structure. Essentially, the mask is a way to prevent bits from a source location word from being copied to a destination word. In one example, the mask in the SQO instruction allows you to use the SQO to write data to some but not all of the bits of an output word. For instance, let's say you have 6 items you need to control with the SQO and you have to use it. There is no sense in tying up the other 10 bits of the 16 bit word, just so you can move data to the six. If it were not for the mask, you would have no choice.
Setting up the mask is simple. Place a one in the bit location that corresponds to the bit you want to effect, and a zero in all the other bit locations. This will translate to a value that will be used to contain the mask locations so it will show up in your instruction as a hexadecimal number. In some processors you have to use hex to put the number in the instruction. I personally use a storage register to hold the mask value, and that way I can access that location through the data table and use any form of number I like to set the mask. If you have more questions, feel free to ask.
Oh, BTW, the masked move, or MOV is the same idea as I described using the SQO example.
 
PLC5 or otherwise, a masked move can be handy in detecting new alarms as they come in and "ignoring" old ones. You can use that to retrigger (look it up, even Webster can't know every word!) an alarm horn that has been silenced.

AK
 
Another really good use for the masked move is converting ASCII numbers to integers. Use a mask value of 0x000f (15) to move the lower nibble.

(8{)} :) .)

(Yosi)
 

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,706
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
Replies
3
Views
4,861
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,772
can someone give me a plain english explaination of the MVM instruction and when to use it properly ...thank you ...
Replies
3
Views
3,807
What Does The "masked Move" Function Do?
Replies
2
Views
5,026
Back
Top Bottom