question

Truc C avatar image
0 Likes"
Truc C asked Jeanette F commented

Change Type label and get some object go back

Hi all,

I have a case that really need your help.

I have a model with 7 object Type, they will go from birth to AVI, then all Type (except type 4) will go back to Dek1 and repeat the process from DEK1 to AVI, then all Type will go to In_depanel. (means object Type 4 does the process 1 time, and Type 1,2,3, 5,6,7 do the process twice.)

In addition, I want to do the process for each Type completely (each Type will go, then come back and totally done) before the next Type.

I tried to change label type by Set label at trigger at OutSMT_Bay1 and Queue1, and set code snipped to avoid mixing among Types, but it still has bug.

Hope someone can help me solve this case.

Thank you so much. If I need provide more, please let me know.


1681291134784.png 1681291249472.png setcomeback.fsm

FlexSim 20.1.3
queuelabelcome back
1681291134784.png (167.7 KiB)
1681291249472.png (24.5 KiB)
setcomeback.fsm (74.0 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Truc C, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. 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 ·

1 Answer

Kavika F avatar image
0 Likes"
Kavika F answered Kavika F commented

Hey @Truc C, I made an example model previously that exhibits similar behavior to what you're asking. I was using the model to showcase the Decide Activity in Process Flow. It has some logic for processing items multiple times; maybe you could adapt it to your use case.

Decide By Condition and Case.fsm


When an item is created, I set two labels on it: the "Type" and "Processed" to let me know how many times it has been processed.

1681329610939.png

I perform different processes on the item depending if it is a specific type (in this case, Type 2 got processed once while Type 1 and 3 got processed twice).

1681329679504.png

After it has processed, I increment the "Processed" label to know it has gone through once. Then I determine if it needs to be processed again, then I send it back to the first queue (before processing).

1681329772572.png

Here's what it looks like in action (notice how red and blue items get sent back to the first queue to be "reprocessed"):

reprocess-items.gif


Side Note: I noticed that you're getting an error when calling getnextpullitem(). That's because in the version you're using, when you use a "Pull Item with Maximum Custom Value" with a Conveyor as input, you get an error thrown. I suggest you either upgrade your license to 23.0 or higher or you can simply add an intermediate queue to catch items from the conveyor and send them to the DEK1 (like you do for the SMT1).


· 2
5 |100000

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

Truc C avatar image Truc C commented ·
Hi Kavika,

Really appreciated for your help. That's so awesome.

If I want to merge long and short process to just only 1 processor (means everything object Type processes on just 1 machine flow), is there anything else I can set up? Can you help me more in this case?

0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Truc C commented ·

If you only have one processor, then you can simply remove the middle section of the Process Flow that splits the stream of flowitems. You just have to send them all to one processor, but keep the labels incrementing.

1681400009664.png

0 Likes 0 ·
1681400009664.png (48.9 KiB)