i try to make the processor empty and not accept any flow items when there's a changeover happening.
I succeeded in turning the status to "Change over" but still the flow item sits on inside the processor as it would in a setup time configuration, is that because maybe i inserted the change status code in the (setup time) window? here's the code i entered in the setup time, it looks up the value from a gloabl table and inserts it as a changeover time.
/**Custom Code*/ Object current = ownerobject(c); Object item = param(1); int port = param(2); double Time=Table.query("SELECT Time FROM [C1] WHERE Code = $1",item.Code)[1][1]; setstate(ownerobject(c),31); print(Time); return Time;
I tried to overcome the problem of not letting the flowitems in the processor during the changeover by adding the following code to the OnEntry trigger but it does nothing. Please help!
/**Custom Code*/ Object current = ownerobject(c); Object item = param(1); int port = param(2); string status = getlabel(ownerobject(c), "status"); // Get the status of the processor if (status == "Change over") { closeinput(ownerobject(c)); // Cancel the entry of the flow item into the processor } else { openinput(ownerobject(c)); // Allow the entry of the flow item into the processor }