question

Kshitij avatar image
0 Likes"
Kshitij asked Kshitij commented

Stop /Resume by Custom Code giving ASCII error

At a decision Point in the Conveyor, how do we resume the item once it's stopped? The Normal DP triggers are not working once the item is stopped. I tried to use process flows, but that is giving ASCII code error. If I try to use for/while loop for rechecking the conditions until fulfilled, the system goes not responding. I need some help to solve this

1. Normal Decision point stop/resume Triggers

1675401423200.png

2. The Process flow and custom code used

1675401515982.png

1675401594449.png

ASCII code error

1675401562747.png

1675403345516.png




FlexSim 22.2.2
conveyor decision pointascii errorcustom code errordecision point error
1675401423200.png (20.3 KiB)
1675401515982.png (12.1 KiB)
1675401562747.png (44.1 KiB)
1675401594449.png (20.8 KiB)
1675403345516.png (87.4 KiB)
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

·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Kshitij commented

1. The DP trigger will only fire once - eg. on arrival - it's not continually checked.

2. Have you tried placing a breakpoint to debug the custom code?

It looks like you've lifted some code for resuming an item and it relies on the label on the DP called otheritem. If you haven't set that then the resume code will not know which item to resume.

It would be better to use a process flow for the OnArrival and have that stop the item if needed and wait for the condition to resume - then the token will have a reference for the item to resume already.

If you have multiple entry/exit points for your loops you could event use the same process for all of them and have a zone to control the entry.

· 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.

Kshitij avatar image Kshitij commented ·
Hi Jason


Thanks for taking our attention to the Wait for Event activity. I used the process flow and send the token via conditional decide therefore using only the relevant tokens in the flow.

Also, Checked the box, "Fire if initial value meets the rule"

It has worked once, I will do more iterations with it.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.