PointGetNext (function)

Syntax 1

PointGetNext(timeOutMs, point1 [,... [, point16])

Syntax 2

PointGetNext(timeOutMs, PointArray)


To return the next point value from a list of points with a timeout.


The timeout value is in milliseconds, a timeout of -1 indicates to wait forever, a timeout of 0 indicates to not wait and a positive integer indicates the timeout period in milliseconds.

Point1 is a Point object with an outstanding request. Up to 16 points can be specified on the function call.

Alternatively, the user may pass an array of point objects.

The function returns the object whose value changed or empty.






Integer. Maximum time to wait in milliseconds. -1 = INFINITE, 0 = Do not wait, > 0 wait. Current resolution is 10ms, all values will be rounded up to the next 10ms increment.



Point object with an OnChange, etc. Up to 16 may be specified as function parameters.



An array of Point object with OnChange, etc.


' Trace the values of 2 point as they change or trace timeout if neither

' point change in 1 second.

sub main()

   Dim Point1 as new Point       ' Declare Point Object

   Dim Point2 as new Point       ' Declare Point Object

   Point1.Id ="TANK_LEVEL"      ' Set the Id

   Point2.Id ="TANK_TEMP"       ' Set the Id

   Point1.OnChange               ' Register OnChange request

   Point2.OnChange               ' Register OnChange request

   Dim Result as Point           ' Declare result pointer

Top :

   ' Set result equal to result of waiting on Point1 and Point2

   ' to change for 1 second

   Set Result = PointGetNext(1000, Point1, Point2)

   if Result is Nothing then      ' Nothing is returned if timeout

      Trace "TimeOut"


     ' Otherwise Result is Point1 or Point2 depending on which one

     ' changed last.

      Trace Result.Id & " " & str$(Result.TimeStamp) & Result.Value

   end if

   goto top

end sub

See Also

Point.OnChange (method); Point.GetNext (method); Point.OnAlarm (method); Point.OnTimed (method); Point.OnAlarmAck (method).

More information

CIMPLICITY Extensions to Basic