question

Daniel C avatar image
0 Likes"
Daniel C asked Emily Hardy commented

Get Processor State

I´m doing a simulation and after a processor I have some queues with a special PULL code.

The thing is that due to this code it restricts the flow since i have some inputs closed.

The bottom line is I want to create a small code for ON PROCESS FINISH to read if the processor is blocked and if this is happening it should send a message to the queues in front to open their inputs.

Any idea?

processorstatesblocked
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

Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Emily Hardy commented

If you are using a more recent version of FlexSim, the dot syntax method of retrieving a state number is Object.stats.state().value. (Where Object would be the object you're looking at.)

So it would be something like this I believe:

if (Object.stats.state().value == STATE_BLOCKED) {
	//Execute your code.
}
· 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.

Emily Hardy avatar image Emily Hardy ♦ commented ·

@Daniel C, did this answer your question?

0 Likes 0 ·