Point Type

The Point data type allows retrieving a point that corresponds to a data point in WinCC OA. In particular, is possible to retrieve point instances from a BrowserObject or as result of the functions searchPoints and searchPointsSync. For further reference, see the following table.

Property

Type

Description

alias

String

Alias of the point.

attributes

Attributes

Set of attributes of the point.

browserObjects

BrowserObject Array

Array of BrowserObjects that are associated to this point.

error

Error

In case of error, it indicates the reason why the operation failed.

pointId

String

Identifier of the point.

systemId

Integer

Unique identifier of the system to which the point belongs.

Syntax

It is possible to create Point instances in Desigo CC. See the following syntax:

var point = new Point(<pointOrObjectReference>);

Parameter Usage

Parameter

Type

Default

Use

Annotation

pointOrObjectReference

String

-

Mandatory

Name that identifies a data point in the system or CNS full path (reference to the system object location).

Result

  • If the Point creation is successful, the Point constructor returns an instance of Point.
  • If any errors occurred during the Point creation, the error property contains the error occurred.

Error Handling

Errors can occur in case:

  • The datapoint name or CNS full path does not identify an object in the system.
  • <pointOrObjectReference> is null or empty.

Examples of Use

 

How to create a Point instance from datapoint name

var dpName = "System1:ApplicationView_Logics_VirtualObjects_Virtual_Analog";

var point = new Point(dpName);

var readPoint = read(point, "Value");

if (readPoint.error)

{

    console(readPoint.error);

}

else

{

    console(readPoint.value);

}

 

Create a Point instance from CNS full path

var cnsPath = "System1.ApplicationView:ApplicationView.Logics.VirtualObjects.Virtual_Analog";

var point = new Point(cnsPath);