move addressing

RElapse

Member
Join Date
Nov 2011
Location
victoria
Posts
1
i am using logixpro simulator

is there a way to address a move as follows

4 bit binary value to the first 4 bit of output (ie. O:6/0-3)

differant 4 bit value to O:6/4-7

ect
 
Not sure about Logixpro, but if it is like RSLogix, look for a MVM (masked move) command. Basically you add a mask that allows only certain bits to "fall through" and get written to the output
Code:
MVM:
Source: 0011010100110101
Mask:   0000000000001111
Dest:   ************0101
* bits remain in same state as before MVM

bernie_carlton; said:
The MVM requires that the source bits be in the same 'bit' position in the source word as they will be in the destination word.

If the bits are not in the correct position, you can re-map them so that they are, or look for a BTD command (bit field distribute in some flavors of RSLogix) which will allow you to choose a starting bit position.

Paul
 
Last edited:
The MVM requires that the source bits be in the same 'bit' position in the source word as they will be in the destination word. If not you can just 'brute force' it by a seperate 'contact ---> output' pair for each bit.
 
I recommend Bernie's suggestion, just use XIC OTE pairs.


Assuming 4 bit values are in N7:0 and N7:1

N7:0/0 O:6/0
---] [-------------( )

N7:0/1 O:6/1
---] [-------------( )

N7:0/2 O:6/2
---] [-------------( )

N7:0/3 O:6/3
---] [-------------( )

N7:1/0 O:6/4
---] [-------------( )

N7:1/1 O:6/5
---] [-------------( )

N7:1/2 O:6/6
---] [-------------( )

N7:1/3 O:6/7
---] [-------------( )


 
LogixPro's limited ability to MOVE bits with Mask

In the first picture, a 4-bit value "1100" is Moved with MVM (Move-with-Mask), mask of 000Fh, to O:6.0 to O:6.3

In the second picture, a 4-bit value "0011" is Moved with MVM (Move-with-Mask), mask of 00F0h, to O:6.4 to O:6.7. Because the Destination does not have the same relative bit locations within the word, "0000" must be added to the 4-bit value, making it "0011 0000".

MOVE 4-BIT MVM-1.jpg MOVE 4-BIT MVM-2.jpg
 

Similar Topics

Hello all, IN S7-300 Does anyone know if its possible to address sfc20 source and destination with variable addresses? ie Indirect addresses...
Replies
10
Views
2,972
So I'm pretty green when it comes to troubleshooting in the field so bear with me. We have a Danfoss valve that opens/closes from an analog output...
Replies
23
Views
939
Hi. This is pretty basic but I'm struggling to find an efficient solution. I have a float value of let say 666.555 that I want to move / split...
Replies
3
Views
195
hi, I got a plc S7-1200 with SEW movitrac **** and i need to program something ridiculous if my application reaches sensor 1 then my SEW has to...
Replies
0
Views
184
Afternoon, I have a DB in TIA Portal V16 that is optimised. I cannot change this. There is an array inside that block which consists of 3000...
Replies
9
Views
1,107
Back
Top Bottom