PointGet (function)

Syntax PointGet ( pointId$ )
Description To read a particular point and return the value.
Comments Parameter Description
pointId$ String. The Point ID to get the value from.
Example
' Prompt user for point id, get the point value and display
' it into a message box.
Sub Main()
   MsgBox "Value is " & PointGet(InputBox$("Enter Point Id") )
End Sub
See Also PointGetMultiple (function)
Important: For CIMPLICITY Machine Edition's array point names

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.
Note: You cannot directly put a single quote (') on an argument line because the single quote in Basic denotes that the remainder of the line is a comment.

Examples

  • val = PointGet("MyPointName")

Result

PointGet receives. MyPointName

  • val = PointGet(Chr$(39) & "MyPointName[10]" & Chr$(39))

Result

PointGet receives 'MyPointName[10]'