question

Jon Perez avatar image
0 Likes"
Jon Perez asked Jason Lightfoot commented

send the created reference to different ports

Hello, I have made a program where depending on the label that the combiner receives, the combiner joins a different reference that is sent to a queue depending on that reference. The problem is that I do not know how to send each reference to its corresponding queue. For example, when the reference number 1 is created, I want to send it to the port 1 and, when the reference number 2 is created, I want to send it to the port 2. Could someone help me? I will attach the program I have created.

Thank you so much.

Join different references.fsm

FlexSim 23.2.1
sendtoport
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

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

The problem appears to be that you're setting the item.ref on the exit from the combiner which is already too late. You need to set it before the processfinish of the combiner which is when it evaluates the sendtoport function.

· 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.

Jon Perez avatar image Jon Perez commented ·

Thank you so much Jason. I have fixed it by putting another queue between the combiner and the final queues and now the references are sent properly by expression. But, do you know how I could do it without putting that additional queue? I was setting the item.ref on the entry of the combiner previously.

Join different references.fsm

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Jon Perez commented ·
Well you should be able to set it on the combiner entry trigger which is normally where you'd set the componentlist.
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.