Move instruction

Join Date
May 2019
Location
Indiana
Posts
9
I want to change my vision system program using a micrologix plc. The vision system uses binary inputs, bits 0 thru 7 to determine program #. I want to move N7:3(program # selected in Panelview 800) to O:0.0 word (Micrologix 1200). Vision inputs bit 0 thru bit 7 are wired to Outputs O:0/7 to O:0/14. Using a MVM instruction, I cannot get it to work. If the Vision inputs are wired to PLC outputs O:/0 to O:0/7, all works great on my test unit. The PLC I will be using has a few bad outputs so I had to start at a different address than
O:0/0. I tried using a Multiply instruction (N7:3 times 128 to scale it up, but that didn't work. I know this is kind of long and I have probably missed some details, but I would appreciate any help.
 
Just shift left 8 places that's assuming the output card is 16 way
or not sure if you can use N regs at bit level on Micro but if you can just map the N bits to the outputs ... N7:3 bit 0 to O:0/7 N7:3 bit 1 to O:0/8 etc.
 
Sorry I re-read your OP, thought it was from output/8 on but it's 7

Mask 16320 will move only bits 7 through 14 and leave the rest

Open calculator on your computer and change to programming mode, handy for checking masks in hex dec oct and binary.
 
Let me see if I have got this right you have a word with the lower 8 bits as a recipe and you move the whole word into an output card but only use bits 0-7
try the SWP function
 
No parky he has bad outputs within the 0-7 range so can't use that, still wanting to use whatever good outputs are left MVM would be my choice
 
Sorry what I meant if originally he used 0-7 by doing a swap on the N word then moving it to the output card this will change bits 0-7 to 8-15
That is what I meant.
 
Sorry, I was 1 bit typo out, the mask should be 32640 for bits 7 through 14.

Tested on a mlx 1000, if it runs on that it'll run on anything.

You'll want to put in a check that your source value doesn't exceed 32640, or it will error on math overflow.

mvm1.png mvm2.png
 

Similar Topics

Hi All, I am using 2 MOVE instructions in Studio 5000 logic designer to move 2 different values in the same destination tag N7[190]. Two...
Replies
16
Views
4,361
Hi I'm working with twdlmda20drt and i was wondering if there is a move instruction in twidosuite cause i cant find it and i may need in the...
Replies
6
Views
2,042
Hi all I currently have a system where data is scanned into a system and in the fc is a move instruction which I move a '00' on the input and...
Replies
2
Views
1,837
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,745
Hello everyone Im using SoMachine Basic V1.5, the PLC is a TM221CE16R with analog inputs, I also have a TM3A2Q (analog out) I have everything...
Replies
7
Views
8,052
Back
Top Bottom