question

Simon S5 avatar image
0 Likes"
Simon S5 asked Simon S5 commented

Decide by label

Hello,

I have trouble on the last decide step in process flow and would appreciate your help.
After a grey box has stopped and the delay has finished I want to stop a brown box (Label "Type" 0).
For some reason it does not work and a error message appears.

Besides that, could you tell me how to simplify the process flow without "decide"?
How can I add a if-condition to stop a box with a certain label? Mabye with custom code?

Thank you!

decide.fsm





FlexSim 21.0.10
conditional decideif
decide.fsm (58.5 KiB)
· 1
5 |100000

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

Andrew O avatar image Andrew O commented ·

Hi @Simon S5, was one of Jonah K's or Kavika F's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Simon S5 commented

What you're describing doesn't need a process flow - you can set that behaviour on the station process condition:

1670693710889.png

decide_jl.fsm

If you intend to only process unprocessed boxes then you can record that on the box during the process finish trigger and include that test in the process condition.

You can do the same seem in a very simple object process flow with both stations as members:

1670694711603.png

decide_jl2.fsm


1670693710889.png (4.4 KiB)
· 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.

Simon S5 avatar image Simon S5 commented ·

Thank you @Jason Lightfoot ! In comparison to your example I want that the material flow keeps running. It is a loading and unloading process of carriers. In the file attached decide_2 I achieved my latest target for one station.

brown: empty carrier
grey: carrier with unprocessed workpiece
blue: carrier with processed workpiece

My next target is to utilize several similar stations like in the file decide_2. My only idea how to do this is copying the existing process flow and connect it with station 2,3,4,... Do you have another idea how to multiply or how to optimize the process flow?

decide_2.fsm


0 Likes 0 ·
decide-2.fsm (55.6 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Simon S5 commented ·

Don't do that.

We should try to define the generic process for all homogenous stations and model it once - then have all stations use that single process.

You now only have one station in your model. How are your stations connected? Does an item visit each station in series and each performs an operation? How many steps to the process are there and how does each station decide if it is doing something to the arriving items?
From your description so far we cannot glean the actual process definition, so it would be good to know what's being done here (industry and product may help).

Also note that you have a test of the workstation is free on arrival. If the station is not free, you should not be able to reach it, so would not be able to generate an arrival event.

Lastly - instead of representing the carrier condition by color, it would be nicer to have the carrier show what it contains (if anything) and have the process step/state of the part shown as the color. The carrier is passive in my mind.

0 Likes 0 ·
Simon S5 avatar image Simon S5 Jason Lightfoot ♦♦ commented ·

I would prefer to model it only once. For the source I tried to choose as object "group: stations", but that didn't worked...

The stations are in a row like in the picture. Later it will be like a baggage carousel. Gray coloured items should stop only at one station when it's free and not at each station in series. In short, every station does the same:

1. when station free, stop grey item for some seconds (unload carrier)
2. station blocked for a amount of time, conveyor keeps running (processing outside conveyor)
3. after blocking time stop brown item for a some seconds, make it blue and resume (load carrier)

The blue item should not stop at a following station. It's finished.
The only difference between the stations would be the processing time.

The product is a wheel which moves on the carrier in a circular conveyor. It is removed by hand to do an assembly step outside the conveyor. When assembly is finished it comes back on a random empty carrier. Later the finished wheel will leave the circular conveyor.

I agree that it would be nicer to see the wheel lying on the carrier.
But as a flexsim beginner I haven't yet achieved the ability to do that.
For testing different process times or amount of stations the workaround with coloured items would be sufficient for me.


1671289825705.png


0 Likes 0 ·
1671289825705.png (48.9 KiB)
Show more comments
Jonah K avatar image
1 Like"
Jonah K answered Jason Lightfoot converted comment to answer



You can simplify the process by using a variable. If you want to alternate which box you stop on the conveyor, you can use the process flow in the attached model, shown here: 1670372294449.png


This still uses a decide activity, but in a much more effective way. If token.type==token.variable (i.e. the last token type that was stopped), then it will throw away the token, and the items will keep flowing. Once you get a token.type that doesn't equal the previous token.variable, it will Stop the item, Delay, Resume, then set the variable to equal the current token.type.

1670372613665.png


AlternatingStopping.fsm




· 1
5 |100000

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

Simon S5 avatar image Simon S5 commented ·

Thank you @Jonah K and @Kavika F. Both examples gave me new abilities.

My intention is to stop a grey box (label type 1) at first. Then the station is occupied for a amount of time. That's why I defined the label "state" on the station and gave it a delay. When occupation has finished a brown box (label type 0) has to be stopped. After that the process starts again.

Station 2 should do the same. Later I will just choose different delay times in comparison to Station 1.

0 Likes 0 ·
Kavika F avatar image
1 Like"
Kavika F answered

Hey @Simon S5, from what I understand, you want gray boxes to stop at the first Station and brown boxes to stop at the second Station? If so, then here's an example of what you could do.

1670367186541.png

I have an Event Triggered Source that makes a token when a box appears at Station1. I decide whether or not it's a Gray box. If so, then I run a subflow (if you're familiar with programming, it's like a function or method) that stops the box, delays a certain amount of time, and then resumes the box. I then check to see when the box reaches the second station. If that box is brown, then perform the stop, otherwise we're done!

Hope this helps.

decide_1.fsm


1670367186541.png (40.5 KiB)
decide-1.fsm (54.8 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.