Point.GetNext (method)

Syntax

Point.GetNext

Description

To wait for and get the next value of the point. This method returns when a point update is received for the point, based on a previously submitted OnChange, OnAlarm, OnTimed or OnAlarmAck call. If the point never changes, the call never returns. To wait with a timeout, see the GetNext(function.)

Example

 

' Calculate the average of the next two point values.

Sub main()

   Dim MyPoint as new Point

   MyPoint.Id ="TANK_TEMPERATURE"   ' Set the Id

   MyPoint.OnChange                 ' Request point onchange

   MyPoint.GetNext                  ' Retrieve the first value.

   x = MyPoint.Value                ' Record the value.

   MyPoint.GetNext                  ' Wait for the next value.

   x1 = MyPoint.Value               ' Record the value

   ave# = (x + x1 )/ 2              ' Calculate the average

   MsgBox "The average was " & str$(ave)

end sub

See Also

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

More information

CIMPLICITY Extensions to Basic