During the simulation get an error "plant simulation the maximum number of call-chains was exceeded" the method "pull" of some of pickandplace.
Already changed the value of "maximum number of call chains". This value is already at maximum (5000000) and keeps giving error. This error only happens when I enable (true) attribute "? .FailureActive" Some SingleProc. Their failures are set to "Availability" (true).
Solved! Go to Solution.
just select the tab "Call Chains" in the debugger:
Because you are calling SetDestination in your robot the pull control is called. And in the pull control you call SetDestination. This continous until the limit is reached.
You are not supposed to call SetDestination in a pull control.
The purpose of a pull control is to choose which part of the block list should enter.
when I reset the model and run it on my machine I don't get an error message?
Do you do anything special?
Hi Ralf. Thanks for the quick answer!
If I understood the command setDestination should be used only in targetControl?
What is the best command to use in PullControl?
I guess your logic is not right:
elseif NOT ?.pred(4).reswaiting AND NOT ?.pred(4).Resworking AND ?.succ(3).Empty then --Vai para a brunidora 2 ?.SetDestination (?.pred(4));
The intention in this code is probably to detect with 'reswaiting' and 'resworking' if a part is available at pred(4). In this specific case where you get the error the pred(4) is failed.
According to your logic you think there is a part available and you set the destination of the robot to pred(4). Now the robot detects that it is already there, but there is no part. Therefore the pull control is called to pull a part. And this starts the endless recursion.
To check if there is a part available you can use the following code:
if SingleProc.Cont /= void and SingleProc.Cont.Finished then -- Part is ready end;