Value and Type Conversions
The following table shows VTScada value and type conversions.
Value to Convert |
Convert To |
Condition of Original Value |
Returned Value |
Code Pointer |
Module |
Valid value |
Valid value |
Module State |
Valid value |
Valid value |
|
Module State |
|||
Statement |
Valid value |
Valid value |
|
Object |
Valid value |
Valid value |
|
Text |
Valid value |
Name of module |
|
Double |
Long |
Valid value |
Valid value |
Short |
Valid value |
Valid value |
|
Status |
Valid value |
Valid value |
|
Text |
Valid value |
String representing numeric value |
|
Edit Block |
Stream |
May only be used in SRead with % option, or in StrLen |
Valid value |
Long |
Double |
Valid value |
Valid value |
Short |
Valid value |
Valid value |
|
Status |
Valid value |
Valid value |
|
Text |
Valid value |
String representing numeric value |
|
Module |
Text |
Valid value |
Name of module |
Module State |
Module |
Valid value |
Valid value |
Text |
Valid value |
Name of module |
|
Module State Statement |
Module |
Valid value |
Valid value |
Module State |
Valid value |
Valid value |
|
Text |
Valid value |
Name of module |
|
Normalize |
Double |
Valid value |
The scaled value |
Long |
In the range of -2 147 483 648 to 2 147 483 647 |
The value |
|
Short |
In the range of -32 767 to 32 767 |
The value |
|
Outside of range |
Invalid |
||
Status |
0 |
0 (false) |
|
Non-0 |
1 (true) |
||
Text |
Valid value |
String representing scaled value |
|
Object |
Module State |
Valid value |
Module and state in which that object exists |
Statement |
Valid value |
Module state and statement number that object is executing |
|
Text |
Valid value |
Name of the module of which that object is an instance |
|
Short |
Double |
Valid value |
Valid value |
Long |
Valid value |
Valid value |
|
Status |
Valid value |
Valid value |
|
Text |
Valid value |
String representing numeric value |
|
Status |
Double |
Unconnected socket |
1 |
Connected socket |
Invalid |
||
Long |
Unconnected socket |
1 |
|
Connected socket |
Invalid |
||
Short |
Unconnected socket |
1 |
|
Connected socket |
Invalid |
||
Status |
Unconnected socket |
1 |
|
Connected socket |
Invalid |
||
Text |
Unconnected socket |
"1" |
|
Connected socket |
String of stream contents |
||
Tag |
Double |
Valid value |
The scaled value |
Long |
In the range of -2 147 483 648 to 2 147 483 647 |
The value |
|
Outside the range |
Invalid |
||
Short |
In the range of -32 767 to 32 767 |
The value |
|
Outside the range |
Invalid |
||
Status |
0 |
0 (false) |
|
Non-0 |
1 (true) |
||
Text |
Valid value |
String representing scaled value |
|
Text |
Double |
Number string |
Number in string |
Long |
Number string |
Number in string |
|
Short |
Number string |
Number in string |
|
Status |
Non-0 number string |
0 (false) |
|
0 number string |
1 (true) |
||
Variable |
Module |
Module variable |
The module in which the module variable resides |
Text |
Valid value |
Name of variable |