question

Omar Aguilera Rico avatar image
0 Likes"
Omar Aguilera Rico asked Omar Aguilera Rico commented

Change status from PF!

I am trying to change the state of a processor when the operator downloads an object on it but the status shows me blocked. How can I make this change from PF? state.fsm

FlexSim 18.0.3
process flowstates
state.fsm (30.0 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.

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Omar Aguilera Rico commented

You're fighting with the Processor's internal management of its own states. If you open the event list and step through what happens when the operator drops off the box, you'll see that the token in Process Flow goes to the custom code that sets the state and then the Processor fires both its End Setup and Process Finish Events. One or both of these events is setting the state of the Processor after you've manually set it.

One way to fix this would be to wait until these events fire to set the state. In this model I added a Wait For Event activity that waits for the Processor's Process Finish event before setting the state.

state-mg.fsm


state-mg.fsm (32.3 KiB)
· 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.

Omar Aguilera Rico avatar image Omar Aguilera Rico commented ·

Boys, thanks for the support! Both are very good ideas.

0 Likes 0 ·
Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered Omar Aguilera Rico commented

@Omar Aguilera Rico,

That is a good explanation by @Matthew Gillespie on what PF is doing. His way is certainly one way to fix your problem. Another way, see attached, is I just put a .01 delay after the unload to the Processor so that all the internal code can complete before your Custom Code to change the state. One of these two way should be useful for your situation.

Thanks.

state-jn1.fsm


state-jn1.fsm (30.5 KiB)
· 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.

Omar Aguilera Rico avatar image Omar Aguilera Rico commented ·

Boys, thanks for the support! Both are very good ideas.

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.