Omron TMFlow Expression Editor and Listen Mode Owner's manual

Type
Owner's manual
TM Robot
Expression Editor and Listen Node
User Manual
Software Version: 1.82
Document Version: 1.00
Release date: 2021-01-08
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
2
The information contained herein is the property of Techman Robot Inc. (hereinafter referred to as the
Corporation). No part of this publication may be reproduced or copied in any way, shape or form without
prior authorization from the Corporation. No information contained herein shall be considered an offer
or commitment. It may be subject to change without notice. This Manual will be reviewed periodically.
The Corporation will not be liable for any error or omission.
and logos are registered trademarks of TECHMAN ROBOT INC. and the company reserves
the ownership of this manual and its copy and its copyrights.
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
3
REVISION HISTORY TABLE ........................................................................................... 11
1. EXPRESSION ......................................................................................................... 12
1.1 Types ................................................................................................................................................. 12
1.2 Variables and Constants ................................................................................................................... 12
1.3 Array ................................................................................................................................................. 16
1.4 Operator Symbols ............................................................................................................................. 17
1.5 Data type conversion ........................................................................................................................ 19
1.6 Warning ............................................................................................................................................ 21
2. FUNCTIONS .......................................................................................................... 23
2.1 Byte_ToInt16() .................................................................................................................................. 23
2.2 Byte_ToInt32() .................................................................................................................................. 24
2.3 Byte_ToFloat() .................................................................................................................................. 25
2.4 Byte_ToDouble() ............................................................................................................................... 26
2.5 Byte_ToInt16Array() ......................................................................................................................... 27
2.6 Byte_ToInt32Array() ......................................................................................................................... 28
2.7 Byte_ToFloatArray() ......................................................................................................................... 29
2.8 Byte_ToDoubleArray() ...................................................................................................................... 30
2.9 Byte_ToString() ................................................................................................................................. 31
2.10 Byte_Concat() ................................................................................................................................... 32
2.11 String_ToInteger() ............................................................................................................................ 35
2.12 String_ToFloat() ................................................................................................................................ 37
2.13 String_ToDouble() ............................................................................................................................ 39
2.14 String_ToByte() ................................................................................................................................. 41
2.15 String_IndexOf() ............................................................................................................................... 42
2.16 String_LastIndexOf() ......................................................................................................................... 43
2.17 String_Substring() ............................................................................................................................. 43
2.18 String_Split() ..................................................................................................................................... 46
Contents
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
4
2.19 String_Replace() ............................................................................................................................... 47
2.20 String_Trim() ..................................................................................................................................... 48
2.21 String_ToLower() .............................................................................................................................. 50
2.22 String_ToUpper() .............................................................................................................................. 50
2.23 Array_Append() ................................................................................................................................ 51
2.24 Array_Insert() ................................................................................................................................... 52
2.25 Array_Remove() ................................................................................................................................ 53
2.26 Array_Equals() .................................................................................................................................. 54
2.27 Array_IndexOf() ................................................................................................................................ 56
2.28 Array_LastIndexOf() .......................................................................................................................... 57
2.29 Array_Reverse() ................................................................................................................................ 58
2.30 Array_Sort() ...................................................................................................................................... 60
2.31 Array_SubElements() ........................................................................................................................ 61
2.32 ValueReverse() .................................................................................................................................. 62
2.33 GetBytes() ......................................................................................................................................... 66
2.34 GetString() ........................................................................................................................................ 71
2.35 GetToken() ........................................................................................................................................ 79
2.36 GetAllTokens() .................................................................................................................................. 88
2.37 GetNow() .......................................................................................................................................... 90
2.38 GetNowStamp() ................................................................................................................................ 91
2.39 GetVarValue() ................................................................................................................................... 94
2.40 Length()............................................................................................................................................. 95
2.41 Ctrl() .................................................................................................................................................. 97
2.42 XOR8() ............................................................................................................................................... 98
2.43 SUM8() ............................................................................................................................................ 100
2.44 SUM16() .......................................................................................................................................... 101
2.45 SUM32() .......................................................................................................................................... 103
2.46 CRC16() ........................................................................................................................................... 104
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
5
2.47 CRC32() ........................................................................................................................................... 106
2.48 ListenPacket() ................................................................................................................................. 108
2.49 ListenSend() .................................................................................................................................... 109
2.50 VarSync() ......................................................................................................................................... 111
3. MATH FUNCTIONS ............................................................................................... 113
3.1 abs() ................................................................................................................................................ 113
3.2 pow()............................................................................................................................................... 114
3.3 sqrt() ............................................................................................................................................... 116
3.4 ceil() ................................................................................................................................................ 116
3.5 floor() .............................................................................................................................................. 117
3.6 round() ............................................................................................................................................ 118
3.7 random() ......................................................................................................................................... 120
3.8 d2r() ................................................................................................................................................ 121
3.9 r2d() ................................................................................................................................................ 122
3.10 sin() ................................................................................................................................................. 122
3.11 cos() ................................................................................................................................................ 123
3.12 tan() ................................................................................................................................................ 124
3.13 asin() ............................................................................................................................................... 125
3.14 acos() .............................................................................................................................................. 125
3.15 atan() .............................................................................................................................................. 126
3.16 atan2() ............................................................................................................................................ 127
3.17 log() ................................................................................................................................................. 128
3.18 log10() ............................................................................................................................................. 129
3.19 norm2() ........................................................................................................................................... 130
3.20 dist() ................................................................................................................................................ 131
3.21 trans() ............................................................................................................................................. 131
3.22 inversetrans() .................................................................................................................................. 132
3.23 applytrans() .................................................................................................................................... 134
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
6
3.24 interpoint() ..................................................................................................................................... 136
3.25 changeref() ..................................................................................................................................... 136
3.26 points2coord() ................................................................................................................................ 138
3.27 intercoord() .................................................................................................................................... 140
4. FILE FUNCTIONS .................................................................................................. 142
4.1 File_ReadBytes() ............................................................................................................................. 143
4.2 File_ReadText() ............................................................................................................................... 143
4.3 File_ReadLines() .............................................................................................................................. 144
4.4 File_NextLine() ................................................................................................................................ 146
4.5 File_NextEOF() ................................................................................................................................ 149
4.6 File_WriteBytes() ............................................................................................................................ 150
4.7 File_WriteText() .............................................................................................................................. 155
4.8 File_WriteLine() .............................................................................................................................. 158
4.9 File_WriteLines() ............................................................................................................................. 161
4.10 File_Exists() ..................................................................................................................................... 164
4.11 File_Length() ................................................................................................................................... 164
4.12 File_Delete() ................................................................................................................................... 165
4.13 File_Copy() ...................................................................................................................................... 166
4.14 File_CopyImage() ............................................................................................................................ 167
4.15 File_Replace() ................................................................................................................................. 169
4.16 File_GetToken() .............................................................................................................................. 170
4.17 File_GetAllTokens() ........................................................................................................................ 175
5. SERIAL PORT FUNCTIONS ..................................................................................... 178
5.1 com_read() ..................................................................................................................................... 178
5.2 com_read_string() .......................................................................................................................... 184
5.3 com_write() .................................................................................................................................... 190
5.4 com_writeline() .............................................................................................................................. 192
6. SOCKET FUNCTIONS ............................................................................................. 195
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
7
6.1 socket_read() .................................................................................................................................. 195
6.2 socket_read_string() ....................................................................................................................... 201
6.3 socket_send() ................................................................................................................................. 207
6.4 socket_sendline() ........................................................................................................................... 209
7. PARAMETERIZED OBJECTS ................................................................................... 212
7.1 Point ............................................................................................................................................... 213
7.2 Base ................................................................................................................................................ 214
7.3 TCP .................................................................................................................................................. 215
7.4 VPoint ............................................................................................................................................. 216
7.5 IO .................................................................................................................................................... 217
7.6 Robot .............................................................................................................................................. 219
7.7 FT .................................................................................................................................................... 220
8. EXTERNAL SCRIPT ................................................................................................ 223
8.1 Listen Node ..................................................................................................................................... 223
8.2 ScriptExit() ...................................................................................................................................... 224
8.3 Communication Protocol ................................................................................................................ 224
8.4 TMSCT ............................................................................................................................................. 226
8.5 TMSTA ............................................................................................................................................. 228
8.6 CPERR.............................................................................................................................................. 231
8.7 Priority Commands ......................................................................................................................... 233
9. ROBOT MOTION FUNCTIONS ............................................................................... 237
9.1 QueueTag() ..................................................................................................................................... 237
9.2 WaitQueueTag() ............................................................................................................................. 238
9.3 StopAndClearBuffer() ..................................................................................................................... 240
9.4 Pause() ............................................................................................................................................ 240
9.5 Resume() ......................................................................................................................................... 241
9.6 PTP()................................................................................................................................................ 241
9.7 Line() ............................................................................................................................................... 245
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
8
9.8 Circle() ............................................................................................................................................. 247
9.9 PLine() ............................................................................................................................................. 249
9.10 Move_PTP() .................................................................................................................................... 251
9.11 Move_Line() .................................................................................................................................... 253
9.12 Move_PLine() .................................................................................................................................. 255
9.13 ChangeBase() .................................................................................................................................. 257
9.14 ChangeTCP() ................................................................................................................................... 258
9.15 ChangeLoad() .................................................................................................................................. 261
9.16 PVTEnter() ....................................................................................................................................... 262
9.17 PVTExit() ......................................................................................................................................... 263
9.18 PVTPoint() ....................................................................................................................................... 263
9.19 PVTPause() ...................................................................................................................................... 264
9.20 PVTResume() .................................................................................................................................. 265
Pose Configuration Parameters: [Config1, Config2, Config3] .............................................................................. 266
9.21 Vision_DoJob() ................................................................................................................................ 266
9.22 Vision_DoJob_PTP() ........................................................................................................................ 267
9.23 Vision_DoJob_Line() ....................................................................................................................... 268
9.24 Vision_IsJobAvailable() ................................................................................................................... 269
10. MODBUS FUNCTIONS .......................................................................................... 270
10.1 modbus_read() ............................................................................................................................... 270
10.2 modbus_read_int16() ..................................................................................................................... 273
10.3 modbus_read_int32() ..................................................................................................................... 275
10.4 modbus_read_float() ...................................................................................................................... 277
10.5 modbus_read_double() .................................................................................................................. 279
10.6 modbus_read_string() .................................................................................................................... 281
10.7 modbus_write() .............................................................................................................................. 283
11. TM ETHERNET SLAVE ........................................................................................... 288
11.1 GUI Setting ...................................................................................................................................... 288
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
9
11.2 svr_read() ....................................................................................................................................... 289
11.3 svr_write() ...................................................................................................................................... 289
11.4 Data Table ....................................................................................................................................... 290
11.5 Communication Protocol ................................................................................................................ 292
11.6 TMSVR ............................................................................................................................................ 293
0. Mode = 0 (the status the server responds to the client command processing) ............................ 295
1. Mode = 1 BINARY ............................................................................................................................ 297
2. Mode = 2 STRING ............................................................................................................................ 299
3. Mode = 3 JSON ............................................................................................................................... 300
11. Mode = 11 BINARY (Request read) ................................................................................................. 301
12. Mode = 12 STRING (Request read) ................................................................................................. 302
13. Mode = 13 JSON (Request read) ..................................................................................................... 303
12. PROFINET FUNCTIONS ......................................................................................... 305
12.1 profinet_read_input() ..................................................................................................................... 306
12.2 profinet_read_input_int() .............................................................................................................. 310
12.3 profinet_read_input_float() ........................................................................................................... 313
12.4 profinet_read_input_string() ......................................................................................................... 315
12.5 profinet_read_input_bit() .............................................................................................................. 316
12.6 profinet_read_output() .................................................................................................................. 319
12.7 profinet_read_output_int() ............................................................................................................ 322
12.8 profinet_read_output_float() ......................................................................................................... 325
12.9 profinet_read_output_string() ....................................................................................................... 327
12.10 profinet_read_output_bit() ............................................................................................................ 328
12.11 profinet_write_output() ................................................................................................................. 330
12.12 profinet_write_output_bit() ........................................................................................................... 339
13. ETHERNET/IP FUNCTIONS .................................................................................... 345
13.1 eip_read_input() ............................................................................................................................. 346
13.2 eip_read_input_int() ...................................................................................................................... 349
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
10
13.3 eip_read_input_float() ................................................................................................................... 352
13.4 eip_read_input_string() .................................................................................................................. 354
13.5 eip_read_input_bit() ...................................................................................................................... 355
13.6 eip_read_output() .......................................................................................................................... 358
13.7 eip_read_output_int() .................................................................................................................... 362
13.8 eip_read_output_float() ................................................................................................................. 364
13.9 eip_read_output_string() ............................................................................................................... 366
13.10 eip_read_output_bit() .................................................................................................................... 367
13.11 eip_write_output() ......................................................................................................................... 370
13.12 eip_write_output_bit() ................................................................................................................... 378
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
11
Revision History Table
Revision
Date
00
Jan, 2021
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
12
1. Expression
1.1 Types
Different data types of variable can be declared in Variables Manager.
byte
8bit integer
unsigned
0 to 255
significant digit 3
int
32bit integer
signed
-2147483648 to 2147483647
significant digit 10
float
32bit floating-
point
signed
-3.40282e+038f to 3.40282e+038f
significant digit 7
double
64bit floating-
point
signed
-1.79769e+308 to 1.79769e+308
significant digit 15
bool
boolean
true or false
string
string
For int type variable, both int16 and int32 are supported. The default type is int 32.
int16
16bit integer
signed
-32768 to 32767
significant digit 5
int32
32bit integer
signed
-2147483648 to 2147483647
significant digit 10
1.2 Variables and Constants
1. Variables
In the naming rule of variables, only the numbers, under line and the upper case and lower case English
characters are supported.
Numbers 0123456789
Characters a-z, A-Z, _
Example
Int var_i = 0
string var_s = "ABC"
string var_s1 = "DEF"
string var_s2 = "123"
Without double quotation marks, strings will be taken as variables.
var_s = var_s1 + " and " + var_s2 // var_s = "DEF and 123"
// var_s, var_s1, var_s2 are variable, and " and " is a string.
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
13
In addition to variables, the naming rule also applies to constants, numbers, strings, and Booleans except
that string constants need to be enclosed in double quotes.
When a variable is generated in TMflow, a prefix is added based on the source. To use the variable for writing
or reading, users must enter the full name including the prefix word. For the rules of adding prefixes, refer
to the respective description in variable setting pages.
2. Numbers
Decimal integer, decimal floating-point, binary, hexadecimal integer and scientific notation are
supported.
Decimal integer 123
-123
+456
Decimal float 34.567
-8.9
Binary 0b0000111
0B1110000
Hexadecimal integer 0x123abc
0X00456DEF
Scientific notation 3.4e5
2.3E-4
For binary and hexadecimal notation, there is no floating-point.
The notation of number is not case sensitive.
For example:
0b0011 equals to 0B0011
0xabcD equals to 0XABCD, 0xABCd, 0Xabcd etc.
3.4e5 equals to 3.4E5
The transforming between floating-point and byte array may cause discrepancy in value
For example:
float 5.317302E+030 float to byte[] {0x72,0x86,0x3A,0x42}
byte[] {0x72,0x86,0x3A,0x43} byte[] to float 5.317302E+030
Byte can only present unsigned numbers from 0 to 255. As a result, if negative number is assigned to
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
14
byte type variable directly or through calculation, only 8 bit unsigned value will be kept.
For example:
byte var_b = -100 // var_b = 156 // -100 is present as 0xFFFFFF9C by 16bit notation.
// Because byte can only keep 8 bit data, that is 0x9C (156), b will equals to 156
3. String
When inputting string constant, double quotation marks shall be placed in pairs around the string to avoid
the recognition error of variable and string.
For example
"Hello World! "
"Hello TM""5" (If " is one of the character in the string, use two ("") instead of one (").
Control character in double quotation mark are not supported.
For example:
"Hello World!\r\n" (the output would be Hello World!\r\n string)
Without double quotation marks, the compiling will follows the rules below
1. Numbers will be view as numbers
2. The combination of numbers and characters will be view as variable as long as the variable does
exist.
3. If the variable does not exist, it will be compiled as string with warning message.
The combination of string and variable
1. Inside double quotation marks, variables will not be combined as variables
For example:
var_s = "TM5" // var_s = "TM5"
var_s1 = "Hi, s Robot" // var_s1 = "Hi, s Robot"
2. To input the combination of variables and strings, double quotation marks needs to be placed
around the string, and plus sign (+) shall be used to link variables and numbers
Example:
var_s1 = "Hi, " + var_s + " Robot" // var_s1 = "Hi, TM5 Robot"
3. To be compatible with the old version software, the single quotation marks can be placed around
the variables, but a warning message will be send out
For example:
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
15
single quotation marks "Hi, ’s’ Robot" // var_s1 = "Hi, TM5 Robot"
"Hi, ’x’ Robot" // var_s1 = "Hi, x Robot" // Because variable x does not exist, ‘x’ is
viewed as string
4. Single quotation marks do not support element value retrieval with array indexes. The standard
format with double quotation marks should be used.
For example
string[] var_ss = {"Techman", "Robot"}
"Hi, var_s ss[0] Robot" // var_s1 = "Hi, TM5 ss[0] Robot" // ‘ss[0]’ is invalid
"Hi, " + var_ s + " " + var_ss[0] + " Robot" // var_s1 = "Hi, TM5 Techman Robot"
5. Single quotation marks cannot be presented by ". If users would like to input ’(variable name)’,
The standard format with double quotation marks should be used.
For example
"Hi, ‘s’ Robot" // var_s1 = "Hi, TM5 Robot"
// If var_s1 = "Hi, ‘s Robot" is what you want, please use the following syntax.
"Hi, " + "s" + " Robot" // var_s1 = "Hi, s Robot"
For control character, e.g. new line, please use Ctrl() command.
For example
var_s1 = "Hi, " + Ctrl("\r\n") + s + " Robot" or "Hi, " + NewLine + var_s + " Robot"
Hi,
TM5 Robot
Reserved characters is similar to variables, no double quotation marks is needed. (But single quotation
mark is not supported)
1. empty empty string, equals to ""
2. newline or NewLine new line, equals to Ctrl("\r\n") or Ctrl(0x0D0A)
4. Boolean
True or false value of logic.
Denote true value
true
True
Denote false value
false
False
The Boolean value is case sensitive. Misuses of capital letters such as TRue will be taken as a variable or a
string.
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
16
1.3 Array
Array is a set of data with the same data type. The initial value is assigned with {}, and every element remains
the characteristic of its data type.
For example
int[] var_i = {0,1,2,3} // elements in number data type
string[] var_s = {"ABC", "DEF", "GHI"} // elements in string data type
bool[] var_bb = {true, false, true} // elements in boolean data type
By utilizing index, the value of specified element can be get, the index is start from 0
For example
index 0 1 2 3 4 5 6 7
array eight elements in total
A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7]
Valid index values [0] .. [7], an error will occur with invalid index number.
Only one degree array is supported. The maximum index number is 2048.
The array size may alter according to the return value of functions or assigned values. The maximum
element number is 2048. This feature makes array meet the needs of different functions and applications
in Network Node.
For Example:
string[] var_ss = {empty, empty, empty} // The initial size of string array is 3 elements
var_ss = String_Split("A_B_C_D_F_G_H", "_") // After splitting string, the string array has 7 elements
var_len = Length(var_ss) // var_len = 7
var_ss = String_Split("A,B", ",") // After splitting string, the string array has 2 elements
var_len = Length(var_ss) // var_len = 2
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
17
1.4 Operator Symbols
The operator table is listed below.
The calculation follows the precedence of operator first then the associativity.
For example
left-to-right associativity
A = A * B / C % D ( A = ( ( ( A * B ) / C ) % D ) )
right-to-left associativity
A -= B += 10 && ! !D ( A -= ( B += ( 10 && ( ! (!D) ) ) ) )
The calculation will proceed by the type of the operand.
1. When both values come as the integer type, the calculation will proceed by the integer type such as
int var_a = 10
int var_b = 3
float var_c = var_a / var_b
By the operator priority, the calculation goes / first and then =.
var_a / var_b = 10 / 3 = 3 (both var_a and var_b are integers)
var_c = 3 (The integer 3 assigns to the floating point number var_c)
2. When one of the two values comes as the floating-point type, the calculation will proceed by the
floating-point type such as
int var_a = 10
float var_b = 3
float var_c = var_a / var_b
var_a / var_b = 10 / 3 = 3.333333 (for var_b is a floating-point number)
var_c = 3.333333 (the floating-point number 3.333333 assigns to var_c)
var_c = var_a / 3
var_a / 3 = 10 / 3 = 3 (both var_a and 3 are integers)
var_c = 3
var_c = var_a / 3.0
var_a / 3.0 = 10 / 3.0 = 3.333333 (for 3.0 is a floating-point number)
var_c = 3.333333
1
2
3
4
1
2
3
4
5
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
18
Precedence
High to low
Operator
Name
Example
Requireme
nt
associativity
17
++
Postfix increment
i++
Integer
variable
left-to-right
--
Postfix decrement
i--
()
Function call
int x = f()
[]
Allocate storage
array[4] = 2
Array
variable
16
++
Prefix increment
++i
Integer
variable
right-to-left
--
Prefix decrement
--i
+
Unary plus
int i = +1
Numeric
variable,
Constant
-
Unary minus
int i = -1
!
Logical negation (NOT)
if (!done) …
Boolean
variable
~
Bitwise NOT
flag1 = ~flag2
Integer
variable
14
*
Multiplication
int i = 2 * 4
Numeric
variable,
Constant
left-to-right
/
Division
float f = 10.0 / 3.0
%
Modulo (integer
remainder)
int rem = 4 % 3
13
+
Addition
int i = 2 + 3
Numeric
variable,
Constant
-
Subtraction
int i = 5 - 1
12
<<
Bitwise left shift
int flags = 33 << 1
Integer
variable,
Constant
>>
Bitwise right shift
int flags = 33 >> 1
11
<
Less than
if (i < 42) …
Numeric
variable,
Constant
<=
Less than or equal to
if (i <= 42) ...
>
Greater than
if (i > 42) …
>=
Greater than or equal to
if (i >= 42) ...
10
==
Equal to
if (i == 42) ...
!=
Not equal to
if (I != 42) …
9
&
Bitwise AND
flag1 = flag2 & 42
Integer
variable,
Constant
8
^
Bitwise XOR
flag1 = flag2 ^ 42
7
|
Bitwise OR
flag1 = flag2 | 42
6
&&
Logical AND
if (conditionA &&
conditionB)
5
||
Logical OR
if (conditionA ||
conditionB)
4
c ? t : f
Ternary conditional
int i = a > b ? a : b
right-to-left
3
=
Basic assignment
int a = b
+=
Addition assignment
a += 3
-=
Subtraction assignment
b -= 4
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
19
*=
Multiplication assignment
a *= 5
Left side:
Numeric
variable
Right side:
Numeric
variable,
Constant
/=
Division assignment
a /= 2
%=
Modulo assignment
a %= 3
<<=
Bitwise left shift
assignment
flags <<= 2
Left side:
Integer
variable
Right side:
Integer
variable,
Constant
>>=
Bitwise right shift
assignment
flags >>= 2
&=
Bitwise AND assignment
flags &= new_flags
^=
Bitwise XOR assignment
flags ^= new_flags
|=
Bitwise OR assignment
flags |= new_flags
1.5 Data type conversion
Data types can be converted to each other and used in variables/constants or arrays.
Conversions must be in the same format of the containers such as variable/constant conversions or array
conversions. It is not permitted to convert a variable to an array or an array to a variable.
Expression Editor and Listen Node Software Version: 1.82 Document Version: 1.00
20
Native type
Conversion type
Example
Result
byte
int
int i = (int)100
i = 100
float
float f = (float)100
f = 100
double
double d = (double)100
d = 100
bool
bool flag = (bool)0
flag = true (not null)
string
string s = (string)100
s = "100"
int
byte
byte b = (byte)1000
b = 232
float
float f = (float)1000
f = 1000
double
double d = (double)1000
d = 1000
bool
bool flag = (bool)1000
flag = true (not null)
string
string s = (string)1000
s = "1000"
float
byte
byte b = (byte)1.23
b = 1
int
int i = (int)1.23
i = 1
double
double d = (double)1.23
d = 1.23
bool
bool flag = (bool)1.23
flag = true
string
string s = (string)1.23
s = "1.23"
double
byte
byte b = (byte)1.23
b = 1
int
int i = (int)1.23
i = 1
float
float f = (float)1.23
f = 1.23
bool
bool flag = (bool)1.23
flag = true
string
string s = (string)1.23
s = "1.23"
bool
byte
byte b = (byte)True
Error
int
int i = (int)False
Error
float
float f = (float)true
Error
double
double d = (double)false
Error
string
string s = (string)True
s = "True"
string
byte
byte b1 = (byte)"1.23"
byte b2 = (byte)"XYZ"
1
Error
int
int i = (int)"1.23"
1
float
float f1 = (float)"1.23"
float f2 = (float)"XYZ"
1.23
Error
double
double d = (double)"1.23"
1.23
bool
bool flag1 = (bool)"1.23"
bool flag2 = (bool)""
flag1 = true (not null)
flag2 = false (null)
The conversion method of arrays is in accordance with the table above. The conversion is performed for
each element in the array.
string[] var_ss = {"1.23", "4.56", "0.789"}
int[] var_i_array = (int[])var_ss // var_i_array = {1, 4, 0}
float[] var_f_array = (float[])var_ss // var_f_array = {1.23, 4.56, 0.789}
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304
  • Page 305 305
  • Page 306 306
  • Page 307 307
  • Page 308 308
  • Page 309 309
  • Page 310 310
  • Page 311 311
  • Page 312 312
  • Page 313 313
  • Page 314 314
  • Page 315 315
  • Page 316 316
  • Page 317 317
  • Page 318 318
  • Page 319 319
  • Page 320 320
  • Page 321 321
  • Page 322 322
  • Page 323 323
  • Page 324 324
  • Page 325 325
  • Page 326 326
  • Page 327 327
  • Page 328 328
  • Page 329 329
  • Page 330 330
  • Page 331 331
  • Page 332 332
  • Page 333 333
  • Page 334 334
  • Page 335 335
  • Page 336 336
  • Page 337 337
  • Page 338 338
  • Page 339 339
  • Page 340 340
  • Page 341 341
  • Page 342 342
  • Page 343 343
  • Page 344 344
  • Page 345 345
  • Page 346 346
  • Page 347 347
  • Page 348 348
  • Page 349 349
  • Page 350 350
  • Page 351 351
  • Page 352 352
  • Page 353 353
  • Page 354 354
  • Page 355 355
  • Page 356 356
  • Page 357 357
  • Page 358 358
  • Page 359 359
  • Page 360 360
  • Page 361 361
  • Page 362 362
  • Page 363 363
  • Page 364 364
  • Page 365 365
  • Page 366 366
  • Page 367 367
  • Page 368 368
  • Page 369 369
  • Page 370 370
  • Page 371 371
  • Page 372 372
  • Page 373 373
  • Page 374 374
  • Page 375 375
  • Page 376 376
  • Page 377 377
  • Page 378 378
  • Page 379 379
  • Page 380 380
  • Page 381 381
  • Page 382 382
  • Page 383 383
  • Page 384 384
  • Page 385 385

Omron TMFlow Expression Editor and Listen Mode Owner's manual

Type
Owner's manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI