question

ernesto daniel AG avatar image
0 Likes"
ernesto daniel AG asked ernesto daniel AG commented

Help with custom code in PF

grua-puente-2.fsm

Hello everyone, I would like you to help me with the "custom codes" of process flow, in the flowchart of "grua puente 2", I have two delays

How can I change the status of the two operator from "idle" to "utilize" during the delays?

FlexSim 18.2.0
custom code
grua-puente-2.fsm (233.1 KiB)
· 3
5 |100000

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

tannerp avatar image tannerp commented ·

Are you changing this parameter for statistical purposes or do you actually need the operators functioning somehow?

0 Likes 0 ·
ernesto daniel AG avatar image ernesto daniel AG tannerp commented ·

Hello @Tanner , the behavior is fine, I want the statistics

thanks

0 Likes 0 ·
tannerp avatar image tannerp ernesto daniel AG commented ·

What you have in your model is the right idea. You can set the operator's state to UTILIZE and then back to IDLE or another state after the delay and I'm pretty sure that would allow your stats collector to grab accurate data.

If you need both operators, you can add another function with the green plus button like this:

Hopefully this is helpful. It seems that you've already got it 90% figured out.

0 Likes 0 ·

1 Answer

Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered ernesto daniel AG commented
@ernesto daniel AG

Attached is your model with the two minor changes that I made.

All I did was add two more delays (one before each Custom Code block) of 0.01. This allows any previous executing code to complete before the custom code changes the Operators state. Would this "fix" solve your problem?

Thanks.

grua-puente-2-jn1.fsm


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

ernesto daniel AG avatar image ernesto daniel AG commented ·

Thanks @Jeff, that was exactly what I needed

0 Likes 0 ·