You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Thread Tools Display Modes
Old May 16th, 2019, 12:25 AM   #1
United States

HunterM93 is offline
Join Date: May 2019
Location: Arkansas
Posts: 3
Studio5000 V28 Queueing Hickup

So I have wrote up a queueing sequence for a set of conveyors on one of my food production lines. The way the conveyors function is all the product comes out of a freezer and then splits into 3 identical conveyors legs to go to their respective machines to be packaged into sleeves, boxes, cases, then all go to the same palletizer. All 3 legs converge back together at the same location on their way to the palletizer. The goal of the queueing that I have wrote is to make it to where if the kickoff totes are filling up a "cycle stop" button can be pressed to stop the conveyor leg for 10 seconds in order to change out the totes then the leg restarts automatically. Also, there can not be more than 1 leg stopped at a time. The code that I have wrote was pulled off of the merge programming for the 3 conveyors going to the palletizer converging into 1. The problem I have with it is the conveyor legs will not stop in the order that their respective "cycle stop" buttons are pressed. The code works fine on the conveyors merging because there are multiple photo eyes that are used for location of boxes.

I wasn't sure what the best way to upload my code to here so I used the snipping tool and its all in the word document. The logic is from my personal controller and IO setup in my office. Currently the way it is it will work but questions may come up at some point as to why it isn't in order that the buttons were pressed and its also possible for the line to expand and may need more added to it.

When the buttons are pressed in order of input 0, 1, 2 it will cycle as 0, 2, 1. When pressed as 2, 1, 0 it will cycle in that order. When pressed as 1, 0, 2 it will cycle as 1, 2, 0. And finally 1, 2, 0 will cycle in that order. Tag CSQue is data type INT[5].
Attached Files
File Type: docx Cycle Stop Code.docx (250.6 KB, 17 views)
  Reply With Quote
Old May 16th, 2019, 01:08 AM   #2

Jobbe9000 is offline
Join Date: Dec 2011
Location: Esbjerg
Posts: 4
Hi HunterM83

This is because of the way your program is scanned, and the fact that you latch your "LegX_CS_Request"

If all 3 requests are high at the same time, both rung 4,5 & 6 will write to CSQUE[3].
When rung 7 is reached, the value of CSQUE[3] will always be 4, because that is the last thing that was written to the tag.

The reason that the "first" press is always accurate, is that it is proccesed right away. But the 5 second timer that you start after your first push is activated to reset CSQUE[0] and allow you to move your queue forward, makes it so that it is always the "last scanned of the 3 rungs (4, 5 & 6) that will be the next value which is processed.

I hope it makes sense, what i am saying.

I suggest that you use a FIFO with a length of 3, instead of your current queue, to make sure that the conveyors are stopped in the same order as the buttons are pushed.
  Reply With Quote
Old May 16th, 2019, 05:22 AM   #3
United States

cwal61 is offline
Join Date: Jan 2011
Location: NC
Posts: 1,072
Check out post #8

It is also about queuing sequence.
  Reply With Quote
Old May 16th, 2019, 09:27 PM   #4
United States

HunterM93 is offline
Join Date: May 2019
Location: Arkansas
Posts: 3
Originally Posted by cwal61 View Post
Check out post #8

It is also about queuing sequence.
Thank you cwal61 for the link. That is super simple and works perfectly. I don't know how I didn't think of this. I tend to over think some of the stuff in this field when coming up with new things. I try to keep most things I do simple so that my technicians are able to follow everything somewhat easily.
  Reply With Quote
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Problems opening a file in studio5000 bendanator LIVE PLC Questions And Answers 4 December 11th, 2018 10:14 PM
Tag Search in Studio5000, in AOI's ceilingwalker LIVE PLC Questions And Answers 11 August 7th, 2017 06:22 PM
Logix Designer v28 will not open programs under v28 Rob S. LIVE PLC Questions And Answers 2 January 24th, 2017 07:46 PM
Studio5000 do not close Properly whussain6 LIVE PLC Questions And Answers 4 April 20th, 2016 09:09 AM
Studio5000 Reuires Logon to FactoryTalk whussain6 LIVE PLC Questions And Answers 2 February 8th, 2016 11:15 AM

All times are GMT -5. The time now is 02:37 PM.