Masked Move RSLogix 5000

Leigh.edler

Member
Join Date
Apr 2014
Location
Arlington, WA
Posts
21
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 forgive me for being Noobish. I'm just having trouble figuring out what the mask should be. Do you think somebody could explain this to me? The help description in RSL is just kind of confusing. Thanks in advance.
 
If the two source INTs are adjacent members of an array or UDT then use the COP command. Let's say the twos INTs are the first two elements of an arrya - MyInt[]. We will copy them to a single DINT - MyDint

COP
MyInt[0]
MyDint
1

This should put MyInt[0] into the lower 16 bits of MyDint and MyInt[1] will go to the upper 16 bits of MyDint.
 
That looks right. 3300 = CE4 hex. 4 = 4 hex.
So the resultant DINT should be CE40004 hex or 216268804 decimal.

Is that not what you were expecting? If not what were you expecting?
 
Well i'm using this to read the numbers off of an RFID card. So lets say the number on the card is 3300039. But I have to make that number with two INTS.
 
Can you explain the whole system?

How is the number being received from the RFID card - as two INTs? If so what does the number look like in the two INTs? What end result do you want?

Please note if you are showing the number as decimal or hexadecimal.
 
I'm showing the numbers as a decimal. The two ints also come in as decimal. The end numbers will be between 3300004 and 3300044. Because the interface block won't write data in DINTS, I have to figure out a way to write it with two INTS and convert those INTS into a single DINT between 3300004 and 3300044. Forgive me if this is confusing I havent been doing this very long.
 
Hi

The btd instruction would but the int into the upper part of a dint for you.
You Could also move the int into a dint then use the swap instruction to move that int to the upper half of the dint and then use the Mvm to move the second int into the lower word of the dint.
Now sometimes you have to swap the bytes in each int word first normally if the unit has been set up to talk to a Siemens plc. But as Bernie said just give so more details on part numbers, network type etc

Donnchadh
 
You told us what you want but not what you have to start with.

Are the two INTs '33' and '4' for your example 1 and '33' and '44' for your example 2?

If so you want (first INT * 1000000) + second INT. Use a CPT instruction with the destination being the DINT.

But if the first INT is ALWAYS '33' then just ignore it and add 33000000 to your second INT.
 
I got it to work. Thank you guys for all your help. I have one last question. The time in my PLC is on eastern time. How would I get it to sync with the time from my computer?
 
The internal "Wall Clock" of the ControlLogix has two important attributes: DateTime and LocalDateTime.

The "Local" DateTime is derived from the ordinary DateTime by applying the Time Zone and Daylight Saving settings.

The idea is that you can have universal timestamps on all your controllers that stay consistent no matter where they are located, and still also have timestamps or displays that match what the operators are going to see on their wristwatches.
 

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