hightekkrednek@gmail.com

P2-550 order operation based on inputs

9 posts in this topic

Good evening. I am building a system that will need to turn on outputs based on the order in which inputs were turned on. For example.. if there are 4 inputs and 4 outputs.. and input x2 was turned on first, then x4, x3 then x1.. it needs to turn on y2,y4,y3 then y1 in that order after each operation is complete. This order will change constantly based on which machines are active and needing material. I am having trouble finding the right terms or something to search for ideas on how to do this so if i had that I will gladly continue to seek out the rest of what i need to know from there.. but i am also open to some input as to how to do this with the Productivity 2000. 

Just to elaborate on what is happening.. This is for a raw materials conveying/handling system. We have 4 blowers, 4 silos and a series of diverters all running to 9 different bins. When the high level switches in each bin signal the plc that they need material.. the plc needs to add that "bin call" to some sort of list or voting system and send material to the appropriate bin in the order that the bin call was received. Bin 6 sends signal and material begins to go to bin 6.. in the meantime while bin 6 is filling, bin 4 sends a signal and then bin 7 also sends a signal. The system needs to know that when bin 6 is full, to go to bin 4, then when 4 is full to go to bin 7 in that order.. or whatever order that the bin calls were received. Right now the current system that I put into place about 6 years ago simply chooses based on the location in ladder logic that each bin operation is, the further down the list the less priority that bin gets to get material no matter how long it has been waiting. This has been working fine up until now as i am conveying material faster than it can be used, but we are near doubling the number of ribbon blenders and material bins requiring material and this could leave some bins without hardly ever getting material so long as those listed earlier in the program are requesting material. I hope this makes sense, thank you for any info or direction to solve this. 

Edited by hightekkrednek@gmail.com
misspelling

Share this post


Link to post
Share on other sites

The keyword in your description is "priority".  This case, based on time of request.  I would use a timestamp register for each of your inputs, updated on the input rising edge and when an operation corresponding to that input completes.  Ordering is then just comparing the timestamps for the inputs that are on and picking the earliest.

Share this post


Link to post
Share on other sites

A quick look shows you have a FIFO/LIFO Instruction in Productivity Suite.  My idea is as follows.  

Declare a tag for FIFO LOAD and make it have a ZERO Value.

Create a Rung to Examine Input X1 {Bin1 Calling} and if true and FIFO LOAD equals ZERO then place a ONE (1) in FIFOLoad.

Create a Rung to Examine Input X2 {Bin2 Calling} and if true and FIFO LOAD equals ZERO then place a TWO (2) in FIFOLoad.

Create a Rung to Examine Input X3 {Bin3 Calling} and if true and FIFO LOAD equals ZERO then place a Three (3) in FIFOLoad.

..........

Create a Rung to Examine Input X9 {Bin9 Calling} and if true and FIFO LOAD equals ZERO then place a Nine (9) in FIFOLoad.

Create a Rung if FIFOLoad equals One (1) and the tag OneQueued is false  then Load that into the FIFO and Set a Coil for OneQueued.

Create a Rung if FIFOLoad equals Two (2) and the tag TwoQueued is false  then Load that into the FIFO and Set a Coil for TwoQueued.

Create a Rung if FIFOLoad equals Three (3) and the tag ThreeQueued is false  then Load that into the FIFO and Set a Coil for ThreeQueued.

......................

Create a Rung if FIFOLoad equals Nine (9) and the tag NineQueued is false  then Load that into the FIFO and Set a Coil for NineQueued.

RESET FIFOLOAD to ZERO

Create a Rung that determines if the blowers are stopped because they just filled a bin.

Create a Rung which when blowers Stop RESETs the NumberQueued coil for that bin.

Crate a Rung when blowers are stopped that Unloads the FIFO Array value into a tag BINBEINGFILLED.

Use the BINBEING FILLED tag to turn the blowers on to the corect bin.

Hope I laid down enough thoughts.  

You can have first come first served filling order.

It would probably be advisable to have a High level Stop Fill.  A Low Level Start Fill and a High-High Level Emergency Stop Fill switches.

1 person likes this

Share this post


Link to post
Share on other sites

BobLfoot, Thank you for the time you spent with this response. I was not aware of the FIFO operation in productivity or what it did as I have only very briefly browsed the software today. This is exactly what I needed and Im going to explore it with some other ideas using timers that start when a call comes in..  reading those timers and prioritizing before starting the next fill operation. Currently all of our bins have high level sensors only and are what is being used to keep all bins topped off. I advised them to install low level sensors so we can catch any failure to fill issues but since that isnt being done I will probably just setup timers on each that indicate a possible failure to maintain material in the bins when the high level sensors dont show a full bin after x amount of minutes of filling, being stuck in bin call queue or not ever receiving a bin call. Thank you again for the thorough response! 

Share this post


Link to post
Share on other sites
9 hours ago, pturmel said:

The keyword in your description is "priority".  This case, based on time of request.  I would use a timestamp register for each of your inputs, updated on the input rising edge and when an operation corresponding to that input completes.  Ordering is then just comparing the timestamps for the inputs that are on and picking the earliest.

This will likely be my simplest and chosen way to go as i can use the same timer data to show upcoming bin calls and their time lapse on the hmi. Thank you for the suggestion!

Share this post


Link to post
Share on other sites

Also thought of this option:

Fill Bin 1 for 90 seconds unless it reaches full sooner.

Fill Bin 2 for 90 seconds unless it reaches full sooner.

Fill Bin 3 for 90 seconds unless it reaches full sooner.

......

Fill Bin 9 for 90 seconds unless it reaches full sooner.

Repeat the process.

Worst Case each bin gets filled to 90 seconds, for four (4) times per hour.

Share this post


Link to post
Share on other sites

BobLfoot.. There is something to be said about simplicity.. less points of failure in logic and easily modifiable as things evolve. Im kinda ashamed that i didn’t consider this option and it may very well be the thing to do. Great suggestion! 

Share this post


Link to post
Share on other sites

I think the description of the system implies that the supply method will soon be inadequate for the processing speeds. I don't think that just program modifications will make up for that.

Share this post


Link to post
Share on other sites

i also want to know about it that how can i fix this issue?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now