Model working delay when use Custom Code for Resume Object.

Model working delay when use Custom Code for Resume Object.

anutt_k
Not applicable
93 Views
2 Replies
Message 1 of 3

Model working delay when use Custom Code for Resume Object.

anutt_k
Not applicable

[ FlexSim 24.0.2 ]

Hello. This case I need to use Custom Code for Resume and Stop Object in Process Flow.

1709956501314.png1709956460202.png

I use Decide for decision the model to Resume or Stop Conveyor. It will decison by data in Global Table (1 = Resume, 0 = Stop).

When data change from 1 to 0 the conveyor has Stop as not delay. But when data change from 0 to 1 the conveyor has Resume as delay 4-8 seconds.

What wrong with this case. I has attached model here. Thank You.

ABB-CRB15000_And_MiniConveyor_USEFOLINE.fsm

0 Likes
Accepted solutions (1)
94 Views
2 Replies
Replies (2)
Message 2 of 3

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

FlexSim is a discrete event simulation software. Logic structures that needlessly check values for a change in a small interval should be avoided at all costs. They will slow down the simulation.

You have several options to react to the change of the cell value directly. If the change of the value originates from the within the model, you can resume/stop the motor in the same code that changes the value.

If you are not comfortable with writing the required code, you can send a message to some object and have an Event-Triggered Source in the Process Flow react to that message and then run the logic.

If you intend to use FlexSim's emulation connection, a variable change will be its own event.

Lastly, you could change the table cells into Tracked Variables which allows you to directly listen for any change. (Use the sampling tool next to the "Object" field of the Event-Triggered Source on the cell.)

1710155936800.png

1710155967624.png

0 Likes
Message 3 of 3

anutt_k
Not applicable
It work well. Thank You so much.
0 Likes