Model working delay when use Custom Code for Resume Object.

Model working delay when use Custom Code for Resume Object.

anutt_k
不适用
94 次查看
2 条回复
1 条消息(共 3 条)

Model working delay when use Custom Code for Resume Object.

anutt_k
不适用

[ 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 个赞
已接受的解答 (1)
95 次查看
2 条回复
回复 (2)
2 条消息(共 3 条)

moehlmann_fe
Enthusiast
Enthusiast
已接受的解答

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 个赞
3 条消息(共 3 条)

anutt_k
不适用
It work well. Thank You so much.
0 个赞