New to Allen Bradley

Old GE Guy

Member
Join Date
Feb 2015
Location
Arkansas
Posts
8
Have been using GE PLCs for years. Now have a few AB PLCs and am trying to figure out how to accomplish some of the GE instructions in RSLogix5000. I have figured out a lot of it, but one instruction I use alot in GE is the Shift Word. I need to be able to shift blocks of words (thousands long)using encoder driven clock pulses. How would be the best way to accomplish this is the AB?

For example I need to shift 10 word blocks for a length of 1000 at a rate of 20 shifts per second.
 
Got it done using the COP instruction. Very powerful. I am able to shift data through an array 2000 words long and 5 wide using 2 COPs. Thanks

Make sure you understand the difference in the COP instruction and the CPS instruction. For that much data at that frequency, I would tend to use the CPS instruction.
 
Make sure you understand the difference in the COP instruction and the CPS instruction. For that much data at that frequency, I would tend to use the CPS instruction.
Good catch!

For the same reason that the CPS instruction exists you may, depending what's going on with the I/O, also want to buffer all inputs at the top of the program scan and use the buffered data to solve the logic.
 
Another set of instructions to consider are the FIFO ones, FFL/FFU. They can take arrays of UDT's as elements. I use those over COP/CPS generally since they don't have to move around the whole array, they just update a pointer to the current location.
 
Make sure you understand the difference in the COP instruction and the CPS instruction. For that much data at that frequency, I would tend to use the CPS instruction.

Thanks for the response. I am trying to understand the difference between the COP and CPS instructions. If I am reading it correctly, the CPS will complete without interruption. If this is the case, that is what I need. For my application, the data shift has to occur precisely at each clock pulse.

The 2000x5 word array doesn't seem to be a probelm for task scan time. It is running around 1.9ms. I actually did some testing with much larger arrays and it seemed to handle those with no problem too.

If there is a better way to accomplish this using different instructions I would appreciate any input.
 
You are correct, CPS is the same as a COP, but will complete before an "interrupt" is acknowledged and acted upon.

Using CPS (instead of COP) on large data-sets, may have a detrimental effect on other tasks... just check periodic and event tasks to see if they are "uber-critical" in the operations they perform.

It is even possible to get "task overlap" where an interrupting task is held off by a large CPS to the point where the interrupting task is triggered again, before the first trigger is actioned, or while it is being actioned.

As you've already seen, COP and CPS are very fast instructions, and it is unlikely anything else needs a response fast enough to be bothered by a CPS, but it is worth checking the configuration of other tasks to be certain.

As for the trigger to perform your data shifts from your encoder pulses, are you sing an "Event" task, driven by "module input data state change", or is the encoder fed into a HSC module ?
 
Last edited:
You are correct, CPS is the same as a COP, but will complete before an "interrupt" is acknowledged and acted upon.

Using CPS (instead of COP) on large data-sets, may have a detrimental effect on other tasks... just check periodic and event tasks to see if they are "uber-critical" in the operations they perform.

It is even possible to get "task overlap" where an interrupting task is held off by a large CPS to the point where the interrupting task is triggered again, before the first trigger is actioned, or while it is being actioned.

As you've already seen, COP and CPS are very fast instructions, and it is unlikely anything else needs a response fast enough to be bothered by a CPS, but it is worth checking the configuration of other tasks to be certain.

As for the trigger to perform your data shifts from your encoder pulses, are you sing an "Event" task, driven by "module input data state change", or is the encoder fed into a HSC module ?

Right now I am just in the experimental stage with the new Allen Bradley. The system I am working on (an old sorting conveyor) is currently controlled by a GE 9070 and the encoder pulses are a direct PLC DC input at a rate of about 17 pulses/second. This pulse period is about 59ms so for the 9070, this isn't a problem with a scan time of about 18-20ms so there was really no need for a HSC.

I have a simulated process running on the new AB using the CPS instruction and it seems to work well. As a test I even tried much larger arrays and much faster clock speed and it seemed to handle the process okay.

Since this data shift is aligned with physical products I have to make sure it is 100% accurate.

Like I said, I am new to Allen Bradley and have much to learn.

I'm not sure how to compare the GE scan time with Allen Bradley. I only have a MAIN task and I noticed the scan time for this is about 1.9ms but this PLC isn't doing anything now except running the sorting simulator.
 
Right now I am just in the experimental stage with the new Allen Bradley. The system I am working on (an old sorting conveyor) is currently controlled by a GE 9070 and the encoder pulses are a direct PLC DC input at a rate of about 17 pulses/second. This pulse period is about 59ms so for the 9070, this isn't a problem with a scan time of about 18-20ms so there was really no need for a HSC.

I have a simulated process running on the new AB using the CPS instruction and it seems to work well. As a test I even tried much larger arrays and much faster clock speed and it seemed to handle the process okay.

Since this data shift is aligned with physical products I have to make sure it is 100% accurate.

Like I said, I am new to Allen Bradley and have much to learn.

I'm not sure how to compare the GE scan time with Allen Bradley. I only have a MAIN task and I noticed the scan time for this is about 1.9ms but this PLC isn't doing anything now except running the sorting simulator.

Just a thought... wouldn't it be simpler just to manipulate a pointer to the data in the arrays, rather than shifting all the data. Analogy - you are looking through a window at the horizon. To see a different view it is easier to move the window....
 
Just a thought... wouldn't it be simpler just to manipulate a pointer to the data in the arrays, rather than shifting all the data. Analogy - you are looking through a window at the horizon. To see a different view it is easier to move the window....

It seems I would always have to shift the data in the array due to the fact there is a new package inducted onto the sorting conveyor every 2-3 seconds. Effectively the data within the array is moving at the same rate as the physical product. The data being shifted through the array contains the physical divert location number on the sorting conveyor.
 
It seems I would always have to shift the data in the array due to the fact there is a new package inducted onto the sorting conveyor every 2-3 seconds. Effectively the data within the array is moving at the same rate as the physical product. The data being shifted through the array contains the physical divert location number on the sorting conveyor.

Sounds to me like your data array will be containing lots of "gaps" where the data will be blank, which isn't ideal.

However, if you used indirect addressing into the array, you could definitely dispense with the data being shifted.

Conceptually, there is no real difference between shifting the data and using fixed pointers, to freezing the data and using variable pointers. The array is just a storage area to accommodate xxx data-sets. The "load" and "divert" locations in the storage area can be moving relative to the data.

The offsets to the divert positions can also be calculated, as they represent a fixed distance from the load position. Remember that it is allowed to put expressions within the square brackets when addressing elements of the array, which might simplify things...

e.g. MyArray[LoadPosition+320]
 

Similar Topics

Hi, I have a ControlLogix system with 1756-IF16 analogue inputs. I can't scale the inputs at the card as there is a requirement to facilitate...
Replies
4
Views
111
Dear community, I am trying to find a tool for Allen-Bradley PLCs similar to SiVArch for Siemens PLCs to automatically generate faceplates and...
Replies
0
Views
70
Hi everyone, new to forum. Since very long time i having issue with 1734-AENT module, after some period of time its keep stuck in error (simmilar...
Replies
9
Views
363
Hello, I am new here. I am trying to find good places to sell some surplus items that I have that isnt through ebay. Does anyone have any sources...
Replies
5
Views
345
Hi all, installed on chassis A17 an A/I from Allen-Bradley , problem is what ever I do , all channels are sticked on value 39.9 and cannot change...
Replies
1
Views
135
Back
Top Bottom