SLC 500 Conversion to Control Logix COP Instructions

KleePax

Member
Join Date
Jan 2021
Location
Idaho
Posts
1
I have the pleasure of converting a very large SLC program to Studio 5000 for an L81E processor. To cut to the chase, I've come across many COP instructions where the copy is an Integer into a Float. I've heard a little scuttlebutt concerning the difference in the new processor being that the length is based on the "Destination" as opposed to the Source in the SLC COP Instruction. I've the luxury of having an SLC 5/05, CL L62, and CL L81 on the rack and have tested the same instructions across all the processors. The results on the CL processors are identical but different than the SLC Processor. I have a hunch why this is, but I'm looking for a solution for how to convert these instructions to get the intended result from the SLC. FYI, I believe the SLC was doing this in order to "pack" and "Unpack" Floats from devices over device net, as I understand it uses only Integers?

Any Help Much Appreciated
 
You are correct DeviceNet only works with integer data.

COP is a fast byte copier, and does no data conversion from one data-type to another.

It calculates the number of bytes to COPy from the source to the destination, as the LENgth multiplied by the number of bytes of the destination data-type.

It is very nearly ideally suited to your suggested application of transferring Float data into other devices on DeviceNet.

However, COP can get interrupted by a higher priority Task, one if which is the System Overhead Time-Slice, which handles, amongst other things, communications to/from I/O modules, including the DeviceNet Scanner.

I recommend you use CPS (CoPy Synchronous) instead of COP. CPS, once enabled, completes without interruption.
 
You are correct DeviceNet only works with integer data.

COP is a fast byte copier, and does no data conversion from one data-type to another.

It calculates the number of bytes to COPy from the source to the destination, as the LENgth multiplied by the number of bytes of the destination data-type.

It is very nearly ideally suited to your suggested application of transferring Float data into other devices on DeviceNet.

However, COP can get interrupted by a higher priority Task, one if which is the System Overhead Time-Slice, which handles, amongst other things, communications to/from I/O modules, including the DeviceNet Scanner.

I recommend you use CPS (CoPy Synchronous) instead of COP. CPS, once enabled, completes without interruption.


I think you just solved a problem I have been having, thanks.
 
I think you just solved a problem I have been having, thanks.

Fragmented data ???

Incidentally, if you use FLL (File Fill) at all to reset or initialise data, there is no equivalent "FLS" to mirror the way CPS disables interrupts.

The way the help suggests you use FLL is to fill a "dummy" file, and then use CPS to copy that initialised data into the destination file. Thats a bit wasteful on memory, but memory is cheap nowadays.

However, you could precede your FLL with UID (User Interrupt Disable), then follow it immediately with UIE (User Interrupt Enable).

During the processing of the FLL, higher priority tasks are "suspended", and will execute once the UIE instruction is executed.

The help shows the UID and UIE instructions on separate rungs, bracketing the code you don't want interrupting, but I believe it is OK to put them all on one rung. I have found no documentation to the contrary, and the benefit of doing so ensures that you cannot easily get the code separated, and there's no possibility of someone inserting rungs into inappropriate places. It also means that the length of time that interrupts are disabled is kept to an absolute minimum.

2021-01-21_160807.jpg
 

Similar Topics

Hello, I'm taking in two 16 bit ints from the field via modbus, one low order and one high order to combine into their proper 32-bit form. I've...
Replies
1
Views
1,270
I have a program that has a scp of 0v to Image dc and in the input minimum it has 1638 and the input max is 14736. The scaled min is 0 and the...
Replies
2
Views
2,156
I am struggling with the conversion of the program used for the 1403-nsc smart card for Allen Bradley's power monitors. We are upgrading an entire...
Replies
5
Views
3,518
We are an OEM and been using the A-B SLC-500 for over 20 years but have decided to move to Beckhoff. We felt strongly that our software doesn't...
Replies
1
Views
1,495
Anyone find a way to do DDV command on a Logix 5000 platform? I can't figure out how the double divide is calculating. Looks like hoodoo voodoo!
Replies
2
Views
4,457
Back
Top Bottom