Mov multiple

Two methods besides individual move instructions include the FAL and looping instructions available on the relevant logix platform. There are other threads which discuss these various approaches for timer elements.
 
You didn't mention which processor you're using but the FLL instruction will do what you want if it's available.
 
Given your addresses I am assuming your using RS500 or PLC 5

It can be with indirect addressing of the MOV instruction but it would be simpler to use 10 MOV.

First you would have to create logic to count from 0-9.

NEQ N7:10 9 ADD N7:10 1 N7:10

MOV N7:0 T4:[N7:10].PRE

EQU N7:10 9 MOV 0 N7:10

So count to 9 and reset. The Reset must be after the MOV to allow the 9th timer preset to be written.

Then you would be using the value of N7:10 as an indirect address to modify the T4.[0-9].PRE

This would also require 10 scan cycles to populate the preset values on first start and if you ever change the value of N7:0.

edit:
Just add in the 10 MOV instructions. It's simple and all values will be completed in 1 scan cycle.
 
Last edited:
@ Mispeld, there is no FAL instruction in 500 or PLC 5 that I know of.

@ RonJohn, the FLL will not work on Timer Elements in 500 or PLC 5. Gives error and will not compile.
 
Yeah, in the PLC-5 this is easy with the FAL. Even easier than the 5000. With the SLC you can do it through extra logic that just complicates the code. And I suspect all of us here would do it differently.

Individual moves would look much cleaner and easier to follow.

OG
 

Similar Topics

In GX Developer I quite often use a BMOV command or FB, this is where I can move a block of word values to another location, i.e BMOV D500, K10...
Replies
0
Views
3,424
Hello experts. Anyone has any idea how to make BLKMOV execute only once? I have tried with R_TRIG and (P) but it wont write to my location.
Replies
3
Views
179
I've used AOI and User Defined Data Types, but I haven't created one yet. I have a lot of repetitive MOV commands to take a select number of...
Replies
4
Views
363
I'm having to make an AOI to use with a generic ethernet device because the manufacturer does not provide an AOP. I just want to do a sanity check...
Replies
13
Views
1,152
Hello, I'm trying to copy the entire value of a UDT base tag to an element of an array of another UDT containing an element of the first UDT...
Replies
7
Views
1,637
Back
Top Bottom