<< Click to Display Table of Contents >>
SetPointDataType |
Determines a type of value that is sent from a SetPoint to a Tag. Possible values for this property are described on the next table.
Available options for the SetPointDataType property
Option |
Description |
---|---|
0 - stCurrentType |
Maintains current value type in a SetPoint (default, please check next) |
1 - stChar |
8-bit signed integer value |
2 - stByte |
8-bit unsigned integer value |
3 - stWord |
16-bit unsigned integer value |
4 - stInteger |
16-bit signed integer value |
5 - stLong |
32-bit signed integer value |
6 - stDWord |
16-bit unsigned integer value |
7 - stSingle |
32-bit floating point value |
8 - stDouble |
64-bit floating point value |
9 - stDateTime |
Date and time value |
10 - stString |
Text |
When a typed text is sent by a SetPoint, it first tries to convert that value to the configured type, such as Word, String, or Double, among others. If this conversion is not possible, that is, the typed value is not valid for the selected type, no value is sent, such as when users type "-1", and type is Byte. When this property's value is 0 - stCurrentType, a data type sent by this SetPoint comes from the previous value available in that object. If that previous value is Empty or Null, no conversion is performed and the typed value is sent as text. The next script contains an example of using this property.
Sub Combobox1_Change()
Screen.Item("Text1").SetPointDataType = CInt(Left(Value, 2))
End Sub