can someone share a model that stops an item at a decision point and then resumes it upon receiving a message....i've been killing myself over this using process flow but I don't think it's necessary.
can someone share a model that stops an item at a decision point and then resumes it upon receiving a message....i've been killing myself over this using process flow but I don't think it's necessary.
@dev, @Matthew Gillespie, @anthony.johnson, there is missing the right template to resume a stopped item in the decision point properties. It still stops the involved object and is referenced to a non existing label. I have copied the resume code to the OnMessage Trigger, which worked in previous versions fine. But now it doesn't.
please, can check this? many thanks.
regards Jörg
Hi @Enrique Elizaga,
Here is a sample model. The model has two photo eyes and one decision point in the conveyor. When the box blocks the first sensor the decision point stops the box. And when the box clears the second sensor a message is sent to the decision point to release the boxes. This cycle is repeated.
Regards,dpcontrol-akr.fsm
Arun KR
@Arun KR thank you for the sample model and logic, it worked marvelously and I am currently using it in multiple points accross the model. I am getting the following error message in some decision points, and I can't seem to find the problem:
FlexScript exception: Invalid down cast. Object is not an instance of the target type. at MODEL:/DP23>variables/localType/onMessage
Also:
Property "up" accessed on invalid node. at MODEL:/DP95>variables/localType/onMessage
The code used in onMessage:
Conveyor.DecisionPoint current = param(9); Object conveyor = param(10);
treenode item = current.REF;
item.up.as(Conveyor).itemData[item].resume();
Hi @Enrique Elizaga ,
I was also getting the same error message, so I managed by adding some "objectexists" conditions. If the conveyor is curved use CurvedConveyor if condition instead of StraightConveyor, as given below in the code.
Object involved = current.REF; if(involved) { if(classobject(involved.up)==library().find("?StraightConveyor")) { involved.up.as(Conveyor).itemData[involved].resume(); } }
6 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved