Point.Value (property, read/write)

Syntax

Point.Value[(index)]

Description

To retrieve or set the value in the point object. The optional index may be supplied to access values of an array point. The first element of the array is at the zero index. The value property uses Engineering Units conversion if supplied by the point. To bypass Engineering Units conversion, use the RawValue property.

 

Automatic conversion will be performed between data types as needed. The only exceptions are String and BitString points, which can only be assigned from Strings.

Example

' This subroutine show automatic type conversion

sub main()

   Dim MyPoint as new Point        'Declare the point object

   MyPoint.Id ="INTEGER_POINT"    'Set the Id, Point Type is INTEGER

   ' The string value of "10" is automatically converted to a integer

   ' value of 10 and place in point object.

   MyPoint.Value = "10"

   MyPoint.Set                    ' Write the point

   ' The floating point value of 10.01 is truncated to 10 and place

   ' in the point

   MyPoint.Value = 10.01

   MyPoint.Set                    ' Write the point

end sub

See also

Point.RawValue (property, read/write); Point.GetArray (method); Point.GetRawArray (method).

Notes

To retrieve the point value, the Point.Get method must be invoked first. Once the value has been read, it can be accessed many times without having to retrieve it from the Point Manager on each reference. If the point hasn't been read, an exception is generated.

When setting a value, the value is not written to the device until the Set method is invoked.

More information

CIMPLICITY Extensions to Basic