Материал из for iRidium developers
Перейти к: навигация, поиск
Эта страница является переводом страницы EPSNET. Перевод выполнен на 100%.

Other languages:
English • ‎русский

the documentation is updated 31.10.2016


Description

iRidium for EPSNET - it is a package of tools for creating interfaces to control houses or offices on the basis of Teco (Tecomat) or iNELS equipment with support of the EPSNET protocol.


Licensing of iRidium for EPSNET (more):

  • Device License (EPSNET ) - a license for one control panel. it enables control of any compatible controller


Connection

Equipment configuration and settings required for iRidium to control equipment via the EPSNET protocol.


Ways of connection to PLC

Different ways of connection enable local work or work via the Internet:

Tecomat HowItWorks.png

1. Local connection

Tecomat Inet scheme.png

2. Internet connection


1. Local connection works only in the local network of the automation object. The UDP protocol is used. The connection is established between the controller and a control panel via the network router.


2. Internet connection enables connection to the controller via the Internet. To work in this mode the network router is required to have a static IP-address or use the DDNS service.


Adding of the EPSNET driver in iRidium

EPSNET does not allow you to form the list of devices you want to control. Add them manually.

Teco connection.png
Drag the selected driver from DEVICE BASE in PROJECT DEVICE PANEL.


  • Host - the controller IP-address
  • Port - the UDP control port, 61682
  • Update Time (ms) - the frequency of data update


It is convenient to form commands for the EPSNET driver on the basis of the export file in the *.PUB format which is made in Mosaic (TECO) and IDM (iNELS).

1(а). Prepare Mosaic:

if you already generated the *.pub file (compiled the project), remove the previous *.pub file before doing it again. Otherwise, addresses in your projects will be duplicated.

MosaicPUBexport.png

1(b). Prepare IDM iNELS:

Make sure IDM is connected to the controller. Otherwise, the import is not possible.

INelsExport1.png

2. Select variables for export in "Unit/Device Manager". Make sure to indicate the NAMES of exported variables:

INelsExport2.png
INelsExport3.png

3. Open "Project Setup" and indicate the path for saving the export file. The tab can be called '...Of SCADA' or 'RELI':

INelsExport4.png

4. For the *.pub file to be exported to your PC, you need to download the configuration on the controller again:

INelsExport5.png

5. Open the *.pub file in the text editor - it has the list of addresses in the format supported by iRidium:

INelsExport6.png


Commands & Feedbacks

To control EPSNET registers, you are required to transfer data from the *.PUB file in iRidium. Start setting up of registers by parsing strings of the PUB file: one string corresponds to one register:

DAC2_04M_OUT1_ON R B 18237 .1 BOOL PUB_INOUT
	  |			 |    |		|  |		 |
	  |_"Name"	 |	  | 	|  |_"Type"	 | reading only (IN)
				 |    |		|			 |_reading and writing (INOUT)
	  "Register"_|    |_"Address"		  
							|
					  "Bit"_|

EPSNET registers in iRidium Studio:

EPSNET register.png
  • Name - the register name
  • Type - the data type, see the correspondence table
  • Register - the register type
  • Address - the register number
  • Bit - the bit number in the byte (for Bool)


Add all required registers in the iRidium project selecting properties from the corresponding values of the *.PUB file.

Registers with the property PUB_INOUT can be written and read, create them in the Commands and Feedback tabs.

Registers with the property PUB_IN can be read only, create them in the Feedback tab.

Type (in the PUB file and iRidium Studio):

PUB file iRidium Studio Description Range
BOOL Bool Boolean 0…1
SINT Signed 8 bit Short integer -128...127
INT Signed 16 bit Integer -32 768...32767
DINT Signed 32 bit Double integer -2147483648...2147483647
USINT Unsignеd 8 bit Unsignеd short integer 0...255
UINT Unsigned 16 bit Unsignеd integer 0...65535
UDINT Unsigned 32 bit Unsignеd double integer 0...4294967295
REAL Float 32 bit Real (single precision) ±2.9E-39… ±3.4E+38
LREAL Float 64 bit Long real (double precision) IEC 559
TIME Time Duration 24d 20:31:23.647
DATE Date Data (only) from 1.1.1970 00:00:00
TIME_OF_DAY (TOD) Time of Day Time of day (only) 24d 20:31:23.647
DATE_AND_TIME (DT) Date Time Data and time of day from 1.1.1970 00:00:00
STRING String String up to 255 symbols


Commands and feedback channels have to be assigned to project graphic items to control equipment:

  • Commands are assigned to graphic items indicating the value to be sent to registers when clicking on the items
  • Feedback channels are assigned to graphic items to display the register state


To assign commands or channels to graphic items use the drag&drop method.

for fast creation of Feedback with the same settings with Command, right-click on Command and select the "Create Feedback" option. You can create Feedback for several registers at a time.


Changing the connection settings

You need the possibility to change connection properties when you disconnect from the Wi-Fi network of the automation object and start using 3G or another Wi-Fi network. To maintain control of the object you need to switch from the local to public IP-address of the Internet router.

The switch is not automatic. You have to select the connection mode. For remote acces you have to make ports for controlling the automation system public. In order to do that you have o set up the Port Forwarding service on your Internet router. VPN can provide protected connection.


1 Download the template (*.js) (right-click button: "Save object as ..."), add the template in the script editor with the buttonIcon Scripts.png (+) Add Script from file


2 Set up script properties as it is shown in the example:

function Internal_1() {
IR.GetDevice("EPSNET (UDP)").SetParameters({Host: "192.168.0.100", Port: 61682, UpdateTime: 1000});
}
function External_1() {
IR.GetDevice("EPSNET (UDP)").SetParameters({Host: "215.110.10.10", Port: 61682, UpdateTime: 1000});
}

Copy the driver name from Projeсt Device Panel - the list of properties has to be copied from the example.


3 Select the button which will be responsible for the switch of Internal and External properties. Open Macros Editor for the Press event (Object Properties > Programming), select the Script Call command and add it by double-clicking on it. Select the name of the function which will be activated by the button:

Script call internal-external.png

Now each pressing on the button will apply the corresponding connection properties.


Control of registers

To control registers you need to set up commands (Commands) and feedback channels (Feedbacks). To send a command you need to drag it on the graphic item and indicate the value (Value) to be sent. To display feedback you need to drag the feedback channel and indicate where the value (Value) has to be output

SendValue.png

Possible settings of commands, channels and graphic items are presented below:


BOOL

Registers with the BOOL (Bool) type are controlled by logical zero and one. The specific feature of its setting up is that besides the number you need to select the controlled bit of the register.

Command:

Type Value *
Bool 0...1 the data type - BOOL and the value for writing
Register X, Y, S, R, E, D0, D1, D2, Unknown the register type from the *.PUB table
Address 0...n the register number
Bit 0...7 the bit number in the byte

*Value - indicate when dragging the command on graphic items


Feedback:

Type Bool the data type - BOOL
Register X, Y, S, R, E, D0, D1, D2, Unknown the register type from the *.PUB table
Address 0...n the register number
Bit 0...7 the bit number in the byte
Value * 0...1 the bit state

* Value - it comes to the feedback channel, use it for displaying on items


Control:

BUTTON

It is a graphic item with 1 or 2 states. Buttons depending on settings can be fixed or not. Each pressing on Button initiates sending of the same set of commands assigned to it.


1 Create a variable were a number or string has to be written. Set it up as it is shown in the instructions.

2 Create a button and set it up as follows (see all settings):

UImakeAbutton.png
Type Button
Feedback Reaction of the item on user pressings and receiving data from equipment
  • Momentary - the button sends values but does not display feedback
  • Channel - the button sends values and displays feedback
  • None - the button does not visually react on pressings or receiving of feedback
  • Invert Channel - the button sends values and dispalys feedback inversely (false - on, true - off)

3 Drag the variable on the button and indicate the following in the dialog window:

UIdragCommand.png
Action Send Number - write numbers in the variable. You can switch to Send String for sending ASCII strings
Event for Action Interface events connected to the button. When the event are activated the indicated value will be written in the variable
  • Press - send on pressing
  • Release - send on releasing the button
  • Hold - send in cycles on holding the button
  • Move - it does not work with Button


You can use several events together. For example, send [ 100 ] on pressing and [ 0 ] on releasing.

Value Values for writing in the variable. The button sends the same value written in Value
Add a feedback channel (Create a feedback channel) Tick this if you want the button not only to write values in the variable but also change its state when receiving data from tthe variable. The received value will affect the button state (on/off) and it can be displayed in the button text field.

4 Now the variable is connected to the button. You can see all relations in OBJECT PROPERTIES > Programming

TRIGGER BUTTON

Trigger switch with the help of the "Trigger Button" item allows to send 2 values indicated in Trigger Value 1 and Trigger Value 2 alternately. When there is feedback the trigger automatically takes the respective value and sends the value opposite to the current one on pressing. The trigger cannot be set up for working with 3 and more values.


1 Create a variable which has to be switched between 2 values. Set it up as it is shown in the instructions.

2 Create a button and set it up as follows (see all item settings):

UImakeAtriggerButton.png
Type Trigger Button
Feedback Reaction on pressings and receiving data from equipment
  • Channel - switches the value and displays feedback (other types are not used)
Trigger Value 1 / Trigger Value 2 the values which will be sent alternately when clicking the button, they depend on the variable type

3 Drag the variable on the trigger, in the dialog window indicate:

UIdragCommandToTrigger.png
Action Send Token - send to the variable Value indicated in the graphic item properties (Trigger Value 1 or Value 2 depending on the current trigger state)
Event for Action An interface event connected to the button. When the event is activated the indicated value will be sent to the variable
  • Press - send on press
  • Release - send on release



For Trigger button you can use only one event at a time

Add a feedback channel (Create a feedback channel) Tick this field as it is required for the button to know its current value and change it when receiving data from the variable and on clicking.

4 Now the variable is connected to the trigger. You can see all relations in OBJECT PROPERTIES > Programming


Displaying states:

Graphic items can display values of variabls by changing their state or text:

CHANGE STATE

1 Set up the graphic item so it would display the received values:

SetUpItemToDisplayValue.png

Select in the General settings:

Feedback: Channel (if 0 = false) or
Feedback: Invert Channel (if 0 = true).

This feedback type enables the item to process data received from variables

2 Assign the equipment channel (Feedback) to the graphic item:

SetUpItemToDisplayValue2.png

Drag the feedback channel or the variable on the item, select In Text in the dialog window

For correct work the item needs 2 states. The first one corresponds to the zero value, the second - to any value different from zero.

The $V template added in the item text will enable output of received values in the item text.

DISPLAY IN TEXT

1 Drag the equipment channel (Feedback) to the graphic item:

DragChannelToDisplayTxt.png

Drag the feedback channel or the variable on the item, select In Text in the dialog window

The item can have any number of states and settings. The value will be output in the text field of all item states.

DragChannelToDisplayValue.png

Add $V in the item text. Drag the feedback channel or the variable on the item, select In Value in the dialog window. It will enable output of the received whole number and ass any text to it.

There are templates for outputting fractions and etc.:

LIST OF TEMPLATES

Template Function Template Function
$V the integer part of the current value $P the current value of Level in percentage of maximum
$F1 - 5 value with a floating point
From 1 to 5 - number of symbols after a point
$H the upper Level value
$S current Item state number $A current Level value minus the lower Level value
$R the Level range (the upper value minus the lower value) $L the lower Level value
$X the current value in the HEX type $$ the "dollar" symbol

A command (template) of incoming data processing and displaying is entered into the text field of a graphic Item and can be combined with other text or symbols (comments, units of measurement)


SINT, INT, DINT, USINT, UINT, UDINT

Information 8-, 16-, 32-bit registers are controlled by the range of values:

Command:

Type Value *
Signed 8 bit -128...127 the data type - SINT and the value for writing
Signed 16 bit -32 768...32767 the data type - INT
Signed 32 bit -2147483648...2147483647 the data type - DINT
Unsigned 8 bit 0...255 the data type - USINT
Unsigned 16 bit 0...65535 the data type - UINT
Unsigned 32 bit 0...4294967295 the data type - UDINT
Register X, Y, S, R, E, D0, D1, D2, Unknown the register type from the *.PUB table
Address 0...n the register number

*Value - indicate when dragging the command on graphic items


Feedback:

Type Value *
Signed 8 bit -128...127 the data type - SINT and the possible value
Signed 16 bit -32 768...32767 the data type - INT
Signed 32 bit -2147483648...2147483647 the data type - DINT
Unsigned 8 bit 0...255 the data type - USINT
Unsigned 16 bit 0...65535 the data type - UINT
Unsigned 32 bit 0...4294967295 the data type - UDINT
Register X, Y, S, R, E, D0, D1, D2, Unknown the register type from the *.PUB table
Address 0...n the register number

* Value - it comes to the feedback channel, use it for displaying on items


Control:

With the help of graphic items you can write the selected value in the variable:

BUTTON

It is a graphic item with 1 or 2 states. Buttons depending on settings can be fixed or not. Each pressing on Button initiates sending of the same set of commands assigned to it.


1 Create a variable were a number or string has to be written. Set it up as it is shown in the instructions.

2 Create a button and set it up as follows (see all settings):

UImakeAbutton.png
Type Button
Feedback Reaction of the item on user pressings and receiving data from equipment
  • Momentary - the button sends values but does not display feedback
  • Channel - the button sends values and displays feedback
  • None - the button does not visually react on pressings or receiving of feedback
  • Invert Channel - the button sends values and dispalys feedback inversely (false - on, true - off)

3 Drag the variable on the button and indicate the following in the dialog window:

UIdragCommand.png
Action Send Number - write numbers in the variable. You can switch to Send String for sending ASCII strings
Event for Action Interface events connected to the button. When the event are activated the indicated value will be written in the variable
  • Press - send on pressing
  • Release - send on releasing the button
  • Hold - send in cycles on holding the button
  • Move - it does not work with Button


You can use several events together. For example, send [ 100 ] on pressing and [ 0 ] on releasing.

Value Values for writing in the variable. The button sends the same value written in Value
Add a feedback channel (Create a feedback channel) Tick this if you want the button not only to write values in the variable but also change its state when receiving data from tthe variable. The received value will affect the button state (on/off) and it can be displayed in the button text field.

4 Now the variable is connected to the button. You can see all relations in OBJECT PROPERTIES > Programming


TRIGGER BUTTON

Trigger switch with the help of the "Trigger Button" item allows to send 2 values indicated in Trigger Value 1 and Trigger Value 2 alternately. When there is feedback the trigger automatically takes the respective value and sends the value opposite to the current one on pressing. The trigger cannot be set up for working with 3 and more values.


1 Create a variable which has to be switched between 2 values. Set it up as it is shown in the instructions.

2 Create a button and set it up as follows (see all item settings):

UImakeAtriggerButton.png
Type Trigger Button
Feedback Reaction on pressings and receiving data from equipment
  • Channel - switches the value and displays feedback (other types are not used)
Trigger Value 1 / Trigger Value 2 the values which will be sent alternately when clicking the button, they depend on the variable type

3 Drag the variable on the trigger, in the dialog window indicate:

UIdragCommandToTrigger.png
Action Send Token - send to the variable Value indicated in the graphic item properties (Trigger Value 1 or Value 2 depending on the current trigger state)
Event for Action An interface event connected to the button. When the event is activated the indicated value will be sent to the variable
  • Press - send on press
  • Release - send on release



For Trigger button you can use only one event at a time

Add a feedback channel (Create a feedback channel) Tick this field as it is required for the button to know its current value and change it when receiving data from the variable and on clicking.

4 Now the variable is connected to the trigger. You can see all relations in OBJECT PROPERTIES > Programming


LEVEL

Pressing on the level or moving of the slider sends to the variable the value corresponding to the current slider position.

1 Create a variable which has to be regulated. Set it up as it is shown in the instructions.

2 Create a level and set it up as follows (see all settings):

UImakeAlevel.png
Type Level
Feedback the level reaction on user's pressings and receiving data from equipment
  • Channel - to send values and display feedback (the slider moves when receiving data)
Min / Max the limits of level regulation: they define the value range in which the slider moves
Invert Range to swap the top and bottom level parts. i.e. the regulation from 0 to 100 will be performed not from the bottom upwards (when the level is vertical) but from top downwards.

3 Drag the variable to the level, indicate in the dialog window:

UIdragCommandToLevel.png
Action Send Token - to send to the variable Value, taken as the current slider position in the Min...Max range
Event for Action the event interface connected to the button. When the event is activated the indicated value will be written in the variable
  • Press - to send Value on pressings
  • Release - to send Value on releasing
  • Move - to send all intermediate Values when moving the slider.
    add Delay (100) before commands for the Move event to avoid overload of equipment (with the Delay command Move will work once in 100 ms)



You can use all three events together.

Add a feedback channel (Create a feedback channel) Tick it for the slider to move in accordance with the actual variable state

4 Now the variable is connected to the level. You can see all relations in OBJECT PROPERTIES > Programming

UP/DOWN BUTTON

A graphic item has 2 states. At that each clicking changes the current value by "Up/Down Value", but within the "Max/Min Value" range. The calculated value is sent by the variable: thus the step increment/decrement of the variable is implemented. It is required to have feedback from the variable in real time to work with the item.


1 Create a variable which has to be incremented/decremented. Set it up as it is shown in the instructions.

2 Create a level and set it up as follows (see all settings):

Editor window Object Properties General Up Down.png
Type Up/Down Button
Feedback Reaction of the level on user's clickings and receiving data from equipment
  • Momentary - the button has to be clicked visually right away, it does not display feedback visually
Up/Down Value the increment/decrement step (it can be more or less than zero)
Min/Max Value the increment/decrement limits (minimum limit for decrement and maximum limit for increment)
Hold Value the increment/decrement step when the Hold event is activated. Commands for controlling equipment can be assigned using both Press and Hold - then the value will be incremented/decremented when you hold the button pressed
Hold Time time of holding the button for the Hold event to be activated
Repeat Time frequency of repeating the On Hold events

3 Drag the variable on the button and in the dialog window indicate:

Editor drag to UDB.png
Action Send Token - send to the variable Value calculated as a sum of the current values and the increment step
Event for Action The interface event connected to the button. When the event is activated the calculated increment value will be written in the variable
  • Press - send on pressing
  • Hold - increment the value with the indicated frequency on holding



You can use two events at a time.

Add a feedback channel (Create a feedback channel) Tick this field as it is required for the increment to be calculated in accordance with the actual variable state

4 Now the variable is connected to the level. You can see all relations in OBJECT PROPERTIES > Programming

RADIO BUTTONS

Radio Button - an interface item which allows to select one of the preset options. In iRidium Radio Buttons are not separated as an item type as they can be set up on the basis of Trigger Button. The task of Radio Buttons: to send to the variables values from different buttons from which you can select only one.

Settings and behavior of Radio Button depend on the variable you work with. You can find several examples below.


Variant 1 Radio Buttons for controlling one variable with the possibility to receive feedback. Values are written in one variable: equipment returns the current state of this variable.

  1. Set up the Trigger Button items (see the image) in a number equal to the number of Radio Buttons. In the fieldsTrigger Value 1 and 2 indicate the same values corresponding to those which have to be sent to the controlled variable by each button
  2. Drag the command for controlling the variable on all Radio Buttons. Select the Press or Release events for sending, tick Add A Feedback Channel to display the variable status


RadioButtons-MainSettings.png
RadioButtons-DragCommand.png

the set up button will go to State 2 only when the variable takes the value indicated in Trigger Value 1 and 2


Variant 2 Radio Buttons for controlling variables with possibility to receive feedback. ON/OFF values are written in different variables; equipment returns the current state of these variables. The variables are not synchronized by automation equipment for working in the Radio Buttons mode (inactive modes on the side of iRidium have to be off)

  1. Set up the items Type: Trigger Button, Feedback: Channel, indicate Trigger Value 1 = inactive, Trigger Value 2 = the variable active state (for example 0/1, 0/100)
  2. Drag the commands for controlling the variables on graphic items. By the example of the first item of the group:
    1. Send zeros to all variables in the Radion Buttons group to deactivate the current active mode. In order to do that select Action: Send Number in the dialog window for command sending
    2. Add Delay(50) ms through the macros editor of the Press event to give equipment time to deactivate the active mode
    3. Drag the command for controlling the variable corresponding to Radio Button on the item. Leave Action: Send Token. Value on the Press (or Release) event, tick Add a Feedback Channel


RadioButtons-MainSettings-Septd.png
RadioButtons-DragCommand-Septd.png

If the equipment working modes are synchronized on the automation equipment side (when activating one of the modes the rest are automatically deactivated) you do not need to send zeros to the deactivated variables. Execute only article 2.3 of the settings.


Displaying states:

Graphic items can display values of variabls by changing their state or text:

CHANGE STATE

1 Set up the graphic item so it would display the received values:

SetUpItemToDisplayValue.png

Select in the General settings:

Feedback: Channel (if 0 = false) or
Feedback: Invert Channel (if 0 = true).

This feedback type enables the item to process data received from variables

2 Assign the equipment channel (Feedback) to the graphic item:

SetUpItemToDisplayValue2.png

Drag the feedback channel or the variable on the item, select In Text in the dialog window

For correct work the item needs 2 states. The first one corresponds to the zero value, the second - to any value different from zero.

The $V template added in the item text will enable output of received values in the item text.

DISPLAY IN TEXT

1 Drag the equipment channel (Feedback) to the graphic item:

DragChannelToDisplayTxt.png

Drag the feedback channel or the variable on the item, select In Text in the dialog window

The item can have any number of states and settings. The value will be output in the text field of all item states.

DragChannelToDisplayValue.png

Add $V in the item text. Drag the feedback channel or the variable on the item, select In Value in the dialog window. It will enable output of the received whole number and ass any text to it.

There are templates for outputting fractions and etc.:

LIST OF TEMPLATES

Template Function Template Function
$V the integer part of the current value $P the current value of Level in percentage of maximum
$F1 - 5 value with a floating point
From 1 to 5 - number of symbols after a point
$H the upper Level value
$S current Item state number $A current Level value minus the lower Level value
$R the Level range (the upper value minus the lower value) $L the lower Level value
$X the current value in the HEX type $$ the "dollar" symbol

A command (template) of incoming data processing and displaying is entered into the text field of a graphic Item and can be combined with other text or symbols (comments, units of measurement)



RGB lighting

RGB LED strips are controlled with the help of DMX controllers and have one of the following configuration:

  • Red, Green, Blue - three channels for controlling the LED strip color. Decrease of brightness is performed by decreasing brightness of separate channels.
  • Red, Green, Blue, Alpha - four channels for controlling the LED strip color and brightness


Variant 1 Control RGB strips with the help of three (four) Level items.


You create 3 (4) Unsigned 8-bit (Subtupe: VALUE) variables in the project. The variables are controlled in the range 0...255, value increase in the channel corresponds to the increase brightness of the respective color.

LEVEL

Pressing on the level or moving of the slider sends to the variable the value corresponding to the current slider position.

1 Create a variable which has to be regulated. Set it up as it is shown in the instructions.

2 Create a level and set it up as follows (see all settings):

UImakeAlevel.png
Type Level
Feedback the level reaction on user's pressings and receiving data from equipment
  • Channel - to send values and display feedback (the slider moves when receiving data)
Min / Max the limits of level regulation: they define the value range in which the slider moves
Invert Range to swap the top and bottom level parts. i.e. the regulation from 0 to 100 will be performed not from the bottom upwards (when the level is vertical) but from top downwards.

3 Drag the variable to the level, indicate in the dialog window:

UIdragCommandToLevel.png
Action Send Token - to send to the variable Value, taken as the current slider position in the Min...Max range
Event for Action the event interface connected to the button. When the event is activated the indicated value will be written in the variable
  • Press - to send Value on pressings
  • Release - to send Value on releasing
  • Move - to send all intermediate Values when moving the slider.
    add Delay (100) before commands for the Move event to avoid overload of equipment (with the Delay command Move will work once in 100 ms)



You can use all three events together.

Add a feedback channel (Create a feedback channel) Tick it for the slider to move in accordance with the actual variable state

4 Now the variable is connected to the level. You can see all relations in OBJECT PROPERTIES > Programming


Variant 2 Control of RGB strips with the help of palette


You can use any colored item as a palette - you will be able to send commands of setting up the selected color to equipment by moving a finger on the item.

It requires adding a special script - RGB libraries - in your project. The script has to be added only once. Then you will be able to use it to control RGB strips of any built-in iRidium drivers.

2.1 Create a palette and auxiliary items. You can use any colored image as a palette.

  • Set up the palette like Joystick with the range 0...100 for Х and Y coordinates
  • Set up an inactive item Button which will display the color selected on the palette
  • If it is required set up active Button items which will change the strip brightness step-by-step
RGBPalette.png

2.2 Download the file RGB_Library.js

This file enables color control with the help of JavaScript. Add the file in your visualization project: open the project in iRidium Studio, click Icon Scripts.png, select the item ( + ) "Add Script From File"

2.3 Create an empty script file: ( + ) "New Script" to add the description of your RGB palette in it:

Describe the palette and the item for displaying the selected color in the script file:
///////// Copy this function to make one more RGB palette ///////
RGB_player(
         "Driver",                                            // Driver in project
         "Channel Red",                                       // Name of Red Channel
         "Channel Green",                                     // Name of Green Channel 
         "Channel Blue",                                      // Name of Blue Channel
         255,                                                 // Top limit for RGB channel (100 or 255)
         IR.GetItem("Page 1").GetItem("Item Color Picker 1"), // Item "Color Picker"
         /////// optional parameters ///////////////////////////
         IR.GetItem("Page 1").GetItem("Item Display 1"),      // Item "Display"
         )

The extended version has buttons for controlling brightness:

Palette, displaying the color and the button +/- for controlling brightness

///////// Copy this function to make one more RGB palette ///////
RGB_player(
         "Driver",                                            // Driver in project
         "Channel Red",                                       // Name of Red Channel
         "Channel Green",                                     // Name of Green Channel 
         "Channel Blue",                                      // Name of Blue Channel
         255,                                                 // Top limit for RGB channel (100 or 255)
         IR.GetItem("Page 1").GetItem("Item Color Picker 1"), // Item "Color Picker"
         /////// optional parameters ////////////////////////////
         IR.GetItem("Page 1").GetItem("Item Display 1"),      // Item "Display"
         IR.GetItem("Page 1").GetItem("Up 1"),                // Item "Up"
         IR.GetItem("Page 1").GetItem("Down 1"),              // Item "Down"
         10                                                   // Increment step for "Up" and "Down"
         )


In the description indicate where the palette is and to what equipment it sends data:

  • IR.GetDevice("Driver") - the name of the diver to which you will send RGB commands. Copy the driver name in PROJECT DEVICE PANEL
  • "Channel Red", "Channel Green", "Channel Blue" - the names of the variables (Commands) which are responsible for control of red, green and blue color components. Copy the names in PROJECT DEVICE PANEL. The Commands names have to be the same as the names of Feedbacks from where information about the current color of the RGB strip comes.
    HDL-Buspro, Domintell - they have a special way of writing names. For them you need to indicate <the device name in the network>:<the channel name>, for example "Dimmer in Bedroom:Channel 1"
  • 255 - the maximum brightness value for each color. For the majority of equipment brightness is regulated in the range from 0 to 255 but there are drivers which control color brightness in the range 0...100 (for example, HDL). For HDL-Buspro indicate value 100 for this property.
  • IR.GetItem("Page 1").GetItem("Item Color Picker 1") - the page name ("Page 1") and the item on it ("Item Color Picker 1") which you will use as a palette
  • IR.GetItem("Page 1").GetItem("Item Display 1") - the page name ("Page 1") and the item on it ("Item Display 1") which you will use for displaying the color selected on the palette
  • IR.GetItem("Page 1").GetItem("Up 1") - the page name ("Page 1") and the item on it ("Up 1") which will increase brightness of the selected color on pressing
  • IR.GetItem("Page 1").GetItem("Down 1") - the page name ("Page 1") and the item on it ("Down 1") which will decrease brightness of the selected color on pressing
  • 10 - the value on which brightness of the selected color will increase/decrease when clicking Up and Down


2.3 Click "OK" to save the palette description. Start Emulator to test its work.

Errors which can appear at incorrect palette description are displayed in the log window (F4)


REAL, LREAL

Information 32- and 64-bit registers with floating point are controlled by the range of values. The difference from integer-valued registers is that you can send fraction values to them (and receive fraction values from the controller):

Command:

Type Value *
Float 32 bit ±2.9E-39… ±3.4E+38 the data type - REAL and the value for writing
Float 64 bit in accordance with IEC 559 the data type - LREAL
Register X, Y, S, R, E, D0, D1, D2, Unknown the register type from the *.PUB table
Address 0...n the register number

*Value - indicate when dragging the command on graphic items


Feedback:

Type Value *
Float 32 bit ±2.9E-39… ±3.4E+38 the data type - REAL and possible value
Float 64 bit in accordance with IEC 559 the data type - LREAL
Register X, Y, S, R, E, D0, D1, D2, Unknown the register type from the *.PUB table
Address 0...n the register number

* Value - it comes to the feedback channel, use it for displaying on items


Control:

With the help of graphic items you can write the selected value in the variable:

BUTTON

It is a graphic item with 1 or 2 states. Buttons depending on settings can be fixed or not. Each pressing on Button initiates sending of the same set of commands assigned to it.


1 Create a variable were a number or string has to be written. Set it up as it is shown in the instructions.

2 Create a button and set it up as follows (see all settings):

UImakeAbutton.png
Type Button
Feedback Reaction of the item on user pressings and receiving data from equipment
  • Momentary - the button sends values but does not display feedback
  • Channel - the button sends values and displays feedback
  • None - the button does not visually react on pressings or receiving of feedback
  • Invert Channel - the button sends values and dispalys feedback inversely (false - on, true - off)

3 Drag the variable on the button and indicate the following in the dialog window:

UIdragCommand.png
Action Send Number - write numbers in the variable. You can switch to Send String for sending ASCII strings
Event for Action Interface events connected to the button. When the event are activated the indicated value will be written in the variable
  • Press - send on pressing
  • Release - send on releasing the button
  • Hold - send in cycles on holding the button
  • Move - it does not work with Button


You can use several events together. For example, send [ 100 ] on pressing and [ 0 ] on releasing.

Value Values for writing in the variable. The button sends the same value written in Value
Add a feedback channel (Create a feedback channel) Tick this if you want the button not only to write values in the variable but also change its state when receiving data from tthe variable. The received value will affect the button state (on/off) and it can be displayed in the button text field.

4 Now the variable is connected to the button. You can see all relations in OBJECT PROPERTIES > Programming


TRIGGER BUTTON

Trigger switch with the help of the "Trigger Button" item allows to send 2 values indicated in Trigger Value 1 and Trigger Value 2 alternately. When there is feedback the trigger automatically takes the respective value and sends the value opposite to the current one on pressing. The trigger cannot be set up for working with 3 and more values.


1 Create a variable which has to be switched between 2 values. Set it up as it is shown in the instructions.

2 Create a button and set it up as follows (see all item settings):

UImakeAtriggerButton.png
Type Trigger Button
Feedback Reaction on pressings and receiving data from equipment
  • Channel - switches the value and displays feedback (other types are not used)
Trigger Value 1 / Trigger Value 2 the values which will be sent alternately when clicking the button, they depend on the variable type

3 Drag the variable on the trigger, in the dialog window indicate:

UIdragCommandToTrigger.png
Action Send Token - send to the variable Value indicated in the graphic item properties (Trigger Value 1 or Value 2 depending on the current trigger state)
Event for Action An interface event connected to the button. When the event is activated the indicated value will be sent to the variable
  • Press - send on press
  • Release - send on release



For Trigger button you can use only one event at a time

Add a feedback channel (Create a feedback channel) Tick this field as it is required for the button to know its current value and change it when receiving data from the variable and on clicking.

4 Now the variable is connected to the trigger. You can see all relations in OBJECT PROPERTIES > Programming


LEVEL

Pressing on the level or moving of the slider sends to the variable the value corresponding to the current slider position.

1 Create a variable which has to be regulated. Set it up as it is shown in the instructions.

2 Create a level and set it up as follows (see all settings):

UImakeAlevel.png
Type Level
Feedback the level reaction on user's pressings and receiving data from equipment
  • Channel - to send values and display feedback (the slider moves when receiving data)
Min / Max the limits of level regulation: they define the value range in which the slider moves
Invert Range to swap the top and bottom level parts. i.e. the regulation from 0 to 100 will be performed not from the bottom upwards (when the level is vertical) but from top downwards.

3 Drag the variable to the level, indicate in the dialog window:

UIdragCommandToLevel.png
Action Send Token - to send to the variable Value, taken as the current slider position in the Min...Max range
Event for Action the event interface connected to the button. When the event is activated the indicated value will be written in the variable
  • Press - to send Value on pressings
  • Release - to send Value on releasing
  • Move - to send all intermediate Values when moving the slider.
    add Delay (100) before commands for the Move event to avoid overload of equipment (with the Delay command Move will work once in 100 ms)



You can use all three events together.

Add a feedback channel (Create a feedback channel) Tick it for the slider to move in accordance with the actual variable state

4 Now the variable is connected to the level. You can see all relations in OBJECT PROPERTIES > Programming

UP/DOWN BUTTON

A graphic item has 2 states. At that each clicking changes the current value by "Up/Down Value", but within the "Max/Min Value" range. The calculated value is sent by the variable: thus the step increment/decrement of the variable is implemented. It is required to have feedback from the variable in real time to work with the item.


1 Create a variable which has to be incremented/decremented. Set it up as it is shown in the instructions.

2 Create a level and set it up as follows (see all settings):

Editor window Object Properties General Up Down.png
Type Up/Down Button
Feedback Reaction of the level on user's clickings and receiving data from equipment
  • Momentary - the button has to be clicked visually right away, it does not display feedback visually
Up/Down Value the increment/decrement step (it can be more or less than zero)
Min/Max Value the increment/decrement limits (minimum limit for decrement and maximum limit for increment)
Hold Value the increment/decrement step when the Hold event is activated. Commands for controlling equipment can be assigned using both Press and Hold - then the value will be incremented/decremented when you hold the button pressed
Hold Time time of holding the button for the Hold event to be activated
Repeat Time frequency of repeating the On Hold events

3 Drag the variable on the button and in the dialog window indicate:

Editor drag to UDB.png
Action Send Token - send to the variable Value calculated as a sum of the current values and the increment step
Event for Action The interface event connected to the button. When the event is activated the calculated increment value will be written in the variable
  • Press - send on pressing
  • Hold - increment the value with the indicated frequency on holding



You can use two events at a time.

Add a feedback channel (Create a feedback channel) Tick this field as it is required for the increment to be calculated in accordance with the actual variable state

4 Now the variable is connected to the level. You can see all relations in OBJECT PROPERTIES > Programming

RADIO BUTTONS

Radio Button - an interface item which allows to select one of the preset options. In iRidium Radio Buttons are not separated as an item type as they can be set up on the basis of Trigger Button. The task of Radio Buttons: to send to the variables values from different buttons from which you can select only one.

Settings and behavior of Radio Button depend on the variable you work with. You can find several examples below.


Variant 1 Radio Buttons for controlling one variable with the possibility to receive feedback. Values are written in one variable: equipment returns the current state of this variable.

  1. Set up the Trigger Button items (see the image) in a number equal to the number of Radio Buttons. In the fieldsTrigger Value 1 and 2 indicate the same values corresponding to those which have to be sent to the controlled variable by each button
  2. Drag the command for controlling the variable on all Radio Buttons. Select the Press or Release events for sending, tick Add A Feedback Channel to display the variable status


RadioButtons-MainSettings.png
RadioButtons-DragCommand.png

the set up button will go to State 2 only when the variable takes the value indicated in Trigger Value 1 and 2


Variant 2 Radio Buttons for controlling variables with possibility to receive feedback. ON/OFF values are written in different variables; equipment returns the current state of these variables. The variables are not synchronized by automation equipment for working in the Radio Buttons mode (inactive modes on the side of iRidium have to be off)

  1. Set up the items Type: Trigger Button, Feedback: Channel, indicate Trigger Value 1 = inactive, Trigger Value 2 = the variable active state (for example 0/1, 0/100)
  2. Drag the commands for controlling the variables on graphic items. By the example of the first item of the group:
    1. Send zeros to all variables in the Radion Buttons group to deactivate the current active mode. In order to do that select Action: Send Number in the dialog window for command sending
    2. Add Delay(50) ms through the macros editor of the Press event to give equipment time to deactivate the active mode
    3. Drag the command for controlling the variable corresponding to Radio Button on the item. Leave Action: Send Token. Value on the Press (or Release) event, tick Add a Feedback Channel


RadioButtons-MainSettings-Septd.png
RadioButtons-DragCommand-Septd.png

If the equipment working modes are synchronized on the automation equipment side (when activating one of the modes the rest are automatically deactivated) you do not need to send zeros to the deactivated variables. Execute only article 2.3 of the settings.


Displaying states:

Graphic items can display values of variabls by changing their state or text:

CHANGE STATE

1 Set up the graphic item so it would display the received values:

SetUpItemToDisplayValue.png

Select in the General settings:

Feedback: Channel (if 0 = false) or
Feedback: Invert Channel (if 0 = true).

This feedback type enables the item to process data received from variables

2 Assign the equipment channel (Feedback) to the graphic item:

SetUpItemToDisplayValue2.png

Drag the feedback channel or the variable on the item, select In Text in the dialog window

For correct work the item needs 2 states. The first one corresponds to the zero value, the second - to any value different from zero.

The $V template added in the item text will enable output of received values in the item text.

DISPLAY IN TEXT

1 Drag the equipment channel (Feedback) to the graphic item:

DragChannelToDisplayTxt.png

Drag the feedback channel or the variable on the item, select In Text in the dialog window

The item can have any number of states and settings. The value will be output in the text field of all item states.

DragChannelToDisplayValue.png

Add $V in the item text. Drag the feedback channel or the variable on the item, select In Value in the dialog window. It will enable output of the received whole number and ass any text to it.

There are templates for outputting fractions and etc.:

LIST OF TEMPLATES

Template Function Template Function
$V the integer part of the current value $P the current value of Level in percentage of maximum
$F1 - 5 value with a floating point
From 1 to 5 - number of symbols after a point
$H the upper Level value
$S current Item state number $A current Level value minus the lower Level value
$R the Level range (the upper value minus the lower value) $L the lower Level value
$X the current value in the HEX type $$ the "dollar" symbol

A command (template) of incoming data processing and displaying is entered into the text field of a graphic Item and can be combined with other text or symbols (comments, units of measurement)




TIME, DATE, TIME_OF_DAY, DATE_AND_TIME

Date and time are available for writing and reading. The format of writing must correspond to the preset one. It is recommended to set up time and date using the means of the controller. The application in this case will only display the received data.

Command:

Type Value *
Time 24d 20:31:23.647 the data type - TIME
Date 1.1.1970 00:00:00 the data type - DATE
Time of Day 24d 20:31:23.647 the data type - TIME_OF_DAY (TOD)
Date Time 1.1.1970 00:00:00 the data type - DATE_AND_TIME (DT)
Register X, Y, S, R, E, D0, D1, D2, Unknown the register type from the *.PUB table
Address 0...n the register number

* Value - indicate it when dragging the command on graphic items


Feedback:

Type Value *
Time 24d 20:31:23.647 the data type - TIME
Date 1.1.1970 00:00:00 the data type - DATE
Time of Day 24d 20:31:23.647 the data type - TIME_OF_DAY (TOD)
Date Time 1.1.1970 00:00:00 the data type - DATE_AND_TIME (DT)
Register X, Y, S, R, E, D0, D1, D2, Unknown the register type from the *.PUB table
Address 0...n the register number

* Value - it comes to the feedback channel, use it for displaying on items


Control:

BUTTON

It is a graphic item with 1 or 2 states. Buttons depending on settings can be fixed or not. Each pressing on Button initiates sending of the same set of commands assigned to it.


1 Create a variable were a number or string has to be written. Set it up as it is shown in the instructions.

2 Create a button and set it up as follows (see all settings):

UImakeAbutton.png
Type Button
Feedback Reaction of the item on user pressings and receiving data from equipment
  • Momentary - the button sends values but does not display feedback
  • Channel - the button sends values and displays feedback
  • None - the button does not visually react on pressings or receiving of feedback
  • Invert Channel - the button sends values and dispalys feedback inversely (false - on, true - off)

3 Drag the variable on the button and indicate the following in the dialog window:

UIdragCommand.png
Action Send Number - write numbers in the variable. You can switch to Send String for sending ASCII strings
Event for Action Interface events connected to the button. When the event are activated the indicated value will be written in the variable
  • Press - send on pressing
  • Release - send on releasing the button
  • Hold - send in cycles on holding the button
  • Move - it does not work with Button


You can use several events together. For example, send [ 100 ] on pressing and [ 0 ] on releasing.

Value Values for writing in the variable. The button sends the same value written in Value
Add a feedback channel (Create a feedback channel) Tick this if you want the button not only to write values in the variable but also change its state when receiving data from tthe variable. The received value will affect the button state (on/off) and it can be displayed in the button text field.

4 Now the variable is connected to the button. You can see all relations in OBJECT PROPERTIES > Programming

EDITBOX

It is an item for inputting data from keyboards. The input data are assigned to an item from where they can be "taken" - sent to equipment or processed in the script.


1 Create an item and set it up as follows (see all settings):

Editor window Object Properties Programming EditBoxSetup.png
Type Edit Box
Feedback Reaction on pressings
  • Momentary - the input area is highlighted when in focus

2 Edit Box items can be related to variables directly or via scripts

Editor window Object Properties Programming Edit Box show.png

When clicking on the Edit Box item execute the command for keyboard opening:

  • Object Properties > Programming > Press > «Show Keyboard [keyboard_type]»


On activation of the Enter event send data from Edit Box to the item or driver.


Example of work:

  • Press - the virtual keyboard of the smart phone (tablet) is opened
  • Enter - the Edit Box item sends the text as a command to the driver; closes the keyboard; clears the input area.


To delete data you input before, write an empty string in Edit Box:

Editor window Object Properties Programming Edit Box hide.png
Editor window Object Properties Programming Edit Box Clean.png
With the help of JavaScript you can form the value of date and time on the basis of the current time of the control panel

Displaying states:

Graphic items can display values of variabls by changing their state or text:

CHANGE STATE

1 Set up the graphic item so it would display the received values:

SetUpItemToDisplayValue.png

Select in the General settings:

Feedback: Channel (if 0 = false) or
Feedback: Invert Channel (if 0 = true).

This feedback type enables the item to process data received from variables

2 Assign the equipment channel (Feedback) to the graphic item:

SetUpItemToDisplayValue2.png

Drag the feedback channel or the variable on the item, select In Text in the dialog window

For correct work the item needs 2 states. The first one corresponds to the zero value, the second - to any value different from zero.

The $V template added in the item text will enable output of received values in the item text.

DISPLAY IN TEXT

1 Drag the equipment channel (Feedback) to the graphic item:

DragChannelToDisplayTxt.png

Drag the feedback channel or the variable on the item, select In Text in the dialog window

The item can have any number of states and settings. The value will be output in the text field of all item states.

DragChannelToDisplayValue.png

Add $V in the item text. Drag the feedback channel or the variable on the item, select In Value in the dialog window. It will enable output of the received whole number and ass any text to it.

There are templates for outputting fractions and etc.:

LIST OF TEMPLATES

Template Function Template Function
$V the integer part of the current value $P the current value of Level in percentage of maximum
$F1 - 5 value with a floating point
From 1 to 5 - number of symbols after a point
$H the upper Level value
$S current Item state number $A current Level value minus the lower Level value
$R the Level range (the upper value minus the lower value) $L the lower Level value
$X the current value in the HEX type $$ the "dollar" symbol

A command (template) of incoming data processing and displaying is entered into the text field of a graphic Item and can be combined with other text or symbols (comments, units of measurement)


Emulator: project testing

Emulator - an application launched in iRidium Studio to test the project work.

An Emulator works only when you authorized with login and password from iRidium Mobile web site

Emulator work modes see in iRidium Studio > Tools > Options > Emulator:

  • Client Fullscreen - start the Emulator in Full Screen mode (press Alt+F4 to Exit)
  • Client Sound On - switch sound in app
  • Show log at Emuator Start - open the log window automatically at Emulator start (you can also use F4)


Path to the license.png

Hot keys:

  • F4 - open the debug log
  • F5 - launch Emulator
  • F7 - open the app Menu to manage account and download projects from iRidium Cloud
  • F8 - open the settings (password: 2007)



Synchronization with control panels

Upload and launch of the iRdidium project on the control panel is performed with the help of the iRidium Transfer application, installed on your PC. You can also upload the project on the panel from the editor via Transfer.


Use i3 pro for iOS, Android, Windows, Mac in Test Mode by downloading projects via iRidium Transfer (the possibility is available for integrators):


iRidium Transfer settings


Commercial use of iRidium is possible only at download of visualization projects with the help of the iRidium Cloud service on the iRidium Mobile web site (see the instructions).

iRidium Cloud can be set up only by a registered integrator. After the setting up he can invite end-users to control the automation object.