i want to discharge a vehicle at a sensor point with the following method
(SensorID : integer; Bug : boolean) is TabellenName : object; do TabellenName := (@.name+"_"+to_str(@.id)+"_Bestand"); if SensorID = 1 then while @.voll = true loop @.Inhalt.umlagern(Puffer); end; TabellenName.löschen; end; end;
But somehow my vehicle has the same amount of BEs after passing the sensor. Only the table content is deleted.
I tried various methods like leer = false (empty) or AnzahlBEs > 0 (AmoutOfBEs) but then my programm crashes.
If i don't use a while-loop only 1 BE is discharged.
I hope you guys can help me with my simple question but i don't know why it doesn't work. I know that i can solve this problem with a DismantleStation or a converter (there i don't know where to fit my tablecontent deleting), but i want to solve it with a sensor-method
Thanks in advance
Solved! Go to Solution.
the buffer needs to shift the parts, so you need a little delay between the MUs, if you use the contition
while @.voll = true loop
only one part is moved, then the condition @.voll returns false.
Try this instead:
--stop the transporter
while @.belegt loop
--start the transporter
freelance simulation specialist