question

Karina GM2 avatar image
0 Likes"
Karina GM2 asked tannerp commented

Conditions

I would like to simulate the following scenario:

When S2 is running and S3 is running as well, the blue buffer is bypassed and pieces go from conveyor to processor (S3).

When S2 is running and S3 is down, the robot would populate the blue tray.

When S2 is down and S3 is running, the robot would use the pieces of the tray so S3 is not starved.

I cannot make my robot use the blue tray though. Nor populate it when S3 is down. I used time tables in order to have them down at different times and see the logic work easily.

Thanks!

FlexSim 19.0.0
logicbuffer sizing
65-line-3.fsm (350.1 KiB)
5 |100000

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

1 Answer

tannerp avatar image
1 Like"
tannerp answered tannerp commented

Hi @Karina GM2,

I think this updated model should do the trick. I basically took all of the cases that you mentioned and applied them in a Process Flow. The idea is that the token will check each condition and depending on the condition, it will load/unload items from the designated locations.

Let me know if you have any questions or if this doesn't quite do what you were expecting. The logic should be pretty straightforward.

robot-logic.fsm


conditions.png (28.7 KiB)
robot-logic.fsm (67.9 KiB)
· 7
5 |100000

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

Karina GM2 avatar image Karina GM2 commented ·

Hello Tanner,

This is exactly what I was trying to simulate. I should look more into process flow now. Thanks again!

0 Likes 0 ·
Karina GM2 avatar image Karina GM2 commented ·

Hello Tanner

I input some real data as global tables for downtime. I notice that the S2 goes down and totally stops production... S3 behavior though, it stops and one piece stops being processed but the Robot keeps grabbing pieces and somehow the processor S3 keeps processing while being down?

Also, my max capacity in my blue tray is 720 and somehow the robot keeps feeding it even though my max is set to just 720... I tried moving around the inputs from the process flow but I have been non successful since PF is new to me.

Could you please let me know what I am doing wrong?

0 Likes 0 ·
tannerp avatar image tannerp Karina GM2 commented ·

Hi @Karina GM2,
I apologize for not explaining the logic I was using in greater detail. One of the key ingredients of the Process Flow logic I built was that there is a label on S2 and S3 called "Stopped" that the Process Flow checks to know if the processors are stopped or not.

I was manipulating this label through a function in the Time Tables you had before. Now we just need to add some logic into the MTBF/MTTR Down and Resume Functions. It's one line of code (per function) that looks like this:

downobject.Stopped = 1; //This sets the label "Stopped" to 1 when S2/S3 is down. (0 for resume)

Now when the Process Flow activity checks to see if S2 or S3 is stopped, it will know and the token will be sent to the proper load/unload sequence. Hopefully this fixes the issue. Let me know if you see other problems as I threw this together quickly, so there's a possibility of holes in the logic.

I didn't explicitly add anything to handle the Tray Max Capacity initially, but I've adjusted the Process Flow to be able to handle it now. Essentially, it's just one additional Decide Activity that checks if the Tray has >=720 pieces and, if so, doesn't load any more but instead recirculates the token.

Hopefully this helps! I'd encourage you to walk through some of the Process Flow tutorials as it's very beneficial to modeling complex systems. Feel free to comment back on this post, but remember to tag me @Tanner Poulton so I can see it quickly. Thanks! And good luck modeling!

buffer-real-data-updated.fsm

0 Likes 0 ·
Karina GM2 avatar image Karina GM2 commented ·

Hello again @tanner.p

After working on my model, I added some difficulty to it... There is a an extra buffer conveyor (short term) and a cart (long term). The logic is in the process flow and I made sure I stated on the "Unloads" where the robot would move the pieces to and how many. I set the capacity of my robot to 12 pcs depending on the condition. There is another condition I need to add: When the cart is full (Max capacity is 720 pcs) then an operator would come, remove the car and replace it with a new cart of the same capacity.

I am getting some errors I am not quite sure why. Could you please go over my model and correct me where I am wrong?

Thank you! 1-short-and-long-term-buffer.fsm

0 Likes 0 ·
tannerp avatar image tannerp Karina GM2 commented ·

Hi @Karina GM2,

Sorry it took me awhile to get back to you. There's just two quick things that I had to change to get the model running again:

1) The Decision Point was not connect to the conveyor. Make sure it's on the same Z height as the conveyor and then drag it over the top. If you see cross-hairs, then it's connected.

2) The token that's created at model start cycles through the Process Flow, but there's not a way for it to re-enter the loop. I created a loop by and now it works. Hopefully this helps!

0 Likes 0 ·
dp-connect.png (71.6 KiB)
loop-creation.png (71.4 KiB)
Karina GM2 avatar image Karina GM2 commented ·

Hello @tanner.p

How can I put the loop (A) as shown in the picture? I try to grab another element but my limited version won't let me put another one.

Thanks!

0 Likes 0 ·
tannerp avatar image tannerp Karina GM2 commented ·

Hi @Karina GM2,

The loop shown by the "A" figure is just a regular connection between activities, but I changed the Line Style to be "Split" rather than "Bezier".

0 Likes 0 ·
split-connector.gif (111.6 KiB)