question

Jose_manuel A avatar image
0 Likes"
Jose_manuel A asked Ryan Clark commented

Tutorial 3.1 instead of a "wait" I use a "wait for event"

Hi,

What would be the setting for a "wait for event" if in the scenario of the example of the tutorial 3.1 instead of a "wait" I use a "wait for event" using the processor as the object? I tried but the Photoeye gets block and the token is waiting but nothing happens... Can you please advise? My plan is to put 3 processors in parallel, so if one is blocked, the box is sent to the next available (using the Photoeye as the desicion maker based on the processors status), could you help me? Many thanks

https://docs.flexsim.com/en/19.2/Tutorials/AdditionalTools/Tutorial3Emulation/3-1BuildBasicPLCLadderLogic/

FlexSim 21.1.0
conveyorswait for eventphoto eyemultiple processors
· 1
5 |100000

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

Connor A avatar image Connor A commented ·

Hi @Jose_manuel A, was Ryan Clark's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Ryan Clark avatar image
0 Likes"
Ryan Clark answered Ryan Clark commented

Hi @Jose_manuel A,

What I would recommend to you is to use Decide activities in addition to Wait for Event activities. You could use a Decide activity to send the box to the first processor that is not in use, and have a fourth option for the case where none of them are available. For that fourth case, you can send the token to a Wait for Event activity to listen to the group of processors for the "OnProcessFinish" event. Then, the token could be released to go to the processor that triggered the event.

I hope this is helpful! Let us know if you have more questions!

· 4
5 |100000

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

Jose_manuel A avatar image Jose_manuel A commented ·

Thanks for the recommendation. Have you got any example I can use as a guide? Many thanks

0 Likes 0 ·
Ryan Clark avatar image Ryan Clark Jose_manuel A commented ·

Hi @Jose_manuel A,

Here is a modification of the tutorial you mentioned that incorporates 3 processors, and has items wait at the Photo Eye until there is a processor available. I implemented the Wait for Event a little differently than I described in my earlier post. Instead of using Decide activities, I used a resource linked to the Processors and had it wait until it acquired one of the processors. Then I just listened to the processors to know when the resource was available again.

I hope this helps! Let me know if you have further questions!

Tutorial-3.1-modification-rc.fsm

0 Likes 0 ·
Jose_manuel A avatar image Jose_manuel A commented ·

Thanks once again Ryan. Not sure where the value "token.processor.ProcessorNum" comes from though (Assign labels).

I tried to replicate what you did on a new model and I get this error:

time: 4.081154 exception: FlexScript exception: Label property ProcessorNum retrieved on /Processor1. Label does not exist. at MODEL:/Tools/ProcessFlow/ProcessFlow/Assign Labels>labels/1/2


Any idea what it could be? Many Thanks

0 Likes 0 ·
Ryan Clark avatar image Ryan Clark Jose_manuel A commented ·
Hi @Jose_manuel A,

If you look again at my model, I have some labels saved on the processors, so they're always there. That's where the ProcessorNum label comes from. Those labels are just fixed on those objects, and they persist through resets, so you don't have to worry about resetting them every time.

I hope this helps answer your question! Let me know if you still have questions!

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.