# PLC MOV Instructions



## dronai (Apr 11, 2011)

Any of you guys working with PLC's find yourself using MOV instructions, or Shift Registers ?


----------



## eric7379 (Jan 5, 2010)

dronai said:


> Any of you guys working with PLC's find yourself using MOV instructions, or Shift Registers ?


At the facility that I work at, we use them all the time. This was my first exposure to them, so I am still learning them. 

We use them for product tracking throughout the manufacturing process, so that if a defect on one particular unit occurs, it can be rejected further down the line with a reject conveyor. 

What are you wanting to know about them? I might not be able to answer specific questions about them because all of my manuals, programs, etc. are at work and I won't be going back to work for a few weeks yet.


----------



## lefleuron (May 22, 2010)

You will use MOV a lot, as your programming gets more and more complex.

As you know, MOV is just a file or word manipulator. For instance, if you wanted to move an analog value to a digital read-out. 

Without going through all the TOD and FRD (binary coded decimal stuff, which you will need to do this).

So the MOV instruction just takes one value, word, file and using an instruction moves that value/word/file to another location.

Depending on the brand PLC, this instruction can be an always true (on a rung all by itself), or can be triggered by true preceding instructions.


MOV is also very useful when you get into sequencers. You may not understand this right now- but there may come a time when you want all outputs to go false- like a fast stop or what-not. By using a MOV instruction, you can move all zero's into a file word at once and kill any outputs.


----------



## lefleuron (May 22, 2010)

For me, shift register not so much.

Get the gist of it, keep it in mind that its available to you, and go from there.

Everyone programs differently, and there are 500 ways to do any program. Shift register is just not something I use, I go one of the other 499 ways.


----------



## Netree (Sep 3, 2011)

MOV lots.


----------



## dronai (Apr 11, 2011)

Thanks guys, I'm just seeing how far into the programming I will need, and how much you guys are actually using.


----------



## John (Jan 22, 2007)

Try this sample . It's a counter that you will load the presets for the counter by pushing the button for whatever counts you want.

View attachment 10330


----------



## dronai (Apr 11, 2011)

Thanks John, I haven't tried to use this function yet. It makes sense to me from reading your ladder. After the first move to the Data register, the counter is not reset right ? So when PB #2 is pushed the preset of the counter is still 10, but the accum would be 20 right ?


----------



## John (Jan 22, 2007)

dronai said:


> Thanks John, I haven't tried to use this function yet. It makes sense to me from reading your ladder. After the first move to the Data register, the counter is not reset right ? So when PB #2 is pushed the preset of the counter is still 10, but the accum would be 20 right ?


Push buttons #1&2 are an " either or" function to move 10 or 20 to data register D0000. This is a clear then write action.

When push button #0 is pushed the amount of times that equals D0000, the counter will reset to 0 by internal relay M0000.

This is not a complete plc program and will not work as you see it. There is some overhead code that needs to be added.


----------



## Netree (Sep 3, 2011)

When you try to do the other things such as scaling you will use many other instructions. Not so hard when you figure them out.


----------



## dronai (Apr 11, 2011)

John said:


> Push buttons #1&2 are an " either or" function to move 10 or 20 to data register D0000. This is a clear then write action.
> 
> When push button #0 is pushed the amount of times that equals D0000, the counter will reset to 0 by internal relay M0000.
> 
> This is not a complete plc program and will not work as you see it. There is some overhead code that needs to be added.


 
I see, your not moving the counters value, you are triggering the Mov instruction to move either the number 10, or the number 20 to the data register, depending on which PB was pushed.


----------



## dronai (Apr 11, 2011)

Netree said:


> When you try to do the other things such as scaling you will use many other instructions. Not so hard when you figure them out.


 
"Scaling" I heard the term, but haven't used this one yet.


----------



## Netree (Sep 3, 2011)

dronai said:


> "Scaling" I heard the term, but haven't used this one yet.


In the piece I post earlier, we have 1 pulse but not truly 1 per foot in a wire making machine. We can scale this pulsing with either multiply or divide setting from the OP (program is used for many different machines):

43 - I set this double-word counter to high number never reached
44 - Convert count double-word value to float value
45 or 46 - Multiply or divide counter float value by scale float value set from OP 
47 - Convert new float value back to double-word integer
48 - Compare scaled counter value to preset value set from OP. If equal or greater, count is full.


----------



## dronai (Apr 11, 2011)

Netree said:


> In the piece I post earlier, we have 1 pulse but not truly 1 per foot in a wire making machine. We can scale this pulsing with either multiply or divide setting from the OP (program is used for many different machines):
> 
> 43 - I set this double-word counter to high number never reached
> 44 - Convert count double-word value to float value
> ...


The pulse is from an encoder with perameters set at 1' pulsing the PLC ? You are using the math fuctions to accomplish what in this case ?


----------



## lefleuron (May 22, 2010)

Scaling. 

Imagine you have a pressure sensor. This sensor puts out 0-10 volts DC depending on how hard you push on it. You want to convert this voltage to read 0-200 PSI on a digital readout.

So, 0 volts = 0 pounds. 10 volts = 200 pounds. By using the scaling instruction that's exactly what happens.

You will have an input Minimum, input maximum ( 0 and 10 volts respectively) then output minimum and maximum (0 and 200). This instruction does the conversion math for you. Of coarse your input and output will each have an address.

This instruction can be used anytime one value needs to be scaled mathematically to another.


----------



## Netree (Sep 3, 2011)

dronai said:


> The pulse is from an encoder with perameters set at 1' pulsing the PLC ?


No. One pulse maybe 8" or 16"; varies. We need to scale this so 1 pulse (proximity sensor mounted at pull-out capstan, example) equal to 1 foot. Or many pulses. It would be hard to make the parts equal 12" circumference, or not practical.


----------



## dronai (Apr 11, 2011)

lefleuron said:


> Scaling.
> 
> Imagine you have a pressure sensor. This sensor puts out 0-10 volts DC depending on how hard you push on it. You want to convert this voltage to read 0-200 PSI on a digital readout.
> 
> ...


Great example lefleuron !



Netree said:


> No. One pulse maybe 8" or 16"; varies. We need to scale this so 1 pulse (proximity sensor mounted at pull-out capstan, example) equal to 1 foot. Or many pulses. It would be hard to make the parts equal 12" circumference, or not practical.


I sort of follow that. The proximity sensor is getting you in the range, but not accurate enough. Using scaling, will add, or subtract the needed amount to make the circumfrence exactly 12"


----------



## Netree (Sep 3, 2011)

Multiply or divide, but yes.


----------



## Stab&Shoot (Aug 23, 2011)

I am a licensed EC since 2005. I started my electrical career in the Navy at 17. I have done tons of commercial and residential and some industrial. But I have zero experience with plc's. I am interested in learning the basics. Is there a course or learning method that you guys would recommend?


----------



## Netree (Sep 3, 2011)

Some things to start:

http://www2.ogu.edu.tr/~redizkan/1h_prim_en.pdf

http://www.joinville.ifsc.edu.br/~jlcurzel/CLP/3 - CLP S7_200/manual_2h.pdf


----------



## Stab&Shoot (Aug 23, 2011)

Netree said:


> Some things to start:
> 
> http://www2.ogu.edu.tr/~redizkan/1h_prim_en.pdf
> 
> http://www.joinville.ifsc.edu.br/~jlcurzel/CLP/3%20-%20CLP%20S7_200/manual_2h.pdf


Hey man that is freaking awesome! I will read it in it's entirety and get back to you.


----------



## Travis Latiolais (Sep 16, 2011)

www.ronbeaufort.com
www.georgebrowncollege.com
Ron has a couple of good utube videos


----------

