News:

  • September 22, 2026, 05:10:01 AM

Login with username, password and session length

Author Topic: Program Help  (Read 39681 times)

plcnut

  • Hero Member
  • *****
  • Posts: 815
    • premiersi.com
Re: Program Help
« Reply #15 on: July 01, 2013, 05:14:23 PM »
You need to have a supervisory program (preferably in stage), and from S0, you can monitor C10 to JMP to S10(RST C10 on this same rung). In S10 you can RUN your program that controls destination 1, then monitor the .done for that program to JMP back to S0.
Do the same for the other 3 destinations from S0, and also place a S0 contact on each of the rungs that has a JMP so that only one destination can be triggered at a time.
In won't matter which order the destinations come in, it will always do the right thing.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
https://premiersi.com

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Program Help
« Reply #16 on: July 03, 2013, 10:29:36 AM »
After the command is executed (move to bin location), the bin execute bit is reset and the program returns to the initial stage.
« Last Edit: July 03, 2013, 11:34:10 AM by CReese »

Dock

  • Jr. Member
  • **
  • Posts: 11
Re: Program Help
« Reply #17 on: July 07, 2013, 04:53:08 PM »
Well its good and not so good so far. :-\

I wrote the supervisory program and I can get the memory block to shift the bin locations throughout the stages as PLC Nut described, but I'm still having trouble getting the program to output TWO or more of the same  bin destinations in a row.

Example: If I input bin1,bin3,bin2, it works fine as long as there are none that repeat in the same order.  I have problems when I try and do bin2, bin1, bin1,.  When two are the same back to back it seems to not execute the second destination.

I assume this is a function of the C10 bit resetting at the same time it jumps to the S10 stage.  I have yet to figure out a way to execute or move the same destination back to back, before the S10 is complete or the program is .DONE

I attached the MOVER inst. if someone would take a look and see if this is correct.
« Last Edit: July 07, 2013, 06:39:04 PM by Dock »

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3626
  • Darth Ladder
Re: Program Help
« Reply #18 on: July 08, 2013, 01:18:23 AM »
Don't worry about doing it in stage.  Just maintain a shift register (your BIN0-BIN3 list of destinations).  Push the new value into the queue on whatever one-shot condition indicates the addition of a new bin.  Operator presses C-More button or whatever.

How does the system work physically?  Is it the addition of a new bin that sends #3 down the conveyor?  Request for the next bin from the downstream side?  In any case, model that condition with some kind of one-shot logic for releasing the next bin.

Then you have to take care of things like making sure you don't allow the operator to claim he's added another when the queue is full, verify with photos that the correct number of bins are present (if available), deal with edge cases like filling partial queue, and so on.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

plcnut

  • Hero Member
  • *****
  • Posts: 815
    • premiersi.com
Re: Program Help
« Reply #19 on: July 08, 2013, 07:38:53 AM »
The delta contact is what is holding you up.
MOVE 0 into BIN3 at the same time that you RST the C10(through C13) Bit(s).
This way each time the system completes a bin transfer and comes back to check the queue, IF there is a bin there, your system will always see a change in BIN3.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
https://premiersi.com

Dock

  • Jr. Member
  • **
  • Posts: 11
Re: Program Help
« Reply #20 on: July 10, 2013, 03:46:30 PM »
Well I think I'm getting there.  My main problem was the MOVER, I should have spent more time trying to understand this instruction in the beginning and I would have been much better off.  I figured out a way to MOVER the bin positions one at a time based on the introduction on new bins, I triggered the MOVER by the positions of the bins on the loading conveyor.  This seemed to work well for the instance in where you had two or more of the same destinations in a row.

I love the sub programs and stage this is making my life MUCH easier, I couldn't imagine trying to do this in one MAIN program.

So now I have more questions. ;D  Can someone explain how much the programs effect scan time?  How many before the main will lag? Too many variables to give an answer?  I need to read into the Yielding more to make sure I understand that aspect of the programs...

Were on the runway getting ready to throttle up but we're not flying yet!  Will update.

Thanks everyone for your help so far!

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: Program Help
« Reply #21 on: July 10, 2013, 04:48:59 PM »
What do you require allow for a maximum scan time?  If it's not an issue, I would never write logic for "minimizing scan time", but for "maximizing understandability".  If it IS an issue, THEN worry about the SPECIFIC bottle necks, but only the bottle necks (and document them well).

Dock

  • Jr. Member
  • **
  • Posts: 11
Re: Program Help
« Reply #22 on: August 30, 2013, 04:32:01 PM »
Well the system is running for the time being.  Projects are stacked up for the moment, when I get a little free time here soon I will update you all on my thoughts since this was my first project with DoMOre.  :)

Thanks again for all who helped and provided input.