Эта страница является
переводом страницы
IRidium studio 2019 Command Sending. Перевод выполнен на 100%.
Sending commands from i3 pro interface, display of data
Sending commands from graphic items, variants of data display in interface
The most frequent task of an interface is to record a numerical value in addresses/ registers/variables of equipment and to display numerical values in an interface. Different recording logics can be required to record values, for example:
- a button sends the same Value (set in Relations) every time it is pressed
- a trigger sends one of the two values, selected in settings, one after the other
- a slider sends to a variable a Value from a range, selected in slider settings when a slider is moved.
When you create an interface, to control variables you select the type of graphic items which logics suits the interface tasks. To assign a command (variable) to a graphic item, the item must be set and a commad from DRIVERS must be drag'n'dropped on it with the help of a mouse.
Control of Variables from Interface
- Select a type of graphical item, that suits your tasks
- Enter in the settings a value, that an item must send to variables connected with it
- Drag'n'drop a command from the DRIVERS on a graphic item
- In the dialogue window of assigning a command, select a value that a graphic item must send. If it's a button, it can be Number, that is, a concrete value that is sent. Other types of items can send Value, that is, a value generated by the item. Read how to select Press, Release and other events look here
- If a graphic item must not only send, but also display data. put a tick in "Add feedback channel" field and select item property to be affected by a received value (a value or text can be changed)
Display of Data in Interface
- Select a type of graphic item to display data - it can be the same item that controls equipment or a display-item (Label)
- Drag'n'drop a feedback channel on a graphic item:
- In Value - change the item state with the help of a value received from a variable (the capability depends on item settings, read the instructions on types of items); display the received value in the item text with the help of "Show value in text" option (see text settings), that allows to display a value with a set number of digits after a point.
- In Text - display a value, received from a variable, in item text. If a variable returns a floating point number, it is displayed with six zeros after a point, that's why use "In Value" and "Show value in text" option in text settings to control the format of displaying numbers.
- More - affect any item property (visibility, size, etc) by a value received from a feedback channel/token.
Displaying Values in Text
Displaying values in text with the help of "Show value in text" option allows to built in a numerical value in the text of a graphical item and determine the number of digits after a point. A special template for levels allows to transfrom values from a random range into 0-100% format.
A value is built in text with the help of a special template ($V, $F1, $F2, ...), который при запуске i3 pro that is automatically substituted with a variable value that is assigned as "In Value" at the start of i3 pro :
- Turn on text editing on an item
- Select "Show value in text" in the list. A template will be added to the text field of an item, for example,
$V
- Go to the text field of an item an enter the text that is to be displyed on an item together with a Value that will be displayed instead of the template, for example,
$V%, to display 100 value received from a channel this way 100%
| Template |
Function
|
| $V |
the integer part of the received value
|
| $F1 ... $F5 |
float value. From 1 to 5 - number of symbols after a point
|
| $F,1 ... $F,5 |
float value. From 1 to 5 - number of symbols after a comma
|
| $S |
current Item state number
|
| $X |
the value in the HEX type
|
| $$ |
the $ symbol
|
| $P |
(levels only) the current value in percentage of Level maximum
|
| $H |
(levels only) the upper Level value
|
| $A |
(levels only) the upper value minus the lower value of Level
|
| $L |
(levels only) the lower Level value
|
| $R |
(levels only) the Level range: the upper value minus the lower value
|
A template is entered into the text field of a graphic Item and can be combined with other text or symbols (comments, units of measurement)
Setting Commands via PROGRAMMING
Setting commands via PROGRAMMING of a graphic item
Commands of macros editor to interact with drivers and variables of a project:
- Send To Driver (sending values to driver commands)
- Send Number. sends a constant - a decimal number (DEC)
- Send Text. sends a constant - a data string (ASCII)
- Send Data. sends a constant - data row (HEX)
- Send Token. sends data from project variables (Value, coordinates, sizes, etc - variables defined by object properties)
- Send To Token (sending data to variables - item properties, drivers, project tokens)
- Send Number. writes a constant (DEC number) in a variable
- Send Text. writes a constant (ASCII string) in a variable
- Send Token. writes a variable in a variable (for example, an item property in a project token)
To send a commands, select an event (Press, Release), a type of value (number, text or item value) and a variable where to write the value. If it's number or text, enter a value that must be sent. Save changes in PROGRAMMING.
Now when an item is pressed when a selected event is activated (when an item is pressed, released or help) a value is sent to the variable.