I can...but I cant use the list in a waituntil statement, which is what I am trying to do.
I have a track with a bunch of sensor. I want the transport to waituntil the sensor ahead is free before proceeding.
I figure if i had a global array would help with this.
But the waituntil statement doesnt work with list or table
yes, that why i wanted to use a global variable
The transport arrives as sensor..
GlobalSensorArray(SensorID) = True
waituntil SensorArray(SensorID + 1) = False
But, I cant make a global variable an array.
you can't use waituntil with table , list and array
And you can't create an user-defined variable of type array, sadly...
So you can't do this.
as a work arround you can create a sensor methode like this
param SensorID: integer, Front: boolean
var sensorName := to_str("sensor",sensorID+1)
execute("waituntil conveyor."+sensorName+" prio 1")
end create a boolean for each sensor named sensor1,sensor2,...