Copy or Fill

randy

Supporting Member
Join Date
Apr 2002
Posts
158
For application purpose, what is the difference between a Fill instruction and a Copy instruction.

rmonroe
 
(In AB Terms, since not specified) Copy (CPY/CPS) copies source data of one or more elements to a destination, preserving the source and overwriting the destination.

Fill (FLL) takes a single value (either constant or from a memory location) and copies that single value to all specified parts of the destination which can be one or more elements long.

N7:0 = 10 N7:1 = 20 N7:2 = 30
N7:20 = 150 N7:21 = 13 N7:22 = 372

After CPY N7:0 N7:20 3, the table looks like this:
N7:0 = 10 N7:1 = 20 N7:2 = 30
N7:20 = 10 N7:21 = 20 N7:22 = 30

After FLL 0 N7:20 3 the table looks like this:
N7:0 = 10 N7:1 = 20 N7:2 = 30
N7:20 = 0 N7:21 = 0 N7:22 = 0
 
in general terms, FLL works with VALUES ... COP works with BIT PATTERNS ...

so ...

if you COP (Copy) from an INTEGER to a FLOAT (for example) then you can expect surprises with the results ...
 

Similar Topics

Hello all, I have a basic question. I have an conveyor application where i need to copy data from location to another and then fill the previous...
Replies
12
Views
3,733
I have 2 7cp476 plcs. How can I copy one of them and install it somewhere else?
Replies
0
Views
75
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
142
Hi everyone I'm in a bit of a conundrum, I've been trying to get this HMI on our machine and I am unable to retrieve it. Device Delta Model...
Replies
10
Views
901
Hi I have a Melsec FX1S-20MR, which has been programmed. I would like to copy the program to a new FX1S-20MR? What are the possible ways to do...
Replies
4
Views
630
Back
Top Bottom