question

Anutt K avatar image
0 Likes"
Anutt K asked Anutt K commented

Model working delay when use Custom Code for Resume Object.

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

FlexSim 24.0.2
global tabledecidestop and resumestopobjectresumeobject
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Anutt K commented

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


1710155936800.png (34.6 KiB)
1710155967624.png (28.6 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.

Anutt K avatar image Anutt K commented ·
It work well. Thank You so much.
0 Likes 0 ·