PointSet (statement)
Syntax | PointSet pointId$, value | |
Description | To set a point's value. | |
Comments | Parameter | Description |
pointId$ | String. The point ID to set. | |
value | Value to set it to. | |
Example |
|
Enclose CIMPLICITY Machine Edition array point names (that are passed through CIMPLICITY Plant Edition Basic) in the the ASCII encoding for single quotes Chr$(39)
.
The reason is as follows:
CIMPLICITY Machine Edition returns array points as single values using the form name[index]
.
When a CIMPLICITY Machine Edition's array point name:
- Is not enclosed in
Chr$(39)
, BASIC will parse this out as a reference to an array element. You will receive an error indicating a bad point name. - Is enclosed in Chr$(39) the point will not be parsed in the PointSet and PointGet BASIC procedures. The name will be passed straight through to Machine Edition.
Examples
-
PointSet "MyPointName", val
Result
PointSet
sets MyPointName
to the value of val.
-
PointSet Chr$(39) & "MEArrayPointName[10]" & Chr$(39), val
Result
PointSet
sets the element with the index 10 of the Machine Edition array point MEArrayPointName to the value of val.
Important: This syntax will not work for Plant Edition array points.
-
PointSet "PEArrayPointName[10]", val
Result
PointSet
sets the element with the index 10 of the Plant Edition array point PEArrayPointName to the value of val