question

Andre T6 avatar image
0 Likes"
Andre T6 asked Felix Möhlmann answered

No error in my custom code, but some part of it likely didn't work

Hi everyone,

I would like to ask something. I want to move an object with process flow and custom code, there is no error in the code, but the code seems like didn't work properly. Can anyone help me with this problem?

So i want to make the box inside the queue6 never empty, but the custom code in process flow likely didn't work. The priority is to make the box inside queue6 never empty.
FIFO Model1.fsm

FlexSim 21.2.2
process flowcustom codecrane
fifo-model1.fsm (55.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.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered

If both conditions based on current content are true, the destination from the first condition (Queue6) will be overwritten with the destination of the second (Queue4).

Either use an "else if" for the second condition, so the condition is only checked if the first one wasn't true or terminate the code directly after assigning a destination by returning any value.

Both possibilities are shown in the screenshot below.

1633098427250.png


1633098427250.png (7.7 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.