question

Varun Rawal avatar image
0 Likes"
Varun Rawal asked Joshua S commented

Use a combiner or processor to send parts according to quantity put a delay

conceptpn-rev-1.fsm

I am trying to use two ports 1 and 2 to connect to a single port downstream.

Right now I have a photo eye which when block would send parts to an accumulation bed(eventually Port 2). Soon the above happens I want my Gate2(we can use combiner or a processor) to send 20 parts via Port 1 then wait for 2 seconds to switch to Port 2 and send 20 parts via Port 2, looping this until all the content on Port 2 (i.e accumulation bed) is clear, soon the content is clear it should be a normal operation i.e my Gate 1 should send parts via port 1. And when I back up again until photo eye PE 1, the above process should kick in.

As you see I am trying to use process flow. I want to understand a best way to approach this. Let me know if any further explanation. Thank you.

FlexSim 18.1.1
send to portinput portsend to port by percentageprocessor different times according to rework and normal
· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Varun Rawal avatar image Varun Rawal commented ·

@Joshua S I am not able to see your comment. But I think you asked whether my conveyer backs up. Yet it would I just have not used other process in the downstream yet and not have updated MTBR MTBfs. I would just back it up by manipulating the process time for the trimmer to 10 secs to see if the logic works.

0 Likes 0 ·
Joshua S avatar image Joshua S Varun Rawal commented ·

I deleted my comment because I didn't run your model long enough to see it backup, but I saw that it eventually does. I'll take a look at it later and see if I can make a suggestion.

0 Likes 0 ·
Joshua S avatar image Joshua S Joshua S commented ·
@Varun Rawal

See if these changes are what you wanted. All changes I made were in process flow with some labels added to Gate2

13234-conceptpn-rev-1.fsm

0 Likes 0 ·
Show more comments
Varun Rawal avatar image Varun Rawal commented ·

@Joshua S This gets the logic based on the accum bed. I am still trying to learn flexsim so want to confirm few things.

I understand we used - model().find("Conveyor128").subnodes.length>0 in order to understand whether conveyor 128 is empty or we still need to empty it out.

However what happens is when it is empty : the tokens still remain in the last Pull from list.

I am trying to put a photo eye as shown which when cleared, the tokens should go into normal operation. I thought to put wait for an event and use PE4 on block to trigger the switch of two ports and when it is cleared it would just be one port (Port 1) somethings not working though.

I want to learn how to do this, this would help me using photo eye in the same situations on different parallel projects. capture.jpg

0 Likes 0 ·
capture.jpg (148.5 KiB)

1 Answer

·
Joshua S avatar image
0 Likes"
Joshua S answered Joshua S commented

@Varun Rawal

The way the process works now is Gate2 is not deciding which port it will pull items from now. Items reach the 2 decision points, are stopped, and are pushed to a list. In process flow, these items are pulled off that list and then are moved to Gate 2. I have a loop happening where it tries to listen if there is anything to pull from Port 2, and if not, pull items from Port 1. There will always be a token seeming to sit at the second pull from list because there is nothing to pull from Port 2 then, and if there is nothing to pull from Port 2, then anything to pull will be from Port 1. f there is something to pull from Port 2, then the token follows a whole different path that does the switching from Port 1 to Port 2 every 2 seconds till there is nothing left in Port 2 and the accumulation bed.

So would you like the process to change so that much of the logic is triggered based on the photo eye?

· 11
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Varun Rawal avatar image Varun Rawal commented ·

Thanks for the explanation. I understand it more clearly now.

Now what happens is if there are no bottles in Port 2 (model time after 5600 seconds) (i.e nothing to pull from port 2) it would wait for the items to be sent in Port 2 until the Gate kicks back in. And the items in Port 1 will start accumulating.

What I want is if there are say even 10-15 left over bottles in Port 2, I do not want the gate 2 to switch and send those last 10-15 bottles (because if it switches it would send out specified number that is 20 and will have to wait for another 5 more bottles to come in to port 2). So what I thought is I would put a photo eye in Port 2 which would tell if I am clear I want my Port 1 running as normal i.e gate would not switch and when the PE is blocked meaning conceptpn-005.fsm more than 10-15 bottles; only then the Gate 2 would work as 1:2.

Let me know if you can find a way. I am trying to determine where I can put this in the process flow so that It would work. Thank you for your immense help.

0 Likes 0 ·
conceptpn-005.fsm (2.9 MiB)
Joshua S avatar image Joshua S Varun Rawal commented ·

The model you uploaded has the bottles as invisible. So you would like Port 2 to batch 20 items, then send those, and if there are less than 20, do not switch the gate to port 2, and the photo eye used to detect 20+ bottles on port 2 so that the gate will switch to port 2?

0 Likes 0 ·
Varun Rawal avatar image Varun Rawal Varun Rawal commented ·

Thats correct.

Let me explain why I am planning to do this. Please find the attached image

1. First scenario: the process is running without any failures in downstream processes which means that the parts(bottles) would be produced and conveyed through the route 1 i.e Port 1 and keep going downstream

2. Now, when any downstream applications fail, the bottles would start accumulating upstream and when they accumulate and block PE1 as you can see in the model, the Gate1 would divert the bottles to take route 2 i.e port 2 (this port is the accumulation bed and which is intended to use a temporary storage buffer only).

3. After the above situation. I would have bottles on two ports 1 and 2. I need to keep my first port running and also keep pulling some bottles out of port 2 to empty it out until a specific threshold. Soon that is met, I would start using the normal operation (meaning situation number 1).

In order to decide when to stop using the Port 2 I am trying to use a photo eye as shown in the image attached. If you can see the bottles have cleared the photo eye in Port 2 . Now I just want to go via normal operation (no gate switch, keep running through port 1) . And, when any failures happen in downstream its going to accumulate again and block PE1 which would ask Gate 1 to send bottles to port 2. Soon the bottles in Port 2 block PE4 the gate 2 should start switching which would get us back to situation number 2.capture.jpg

0 Likes 0 ·
capture.jpg (183.3 KiB)
Joshua S avatar image Joshua S Varun Rawal commented ·

That makes sense, can you upload your model again that you sent last time, the bottles are invisible, or upload the 3D model you are using for your bottle.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.