How can I make a a send to port only if a tracked variable is lower than a certain value without blockign the entire system, so just wait it out untill the variable is lower than a value and continue.
Hi Community,
I have been trying to block a processor from sending a part to a buffer if the amount of parts in the system from a certain point (Which I did a tracked variable for, like workinprogress but from a certain point) is bigger than 5. In other words, I want the processor NOT to send to port if this tracked variable is bigger than 5, and wait untill the element goes out of the system, that I have a trigger that reduced the value of that variable by 1.
I have tried to create a trigger that copies the value of the tracked variable when finishing with the processor, but despite it stops the process it doesn't continue when the variable is low enougth again to continue the process. I understand I should code it myself, but I don't know how to do it. I made a quick model with the same problem so it's more visual.
In the image we can see the trakced variable I have created, and from the second queue there should not be more than 5 items. Both in the queue 2 and the processor 2.
Thanks a lot in advance, that would be really helpful.