question

Muneer I avatar image
0 Likes"
Muneer I asked Jeff Nordgren commented

decision point : Item with multi labels to achieve one decision,

3.fsmAt the decision point DP1 the item has to achieve the following conditions in regards to the item will level the conveyor loop.

  • Item with Labels
    • Item.Type == 1 and Item.Loop == 3 // Then the item leave DP1 to sink and the rest of the item stay in the loop
    • Item Type == 2 and Item.Loop == 6 // Then the item leave DP1 to sink and the rest of the item stay in the loop
FlexSim 20.2.1
decision pointsflexsim 20.2.1
3.png (574.1 KiB)
3.fsm (87.2 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.

Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered Jeff Nordgren commented

@muneer.i,

Attached is your model with the changes that I've made. I changed the Decision Point Type code on DP1. That was pretty much it. I believe it is working as you describe now.

Take a look at the model and see if something like this would work for your particular situation. If you have any questions or problems, please let us know.

Thanks.

3-JN1.fsm


3-jn1.fsm (85.5 KiB)
· 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.

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

If I understand what you're trying to do you just need to change the code in the On Arrival trigger of DP1 to be like this:

  1. if (item.Type == 1 && item.Loop == 3 || item.Type == 2 && item.Loop == 6) {
  2.     Conveyor.sendItem(item, current.outObjects[2]); // Exit Loop
  3. } else {
  4.     Conveyor.sendItem(item, current.outObjects[1]); // Stay In Loop
  5. }

3_1.fsm


3-1.fsm (101.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.