[Solved] Error: While loop & Transport Out error: The product was destroyed

Dear All,

When using a while loop to transport in and out for a condition results in an Transport out error.

Removing the while loop solves the issue, but does not give me the behavior that i would like to simulate. I want to have the process running if a certain value is met and I am using signals for that.

Can I some how do this smarter?

While loop process:

Error1: Transport error out

Error 2: Mobile Robot

Seems like a classic mistake of reusing a product variable in a loop, which causes it to become a list on the second TransportIn usage.

Hi,

After you transport out any products that are stuck inside the while loop, some product variables may stay “stuck”. The solution is generally by using assign statement and you assign the ProductIn variable to null. See the image below:

br,
lefa

Thanks TSy and Lefa, this was indeed what was necessary