Hello,
I'd like to do an "actual-target-comparison" by checking whether the value of a label is equal to another label. If it's true, then change another labels value to 1. See my simplified code snippet below. If I try to apply the code like this to my model it won't work and gives back an error message regarding the syntax. I am quite new to programming custom code in FlexSim and don't get how to adress labels on items. In the end this costum code is implemented in a decision point on a conveyor in order to send items one way or another.
/**Custom Code*/ Conveyor.DecisionPoint current = param(1); Object item = param(2); Conveyor conveyor = param(3); Conveyor.Item conveyorItem = conveyor.itemData[item]; if(item.labels["Anzuchtszeit_IST"] == item.labels["Anzuchtszeit_SOLL"]) { item.SollErr = 1; }