COP and CPW commands

COPy appears to copy complete elements while CPW copies words. A length of '1' when COPying a timer to a timer would copy 1 complete timer. Using CPW in the same context, a length of '1' would only copy the first word of the 3-word long timer. I guess it's for a different level of control of the copying. It looks like you could really get in trouble easier with the CPW.
 
I'm not a big MicroLogix guy so I didn't know that the MicroLogix COP required the same data type in source and destination. The CPW command looks like the SLC5 / PLC5 / ControlLogix COP instruction, where you are doing a direct data image copy. CPW allows dissimilar source and destination file types where COP does not.

Keith
 
Arik-
I have Logix500 V5.5. I have the CPW instruction but you have to have a MicroLogix 1200/1500 Series C project open to see it. CPW is not a valid SLC5 instruction.

Keith
 
I Found hide some where I try to run it on SLC5/05 but it dont run
may be it Micrologix instruction.
I not use Micrologix much. I dont like to work with out On Line Edit.
 
In general (with respect to PLC's) any kind of data move is "size" oriented. Some people say "type" oriented, but it is really "size" oriented.

Sizes include...
  • byte (8-bits),
  • word (16-bits),
  • double-word (32-bits)
That's all there is (up to this point).

Some really older machines were able to move "nibbles" (4-bits).

Within each of those size-groups are a few data-types.
"word" can mean Interger, Signed Integer,...
"double-word" can mean "Long Integer, Real,...

Down at the gut-level of the processor, moves are byte-oriented.

Yes, the processors use 16-bit registers... but those registers get loaded one byte at a time. This is because Memory is byte-oriented.

When the processor is told to "fetch" an "Integer" (word), the processor performs 2 fetches from memory... 2 x 8 = 16.

When the processor is told to "fetch" a "Signed Integer" (word), the processor performs 2 fetches from memory... 2 x 8 = 16.

When the processor is told to "fetch" a "Long Integer" (double-word), the processor performs 4 fetches from memory... 4 x 8 = 32.

When the processor is told to "fetch" a "Real" (double-word), the processor performs 4 fetches from memory... 4 x 8 = 32.

With respect to "moves" there is no difference between an Integer and a Signed Integer, nor between a Long Integer and a Real.

As far as a move operation is concerned...
Integer = Signed = 2-bytes
Long = Real = 4-bytes.

Some instructions call for the user to specify the "data type". Identifying the "data-type" specifies the number of bytes.

Some instructions are inherently "size-specific". That is, Move Word will move 2-bytes. Move DWord will move 4-bytes.

Some instructions call for the user to specify an "element type" and then a number of "elements". In this case, the element-type might be... byte, word or double-word. Each "element-type" specifies a number of bytes... 1, 2, or 4. The "number of elements" would then be multiplied by the type-number to get the total number of bytes involved in the move.

The "element move" is by far the most flexible data move (copy) instruction in all of PLC-dom. It can use indirect-addressing for all parameters (except the element type), including... source, destination, and number of elements. Adding the element-type gives the user access to all possible move types.

So... the lesson learned here... if you aren't restricted to a system that uses rules set forth by a "Land Use Planning and Zoning Commission" (you know who you are), is that there are more than a half-dozen different ways to skin poor ol' Tin-Tin when it comes to "moving" data.

Damn, I'm sorry Pierre... you know I am... you can have at mine... but please, be gentle with 'em... Especially with Stinker... she's still got those aliens showing up all the time, ya know. However... just 'cause I'm a little pi$$ed at the little prick right now, you can have at Tuffy "Tuff-Nuts"... he deserves it! And he can take it... he is Tuffy-Tuff-Nuts, after all... what a little prick!

A note on that "Land Use Planning and Zoning Commission"...
I have heard that those commissioners are coming around more and more to the TI way of thinking... hmmmm?

I'm beginning to understand how the earlier settlers in the Oklahoma Territory felt when the great land-grab happened. I felt pretty much alone out here... now an awful lot of new neighbors are showin' up!

And Lefty,
I'd still like to know which came first...

Direct Logic from Koyo
-or-
Texas Instrument products designed by Texas Instruments with manufacturing "farmed out" to Koyo.

That makes me wonder where the DL programming philosophy really came from.

blah-blah-blah... End-Rambling...
 
Why CPW?

The SLC and MicroLogix are NOT compatible when it comes to copying different data types using the COP command. When copying data in F files to B files, the upper and lower 16 bits are swapped in a Micrologix compared to the SLC. To copy the F file data into the B file correctly the MicroLogix must use the CPW command.

My conclusion is that the SLC and MicroLogix store the high and low parts of a 32 bit word in opposite order.

There was a thread about this topic last spring.
 
Terry Woods said:
And Lefty,
I'd still like to know which came first...

Direct Logic from Koyo
-or-
Texas Instrument products designed by Texas Instruments with manufacturing "farmed out" to Koyo.

That makes me wonder where the DL programming philosophy really came from.

Hey now... Tom's not the only A-D fan 'round here, though he's probably the most knowledgeable... :nodi:

Here's Automation Direct's 305 history lesson:

"For over 16 years, the DL305 PLC design offered exceptional reliability, the right mix of features and a great price. This design was so desirable that it became the most popular privately - labeled PLC in history. Best of all, almost every part produced in its 16-year history is interchangeable! That makes it the most compatible PLC in the world! Here’s a quick history of this «PLC Classic.» In 1983, General Electric decided to private label the Koyo SR21 design. They called it the General Electric and changed the color from Koyo yellow to black. The product sold so well they nicknamed it "America's Most Popu1ar PLC». In 1989, Texas Instruments also decided to private label the Koyo SR21 design. They named it the Series 305 and changed the plastic color to light gray. The product was enhanced and did so well for Texas Instruments that they nicknamed it the «Best Value PLC.» In 1991, Siemens Industrial Automation decided to private label the Koyo SR21 design. They named it the SIMATIC TI305 and changed the color to charcoal gray. Once again, the product line continued to receive enhancements. Many at Siemens continued with the «Best Value PLC» name (among other things). In 1994, Automationdirect.com introduced more enhancements. In 1997, Automationdirect.com introduced the super-dooper D3-350 CPU that offered state-of-the-art features while maintaining 16 years of compatibility. Of course, more DL305 family products are under development!"

How accurate is this? I dunno... :confused:

beerchug

-Eric
 
What the L is this about?

Damn, I'm sorry Pierre... you know I am... you can have at mine... but please, be gentle with 'em... Especially with Stinker... she's still got those aliens showing up all the time, ya know. However... just 'cause I'm a little pi$$ed at the little prick right now, you can have at Tuffy "Tuff-Nuts"... he deserves it! And he can take it... he is Tuffy-Tuff-Nuts, after all... what a little prick!
 
Re: What the L is this about?

I though I was the one with the bad memory Ron. You've been around here long enough to know the name of everyone's family pets, no?... :unsure:

Pierre's cat is Tin-Tin, and now we know Terry's two are Stinker and Tuffy.

And you once owned an island in Florida. Scary that we know each other so well!... utoh

beerchug

-Eric
 
GEEZ I been here what..2 years now?

Dont think I ever heard mention of Pierre's cat fetish except the signature.

Definitely didnt know Terry was a cat person.

BTW..sold that island, someone kick me NOW.I have 2 cats, Killer Dog and Smoke, AND 2 dogs, Baby and Baby Girl...dont ask why the dogs are both named baby. The fact I have 2 dogs (was 3 ) and an orange scrawny mean as L kitten cat should tell you why the first was name Killer Dog...it dont know its a cat and aint worried about any dogs.
 

Similar Topics

I know this has been brought up before and I have read through many posts and tried many different things before asking... I am using a ML1400 Ser...
Replies
13
Views
5,121
I am trying to copy an array of real numbers into a UDT with a real data type element. I have attached a snip below showing my COP instruction...
Replies
4
Views
200
Hello all. I have a Danfoss VLT feeding an INT into my CpLX program. I need to concatenate the MSB and LSB for position. I used a COP, making sure...
Replies
10
Views
638
Hello, I have been looking for a reference for the order that a UDT is copied in the COP instruction. More specifically - I have a set of code...
Replies
5
Views
544
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,257
Back
Top Bottom