Time Exception Error

Time Exception Error

jyhjeng_d2
Not applicable
52 Views
2 Replies
Message 1 of 3

Time Exception Error

jyhjeng_d2
Not applicable

[ FlexSim 22.0.1 ]

Hi, there. Recently I watched a video of the FlexSim 2020 Tutorial Part 2,

https://www.youtube.com/watch?v=Q0VfuD_H_uM&t=1808s

At the time frame 1:31:20~1:34:01, there is an example of using a token in the process flow to control the flow item in the 3D model. I follow the steps in the video exactly. However, the time exception occurred as follows.


time: 13.364542 exception: Exception Caught in FixedResource::getItemInfo(treenode flowitem)

time: 13.364542 exception: Exception Caught in FixedResource::setItemState(treenode flowitem, int state)

time: 13.364542 exception: Exception Caught in FixedResource::releaseItem(treenode item) object: /Processor1

time: 13.364542 exception: Exception Caught in Processor::onTimerEvent(treenode involved, int code, char *datastr) object: /Processor1

time: 13.364542 exception: Exception Caught in ObjectFunction250__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Processor1 class: /Processor1


Can anyone help me solve the time exception problem?

The FlexSim file can be downloaded here.

https://drive.google.com/file/d/1kEgeoc4tVUCqZnC3xyYkvOyl3VeOVMjj/view?usp=sharing

Thanks.


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

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

When an item starts processing, a "process finish" event is scheduled to fire after the process time that is set in the processor has elapsed. This time is independent from the delay time used in the process flow. In the case where the delay time in the process flow is shorter than the processor's cycle time, the item will get destroyed before that "process finish" event fires. When it does fire some time later, the item reference it uses is no longer valid and the error message is thrown.

This actually seems to be an oversight in the video where the problem just didn't occur because the processor was always done before the token.

This is why "Wait for Event" and similar activities should be used to synchronize the 3d model and a process flow, which the video goes on to showcase directly afterwards.

0 Likes
Message 3 of 3

jyhjeng_d2
Not applicable

Thank you for explanation. It makes sense.

0 Likes