Skip to main content

iRidi for EPSNET

a toolkit for creating control interfaces for Teco and iNELS using the EPSNET protocol

Documentation updated 01.01.2024

Description​

iRidi for EPSNET is a toolkit for creating a home or office control interface based on Teco (Tecomat) or iNELS equipment that supports the EPSNET protocol.

Connection​

Equipment configuration and settings required for iRidi to control equipment using the EPSNET protocol.

PLC connection methods​

Different connection methods support local operation and operation over the Internet:

Tecomat_HowItWorks.png

  1. Local connection

Tecomat_Inet_scheme.png

  1. Internet connection

  2. A local connection works only on the automation site's local network. It uses UDP. The connection is established between the control panel and the controller through a network router.

  3. An Internet connection lets you connect to the controller over the Internet. To operate in this mode, the network router must have a static IP address or use a DDNS service.

You can add an EPSNET driver by importing a CSV file or entering the data manually.

Importing a CSV file (*.csv)​

Universal import from CSV File lets you import drivers from a table in CSV format.

For detailed instructions on creating a CSV file and importing it into iRidi Studio, follow this link.

Adding an EPSNET driver to iRidi​

EPSNET cannot automatically generate a list of devices that can be controlled, so add them manually.

Epsnet1.png

Drag the selected driver from DEVICE BASE to PROJECT DEVICE PANEL.

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

A convenient way to create commands for the EPSNET driver is to use an export file in .PUB format, generated by Mosaic (TECO) and IDM (iNELS).

1(a). Prepare Mosaic:

If you have already generated a *.pub file (compiled the project), delete the previous *.pub file before generating it again; otherwise, the addresses in the project will be duplicated.

MosaicPUBexport.png

1(b). Prepare IDM iNELS:

Make sure IDM is connected to the controller; otherwise, export is not possible.

INelsExport1.png

2. Select the variables to export in the device's control software: "Unit/device manager". You must specify the NAMES of the exported variables:

INelsExport2.png INelsExport3.png

3. Open "Project setup" and specify the path for saving the export file. The tab may be named '... of SCADA' or 'RELI':

INelsExport4.png

4. To export the .pub file to the PC, reload the configuration onto the controller:

INelsExport5.png

5. Open the *.pub file in a text editor. It contains a list of addresses in a format supported by iRidi:

INelsExport6.png

Commands & Feedbacks​

The data from the *.PUB file must be transferred to iRidi to control EPSNET registers. Configure the registers by examining the lines in the PUB file, each of which corresponds to one register:


DAC2_04M_OUT1_ON R B 18237 .1 BOOL PUB_INOUT
| | | | | |
|_"Name" | | | |_"Type" | read only (IN)
| | | |_read and write (INOUT)
"Register"_| |_"Address"
|
"Bit"_|

An EPSNET register in iRidi Studio:

Epsnet2.png

  • Name - register name
  • Type - data type; see the mapping table
  • Register - register type
  • Address - register number
  • Bit - bit number within the byte (for Bool)

Add all required registers to the iRidi project, selecting parameters from the corresponding values in the *.PUB file.

A register with the PUB_INOUT property can be read and written; create it in the Commands and Feedback tabs.

A register with the PUB_IN property can only be read; create it only in the Feedback tab.

Type (in the PUB file and iRidi Studio):

PUB fileiRidi StudioDescriptionRange
BOOLBoolBoolean0…1
SINTSigned 8 bitShort integer-128…127
INTSigned 16 bitInteger-32 768…32767
DINTSigned 32 bitDouble integer-2147483648…2147483647
USINTUnsigned 8 bitUnsigned short integer0…255
UINTUnsigned 16 bitUnsigned integer0…65535
UDINTUnsigned 32 bitUnsigned double integer0…4294967295
REALFloat 32 bitReal (single precision)±2.9E-39…±3.4E+38
LREALFloat 64 bitLong real (double precision)IEC 559
TIMETimeDuration24d 20:31:23.647
DATEDateData (only)from 1.1.1970 00:00:00
TIME_OF_DAY (TOD)Time of DayTime of day (only)24d 20:31:23.647
DATE_AND_TIME (DT)Date TimeData and time of dayfrom 1.1.1970 00:00:00

Commands and feedback channels must be linked to the project's graphic items to control equipment:

  • Link a command to a graphical item and specify the value to send to the register when the item is pressed
  • Link a feedback channel to a graphical item to display the register state

To link a command or channel to a graphical item, use

drag&drop
  • dragging.
Tip

To quickly create a Feedback with the same settings as a Command, right-click the Command and select "Create Feedback". You can create Feedbacks for several registers at once.

Changing connection settings​

You need to change connection parameters when you disconnect from the automation site's Wi-Fi network and start using 3G or another Wi-Fi network. For control to continue working, switch from the local IP address to the Internet router's public IP address.

Switching is not automatic; you need to press the connection mode selection button. For remote access, the automation system's control ports must be made public. To do this, configure Port Forwarding on the Internet router. A VPN can provide a secure connection.

  1. Download the template (*.js) (right-click and save the target), then add it to the script editor using (+) Add Script from file

  2. Configure the script parameters as 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 Project Device Panel; copy the parameter list exactly as shown in the example.

  1. Select the button that will switch between the Internal and External parameters. Open the macros editor for the Press event (Object Properties > Programming), select the Script call command, and double-click to add it. Select the name of the function the button will call:

Script call internal-external.png

Each button press now applies the corresponding connection settings.

Equipment control​

SendRecieve.png

To control equipment, configure Commands and Feedbacks. To send a command, drag it onto a graphical item and specify the Value to send. To display feedback, drag the Feedback onto a graphical item and specify how to display its Value.

For more information about graphical items, see Graphical item types.

The available command and feedback channel settings are shown below:

BOOL​

A BOOL (Bool) register is controlled by a logical zero or one. When configuring it, you must select the bit to control in addition to the register number.

Command

TypeValue *Description
Bool0...1BOOL data type and value to write
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
Bit0...7bit number within the byte

*Value - specify this when dragging the command onto a graphical item


Feedback

TypeBoolBOOL data type
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
Bit0...7bit number within the byte
Value *0...1bit state
  • Value - received by the feedback channel; use it to display the value on items

SINT, INT, DINT, USINT, UINT, UDINT​

8, 16, and 32-bit data registers are controlled using a range of values:

Command

TypeValue *Description
Signed 8 bit-128...127SINT data type and value to write
Signed 16 bit-32 768...32767INT data type
Signed 32 bit-2147483648...2147483647DINT data type
Unsigned 8 bit0...255USINT data type
Unsigned 16 bit0...65535UINT data type
Unsigned 32 bit0...4294967295UDINT data type
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
  • Value - specify this when dragging the command onto a graphical item

Feedback

TypeValue *Description
Signed 8 bit-128...127SINT data type and possible value
Signed 16 bit-32 768...32767INT data type
Signed 32 bit-2147483648...2147483647DINT data type
Unsigned 8 bit0...255USINT data type
Unsigned 16 bit0...65535UINT data type
Unsigned 32 bit0...4294967295UDINT data type
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
  • Value - received by the feedback channel; use it to display the value on items

REAL, LREAL​

32 and 64-bit floating-point data registers are controlled using a range of values. Unlike integer registers, they accept fractional values (and return fractional values from the controller):

Command

TypeValue *Description
Float 32 bit±2.9E-39…±3.4E+38REAL data type and value to write
Float 64 bitIEC 559LREAL data type
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
  • Value - specify this when dragging the command onto a graphical item

Feedback

TypeValue *Description
Float 32 bit±2.9E-39…±3.4E+38REAL data type and possible value
Float 64 bitIEC 559LREAL data type
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
  • Value - received by the feedback channel; use it to display the value on items

STRING​

Command

TypeValue *Description
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
Value *string123string to write to the register
  • alue - specify when dragging the command onto a graphical item

Feedback

TypeValue *Description
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
Value *string123string received from the register
  • Value - received by the feedback channel; use it to display the value on items

TIME, DATE, TIME_OF_DAY, DATE_AND_TIME​

Time and date can be read and written. The format used for writing must exactly match the specified format. It is recommended to set the time and date using the controller and only display the received data in the application.

Command

TypeValue *Description
Time24d 20:31:23.647TIME data type
Date1.1.1970 00:00:00DATE data type
Time of Day24d 20:31:23.647TIME_OF_DAY (TOD) data type
Date Time1.1.1970 00:00:00DATE_AND_TIME (DT) data type
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
  • Value - specify this when dragging the command onto a graphical item

Feedback

TypeValue *Description
Time24d 20:31:23.647TIME data type
Date1.1.1970 00:00:00DATE data type
Time of Day24d 20:31:23.647TIME_OF_DAY (TOD) data type
Date Time1.1.1970 00:00:00DATE_AND_TIME (DT) data type
RegisterX, Y, S, R, E, D0, D1, D2, Unknownregister type from the *.PUB table
Address0...nregister number
  • Value - received by the feedback channel; use it to display the value on items
Tip

JavaScript can generate a date and time value based on the control panel's current time