question

Axel Z2 avatar image
0 Likes"
Axel Z2 asked Axel Z2 commented

Conditional Port at a Separator

Hello, at the separator1 i want to separate the engine form the Adapter. The engine should Always go to queue1 and the Adapter should go to combiner2 if ist empty. when the combiner2 is full and the queue1 is empty the engine should go to queue1 and the Adapter should go to the conveyor2 instead.

can you help me with the Code for the conditional ports ?

i dont know how to start...

thank you !

the model is attached

neu7.fsm

FlexSim 19.1.1
conditional port
neu7.fsm (45.4 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
0 Likes"
tannerp answered Joerg Vogel edited

Hi @Axel Z2,

Here is an example of how you could do this with hard coding in the Separator. Essentially, it's just adding one block of code that checks to see if the Combiner is empty and, if not, changes the port to 3 (the value of the Conveyor2 port).

Alternatively, you could do a similar thing with Process Flow that would Acquire the robot, Decide whether or not the item is the engine or adapter, Load the item, and Unload it based on the proper function.

I've attached an updated version of your model with the hard code in the Separator.

Let me know if you have any questions.

separator-to-combiner-logic.fsm


· 3
5 |100000

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

Axel Z2 avatar image Axel Z2 commented ·

Hey @Tanner Poulton,

first of all thank you for your answer :) with your solution if works perfekt. But i have a few more questiions indeed…

1.) The robot should only carry the enginges and not the adapter. But he also carrys the adapter from the Seperator1 to the combiner2 and to the conveyor2. How can i make the adapters go to cobiner2 and conveyor2 without the robot as a transport system ?

2.) When the processor2 is finished with processing the engine should wait in the processor2 until a engine is in queue3. When this case is true the engine from processor2 can go to queue4. I thought it can be done simiular to your answer. if(current.inObjects[1].as(Object).subnodes.length < 1) { waituntil .........................; but to be honest i dont know the syntax...maybe you can help me there.

. 3.) Where can i edit the amount of content of an conveyor ? I this case i want that only 1 item can be on the conveyor1 in total.

I hope i dont bother you with this many questions. I would be really happy if you can help me :)

Best wishes Axel

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Axel Z2 commented ·

Hi @Axel Z2, can you ask new questions instead of creating a thread of several questions in comments. Please read the best practices of this answers site, especially the section “Additional pointers for using answers.flexsim.com“ Thanks! Jörg.

0 Likes 0 ·
Axel Z2 avatar image Axel Z2 Joerg Vogel commented ·

Hey @Jörg Vogel,

you are Right. Im Opening a new thread for my new Questions.

Best wishes,

Axel


0 Likes 0 ·

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.