About Expression

Components and HelloDevice can make viable connection via this parameter "Expression" . You do not need to write a code by yourself for communication with the device because it will be done automatically by assigning these simple Expressions.

See also serial protocol defining/editing for serial communication.

Property Expression

This expression is expected to be set in the design time. Activate component's property editor by double clicking on the component and modify these fields.

Value Expression 

Reads data from the specified bit or address of the device interface (HD1100) or memory (HD1200), or from the specified symbol of transmitted serial data (HD13xx). By adding some operators, you can display read data with various manipulations. 
This property is for Gauge and Switch category components both.

m<address>
If connected with HelloDevice 1100, it reads a bit status from the device¡¯s specified I/O interface.
If connected with HelloDevice 1200, it reads a byte value from the device¡¯s specified memory.
If connected with HelloDevice 13xx or serial devices, it reads a byte value from the transmitted data stream according to the associated serial protocol definition.
Examples) 
'm8' with HelloDevice 1100 - the 9th (zero base) bit status of the device¡¯s I/O interface
'm100' with HelloDevice 1200 - the byte value at address 100 of the dual port ram of the device.
'm3' with HelloDevice 1300 - the ¡®value¡¯ property of an ¡°FX¡± category data field in the associated serial protocol definition is ¡®m3¡¯.

m<address>:<length> (HD1200 only)
Multi-Byte expression.
Example) 
'm100:4' with HelloDevice 1200 - address 100, 101, 102 and 103 address.

Available Operator
(, ), +, -, *, /, ^, %, &, |, >, <, >=, <=, ==, !=, !, &&, ||, >>, <<.
Logical operation 'true' is 1, 'false' is 0.
Examples)
'(m100 - 5.5)*10 - m200 + (m100 > 10)*7' with HelloDevice 1200 or 13xx.
'm4 & m7 | m15' with HelloDevice 1100.

v<symbol #> in Serial Connection (HD13xx)
To display text data (byte array, VA or fixed size FX with 'text' type attribute data in a serial protocol)
Serial Label is the only one component that will accept this form of 'Value expression'. No operations in this case.
Examples)
'v3' as the value expression of a Serial Label, a text will be sampled from a serial data that was transmitted according to a serial protocol and will be displayed on this Serial Label. See the section serial protocol defining/editing.

Write Destination

This property is to assign target address to read.
This property is for Switch category components only.

m<address>
If connected with HelloDevice 1100, it writes the switch value to the specified bit of the device¡¯s I/O interface.
If connected with HelloDevice 1200, it writes the switch byte value to the specified address of the device¡¯s memory.
If connected with HelloDevice 13xx or serial devices, it writes the switch byte value to the outgoing data stream according to the associated serial protocol definition.
Examples) 
'm8' with HelloDevice 1100 - the 9th (zero base) bit status of the device¡¯s I/O interface
'm100' with HelloDevice 1200 - the byte value at address 100 of the dual port ram of the device.
'm3' with HelloDevice 1300 - the ¡®value¡¯ property of an ¡°FX¡± category data field in the associated serial protocol definition is ¡®m3¡¯.
Any operations will not be accepted in this property. Use Write expression for operations

m<address1>, m<address2), .... , (v<address1>, v<address2), .... ,)
Multiple accesses.
Examples) 
'm1, m4, m7' with HelloDevice 1100 - the destination bit is 1, 4 and 7.
'm100, m110' with HelloDevice 1200 - the destination address is 100 and 110.
'v0, v1' with HelloDevice 1300 - the destination address is 0 and 1.

v<symbol #> in Serial Connection (HD13xx)
To send text data (byte array, VA in a serial protocol)
Serial Text Field is the only one component that will accept this form of 'Write destination'.
Examples)
'v3' as the write destination of a Serial Text Field, a text which is contained within this component will be translated into a byte array (one or two byte character) and will be loaded into a serial data, which will be sent to the connected device. See the section serial protocol defining/editing.

Write Expression

Writes value to target address with various manipulation.
This property is for Switch category components only.

s
the current switch value.

Available Operator 
(, ), +, -, *, /, ^, %, &, |, >, <, >=, <=, ==, !=, !, &&, ||, >>, <<.
Logical operation 'true' is 1, 'false' is 0.
Examples) 
'(s - 5.5) * 10 - 200 + (s > 10) * 7' with HelloDevice 1200 or 13xx.
's >> 4' with HelloDevice 1100. 

Note : No write expression in Serial Text Field in HelloDevice 13xx

Run time Expression

Value Field Component

Using this component, it is possible to write a value to target address at the run time by the command line expression.

on/off  m<address>
Write On( is not 0) or Off(0) value to target address bit in HelloDevice 1100.
Example) Type "on m4" in this component and press "Enter" at the runtime
This will turn on 5th bit (zero base) of HelloDevice 1100

Value m<address>
Write Value to target address byte in HelloDevice 1200.
Example) Type "120 m52" in this component and press "Enter" at the runtime
This will change the value of 53rd byte of dual port ram in HelloDevice 1200 to 120.

Note : The runtime expression will not be implemented in HelloDevice 13xx

Available Address.

HelloDevice 1100
The Input bit : m0 ~ m15 .
The Output bit : m16 ~ m31.

HelloDevice 1200
m0 ~ m256.

HelloDevice 13xx
As user pleases.

56.

HelloDevice 13xx
As user pleases.