I would like to control my line so that when the photo eye is blocked by a flowitem, it should stop the source output and just reopen it as soon as the flowitem leaves the photo eye. This way my model will not face overlapping of products anymore.
I would like to control my line so that when the photo eye is blocked by a flowitem, it should stop the source output and just reopen it as soon as the flowitem leaves the photo eye. This way my model will not face overlapping of products anymore.
You can do this by going into the Photo Eye properties and under the On Block trigger, you can add a Code Snippet and call the stopoutput() method. Just reference the Source object as the parameter. Then under the On Clear trigger just add a Code Snippet with the resumeoutput() method using the same object as the parameter.
The methods will look something like this:
stopoutput(node("Source1", model())); resumeoutput(node("Source1", model()));
Would you mind to send me a complete default code for doing this? I am still not used to FlexSim code language. I have just copied and pasted what you said but it doesn't seem to be working yet.
Where it says "Source1" you'll have to reference the name of your own source in your model.
And make sure the stopoutput code is in the On Blocked trigger, and the resumeoutput code is in the On Clear trigger.
3 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