Can't see "verify rung" data in RSLogix 5000

I think it's worth understanding why COP is necessary instead of MOV.

MOV only works on atomic datatypes (foundational datatypes, not built off other datatypes), and even then not all of them. It works on DINT, REAL, INT, etc. MOV is a lot smarter than COP and actually tries to understand what the programmer is doing, so it, for example, can handle a MOV between a REAL and a DINT, because the MOV knows that the programmer wants the two values to match as closely as possible (this is still bad practice - if you ever make money off PLC programming please don't do this).

Strings are not atomic datatypes. They are comprised of a single DINT (or similar) indicating how many characters are in the string and an array of SINTS (8 bit integers or similar) representing each character in the string using ASCII encoding.

Where MOVs have the benefit of being smart, COPs have the benefit of being able to operate on any datatype. In a string's case, the datatype is the length integer and the array of character integers. A COP instruction can do this because the COP instruction is dumb. It just takes the binary values in the source memory register and pushes them to the destination memory register. It does not care what is actually assigned at either register.

To test it out, try doing a MOV between a DINT and a REAL and then try the same but with a COP. Both a DINT and a REAL are 32 bits but you will see very different behavior. This is because the MOV knows what you want, the COP does not. The way the PLC stores a DINT and a REAL, while both 32 bits, are very different behind the scenes, and results in very strange behavior if you aren't aware of what is going on.
JLand, this is a very detailed description, and explains what is going on perfectly. Thanks for this! Always nice when someone can explain not only HOW something works/doesn't work, but also WHY it works/doesn't work.
 
This was a common bug before Rockwell went to the Visual Studio based Studio 5000. Very annoying. You'll also commonly see the same behavior and even restarting the editor will not fix it. Usually you either need to convert to an L5K and back or upload from the PLC.
What was the environment before Visual Studio?
 
I'm struggling with my memory here. I remember using strings inside an AOI once, then bringing the AOI into a newer version of Logix and having to change some MOVs to COPs...but I can't duplicate the issue outside an AOI. When I go back to older versions (v19 for example), it still requires COP for string tags (as expected). I even went back to RSLogix 500 and it also requires COP. I can't for the life of me remember where I had to make the transition from MOV to COP but I clearly remember running into it at some point. Sheesh....
 

Similar Topics

Hi, We are thinking of implementing a light to our safety system that indicates that a machine is in a ceratian more dangerous state then normal...
Replies
12
Views
1,984
Hi, I'm working on a project with an Allen-Bradley PLC, so we are using Studio5000. I have a bunch of things that communicate through ethernet/Ip...
Replies
2
Views
1,251
I've created an AOI in Studio 5000 for the first time. This is an AOI to do a bunch of math to calculate air properties. I don't have access to...
Replies
25
Views
5,494
Does anyone know what “DT Errors” mean when verifying a program after downloading in Ladder Logistixs software?
Replies
6
Views
2,531
I have an application where 2 hoses will be connected to a railcar for pneumatically transporting material into a building. Is there a device...
Replies
7
Views
2,388
Back
Top Bottom