AnswerHub Upload Issue
Our AnswerHub community currently has a bug that prevents you from attaching your model or other files to your questions. AnswerHub is aware of this issue and they are working on a fix. Until we receive their patch, you can upload your models and other files to FlexSim's file share site. Include the file name in your question so that we know which upload to reference.

question

John W14 avatar image
0 Likes"
John W14 asked Jason Lightfoot commented

On message not firing wait for event

Hello, I'm fairly new to flexsim and haven't received training so my model is crude but I can't seem to get the wait for event in my process flow to fire when a station sends a message. The model is an over/under conveyor system with 3 different products – C1, D2, C234. I’ve given the pallets labels for each of the products. I’m trying to get station “FV070_075” to send a message to a “wait on event” in the process flow (in the 20317/PAC area) so I can remove (2) boxes from the smaller conveyor to represent parts getting put on the pallet. I need this to happen only for the “C234” product (yellow pallet) and have tried to make it work by using the label “C234” with a value of “1”. The other products have different labels and values, "2" for the "C1" and "3" for the D2.I have other stations stopping specific products using the labels I’ve created but for some reason I can’t even get the “wait for event” to fire for all products at station FV070-075. I’ve tried every combination of message parameters to get it to work but it seems like the message isn’t even getting to the process flow. Is there any insight you could give me to get this to work? Any help would be much appreciated.


020316-0741-2.fsm

FlexSim 22.0.1
wait for eventon message
020316-0741-2.fsm (185.3 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

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

The onMessage fires for the receiver of the message but in your activity you're listening to the sender. If you change it so that the station sends a message to itself, the wait for event activity will detect it correctly.

· 7
5 |100000

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

I set the station to message itself but the wait for event still wont send the token on. Are there specific parameters I need to use? Right now I have everything set to 0

0 Likes 0 ·


It just needs current in both fields.

1644856682236.png

Attached is the model working (and fixed the reset exception).

020316-0741-2_jl.fsm

0 Likes 0 ·
1644856682236.png (12.0 KiB)
020316-0741-2-jl.fsm (186.2 KiB)

This is how I have it set up but it's still holding the token in the process flow

screenshot-2.png

1644857026233.png


0 Likes 0 ·
screenshot-2.png (18.0 KiB)
1644857026233.png (21.0 KiB)
That looks okay - I attached a model with those changes that worked for the first item - I didn't check subsequent items.
0 Likes 0 ·
John W14 avatar image John W14 Jason Lightfoot ♦ ·
You're model is exactly what I need. I saw you added some custom code to the station which seems to be the difference between your model working and mine not working. Unfortunately I don't know enough about writing code to make it work for myself. Thank you very much for your fix though.
0 Likes 0 ·
Show more comments
If it's not working, try adding an onMessage trigger to the station.
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.