# How To # Connect to WCC Lite In order to connect to the WCC Lite: 1. Power up the WCC Lite 2. Once the WCC Lite boots up, plug an ethernet cable into the **ETH0** port. 3. Connect the other end of the cable to the Ethernet interface of your PC/Mac 4. Make sure DHCP is enabled on your Ethernet interface 5. Open [https://192.168.1.1](http://192.168.1.1/) in your web browser (username: root, password: wcclite)

Remember, by default WCC Lite interfaces have following designations

Interface Designation Specs
ETH0 LAN DHCP server, without firewall protection by default.
ETH1 WAN DHCP client, strict firewall rules
# WAN IP Setup ## Description One o the first steps in RTU/Datalogger setting up is to prepare connection to internet or a specific private network over Ethernet or GSM. This article describes WAN over Ethernet connection setup. [![image-1601990457991.png](https://wiki.elseta.com/uploads/images/gallery/2020-10/scaled-1680-/image-1601990457991.png)](https://wiki.elseta.com/uploads/images/gallery/2020-10/image-1601990457991.png) ## Setting WAN IP 1. Go to Network → Interfaces → Edit (WAN) 2. Select protocol - Static address and click on Switch protocol 3. Enter addresses of your WAN network and click on Save & Apply Example:
[![image-1601989521974.png](https://wiki.elseta.com/uploads/images/gallery/2020-10/scaled-1680-/image-1601989521974.png)](https://wiki.elseta.com/uploads/images/gallery/2020-10/image-1601989521974.png)
Video how to setup WAN IP address: # Enable Internet or WAN for connected devices In order to enable connected devices communication through the router it is needed to enable Masquerading for outgoing packets on WAN interface: 1. Go to Network → Firewall→ General settings 2. Select Masquerading on WAN interface and click on Save & Apply [![image-1601989913581.png](https://wiki.elseta.com/uploads/images/gallery/2020-10/scaled-1680-/image-1601989913581.png)](https://wiki.elseta.com/uploads/images/gallery/2020-10/image-1601989913581.png) A short video about this: # Comlynx to Modbus TCP protocol conversion ## Description This article describes WCC Lite configuration steps to enable Comlynx protocol conversion to Modbus TCP [![image-1601994154261.png](https://wiki.elseta.com/uploads/images/gallery/2020-10/scaled-1680-/image-1601994154261.png)](https://wiki.elseta.com/uploads/images/gallery/2020-10/image-1601994154261.png) ## First steps Before you begin, make sure you have completed all physical installation work according to the manufacturer's installation instructions. Set up your computer and connect Ethernet cable to WCC Lite ETH0 port. Login with default credentials and setup basic required settings (name, network, users, etc. ). You can find configuration tutorials in [How to](https://wiki.elseta.com/books/how-to) articles. After setup, download configuration template from device (Protocol Hub → Configuration → Template configuration Download) Or download configuration example from this article [Files](#h_52402507611602751244400). To prepare configuration fill information in both - [Devices](#bkmrk-configure-devices) and [Signals](#bkmrk-configure-signals) sheets: ## Configure devices Add connected inverter with ComLynx protocol required information:
**name****device\_alias****enable****protocol****timeout\_ms****device****baudrate****databits****stopbits****parity****flowcontrol**
InverterDanfoss\_INV\_11ComLynx2000000PORT11920081nonenone
**scan\_rate\_ms****retry\_count****network****subnet****address**
60000332163
Add Modbus Slave required information:
**name****device\_alias****enable****protocol****timeout\_ms****bind\_address**
Modbus SlaveModbus\_slave1Modbus TCP Slave5000000.0.0.0
**host****port****mode**
192.168.1.1502tcp
You can find more options and descriptions of the settings in [Device configuration](https://wiki.elseta.com/books/excel-configuration/page/device-configuration "Device configuration") article. ## Configure signals Add connected inverter signals information. Use inverter manual for information and addresses (**tag\_job\_todo).**
**signal\_name** **device\_alias** **signal\_alias** **enable** **tag\_type** **units** **multiply** **job\_todo** **job\_todo** **number\_type**
Total energy productionDanfoss\_INV\_1Danfoss\_11NormalkWh0,00108|01|02NAUNSIGNED16
...
Where in **job\_todo** *08* is "module id", *01* - "Index", *02* - "SubIndex" of measurements. **number\_type** can be found in manual as Data type id converted to data type as follow:
0x0: Not defined- Not supported 0x1: Boolean 0x2: Signed 8 0x3: Signed 16 0x4: Signed 32 0x5: Unsigned 8 0x6: Unsigned 16 0x7: Unsigned 32 0x8: Float 0x9: Visible string - Not supported 0xA: Packed bytes - Not supported 0xB: Packed words - Not supported 0xC - 0xF: Reserved- Not supported
Add Modbus slave signals information
**signal\_name** **device\_alias** **signal\_alias** **source\_device\_alias** **source\_signal\_alias** **enable** **tag\_type** **units** **multiply**
Total energy productionModbus\_slaveModbus\_1Danfoss\_INV\_1Danfoss\_11NormalkWh1.0
**common\_address** **function** **info\_address** **number\_type** **size**
131UNSIGNED161
Use measurements from inverter as a source to be forwarded. You can find more options and descriptions of the settings in [Signals sheet](https://wiki.elseta.com/books/excel-configuration/page/signals-sheet "Signals sheet") article. ## Upload configuration After configuring all devices and signals, follow these steps to check and upload configuration using WCC Excel Utility: 1. [Download ](https://wiki.elseta.com/books/wcclite-downloads/page/firmware-and-tools)and run WCC Excel Utility; 2. Select Excel file from your computer and click *Convert*; 3. Check if no events in red color occur. If so, edit Excel file according to event text and repeat Step 2; 4. Enter Host and credentials of WCC Lite and click *Upload configuration.* Another method to upload the configuration is via the web interface: 1. Access the WCC Lite interface via your browser: [![image-1733135286847.png](https://wiki.elseta.com/uploads/images/gallery/2024-12/scaled-1680-/image-1733135286847.png)](https://wiki.elseta.com/uploads/images/gallery/2024-12/image-1733135286847.png) 2. Upload the Excel configuration: [![image-1733135363443.png](https://wiki.elseta.com/uploads/images/gallery/2024-12/scaled-1680-/image-1733135363443.png)](https://wiki.elseta.com/uploads/images/gallery/2024-12/image-1733135363443.png) 3. After a successful upload, the configuration will appear under the **DOWNLOAD CONFIGURATION** tab: [![image-1733135451404.png](https://wiki.elseta.com/uploads/images/gallery/2024-12/scaled-1680-/image-1733135451404.png)](https://wiki.elseta.com/uploads/images/gallery/2024-12/image-1733135451404.png) 4. If any errors occur during the upload, follow the error messages, fix them along Excel utility guidelines. ## Files 1. Danfoss inverter manual - Accessing Inverter Parameters via RS485 using the ComLynx protocol [Download](https://wiki.elseta.com/attachments/4) 2. WCC Excel Utility [Download](https://wiki.elseta.com/books/wcclite-downloads/page/firmware-and-tools) 3. Example of configuration file [Download](https://wiki.elseta.com/attachments/629)# DLMS Serial to IEC104 protocol conversion ## Description
The article describes WCC Lite configuration steps to enable DLMS Serial protocol conversion to IEC 60870-5-104. [![image-1685538397956.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1685538397956.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1685538397956.png) Fig 1. ## First steps Before you begin, make sure you have completed all physical installation work according to the manufacturer's installation instructions. Set up your computer and connect Ethernet cable to WCC Lite ETH0 port. Login with default credentials and setup basic required settings (name, network, users, etc.). You can find configuration tutorials in [How to](https://wiki.elseta.com/books/how-to) articles. To prepare configuration fill information in both - [Devices ](https://wiki.elseta.com/books/how-to/page/dlms-serial-to-iec104-protocol-conversion#bkmrk-configure-devices)and [Signals](https://wiki.elseta.com/books/how-to/page/dlms-serial-to-iec104-protocol-conversion#bkmrk-configure-signals) sheets: ## Configure devices ##### Add connected Gama meter with **DLMS Serial** protocol required information:
**name****description****device\_alias****enable****protocol****serial\_number****device****databits****stopbits**
From Gama MeterElgama Gama 300GAMA3001DLMS2250259PORT181
**baudrate****parity****flowcontrol****logical\_address****address\_size****client\_address****type**
4800nonenone1232SN
**mode****auth**
DLMS-HDLCLOW
More information concerning DLMS protocol configuration is provided in [DLMS/COSEM](https://wiki.elseta.com/books/manual-18/page/171-dlmscosem) article. ##### Add SCADA working on **IEC104** protocol required information:
**name****device\_alias****enable****protocol****bind\_address****host****port**
To SCADAIEC104\_SCADA1IEC 60870-5-104 slave0.0.0.0192.168.1.10 192.168.67.192 192.168.71.12404
**asdu\_size** **cot\_size** **ioa\_size** **rwt** **swt** **t1** **t2** **t3**
2238124530200
**time\_sync****message\_size****cache\_size**
1249100
More information concerning IEC104 protocol configuration is provided in [IEC 60870-5-104 Slave](https://wiki.elseta.com/books/manual-18/page/146-iec-60870-5-104-slave) article. ## Configure signals Add connected meter measurements information.
**signal\_name****device\_alias****signal\_alias****obis\_job**
VoltageGAMA300L3\_U1.0.72.7.0.255
FrequencyGAMA300F1.0.14.7.0.255

**obis\_job** - Objects are identified with the help of OBIS (Object Identification System) codes.

1. The first number of OBIS code defines the media (energy type) to which the metering is related. Nonmedia related information is handled as abstract data. For example both obis\_jobs in the table above starts with numbers 1 which stands for "Electricity related objects". 2. The second number defines the channel number, i.e. the number of the input of a metering equipment having several inputs for the measurement of energy of the same or different types (e.g. in data concentrators, registration units). Data from different sources can thus be identified. The definitions for this value group are independent from the value of the first number. In both obis\_jobs from the table above second number is set to zero which means that no channel is specified. 3. The third number defines the abstract or physical data items related to the information source concerned, for example current, voltage, power, volume, temperature. The definitions depend on the value of the first number. For example in obis\_jobs from the table above number 72 means voltage L3 and number 14 means frequency. 4. The forth number defines types, or the result of the processing of physical quantities identified with the numbers 1 and 3, according to various specific algorithms. The algorithms can deliver energy and demand quantities as well as other physical quantities. In both obis\_jobs from the table above forth number is set to 7 which stands for "Instantaneous value". 5. The value of the fifth number defines further processing or classification of quantities identified by numbers 1 to 4. In case of the first obis\_job number 0 means that all harmonics of the signal along with its fundamental frequency are going to be taken into consideration. 6. The value of the sixth number defines the storage of data, identified by numbers 1 to 5, according to different billing periods. Where this is not relevant, this value group can be used for further classification. In both obis\_jobs from the table above last number is set to 255 which means that data is not used. Add **IEC104 Slave** signals information:
**signal\_name****device\_alias****signal\_alias****source\_device\_alias****source\_signal\_alias****enable**
IEC104 SCADA VIEC104\_SCADAIEC104\_SCADA\_V\_L3\_NGAMA300L3\_U1
IEC104 SCADA FIEC104\_SCADAIEC104\_SCADA\_FreqGAMA300F1
**log****gi****common\_address****info\_address****data\_type**
11110136
11110436
For more detailed DLMS protocol communication analysis Gurux DLMS Director application can be used. ## Upload configuration After configuring all devices and signals, follow these steps to check and upload configuration using WCC Excel Utility: 1. [Download ](https://wiki.elseta.com/books/wcclite-downloads/page/firmware-and-tools)and run WCC Excel Utility; 2. Select Excel file from your computer and click *Convert*; 3. Check if no events in red color occur. If so, edit Excel file according to event text and repeat Step 2; 4. Enter Host and credentials of WCC Lite and click *Upload configuration.* Another method to upload the configuration is via the web interface: 1. Access the WCC Lite interface via your browser: [![image-1733135286847.png](https://wiki.elseta.com/uploads/images/gallery/2024-12/scaled-1680-/image-1733135286847.png)](https://wiki.elseta.com/uploads/images/gallery/2024-12/image-1733135286847.png) 2. Upload the Excel configuration: [![image-1733135363443.png](https://wiki.elseta.com/uploads/images/gallery/2024-12/scaled-1680-/image-1733135363443.png)](https://wiki.elseta.com/uploads/images/gallery/2024-12/image-1733135363443.png) 3. After a successful upload, the configuration will appear under the **DOWNLOAD CONFIGURATION** tab: [![image-1733135451404.png](https://wiki.elseta.com/uploads/images/gallery/2024-12/scaled-1680-/image-1733135451404.png)](https://wiki.elseta.com/uploads/images/gallery/2024-12/image-1733135451404.png) 4. If any errors occur during the upload, follow the error messages, fix them along Excel utility guidelines. ## Files 1. WCC Excel Utility [Download](https://wiki.elseta.com/books/wcclite-downloads/page/firmware-and-tools) 2. Example of configuration file [Download](https://wiki.elseta.com/attachments/104)# DLMS TCP to DNP3 protocol conversion ## Description
The article describes WCC Lite configuration steps to enable DLMS tcp protocol conversion to DNP3. [![image-1690294047661.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690294047661.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690294047661.png) Fig 1. ## First steps Before you begin, make sure you have completed all physical installation work according to the manufacturer's installation instructions. Set up your computer and connect Ethernet cable to WCC Lite ETH0 port. Login with default credentials and setup basic required settings (name, network, users, etc.). You can find configuration tutorials in [How to](https://wiki.elseta.com/books/how-to) articles. To prepare configuration fill information in both - [Devices ](https://wiki.elseta.com/books/how-to/page/dlms-tcp-to-dnp3-protocol-conversion#bkmrk-configure-devices)and [Signals](https://wiki.elseta.com/books/how-to/page/dlms-tcp-to-dnp3-protocol-conversion#bkmrk-configure-signals) sheets: ## Configure devices ##### Add connected Gama meter with **DLMS TCP** protocol required information:
**name****description****device\_alias****enable****protocol****serial\_number****port**
From Gama MeterElgama Gama 300GAMA3001DLMS23930204059
**ip****logical\_address****address\_size****client\_address****type****mode****auth****password**
192.168.1.21232LNDLMS-WRAPPERLOW 00000002
More information concerning DLMS protocol configuration is provided in [DLMS/COSEM](https://wiki.elseta.com/books/manual-18/page/171-dlmscosem) article. ##### Add SCADA working on **DNP3** protocol required information:
**name****device\_alias****enable****protocol****mode****host****bind\_address**
DNP3 SCADA systemDNP3\_SCADA1dnp3 tcp slave TCP192.168.1.2150.0.0.0
**port** destination\_address source\_address unsol\_classes
200001011,2,3
More information concerning DNP3 protocol configuration is provided in [DNP 3.0 Slave](https://wiki.elseta.com/books/manual-18/page/123-dnp-30-slave) article. ## Configure signals Add connected meter measurements information.
**signal\_name****device\_alias****signal\_alias****obis\_job**
Voltage L3-NGAMA300L3\_U1.0.72.7.0.255
FrequencyGAMA300F1.0.14.7.0.255
Current L3GAMA300L3-I1.0.71.7.0.255
Absolute active instantaneous powerGAMA300P1.0.15.7.0.255

**obis\_job** - Objects are identified with the help of OBIS (Object Identification System) codes.

1. The first number of OBIS code defines the media (energy type) to which the metering is related. Nonmedia related information is handled as abstract data. For example both obis\_jobs in the table above starts with numbers 1 which stands for "Electricity related objects". 2. The second number defines the channel number, i.e. the number of the input of a metering equipment having several inputs for the measurement of energy of the same or different types (e.g. in data concentrators, registration units). Data from different sources can thus be identified. The definitions for this value group are independent from the value of the first number. In both obis\_jobs from the table above second number is set to zero which means that no channel is specified. 3. The third number defines the abstract or physical data items related to the information source concerned, for example current, voltage, power, volume, temperature. The definitions depend on the value of the first number. For example in obis\_jobs from the table above number 72 means voltage L3 and number 14 means frequency. 4. The forth number defines types, or the result of the processing of physical quantities identified with the numbers 1 and 3, according to various specific algorithms. The algorithms can deliver energy and demand quantities as well as other physical quantities. In both obis\_jobs from the table above forth number is set to 7 which stands for "Instantaneous value". 5. The value of the fifth number defines further processing or classification of quantities identified by numbers 1 to 4. In case of the first obis\_job number 0 means that all harmonics of the signal along with its fundamental frequency are going to be taken into consideration. 6. The value of the sixth number defines the storage of data, identified by numbers 1 to 5, according to different billing periods. Where this is not relevant, this value group can be used for further classification. In both obis\_jobs from the table above last number is set to 255 which means that data is not used. Add **DNP3 Slave** signals information:
**signal\_name****device\_alias****signal\_alias****source\_device\_alias****source\_signal\_alias****enable**
DNP3 SCADA VDNP3\_SCADADNP3\_SCADA\_V\_L3\_NGAMA300L3\_U1
DNP3 SCADA FDNP3\_SCADADNP3\_SCADA\_FreqGAMA300F1
DNP3 SCADA ADNP3\_SCADADNP3\_SCADA\_A\_L3GAMA300L3\_I1
DNP3 SCADA KWDNP3\_SCADADNP3\_SCADA\_PGAMA300P1
**index****signal\_type****static\_variation****event\_variation****class\_num**
1analog132
2analog132
3analog132
4analog132
For more detailed DLMS protocol communication analysis Gurux DLMS Director application can be used. ## Upload configuration After configuring all devices and signals, follow these steps to check and upload configuration using WCC Excel Utility: 1. [Download ](https://wiki.elseta.com/books/wcclite-downloads/page/firmware-and-tools)and run WCC Excel Utility; 2. Select Excel file from your computer and click *Convert*; 3. Check if no events in red color occur. If so, edit Excel file according to event text and repeat Step 2; 4. Enter Host and credentials of WCC Lite and click *Upload configuration.* Another method to upload the configuration is via the web interface: 1. Access the WCC Lite interface via your browser: [![image-1733135286847.png](https://wiki.elseta.com/uploads/images/gallery/2024-12/scaled-1680-/image-1733135286847.png)](https://wiki.elseta.com/uploads/images/gallery/2024-12/image-1733135286847.png) 2. Upload the Excel configuration: [![image-1733135363443.png](https://wiki.elseta.com/uploads/images/gallery/2024-12/scaled-1680-/image-1733135363443.png)](https://wiki.elseta.com/uploads/images/gallery/2024-12/image-1733135363443.png) 3. After a successful upload, the configuration will appear under the **DOWNLOAD CONFIGURATION** tab: [![image-1733135451404.png](https://wiki.elseta.com/uploads/images/gallery/2024-12/scaled-1680-/image-1733135451404.png)](https://wiki.elseta.com/uploads/images/gallery/2024-12/image-1733135451404.png) 4. If any errors occur during the upload, follow the error messages, fix them along Excel utility guidelines. ## Files 1. WCC Excel Utility [Download](https://wiki.elseta.com/books/wcclite-downloads/page/firmware-and-tools) 2. Example of configuration file [Download](https://wiki.elseta.com/attachments/122)# Modbus RTU to IEC104 protocol conversion ## Description This article describes WCC Lite configuration steps to enable Modbus TCP protocol conversion to IEC 104. [![image-1602846671040.png](https://wiki.elseta.com/uploads/images/gallery/2020-10/scaled-1680-/image-1602846671040.png)](https://wiki.elseta.com/uploads/images/gallery/2020-10/image-1602846671040.png) ## First steps Before you begin, make sure you have completed all physical installation work according to the manufacturer's installation instructions. Set up your computer and connect Ethernet cable to WCC Lite ETH0 port. Login with default credentials and setup basic required settings (name, network, users, etc. ). You can find configuration tutorials in [How to](https://wiki.elseta.com/books/how-to) articles. After setup, download configuration template from device (Protocol Hub → Configuration → Template configuration Download) Or download configuration example from this article [Files](https://wiki.elseta.com/books/how-to/page/comlynx-to-modbus-tcp-protocol-conversion#h_52402507611602751244400). To prepare configuration fill information in both - [Devices ](#bkmrk-configure-devices)and [Signals](#bkmrk-configure-signals) sheets: ## Configure devices ##### Add connected ABB meter with Modbus RTU protocol required information:
**name****description****device\_alias****enable****protocol****id****device****baudrate****databits**
From ABB MeterABB B21B211Modbus RTU1PORT296008
**stopbits****parity****flowcontrol****scan\_rate\_ms****serial\_delay****retry\_count**
1nonenone50002003
##### Add SCADA working on IEC104 protocol required information:
**name****description****device\_alias****enable****protocol****bind\_address****host****port**
To SCADA iec1041IEC 60870-5-104 slave0.0.0.0192.168.1.10 192.168.67.192 192.168.71.12404
**asdu\_size****cot\_size****ioa\_size****rwt****swt****t1****t2****t3****time\_sync****message\_size****cache\_size**
22381245302001249100
You can find more options and descriptions of the settings in [Device configuration](https://wiki.elseta.com/books/excel-configuration/page/device-configuration "Device configuration") article. ## Configure signals Add connected meter measurements information. Use meter manual for information and addresses (**tag\_job\_todo).**
**signal\_name****device\_alias****signal\_alias****enable****multiply****log****job\_todo****tag\_job\_todo****number\_type**
VoltageB21U10.113;23296;673;23296;2UNSIGNED32
CurrentB21I10.0113;23296;673;23308;2UNSIGNED32
Active powerB21P10.0000113;23296;673;23316;2SIGNED32
FrequencyB21F10.0113;23296;673;23342;1UNSIGNED16
Power factorB21Cos10.00113;23296;673;23354;1SIGNED16
Active importB21E10.0113;20480;43;20480;4UNSIGNED64

**job\_todo** -Request to send according to modbus specification without device address and checksum;

**tag\_job\_todo** - a subset of **job\_todo** field, exact address of measurement (tag)

Add **IEC104** master signals information:
**signal\_name****device\_alias****signal\_alias****source\_device\_alias****source\_signal\_alias**
Voltageiec104tag-iec104-1001B21U
Currentiec104tag-iec104-1002B21I
Active poweriec104tag-iec104-1003B21P
Frequencyiec104tag-iec104-1004B21F
Power factoriec104tag-iec104-1005B21Cos
Active importiec104tag-iec104-1006B21E
**enable****log****units****multiply****gi****common\_address****info\_address****data\_type**
11V1.011100113
11A1.011100213
11kW1.011100313
11Hz1.011100413
11 1.011100513
11kWh1.011100613
## Other example with Rail350 meter in video

The video covers only 1.5 firmware version.

## Upload configuration After all devices and signals are configured it time to check and upload configuration using WCC Excel Utility: 1. [Download](#bkmrk-files) and run WCC Excel Utility; 2. Select Excel file from your computer and click *Convert*; 3. Check if no events in red color occur. If so, edit Excel file according to event text and repeat Step 2; 4. Enter Host and credentials of WCC Lite and click *Upload configuration.* ## Files 1. ABB meter manual [Download](https://search.abb.com/library/Download.aspx?DocumentID=2CMC485004M0201&LanguageCode=en&DocumentPartId=&Action=Launch) 2. WCC Excel Utility [Download](https://elseta.com/wp-content/uploads/wcc-excel-utility_v1.2.19.zip) 3. Example of configuration file [Download](https://wiki.elseta.com/attachments/108)# Capture packets using tcpdump ### Description This article describes how to log packets using tcpdump. ### Installing tcpdump Before starting, you need to install required packages. **Tcpdump** and **Libpcap**. These packages can be found attached to the article. To install, you need to upload the packages to your **WCCLite** /tmp/ directory. You can achieve this by using **scp** or any other software that has scp compatibility, for example: WinSCP, PSCP, FileZilla. We are going to upload using **scp.** 1. Navigate to the directory where **libpcap** is. 2. Open the command terminal in that directory. 3. Execute command: *scp libpcap\_1.7.4-1\_ar71xx.ipk root@192.168.1.1:/tmp/* 4. It will ask you for the password. Enter the default wcclite password - *wcclite*. [![image-1627892977493.png](https://wiki.elseta.com/uploads/images/gallery/2021-08/scaled-1680-/image-1627892977493.png)](https://wiki.elseta.com/uploads/images/gallery/2021-08/image-1627892977493.png) 1. Navigate to the directory where **tcpdump** is. 2. Open the command terminal in that directory. 3. Execute command: *scp tcpdump\_4.9.2-1\_ar71xx.ipk root@192.168.1.1:/tmp/* 4. It will ask you for the password. Enter the default wcclite password - *wcclite*. [![image-1627893107060.png](https://wiki.elseta.com/uploads/images/gallery/2021-08/scaled-1680-/image-1627893107060.png)](https://wiki.elseta.com/uploads/images/gallery/2021-08/image-1627893107060.png) After uploading the packages, you need to install them. 1. Connect to the **WCCLite** using an ssh client. We recommend using [*putty*](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) 2. Execute command: *opkg install /tmp/libpcap\_1.7.4-1\_ar71xx.ipk* to install **libpcap** 3. If successful you will get this message. [![image-1627890317789.png](https://wiki.elseta.com/uploads/images/gallery/2021-08/scaled-1680-/image-1627890317789.png)](https://wiki.elseta.com/uploads/images/gallery/2021-08/image-1627890317789.png) Now to install **tcpdump**: 1. Execute: *opkg install /tmp/tcpdump\_4.9.2-1\_ar71xx.ipk* to install **tcpdump.** 2. If successful you will get this message. [![image-1627890567145.png](https://wiki.elseta.com/uploads/images/gallery/2021-08/scaled-1680-/image-1627890567145.png)](https://wiki.elseta.com/uploads/images/gallery/2021-08/image-1627890567145.png) To check if everything installed correctly, execute this command: *tcpdump --v* [![image-1627654474783.png](https://wiki.elseta.com/uploads/images/gallery/2021-07/scaled-1680-/image-1627654474783.png)](https://wiki.elseta.com/uploads/images/gallery/2021-07/image-1627654474783.png) Now **Tcpdump** has been successfully installed. ### Running tcpdump To run **tcpdump** you need to give it specific options. You can find all of them in the [manual](https://www.tcpdump.org/manpages/tcpdump.1.html). Here are some of the more frequent ones:
**Switch****Syntax****Description**
-i anytcpdump -i anyCapture from all interfaces
-i eth0tcpdump -i eth0Capture from specific interface
-Dtcpdump -DShow available interfaces
-wtcpdump -i eth0 -w capture.pcapSave capture to file (.pcap for reading it with *Wireshark* or other packet analysis tools)
-c tcpdump -i eth0 -c 100Capture first 100 packets and exit
-ntcpdump -n -i eth0Do not resolve host names
porttcpdump -i eth0 port 2404Capture traffic from a defined port only
hosttcpdump host 192.168.1.100Capture packets from specific host
After you write your specific command you execute it via the console. Here is shown ***tcpdump -i wwan0 -n.*** This command shows all traffic that goes through the gsm interface. [![image-1627889271177.png](https://wiki.elseta.com/uploads/images/gallery/2021-08/scaled-1680-/image-1627889271177.png)](https://wiki.elseta.com/uploads/images/gallery/2021-08/image-1627889271177.png) #### Examples
**Command****Description**
tcpdump -i eth0 -n port 2404 -c 1000 -s0 -w /var/log/2404.dmpCapture packets that are on port 2404 that go through eth0 interface.Exit after first 1000 and save them to /var/log/2404.dmp file
tcpdump -i wwan0 -w /tmp/capture-%H.pcap -G 3600 -C 10000
Capture packets that go through gsm interface and write a new file to /tmp/capture-<count>.pcap file every 3600 seconds.
tcpdump -i any -n port 2404 -w /tmp/capture-%H.pcap -G 3600Capture packets that are on port 2404 that go through all interfaces and save a new file to /tmp/capture-<count>.pcap every 3600 seconds.
### Downloading packet files If you save your **tcpdump** files, you need to download them from the **WCCLite.** This can be achieved by using **scp** or any software that has scp compatibility, for example: WinSCP, PSCP, FileZilla. We are going to use **scp** to download the file. 1. Open the command terminal on your computer. 2. Execute command with the location of your *packet dump* file and directory where to save it. *scp root@192.168.1.1:/<dump directory>/<dump name> <directory where to save it>* 3. It will ask for the **WCCLite** password. Enter the default password - *wcclite*. 4. If successful the file will appear in the determined location. Example of the command. [![image-1627903702658.png](https://wiki.elseta.com/uploads/images/gallery/2021-08/scaled-1680-/image-1627903702658.png)](https://wiki.elseta.com/uploads/images/gallery/2021-08/image-1627903702658.png "Example of the command") ### Files 1. PuTTy ssh software [Download](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) 2. WinSCP software [Download](https://winscp.net/eng/index.php) 3. TCPDump [manual](https://www.tcpdump.org/manpages/tcpdump.1.html) 4. Libpcap [Download](https://wiki.elseta.com/attachments/7) 5. Tcpdump [Download](https://wiki.elseta.com/attachments/8)# IOMod setup with WCC Lite In this chapter you will learn how to connect all kinds of Elseta IOMods to the WCC Lite # Connecting IOMod 16DI to the WCC Lite ### Description This article describes how to connect and configure IOMod 16DI to the WCC Lite using IEC101, IEC103, and Modbus RTU. [![image-1638361303133.png](https://wiki.elseta.com/uploads/images/gallery/2021-12/scaled-1680-/image-1638361303133.png)](https://wiki.elseta.com/uploads/images/gallery/2021-12/image-1638361303133.png) ### Preparing the configuration At first you need to make a configuration for the WCC Lite. This can be done using any spreadsheet editing program. Templates for configuration can be found on the WCC Lite web. Protocol Hub --> Configuration. On the bottom of the page there will be a *Download* button for template configurations. [![image-1669975993674.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1669975993674.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1669975993674.png) You can download the example configuration for each firmware versions at the bottom of the article or create your own using these links: - For [IEC103](https://wiki.elseta.com/books/manual/page/292-iec-60870-5-103#bkmrk-iec-60870%C2%AD-5-%C2%AD101-sl) - For [IEC101](https://wiki.elseta.com/books/manual/page/291-iec-60870-5-101#bkmrk-iec-60870-%C2%AD5-%C2%AD101-ma) - For [Modbus](https://wiki.elseta.com/books/manual/page/28-modbus#bkmrk-table-of-modbus-mast) You need to configure Devices and Signals sheets before continuing. After downloading template configurations, open phub templates folder. You will see that there's different templates for each IOMod: [![image-1671606569174.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671606569174.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671606569174.png) To select correct configuration, check the sticker on the back of IOMod. There you will find which protocol to use according to Factory FW type. For example, if you have IOMod 16DI with IEC103 FW, select configuration iomod\_16DI\_IEC103\_to\_IEC104\_DNP3\_Modbus\_SCADA. ### Uploading configuration Template configurations can work with default settings without any further changes. These template configurations can also be used to configure protocols like Modbus-master and DNP3. Configuration can be modified according to functionality needed. For that you can rely on the examples given in the links above (Preparing the configuration). If you need to specify different IEC104 slave settings, you can do that by changing excel configuration. By changing settings such as *info\_address* or *data\_type* you can adapt IEC104 slave to work as needed. To test this example you have to specify your computer's IP address in excel configuration for IEC104 slave. After configuration is ready, upload it to WCC Lite (Configuration --> Choose file --> Import configuration): [![image-1671608864283.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671608864283.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671608864283.png) After upload is done and no errors were detected, you should see all imported signals (Protocol Hub --> Imported signals): [![image-1673423830120.png](https://wiki.elseta.com/uploads/images/gallery/2023-01/scaled-1680-/image-1673423830120.png)](https://wiki.elseta.com/uploads/images/gallery/2023-01/image-1673423830120.png) Before doing anything further you should also check for protocol connections if IOMod16DI is connected to WCC Lite via PORT1. Go to Protocol connections where you can see all the connected slave and master protocol devices: [![image-1673424016504.png](https://wiki.elseta.com/uploads/images/gallery/2023-01/scaled-1680-/image-1673424016504.png)](https://wiki.elseta.com/uploads/images/gallery/2023-01/image-1673424016504.png) ### Simulating SCADA via Vinci software After uploading Excel configuration, you can simulate SCADA using Vinci software. In order to simulate IEC104 slave you need to choose IEC 60870-5-104 protocol and Master(Client) mode and press start. In *Settings* tab, check Structure, Timeouts and Windows values to match Excel configuration. [![image-1671616002284.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671616002284.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671616002284.png) Then set correct IP address and Port at the top of the program page. **Port** for IEC104 should be 2404 and **IP address** should match your WCC Lite IP address (default address is 192.168.1.1 if it's connected to your computer via ethernet cable). [![image-1671616037090.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671616037090.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671616037090.png) After clicking start, you should check protocol connections tab again to see if IEC104 slave is connected. On the right side of the page you can find *Tags* and *System* tabs. In *Tags* you can create *jobs* which are specified in you excel configuration *job\_todo* and *tag\_job\_todo.* To do so, click *Add* and choose *Type*. This type should match *data\_type* described in excel configuration. If needed change asdu (in Excel configuration – *asdu\_address*) and ioa (*info\_address)*. Create user friendly name for this job and click save. To execute when needed click *send.* [![image-1669984366477.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1669984366477.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1669984366477.png) [![image-1669984293742.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1669984293742.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1669984293742.png) In *System* tab you can execute commands accordingly by setting *ASDU*, *Type* and *IOA*. To execute commands you need to specify *Value* and *Cause*. To execute these commands you need to click *Execute*. [![image-1669985157352.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1669985157352.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1669985157352.png) After executing one of the commands you should see results on the web as well as Vinci software window. [![image-1671616672437.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671616672437.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671616672437.png) # Connecting two IOMod 16DI ### Description
This article describes how to connect and configure two IOMods 16DI to the WCC Lite using IEC103, and Modbus RTU. [![image-1670317371132.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1670317371132.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1670317371132.png) Typical connection schematic for two IOMod 16DI ### Preparing the configuration At first you need to make a configuration for the WCC Lite. This can be done using any spreadsheet editing program. Templates for configuration can be found on the WCC Lite web. Protocol Hub --> Configuration. On the bottom of the page there will be a *Download* button for template configurations. [![image-1670318276074.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1670318276074.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1670318276074.png) You need to configure Devices and Signals sheets before continuing. These template configurations can also be used to configure protocols like Modbus-master and DNP3. Configuration can be modified according to functionality needed. In this case, *Device* sheet will only have three devices, WCC Lite and two IOMod 16DI. It is important to use only one protocol for each port, otherwise configuration will not work. [![image-1670319607421.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1670319607421.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1670319607421.png) ### Second step
Before connecting IOMods to WCC Lite you need to configure it via mini USB. This can be done following these steps: - For [IEC103](https://wiki.elseta.com/books/iomod-16di/page/iomod-16di-user-manual-iec-60870-5-103#bkmrk-a.%C2%A0-iomod-configurat) - For [IEC101(WIP)](https://wiki.elseta.com/books/iomod-16di/page/iomod-16di-user-manual-iec-60870-5-101-wip#bkmrk-1.%C2%A0-configuration-ov) - For [Modbus](https://wiki.elseta.com/books/iomod-16di/page/iomod-16di-user-manual-modbus#bkmrk-iomod-configuration-) You need to configure it, like it is done in the excel configuration. To do that, fist you need to open PuTTY terminal and change these parameters: *parity, link address, asdu address*. It is important, that *link address* and *asdu address* for both IOMods are different and *parity* should be even. Other parameters such as *baudrate, databits* and *stopbits* should be set to default. Signals sheet should be mapped according to functionality needed. ### Connecting IEC104-slave via Vinci
After Excel and USB configurations, you can connect to device using Vinci software. In order to simulate IEC104 slave you need to choose IEC 60870-5-104 protocol and Master(Client) mode and press start. In *Settings* tab, check Structure, Timeouts and Windows values to match Excel configuration. [![image-1670320501413.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1670320501413.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1670320501413.png) Then set correct IP address and Port at the top of the program page. **Port** for IEC104 should be 2404 and **IP address** should match your WCC Lite IP address. [![image-1670320526682.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1670320526682.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1670320526682.png) On the right side of the page you can find *Tags* and *System* tabs. In *Tags* you can create *jobs* which are described in you excel configuration *job\_todo* and *tag\_job\_todo.* To do so, click *Add* and choose *Type*. This type should match *data\_type* described in excel configuration. If needed change asdu (in Excel configuration – *asdu\_address*) and ioa (*info\_address)*. Create user friendly name for this job and click save. To execute when needed click *send.* [![image-1670320621092.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1670320621092.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1670320621092.png) [![image-1670320605469.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1670320605469.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1670320605469.png) In *System* tab you can execute commands accordingly by setting *ASDU*, *Type* and *IOA*. To execute commands you need to specify *Value* and *Cause*. Depending on your configuration in order to execute these commands you need to click *Execute* or *Select.* By clicking *Execute,* command will be executed immediately and *Select* will only select given command but will not execute it. [![image-1670321274098.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1670321274098.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1670321274098.png) # DLMS Serial to IEC61850-server protocol conversion (Wcc Lite FW: 1.7.0) ## Description
The article describes WCC Lite configuration steps to enable DLMS Serial protocol conversion to IEC 61850-server. [![image-1690356504117.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690356504117.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690356504117.png) Fig 1. Connecting Meter with DLMS serial protocol to Wcc Lite and IEC61850 server ## First steps Before you begin, make sure you have completed all physical installation work according to the manufacturer's installation instructions. Set up your computer and connect Ethernet cable to WCC Lite ETH0 port. Login with default credentials and setup basic required settings (name, network, users, etc.). You can find configuration tutorials in [How to](https://wiki.elseta.com/books/how-to) articles. To prepare configuration fill information in both - [Devices ](https://wiki.elseta.com/books/how-to/page/dlms-serial-to-iec104-protocol-conversion#bkmrk-configure-devices)and [Signals](https://wiki.elseta.com/books/how-to/page/dlms-serial-to-iec104-protocol-conversion#bkmrk-configure-signals) sheets: ## Configure devices (excel "Devices" sheet) ##### Add required information for connected Gama meter with **DLMS Serial** protocol:
**name****description****device\_alias****protocol****serial\_number****device****databits****stopbits****baudrate****parity**
DLMS SerialDLMS SerialDLMS\_MeterDLMS2250259PORT1814800none
**flowcontrol****enable****auth****logical\_address****address\_size****client\_address****type****mode**
none1LOW1232SNDLMS-HDLC
More information concerning DLMS protocol configuration is provided in [DLMS/COSEM](https://wiki.elseta.com/books/manual-18/page/171-dlmscosem) article. ##### ##### Add **IEC 61850 server** protocol required information:
**name****description****device\_alias****protocol****bind\_address**
IEC 61850 ServerIEC 61850 Serveriec\_61850\_serveriec 61850 server0.0.0.0
**ied\_name****access\_point****port****auth****host** **model\_filename**
WCCLITELD0102NONE192.168.1.2WCC
More information concerning IEC 61850 server protocol configuration is provided in [IEC 61850 server](https://wiki.elseta.com/books/manual-18/page/152-iec-61850-server) article. ## Configure signals (Excel "Signals" sheet) The signals for all devices can be separated to different excel sheets for different device or listed in one excel sheet. In this case signals will be separated to **SignalsDLMS** and **SignalsIEC61850** excel sheets. Make sure that these excel sheet names for different device signals always must start with word **Signals.** The example template for this case is added at the end of this article. #### Add signals information for connected meter with DLMS Serial protocol (Excel **SignalsDLMS** sheet):
**signal\_name****device\_alias****signal\_alias****obis\_job**
Voltage L1-NDLMS\_MeterVoltage\_L1-N1.0.32.7.0.255
Voltage L2-NDLMS\_MeterVoltage\_L2-N1.0.52.7.0.255
Voltage L3-NDLMS\_MeterVoltage\_L3-N1.0.72.7.0.255
FrequencyDLMS\_MeterFrequency1.0.14.7.0.255
Current L3DLMS\_MeterCurrent\_L31.0.71.7.0.255

**obis\_job** - Objects are identified with the help of OBIS (Object Identification System) codes.

1. The first number of OBIS code defines the media (energy type) to which the metering is related. Nonmedia related information is handled as abstract data. For example all obis\_jobs in the table above starts with numbers 1 which stands for "Electricity related objects". 2. The second number defines the channel number, i.e. the number of the input of a metering equipment having several inputs for the measurement of energy of the same or different types (e.g. in data concentrators, registration units). Data from different sources can thus be identified. The definitions for this value group are independent from the value of the first number. In all obis\_jobs from the table above second number is set to zero which means that no channel is specified. 3. The third number defines the abstract or physical data items related to the information source concerned, for example current, voltage, power, volume, temperature. The definitions depend on the value of the first number. For example in obis\_jobs from the table above number 72 means voltage L3 and number 14 means frequency. 4. The forth number defines types, or the result of the processing of physical quantities identified with the numbers 1 and 3, according to various specific algorithms. The algorithms can deliver energy and demand quantities as well as other physical quantities. In all obis\_jobs from the table above forth number is set to 7 which stands for "Instantaneous value". 5. The value of the fifth number defines further processing or classification of quantities identified by numbers 1 to 4. In case of the first obis\_job number 0 means that all harmonics of the signal along with its fundamental frequency are going to be taken into consideration. 6. The value of the sixth number defines the storage of data, identified by numbers 1 to 5, according to different billing periods. Where this is not relevant, this value group can be used for further classification. In all obis\_jobs from the table above last number is set to 255 which means that data is not used. #### Add signals information for **IEC 61850 server** (Excel **SignalsIEC61850** sheet):
**signal\_name****device\_alias****signal\_alias****source\_device\_alias****source\_signal\_alias**
LD0\_\_GGIO\_5\_AnIn1\_mag.fiec\_61850\_serverLD0\_\_GGIO\_5\_AnIn1\_mag.fDLMS\_MeterVoltage\_L1-N
LD0\_\_GGIO\_5\_AnIn2\_mag.fiec\_61850\_serverLD0\_\_GGIO\_5\_AnIn2\_mag.fDLMS\_MeterVoltage\_L2-N
LD0\_\_GGIO\_5\_AnIn3\_mag.fiec\_61850\_serverLD0\_\_GGIO\_5\_AnIn3\_mag.fDLMS\_MeterVoltage\_L3-N
LD0\_\_GGIO\_5\_AnIn4\_mag.fiec\_61850\_serverLD0\_\_GGIO\_5\_AnIn4\_mag.fDLMS\_MeterFrequency
LD0\_\_GGIO\_5\_AnIn5\_mag.fiec\_61850\_serverLD0\_\_GGIO\_5\_AnIn5\_mag.fDLMS\_MeterCurrent\_L3
**ld\_instance****ln\_class****ln\_instance****cdc****data\_object****da\_fc****number\_type****da\_value****Log**
LD0GGIO5MVAnIn1MXFLOAT32mag.f1
LD0GGIO5MVAnIn2MXFLOAT32mag.f1
LD0GGIO5MVAnIn3MXFLOAT32mag.f1
LD0GGIO5MVAnIn4MXFLOAT32mag.f1
LD0GGIO5MVAnIn5MXFLOAT32mag.f1
From the table above it can be seen that IEC 61850 server signals has **source\_device\_alias** and **source\_signal\_alias** in which device\_alias and signal\_alias of DLMS meter signals are described. That is how DLMS meter signals are linked to IEC61850 server signals, so the measurements of the DLMS meter could be transported to IEC 61850 server. For more detailed DLMS protocol communication analysis Gurux DLMS Director application can be used. ## ICD file for IEC 61850 server IED Capability Description (ICD) files are a specific type of Substation Configuration Language (SCL) file, containing a generic description of the whole capability range of a given device, including the functions and objects it can support. These ICD files can be found on internet, edited and adapted for current project. In this case the ICD file with 2 analog signals was edited, so it could have 5 analog signals for DLMS measurements. For that purpose, 3 additional signals was described in ICD file, so 5 analog signals could be linked with signals from DLMS. The ICD file and added signals are shown in Fig. 2. If it is needed to have more analog or other type of signals, the ICD file must be analyzed and signals added to the correct place of the file. [![image-1690292826983.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690292826983.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690292826983.png)[![image-1690292954514.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690292954514.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690292954514.png) Fig. 2 Editing the ICD file This ICD file will be used for creating the IEC 61850 server model file, which later will be uploaded to Wcc Lite. Also the ICD file will be uploaded to IEDscout app, for simulating the client. Other apps for simulation of client can be used as well. ## Generating Server Model file for Wcc Lite For this step, Wcc Excel Utility app will be used. Firstly open Wcc Excel Utility app and choose **version 1.7** in "Configuration" tab**.** [![image-1690294044910.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690294044910.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690294044910.png) Fig. 3 Choosing the right version Second step is to go to IEC61850 Config tab, choose the ICD file that is needed and Output file directory of Server Model file. The name of output file should be the same as the name specified in the Excel configuration "Devices" tab "**model\_filename**" for IEC 61850 server. The extension of Server Model file using **Wcc Lite 1.7.0** firmware should be **.cfg** but using newer version of Wcc Excel Utility the extension **.server** can be created by default. This can be changed by editing the Server Model file name. Now "convert" button needs to be pressed and the Server Model file will be generated (Fig. 4). After that, this Server Model file needs to be uploaded to Wcc Lite WEB (Fig. 5). [![image-1690295167581.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690295167581.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690295167581.png) Fig. 4 Generating Server Model file [![image-1690295297098.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690295297098.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690295297098.png) Fig. 5 Uploading IEC 61850 Server Model file to Wcc Lite WEB ### Uploading Wcc Lite configuration After the Server Model file is uploaded, and made sure that Server Model file name matches the one specified in excel configuration we are now able to upload excel configuration to Wcc Lite. One more thing to notice, in Excel configuration "Devices" sheet "host" parameter for IEC61850 server is 192.168.1.2. This IP should match the PC Ethernet IP, to which Wcc Lite ETH0 port is connected via ETH cable and can be set manually. This is shown in Fig. 6. [![image-1690357201276.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690357201276.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690357201276.png) Fig. 6 Changing PC IP (TCP/IPv4) to match the Host IP in configuration When all parameter described earlier matches the ones specified in configuration, we can upload the configuration to Wcc Lite WEB. It is shown in Fig. 7. Simply choose the Excel configuration and press "import configuration". The upload may take several minutes. [![image-1690357767962.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690357767962.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690357767962.png) Fig. 7 Uploading Excel configuration to Wcc Lite. ## Starting IEC 61850 server Now, when needed files were uploaded to Wcc Lite, we can start IEC61850 server. For this step the debugger interface will be needed. We prefer using terminal window with installed linux subsystem or other debugger interfaces like PuTTY app. These apps can be found and downloaded on the internet. Firstly we need to connect to Wcc Lite through SSH (using PuTTY, SSH connection type should be chosen and Wcc Lite IP 192.168.1.1 entered). Following commands should be entered in the debugger window: 1\. Connecting to Wcc Lite: **ssh root@192.168.1.1** 2\. Login: **root** Password: **your Wcc Lite pasword** 3\. Stopping the IEC 61850 service: **/etc/init.d/iec61850-server stop** 4\. Starting IEC61850 server in debugger mode: **iec61850-server -c /etc/iec61850-server/iec61850-server.json -d7** After these commands are executed, the IEC 61850 server is started, it is shown in Fig. 8. [![image-1690359835315.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690359835315.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690359835315.png) Fig. 8 Connecting to Wcc Lite through SSH and starting IEC61850 server ## Connecting to Wcc Lite (server) on IEDscout (client) For this step, IEDscout will be needed. IEDScout is an ideal tool for protection and substation automation engineers working with IEC 61850 devices. It provides access to the IEDs (Intelligent Electronic Devices) and performs numerous useful functions when working with them. The software can simulate entire Ed. Also any different but similar functionality software can be used as well. Following steps are done using IEDscout software. 1\. Open IEDscout software, then choose and open ICD file that is needed. 2\. In opened IEDscout Browser window click "Discover IED", then in opened window enter Wcc Lite IP (192.168.1.1) and press "discover" (Fig. 9). 3\. If the Wcc Lite did not connect when "discover" was pressed, then it is needed to press "Online". The indication, that IEC61850 server and Meter with DLMS serial protocol are connected correctly can be seen in Wcc Lite WEB "protocol connections" tab (Fig. 10). Now Wcc Lite IEC61850 server and IEC61850 client on IEDscout are connected and after few moments we should see measurement from the Meter in the debugger window. When measurements from the Meter appears in debugger window (Fig. 11), press "Read" on IEDscout to update values (Fig. 12). All these measurements are also represented in Wcc Lite WEB. There you can see that it has DLMS serial Meter signals and IEC 61850 server signals all in one place in "Imported signals" tab (Fig. 13). [![image-1690360585596.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690360585596.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690360585596.png) Fig. 9 Starting IED on IEDscout [![image-1690361170192.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690361170192.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690361170192.png) Fig. 10 Protocol connections [![image-1690361780503.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690361780503.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690361780503.png) Fig. 11 Measurements from Meter linked to IEC61850 server signals [![image-1690361918281.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690361918281.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690361918281.png) Fig. 12 Measurements appeared in IEDscout software [![image-1690365992182.png](https://wiki.elseta.com/uploads/images/gallery/2023-07/scaled-1680-/image-1690365992182.png)](https://wiki.elseta.com/uploads/images/gallery/2023-07/image-1690365992182.png) Fig. 13 Measurements represented in Wcc Lite WEB "Imported signals" tab. #### Files used in this article: 1\. ICD file: [WCC.icd](https://wiki.elseta.com/attachments/602) 2\. Server Model file: [WCC.cfg](https://wiki.elseta.com/attachments/603) 3\. Excel configuration file: [WCC\_full.xlsx](https://wiki.elseta.com/attachments/604) 4\. Excel Utility software: [Excel Utility](https://wiki.elseta.com/attachments/55) 5\. Wcc Lite firmware: [Wcc 1.7.0 RTU](https://wiki.elseta.com/attachments/47)# Firmware update To upgrade the FW of wcc lite, in the web interface go to system -> backup/flash firmware and upload the downloaded sysupgrade file by browsing for it and then pressing flash image. The keep settings box can be marked if the old settings are needed and the FW version change is minor (that is, the third number changed: 1.6.2 -> 1.6.3). [![image-1655190705882.png](https://wiki.elseta.com/uploads/images/gallery/2022-06/scaled-1680-/image-1655190705882.png)](https://wiki.elseta.com/uploads/images/gallery/2022-06/image-1655190705882.png) A pop-up should be presented to inform that the verification process can take no more than 120 seconds. [![image-1655190719778.png](https://wiki.elseta.com/uploads/images/gallery/2022-06/scaled-1680-/image-1655190719778.png)](https://wiki.elseta.com/uploads/images/gallery/2022-06/image-1655190719778.png) There you should see a checksum that you need to make sure matches the provided in the downloads page (at least 5 symbols should be checked). [![image-1655190731680.png](https://wiki.elseta.com/uploads/images/gallery/2022-06/scaled-1680-/image-1655190731680.png)](https://wiki.elseta.com/uploads/images/gallery/2022-06/image-1655190731680.png) After that, a new page opens that indicates that the system is flashing. This page is only visual, so you can exit out of it. When the FW is flashing you can **not** power off the device, the FW will get corrupted and the device will stop working. [![image-1655192321413.png](https://wiki.elseta.com/uploads/images/gallery/2022-06/scaled-1680-/image-1655192321413.png)](https://wiki.elseta.com/uploads/images/gallery/2022-06/image-1655192321413.png) After 10 minutes you can try connecting to the wcc lite once again.# Lua runner examples # Configuration Example With Default and Saved Values (Modbus TCP, IEC104) #### Excel configuration In order to control signals with Lua script an excel configuration for WCC Lite is needed. In this case three devices are required: one for Modbus TCP Master, one for IEC104-slave and one for Lua runner. Configuration example: [![image-1691501602369.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691501602369.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691501602369.png)
In order to connect slave and master devices, master's IP address and slave's host addresses has to be specified. Modbus IP address will be the address of Wi-Fi to which the computer is connected (this can be checked on terminal window with command *ipconfig*) and host address for IEC104 slave protocol will be the IP address to which WCC Lite is connected. To reach the device via these addressed WCC Lite has to be connected to the internet.
When creating Excel configuration with Lua, there is an option **default value** for signal. This value will be set to the signal right after uploading configuration or if the script does not return any saved values.
Signals sheet:
[![image-1692706261790.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692706261790.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692706261790.png) As it is seen from example values such as **min\_value** and **max\_value** can be added to determine limits of a signal. This way command signal will only return results which are within this range. Otherwise command value will have negative cot with invalid, non topical or overflow attributes and new value will not be sent to result signals. As configured, until command value is sent default value will be represented for Lua command signal. For saved values to be represented a Lua script is needed. #### Lua script Lua script example for this configuration is shown below: ```Lua local saved = get(signals.result) --getting result signal which is equated to new variable 'saved'

local command = get(signals.command) --getting command signal which is equated to new variable 'command'



--get() function returns nill if there is no valid value



if not command then --if command is not nill

    if saved then --if signal is not nill

        publish(signals.result, saved.value) --this value is published to result signals and saved value

    end

    return 0

end 





local time_diff = time_ms() - tonumber(command.time) --compares command time and real time

local is_command = time_diff < 30000 and time_diff > -30000 --if command time differs from

--real time more than 30s it will not be executed 





if string.find(command.attributes, "nt") or string.find(command.attributes,

"iv") or string.find(command.attributes, "ov") then

--searching if signal has negative attributes 

    if is_command then --if command execution time is not exceeding the limits then

        command.attributes = "cot=7,cotn" --equates negative cot values to response signal attributes

        publish(signals.command, command) -- and publishes value to command signals and value

        if saved then --if there is saved value then

            publish(signals.result, saved.value) --restores saved value to result signals

        end

        return 0

    end

else

    if is_command then

        command.attributes = "cot=7"

        publish(signals.command, command)   --in this cycle command value is being returned as well as

--cot7 and cot10 values in case given signal is command and has no negative attributes

        command.attributes = "cot=10"

        publish(signals.command, command) --publishes response to the command

        save(signals.result, command.value) --command value is being saved to result signal

    end

    publish(signals.result, command.value) --in this row command value is being published to result signals

end ```
#### Uploading configuration and Lua script to WCC Lite First Excel configuration needs to be uploaded to WCC Lite: [![image-1671526558865.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671526558865.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671526558865.png) After uploading configuration default value will be shown: [![image-1692712552551.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692712552551.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692712552551.png) After uploading configuration no errors should appear and all signal should be represented on the web. To upload Lua script go to *Script-Runner*, select *upload script* and then *start:* [![image-1671526957681.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671526957681.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671526957681.png) #### Connecting master and slave via Vinci software ##### Connecting IEC104 slave In order to connect to WCC Lite via IEC104 protocol, select Master(Client) mode on Vinci: [![image-1671528870849.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671528870849.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671528870849.png) Check Settings tab to match excel configuration: [![image-1671528969827.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671528969827.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671528969827.png) Specify IP address which should match the one in Excel configuration. ##### Connecting ModbusTCP master: To connect ModbusTCP Master, select Slave (Server) mode on Vinci: [![image-1671530055509.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671530055509.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671530055509.png) Check address to match **id** in Excel configuration: [![image-1691399259812.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691399259812.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691399259812.png)
Match the IP address given in Excel configuration as well. #### Executing commands Start both master and slave simulations on Vinci. Check if both protocols are connected to WCC Lite on the web tab *Protocol Connections:* [![image-1692703562023.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692703562023.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692703562023.png) To execute commands, open Vinci program with IEC104 master running. Here, go to *System* tab and fill in required fields such as IOA and select data type indicated in Excel configuration. First, try sending value that is outside the set range: [![image-1692952309993.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692952309993.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692952309993.png) After selecting *execute* this value will not be showed on the web and positive cot6 and negative cot7 values will be seen on Vinci IEC104 simulation window. Positive cot6 indicates command activation and negative cot7 means that command activation confirmation was denied. The command signal value will not be represented as result signals, because it is determined in the script, that signals with negative attributes will not be published. [![image-1692957902714.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692957902714.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692957902714.png) Now specify value which will be sent as a result and is within the given range. [![image-1691399941593.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691399941593.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691399941593.png) Positive cot7 and cot10 values will be seen on the Vinci IEC104 simulation window: [![image-1691400062905.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691400062905.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691400062905.png) This value will also be represented on Modbus TCP master Vinci simulation window: [![image-1691400136020.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691400136020.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691400136020.png) To show what happens if the value is not within determined range after the correct value has been sent before, try executing command with smaller or larger value specified: [![image-1691400179325.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691400179325.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691400179325.png) Again, positive cot6 and negative cot7 values is seen on Vinci window. [![image-1691400197027.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691400197027.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691400197027.png) As seen on WCC Lite web window, command signals have negative attributes and result signals have the same value as before, because it was saved by Lua script. This example shows that Lua runner can be used to save certain values to signal. For example after the restart saved value could be seen on command signal to determine minimum or maximum value, last value or typical value. This solution could be useful for protecting important data even after reboot or connection faults. Configuration --> [Download](https://wiki.elseta.com/attachments/552) Lua script --> [Download](https://wiki.elseta.com/attachments/542) # Signal Delay with Lua For delaying the response of command execution, Lua runner could be used as one of the solutions. In this example IEC104 and Modbus TCP are used. IEC104 protocol sends the command to Modbus and Lua signals and the results are represented as two separate signals. To create Excel configuration for WCC Lite in this case device sheet should look like this: [![image-1691574338163.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691574338163.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691574338163.png) In the fields marked red, for Modbus TCP enter IP address of Wi-Fi connected to computer and for IEC104 enter IP address of WCC Lite. Map the signals as shown below: [![image-1692965126845.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692965126845.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692965126845.png) IEC104 SCADA will send command which will then go to Lua signal. Lua signal will send the response back to IEC104 SCADA and to Modbus TCP result signal. For delaying signal response, Lua script could be written in many ways, however the most simple and effective one is to determine a wait time before publishing signal values to result signals. So in this case Lua script will look like this: ```Lua local saved = get(signals.result)--getting result signal which is equated to new variable 'saved'

local command = get(signals.command) --getting command signal which is equated to new variable 'command'



if not command then

if saved then

publish(signals.result, saved.value)--this value is published to result signals and saved value

end

return 0

end



if string.find(command.attributes, "nt") or string.find(command.attributes, "iv") or string.find(command.attributes, "ov") then

--searching if signal has negative attributes 

if command then

command.attributes = "cot=7,cotn"--equates negative cot values to response signal attributes

publish(signals.command, command)-- and publishes value to command signals and value

if saved then

publish(signals.result, saved.value)--restores saved value to result signals

end

return 0

end

else

if command then

command.attributes = "cot=7"

publish(signals.command, command)--in this cycle command value is being returned as well as

--cot7 and cot10 values in case given signal is command type and has no negative attributes

command.attributes = "cot=10"

publish(signals.command, command) --publishes response to the command

save(signals.result, command.value)--command value is being saved to result signal

end

local sleepTime = 30

sleep(sleepTime) --before publishing values to result signals script waits 30s

publish(signals.result, command.value)--in this row values are being published to result signals

end ``` After entering values to empty Excel configuration fields, upload the configuration to WCC Lite (it should upload without any errors): [![image-1691483399099.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691483399099.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691483399099.png) Upload Lua script to script runner and press start. After this, **Status** should show *Running* and script process number will appear.[![image-1691650520213.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691650520213.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691650520213.png) Open Vinci as IEC104 master, enter IP address of WCC Lite and start communication. Then open another Vinci window and connect Modbus TCP master – select Modbus TCP slave in Vinci and enter the same IP address as set in Excel configuration for Modbus device. With both communications running check **Protocol connections** on WCC Lite web interface, it should show *connected.* From IEC104 Vinci window go to *System* tab. Select command determined in the Excel configuration (50), IOA (1) and value (eg. 2). [![image-1691656106450.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691656106450.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691656106450.png) Execute the command and check *Imported signals:* [![image-1691656557970.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691656557970.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691656557970.png) After 30s result signals will now have the same value: [![image-1691657076669.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691657076669.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691657076669.png) Signal delay could be used as a tool to synchronize signals so all the values are received at the same time. It can also be used to schedule commands or tasks when delay is required. Since Lua is one of the faster programming languages, it is the most effective instrument to be used is such matters. Configuration --> [Download](https://wiki.elseta.com/attachments/553) Lua script --> [Download](https://wiki.elseta.com/attachments/554) # Mathematical Operations With Lua (FW version 1.7) Mathematical operations can be applied to Lua signals as in any other protocol. This can be done by configuring WCC Lite according to solution needed. To create an example which would test multiple mathematical operations, Excel configuration and Lua script is required. Device sheet should look similar to this: [![image-1691759419298.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691759419298.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691759419298.png) Each Lua device is created to send result values to Modbus TCP signals with different mathematical functions applied. This way the same Lua script can be reused and is more optimal since signal alias for each device can stay the same. There are many other solutions but this one allows to observe results more clearly. In the field "ip" for Modbus TCP master, enter IP address of Wi-Fi connection for computer in use. In the field "host" for IEC104 slave protocol enter IP address of WCC Lite device. Signals for these devices should be mapped in example to this: [![image-1691761247612.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691761247612.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691761247612.png) Each Lua device has command and result signals. Command received from IEC104 protocol is sent to Lua command signal and then this signal sends back a response for IEC104 protocol. If the response does not have negative cot attributes, value is then sent to Lua result signal which sends value to Modbus TCP result signal. Mathematical operations are applied to IEC104 protocol signals since it is the one sending the commands. As mentioned before Lua script for each Lua device is going to be unchanged and should look like this: ```Lua local saved = get(signals.result) --getting result signal which is equated to new variable 'saved'

local command = get(signals.command) --getting command signal which is equated to new variable 'command'



--get() function returns nill if there is no valid value



if not command then --if command is not nill

    if saved then --if signal is not nill

        publish(signals.result, saved.value) --this value is published to result signals and saved value

    end

    return 0

end 





local time_diff = time_ms() - tonumber(command.time) --compares command time and real time

local is_command = time_diff < 30000 and time_diff > -30000 --if command time differs from

--real time more than 30s it will not be executed 





if string.find(command.attributes, "nt") or string.find(command.attributes,

"iv") or string.find(command.attributes, "ov") then

--searching if signal has negative attributes 

    if is_command then --if command execution time is not exceeding the limits then

        command.attributes = "cot=7,cotn" --equates negative cot values to response signal attributes

        publish(signals.command, command) -- and publishes value to command signals and value

        if saved then --if there is saved value then

            publish(signals.result, saved.value) --restores saved value to result signals

        end

        return 0

    end

else

    if is_command then

        command.attributes = "cot=7"

        publish(signals.command, command)   --in this cycle command value is being returned as well as

--cot7 and cot10 values in case given signal is command and has no negative attributes

        command.attributes = "cot=10"

        publish(signals.command, command) --publishes response to the command

        save(signals.result, command.value) --command value is being saved to result signal

    end

    publish(signals.result, command.value) --in this row command value is being published to result signals

end ``` Upload Excel configuration to WCC Lite: [![image-1671526558865.png](https://wiki.elseta.com/uploads/images/gallery/2022-12/scaled-1680-/image-1671526558865.png)](https://wiki.elseta.com/uploads/images/gallery/2022-12/image-1671526558865.png) After uploading configuration no errors should appear and all signal should be represented on the web. To upload Lua script go to *Script-Runner*, select *upload script* and then *start* (for each Lua device): [![image-1691650520213.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691650520213.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691650520213.png) Open Vinci as IEC104 master, enter IP address of WCC Lite and start communication. Then open another Vinci window and connect Modbus TCP master – select Modbus TCP slave in Vinci and enter the same IP address as set in Excel configuration for Modbus device. With both communications running check **Protocol connections** on WCC Lite web interface, it should show *Connected*. From IEC104 Vinci window go to System tab. Select command determined in the Excel configuration (50), IOA (different for each signal) and value. After executing command, each signal (IEC104 command, Lua command, Lua result and Modbus result) will have the same value, which now will be with math applied. For example, command with IOA=1 and value 1 is being executed. In Excel configuration for this signal **add** column has a value of 5, which means that this value is going to be added to the value sent and the result will be 6. There can be multiple mathematical operations for one signal. For example add, multiply, bit select etc. If that is the case, math will be applied in typical order (eg. first bit select, then multiply, then add). More detailed explanation about mathematical operations in Excel configuration can be found here: [Optional parameters for signals](https://wiki.elseta.com/books/manual163/page/182-optional-parameters-for-signals) A user can also apply mathematical condition for the signal value. For example minimum or maximum value, threshold, suppression time for specific value etc. Minimum and maximum values can be applied to set the range of the signal, if the value is smaller or larger signal state will show invalid or overflow. Thresholds can be used in many ways. It can be a specific value or a percentage. If the signal value passes set threshold it will be represented on imported signals window. Threshold works by comparing old value with new value and then applying the condition of either representing the value or suppressing it, depending on the value change. Suppression value and suppression time is best used together, because suppression time determines how long the specific value should be suppressed. There could be multiple values set for suppression. In Excel configuration those values should be separated by comma. Mathematical operations combined with Lua script is useful for may cases. They can be used for filtering data, converting units, applying specific mathematical logic or other solutions. Configuration --> [Download](https://wiki.elseta.com/attachments/631) Lua script --> [Download](https://wiki.elseta.com/attachments/548) # Cronjob example Lua device can be configured using cron time expression. This way script execution can be scheduled or executed at certain times. To create such solution, device sheet of Excel configuration should look like this:[![image-1692192128948.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692192128948.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692192128948.png) As seen in this configuration, execution type for Lua device is date and execution parameter is in cron time expression. In this case script will be executed every 30s starting from a mm:30 or a mm:00 mark. There are a lot of online cron expression parsers or generators to convert this expression to a more understandable form: [https://crontab.cronhub.io/.](https://crontab.cronhub.io/) A Cron expression must have six variables, for instance, the code "0 \* \* \* \*" will not suffice because it contains only five variables. To rectify this, add a "0" to the beginning of the code: "0 0 \* \* \* \*". Similarly, the code "0 20-23,0-4,11 \* \* \*" which is displayed as correct on the website, to achieve the effect of every hour from 08:00 PM to 11:59 PM, 12:00 AM to 04:59 AM, and 11:00 AM, it must be adjusted as follows: "0 0 20-23,0-4,11 \* \* \*". To complete Excel configuration fill out the red fields with correct parameters. For "ip" field enter IP address of Wi-Fi connection that is connected to computer. This can be checked by entering command "ipconfig" on terminal window. For the "host" field enter IP address of WCC Lite device. Signals sheet should look similar to this: [![image-1692193770966.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692193770966.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692193770966.png) IEC104 SCADA will send command which will then go to Lua signal. Lua signal will send the response back to IEC104 SCADA and to Modbus TCP result signal. Lua script in this case will be very simple. To show how Lua with cronjob can be used in real life, a calculation for kilowatts per hour has been added: ```Lua local kW = tonumber(get_value(signals.command))--function "get_value" will get value from iec104 command

--without any attributes this value is still in string form so funtion "tonumber" will convert it to number

--a new variable is creted which is now equal to command value

value = value or 0 --new variable is created. It has to be equal to itself or to 0 if the script is running

--for the forst time

value = (kW * 30/3600) + value --formula for calculating kilowatts. command value from iec104 is multiplied by time.

--Since the script is being executed every 30s, this time needs to be converted to hours. an old value is being

--added to new value, this way result value that is being published will grow every 30s

publish(signals.result, value)--publishes result to result signals for lua and modbus TCP.

--Since the script is being executed every 30s, those values will be refreshed every 30s as well ``` To test the functionality of this script upload Excel configuration to WCC Lite (it should upload without any errors): [![image-1691483399099.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1691483399099.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1691483399099.png) Upload Lua script to script runner and press start. After this, **Status** should show *Running* and script process number will appear: [![image-1692256160683.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692256160683.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692256160683.png) Open Vinci as IEC104 master, enter IP address of WCC Lite and start communication. Then open another Vinci window and connect Modbus TCP master – select Modbus TCP slave in Vinci and enter the same IP address as set in Excel configuration for Modbus device. With both communications running check **Protocol connections** on WCC Lite web interface, it should show *connected.* From IEC104 Vinci window go to *System* tab. Select command determined in the Excel configuration (50), IOA (1) and value (for example 3600). [![image-1692256267495.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692256267495.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692256267495.png) Execute the command and check *Imported signals:* [![image-1692256755579.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692256755579.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692256755579.png) On a 30s mark result signals will have calculated value: [![image-1692256964491.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692256964491.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692256964491.png) After another 30s new value will be added to old value and result signals will be updated accordingly: [![image-1692257097082.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692257097082.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692257097082.png) Cronjob with Lua can be used mainly to schedule tasks. It can also be used as a way to filter, monitor or control the data. As seen in this example, Lua script can help calculate certain parameters which will then can be sorted using cron time expression. Configuration --> [Download](https://wiki.elseta.com/attachments/550) Lua script --> [Download](https://wiki.elseta.com/attachments/549) # Selecting specific bit as data (using bit_select) ### Description Some devices send single-point data (0 and 1) in one register. To access the individual bits of the register you need to use the optional parameter - **bit\_select** parameter in the excel configuration. You can read about other optional parameters in the [manual section 18](https://wiki.elseta.com/link/859#bkmrk-optional-attributes). In short, you need to add one more column in the signals sheet with the name **bit\_select**, and in the signals, you use to specify which **bit** is assigned to the specific signal, starting from 0 to 15 if the register is 16 bits, if we need 2 registers, then from 0 to 32 and so on. In this example, we will explain how to read states from the Fanox fault protection relay. ### Configuration The Fanox relay is communicating via Modbus, the address of the register is 500 using function 3 and the size of the register is 32 bits. So in the **job\_todo** field, we enter *3;500;2* because we need to read 2 registers. The number type is SIGNED32. Below is the data that is written in the register as bits. [![image-1676894368945.png](https://wiki.elseta.com/uploads/images/gallery/2023-02/scaled-1680-/image-1676894368945.png)](https://wiki.elseta.com/uploads/images/gallery/2023-02/image-1676894368945.png) To read this data as signals we need to assign each of the bits from 0 to 26 to the created signals. All of the signals have the same **job\_todo, tag\_job\_todo** , and **number\_type**. But each signal has a specific bit. Below you can see the configuration of these signals. [![image-1676894559730.png](https://wiki.elseta.com/uploads/images/gallery/2023-02/scaled-1680-/image-1676894559730.png)](https://wiki.elseta.com/uploads/images/gallery/2023-02/image-1676894559730.png) This example only displays how to read bit states via modbus, if you are using any other protocol you will need other parameters to read the data, but **bit\_select** parameter will stay.# IEC 61850 interoperability with IEC 104 ### IEC 61850 Server WCC Lite can act as a IEC 61850 server to serve data to remote SCADA systems. For example, WCC Lite can be used to acquire data from various protocols (Modbus, IEC 60870-5-103, etc.), this data can be redirected and propagated further to a single or multiple IEC 61850 clients. IEC 61850 Server supports TCP and TLS connection types. TCP connection can be secured with password authentication. #### Commands WCC Lite **IEC 61850 Server** implementation defines four command types which are described by their control model: - **Case 1**: Direct control with normal security (direct-operate); - **Case 2**: SBO control with normal security (operate-once or operate-many); - **Case 3**: Direct control with enhanced security (direct-operate); - **Case 4**: SBO control with enhanced security (operate-once or operate-many). Normal security commands are considered for execution if the command signal is found in Excel configuration. There aren’t any additional checks in command execution in any master protocol. Enhanced security commands need feedback from master protocol to either to succeed or fail. If feedback is not received within **command\_ack\_timeout\_ms** timeframe, the command is considered as failed. Command value attributes (e.g. stVal) must be updated separately (if they need to be updated).

When using SBO commands, select is not routed to master protocol and select logic is performed only in IEC 61850 Server protocol.

### IEC 61850 Client WCC Lite supports IEC 61850 Client command functionality that is used to control server devices such as protection relays. As relays require fast, secure and responsive interfaces, WCC Lite can be considered as a valid option. #### Supported commands Currently WCC Lite supports three types of commands: - setVal command; - setMag.f command; - Oper.ctlVal commad. If configured all commands will be added to excel using WCC-Utility. ### How commands function
**ctlModel** **Description**
`status-only` (0) Signal cannot be controlled
`direct-with-normal-security` (1) Direct execution of a command
`sbo-with-normal-security` (2) Command is selected and then executed
`direct-with-enhanced-security` (3) Direct execution with a force wait of command termination
`sbo-with-enhanced-security` (4) Command is selected and then executed; waiting for command termination
If ctlModel is `status-only`, messages via Redis will be ignored for this point, otherwise a Redis subscribe callback will be launched to handle commands as soon as they are sent over Redis. If CDC of a signal does not have means of control, `ctlModel` parameter is ignored. #### Controlling remote equipment via commands
The control model provides a specific way to change the state of internal and external processes by a client. The control model can only be applied to data object instances of a controllable Common Data Class (CDC) and whose ctlModel DataAttribute is not set to `status-only`. Such data objects can be referred to as control objects. If controls are enabled in a IEC 61850 Server device the user can configure controls by filling control\_model column in Excel configuration with a control model **direct-with-normal-security, sbo-with-normal-security, direct-with-enhanced-security** and **sbo-with-enhanced-security** as well as setting functional constraint in `da_fc` column to CO. #### Command “direct-with-normal-security” As the IEC 61850 protocol states `direct-with-normal-security` command simply executes a command directly without any additional selection or execution logic. This is the most basic use of commands. Does not contain any **command termination** logic. Provided below is command `direct-with-normal-security` standard logic of successful command and failed command: [![image-1681813442978.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1681813442978.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1681813442978.png)
Successful command logic [![image-1681813562966.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1681813562966.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1681813562966.png)
Failed command logic #### Command “sbo-with-normal-security” As the IEC 61850 protocol states `sbo-with-normal-security` command uses `select` and `execute` command logic. First, the command is selected, and then the execute command is sent to the server. Does not contain any **command termination** logic. Provided below is command `sbo-with-normal-security` standard success and failure logic: [![image-1681813485538.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1681813485538.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1681813485538.png)
Successful command logic [![image-1681813502398.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1681813502398.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1681813502398.png)
Failed command logic Regarding failure, if server fails to select cotn 7 is returned the same way if an execute fails. #### Command “direct-with-enhanced-security” As the IEC 61850 protocol states `direct-with-enhanced-security` command uses `execute` command logic. Contain **command termination**. This means that command awaits for termination message. The execute command is sent to the server, and the command waits for a termination message from the server. If the termination message is received, the command is considered successful, and if not, the command is considered failed. Provided below is command `direct-with-enhanced-security` standard success and failure logic: [![image-1681813522448.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1681813522448.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1681813522448.png)
Successful command logic [![image-1681813536268.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1681813536268.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1681813536268.png)
Failed command logic In case of failure, no command termination is additionally provided. #### Command “sbo-with-enhanced-security” As the IEC 61850 protocol states `sbo-with-normal-security` command uses `select` and `execute` command logic. Contains **command termination**. This command is similar to the sbo-with-normal-security command, but it also responds with a termination message. If the command is successful, the termination message is sent to the client, and if not, the cotn 7 is returned. Provided below is command `sbo-with-enhanced-security` standard success and failure logic: [![image-1681813585887.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1681813585887.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1681813585887.png)
Successful command logic [![image-1681813603803.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1681813603803.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1681813603803.png)
Failed command logic In the case of failure, `sbo` command acts the same way as `direct` command. It does not send command termination, only cotn 7. ### Basic protocol functionality The server (controlled station) delivers various data to the client. • Data object values reported upon changes • Data object values reported cyclically • Responses to control commands • Responses to read requests To enable interoperability between IEC 61850 and IEC 60870-5-104, mapping between the two protocols is necessary. This mapping involves defining which data objects from one protocol correspond to which data objects in the other protocol. [![image-1682431947176.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1682431947176.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1682431947176.png) Excel configuration Devices sheet [![image-1682491955449.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1682491955449.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1682491955449.png) Excel configuration Signals sheet The client can at any time request the present process data values by issuing interrogation commands. The command may be a general interrogation (GI) request, where all data objects with GI indication configured “1” are reported. [![image-1682491752307.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1682491752307.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1682491752307.png) Signals sheet ### IEC 60870-5-104 data objects **Single-point information** Single-point information is derived from several IEC 61850 boolean data attributes • SPS.stVal • SPC.stVal
TypeASDU
GI1M\_SP\_NA\_1Single point
Event30M\_SP\_TB\_1 Single point with CP56Time2a
Single-point information **Double-point information** Double-point information is derived from several IEC 61850 data attributes. • DPS.stVal • DPC.stVal
TypeASDU
GI3M\_DP\_NA\_1Double point
Event31M\_DP\_TB\_1 Double point with CP56Time2a
Double-point information ### Control operations ##### Single command Single-command controls are performed towards SPC (controllable single point) IEC 61850 target objects. The command can be given with or without a time stamp (C\_SC\_NA\_1, C\_SC\_TA\_1). Only direct type operations are allowed. **Single command** Single-command control operations can be performed towards SPC (controllable single point) data class objects. Only direct controls are allowed. • SPC.Oper.ctlVal
TypeASDU
Control45C\_SC\_NA\_1Single command
Control58C\_SC\_TA\_1Single command with CP56Time2a
Single command [![image-1682497120354.png](https://wiki.elseta.com/uploads/images/gallery/2023-04/scaled-1680-/image-1682497120354.png)](https://wiki.elseta.com/uploads/images/gallery/2023-04/image-1682497120354.png) ##### Double command Double-command controls are performed towards DPC (controllable double point) IEC 61850 target objects, that is, circuit breakers and controllable disconnector objects. The command can be given with or without a time stamp (C\_DC\_NA\_1, C\_DC\_TA\_1). If time tagged commands are used, it is important to ensure the master and the relay times are synchronized. Each double-point DPC object has two predefined IEC 60870-5-104 control objects: one intended for direct operation and the other one for select-execute (select-before-operate) operation. **Double command** Double-command control operations can be performed towards DPC (controllable double point) data class objects. Direct controls are always possible. Two-step select-execute controls are also possible if the target DPC object allows it. There are two different control objects available for the direct and select-execute alternatives. • DPC.Oper.ctlVal
TypeASDU
Control46C\_DC\_NA\_1Double command
Control59C\_DC\_TA\_1Double command with CP56Time2a
Double command **Direct operation** Direct operation is always possible for the double command regardless of the control model (direct or SBO) configured for the target IEC 61850 DPC object. If the control model is SBO, the IEC 60870-5-104 stack automatically performs the two needed operations (select and operate) towards the DPC object. **Select-execute operation** A two-step select-and-execute operation is possible only if the target DPC object’s control model is configured as select-before-operate (SBO). For most target DPC objects, the default control model setting mode is SBO. IEC 60870-5-104 selection timeout is defined by the protocol instance’s Selection Timeout setting parameter. When a command is performed from the IEC 60870-5-104 instance, the selection timeout setting configured for the IEC 61850 DPC target object is overridden. Cause of transmission and selected status The relay’s native IEC 61850 data model does not include any cause of transmission (COT) information data. Therefore, monitoring object transmissions from the IEC 60870-5-104 stack can only include the following cause of transmission values. • 1 = Cyclical • 3 = Spontaneous • 20 = General interrogation • 21...36 = Group 1...16 interrogation The control command’s response message returned to the controlling client includes COT value 11 = Remote command, but the controlled object value change in monitoring direction is always COT=3 (Spontaneous). While this information is not so important for the controlling client, it can be for another client in a multiple-client environment.# WCC Excel utility WCC Excel Utility app can be used to: - Upload configurations to WCC Lite device. App checks if there are no errors in your WCC Lite excel configuration file and converts excel configurations to .json file. Excel file → validation→ .json file. - Debug various protocols. - Create IEC 61850 protocol client and server model from .icd, .scd or .cid extensions. - Create excel configurations for IEC 61850 protocols. ### Connecting WCC Lite To start using the app you will need to connect your WCC Lite. Fill in *Host, Port, Username, password* and connect as required. [![image-1683273653971.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683273653971.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683273653971.png) - **Host** - an IP address for the device to connect to. (Default value 192.168.1.1) - **Port** - a PORT number to which an SSH connection can be made; valid values fall into a range between 1 and 65535. (Default is 22) - **Username** - a username which is used to make an SSH connection. (Default username is root) - **Password** - a password of a user used for establishing an SSH connection. (Default password is wcclite) #### Successful connection If connection is successful a connection status message will appear. Also a bar on the bottom of the app will turn green. [![image-1683196457098.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683196457098.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683196457098.png) [![connected.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/connected.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/connected.png) Successful connection message Once connected the app scans your current WCC Litte firmware version and suggest to use a correct conversion version. [![image-1683202961197.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683202961197.png) ](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683202961197.png) If you are using previous WCC Lite firmware versions you could select that from dropdown tab. [![image-1736507352998.png](https://wiki.elseta.com/uploads/images/gallery/2025-01/scaled-1680-/image-1736507352998.png)](https://wiki.elseta.com/uploads/images/gallery/2025-01/image-1736507352998.png) WCC Lite firmware selection tab #### Failed connection In case connection was not successful a connection status message will appear. [![image-1683199782056.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683199782056.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683199782056.png) Connection failure Make sure parameters: *Host IP, username and password* you have entered are correct. Note that connection can only be successful if a port used for SSH connection is open for IP address filled in the hostname entry field. Also please check WCC Lite firewall settings in case of connection failure. ### Validate and upload To make a conversion please select your excel configuration file and press **Convert**. File will go through various validation steps. If there are no errors found in the configuration, the output file should contain the generated configuration, otherwise, an error message is shown to a user. [![image-1683269177150.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683269177150.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683269177150.png) Error message indicates where changes need to be made In order to send a configuration to your WCC Lite press **Upload configuration**. If no errors occur, you should finally be met with text output mentioning configuration has been applied. During the course of the upload process, the aforementioned button is disabled to prevent spanning multiple concurrent processes. [![image-1683272332074.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683272332074.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683272332074.png) Successful upload message ### Configuration Configuration of IEC61850 for WCCLite is done via WCC Utility. Elseta WCC Utility has two IEC 61850 selections - IEC 61850 Config and IEC 61850 Excel: - **IEC 61850 Config** is used to create a configuration model file, which IEC 61850 Client service will use to parse reports from the server. IEC 61850 Server is used to send responses to master requests and commands. - **IEC 61850 Excel** is used to generate excel configuration file which in turn will be used to generated configuration .json via excel-utility. [![image-1683613769188.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683613769188.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683613769188.png) WCC Utility with IEC61850 selections ##### Generate model file To generate IEC 61850 Client or Server model file select “Client” or "Server" in drop down selection tab. Upload file with extensions .icd, .scd or .cid, then select where to output the generated model and press **Convert.** [![image-1683273244549.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683273244549.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683273244549.png) Generate IEC 61850 model file ##### Generate excel file To generate IEC 61850 Client or Server excel file select “Client” or "Server" in drop down selection tab. Upload file with extensions .icd, .scd or .cid, then select where to output the generated file and press **Convert**. [![image-1683273424037.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683273424037.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683273424037.png) Generate IEC 61850 excel file After generating excel file additional configuration information must be written in the devices sheet: - A valid host ip address must be provided. - An authorization method must be provided (if it is a complex authorization method, additional parameters might be required). - Model filename must be provided. The model filename must be exactly the same as that was generated one step earlier (Model filename can include extension, but it is not mandatory). [![image-1676877418592.png](https://wiki.elseta.com/uploads/images/gallery/2023-02/scaled-1680-/image-1676877418592.png)](https://wiki.elseta.com/uploads/images/gallery/2023-02/image-1676877418592.png) Excel configuration (Devices sheet) ### Debugger WCC excel utility has a debugging tool. This feature helps to track protocol service process and monitor events in real time. If protocol does not work properly (e.g. no communication between devices, data is corrupted, etc.), a user can launch a debug session and find out why the link is not functioning properly ##### Configuration **Step 1.** Use dropdown menu tab to select a **protocol** you want to debug. [![image-1683276901489.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683276901489.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683276901489.png) Protocol selection tab **Step 2.** Click on *Scan configurations* to validate protocol. [![image-1683275032672.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683275032672.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683275032672.png) Successful protocol validation message Please note that Debugger only works with protocols that are uploaded to your WCC Lite. If you select a protocol that is not configured on your device an error message will appear. Also you could only debug one protocol at a time. **Step 3.** Click on *Start session* ##### Debugger logging There is an option to store debugger log to a file. Thick the box before starting a session. [![image-1683275243272.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683275243272.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683275243272.png) In order to change debug logger output file location navigate to *Settings -> Preferences* [![image-1683289151579.png](https://wiki.elseta.com/uploads/images/gallery/2023-05/scaled-1680-/image-1683289151579.png)](https://wiki.elseta.com/uploads/images/gallery/2023-05/image-1683289151579.png)# Single point to double point and double point to single point information ##### Single point to double point information For this example of changing single point information to double point information 2 protocols are being used. For single point signals – Modbus RTU master and results are going to be returned as double point information to IEC 60870-5-104 slave protocol. Firstly, configuration for Devices sheet should look something like this: [![image-1686143861654.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686143861654.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686143861654.png) *Device* field should indicate which physical port is used in WCC Lite for Modbus protocol. *Host* field should be IP address of computer from which monitoring is happening. Other parameters should be specified according to protocol specifications or solution needed. Signals tab should look similar to this: [![image-1686146272043.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686146272043.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686146272043.png) For source device alias and source signal alias there should be 2 names specified and separated with space. That way IEC104 protocol will take information from both of these signals. Single point information is changed to double point information via source math expression. In this case if signal1 and signal2 are both have values of 0, result will also be 0. If both of these values are 1 result will be 3. If signal1 value is 1 and signal2 value is 0 result will be 2, if reversed – 1. To test this case, VINCI simulation program and VINCI Expert could be used. Connect VINCI Expert with WCC Lite PORT2 and with computer via USB cable. Then open one VINCI program window and select IEC104 master, make sure all setting match Excel configuration. On another VINCI window select Modbus RTU slave and VINCI Expert port (usually the lowest possible). Upload Excel configuration to WCC Lite, run both simulations and make sure both protocols are connected. On Modbus slave tab create 2 tags witch matching settings (function, data type etc.). Change tag values accordingly and observe the results on the web and IEC104 master tab: [![image-1686208772352.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686208772352.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686208772352.png) [![image-1686209563378.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686209563378.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686209563378.png) [![image-1686208800310.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686208800310.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686208800310.png) [![image-1686209596566.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686209596566.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686209596566.png) [![image-1686208832585.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686208832585.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686208832585.png) [![image-1686209640810.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686209640810.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686209640810.png) [![image-1686208856799.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686208856799.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686208856799.png) [![image-1686209669772.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686209669772.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686209669772.png) ##### Double point to single point information To change double point information to single point Devices sheet and protocols to be used will be the same as earlier. Signals sheet should look similar to this: [![image-1686146843376.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686146843376.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686146843376.png) In this case Modbus master reads 2 information units at once. To simulate this case connect WCC Lite and VINCI Expert analogously to the first example, protocol connections on VINCI app should also stay the same. For this test, Modbus tags will be: [![image-1686210882527.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686210882527.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686210882527.png) [![image-1686210225395.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686210225395.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686210225395.png) If Value box is checked, it means that this value is 1. Change tag values accordingly and observe the results on the web and IEC104 master tab: [![image-1686211295910.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686211295910.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686211295910.png) [![image-1686211284329.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686211284329.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686211284329.png) [![image-1686211325526.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686211325526.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686211325526.png) [![image-1686211355638.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686211355638.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686211355638.png) [![image-1686211396942.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686211396942.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686211396942.png) [![image-1686211408282.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686211408282.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686211408282.png) [![image-1686211430208.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686211430208.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686211430208.png) [![image-1686211446685.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686211446685.png)](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686211446685.png) Configurations: Double point to single point --> [Download](https://wiki.elseta.com/attachments/102) Single point to double point --> [Download](https://wiki.elseta.com/attachments/103)# Firmware 1.5 and 1.8 configurations comparison ## Description Since 1.5 firmware version some configuration parameters stopped existing, new ones were added, others simply changed their name. All these changes might be a problem when you want to import old configuration file into WCC Lite with a new firmware. This article is aimed to provide differences between different firmware versions for such protocols as Modbus Master, IEC 60870­5­103 Master and Internal Data. ## MODBUS Master #### **Device sheet:**
**Parameter** **1.5** **1.8**
mode - +
ascii + -
keep\_alive\_timeout - +
event\_history\_size + -
update - +
\+ (exists) \- (does not exist)
**Description of a Parameter** **1.5** **1.8**
**Parameter** **Parameter**
IP address of TCP slave device host ip
Number of requests, before link is considered lost (device status signals are changed) and reconnect attempt will be issued poll\_retry\_count retry\_count
RS485 delay between read and write operations in milliseconds poll\_delay\_ms serial\_delay
#### **Signal sheet:**
**Parameter** **1.5** **1.8**
scan\_rate\_ms + -
\+ (exists) \- (does not exist)
**Description of a Parameter** **1.5** **1.8**
**Parameter** **Parameter**
Size of this signal’s log in Event log. log\_size log
## IEC 60870­5­103 Master #### **Device sheet:**
**Parameter** **1.5** **1.8**
event\_history\_size + -
serial\_delay + -
retry\_delay\_ms - +
\+ (exists) \- (does not exist)
**Description of a Parameter** **1.5** **1.8**
**Parameter** **Parameter**
Polling interval in milliseconds. Time frame between two telegrams from master. poll\_interval\_ms scan\_rate\_ms
Response timeout in milliseconds poll\_timeout\_ms timeout\_ms
Number of retries of failed requests before announcing that device is in Error state poll\_retry\_count retry\_count
#### **Signal sheet:**
**Description of a Parameter** **1.5** **1.8**
**Parameter** **Parameter**
Size of this signal’s log in Event log. log\_size log
## WCC Lite internal signals #### **Device sheet:**
**Parameter** **1.5** **1.8**
name - +
device\_alias - +
\+ (exists) \- (does not exist) #### **Signal sheet:** ##### job\_todo comparison:
**job\_todo** **1.5** **1.8**
gsm - +
date - +
##### tag\_job\_todo comparison:
**job\_todo** **tag\_job\_todo** **1.5** **1.8**
gpio GPIO number + -
digital-input - +
rs232-enable - +
sim-select - +
sim-detect - +
modem-reset - +
board active-sim-iccid + -
active-sim + -
duid + -
mac-address - +
uptime - +
fw-version - +
hw-version - +
modem-type - +
led green-signal1 - +
green-signal2 - +
green-signal3 - +
\+ (exists) \- (does not exist)
**Description of a Parameter** **1.5** **1.8**
**job\_todo** **tag\_job\_todo** **job\_todo** **tag\_job\_todo**
GSM RAT number board gsm-current-rat-num gsm rat-number
GSM IMSI number gsm-imsi imsi-number
GSM Internet status gsm-internet-status internet-status
GSM operator number gsm-operator-num operator-number
GSM roaming status gsm-roaming-status roaming-status
GSM signal quality gsm-signal-quality-num signal-quality
WLAN LED led wcclite:blue:wlan led blue-wlan
ETH0 LED wcclite:green:eth0 green-eth0
ETH1 LED wcclite:green:eth1 green-eth1
Fault LED wcclite:red:fault red-fault
Relay LED & Output wcclite:relay gpio relay
# SNMP ### Description This article describes installing, setting up and monitoring SNMP with WCC Lite. ### Install To install SNMP to the WCC Lite you need to download .ZIP archive that has all the files necessary -> [SNMP\_tutorial.zip](https://wiki.elseta.com/attachments/616) Now you need to extract the .ZIP file. You will get a folder called *SNMP tutorial*. Go inside it and you will find these files: [![image-1657786127981.png](https://wiki.elseta.com/uploads/images/gallery/2022-07/scaled-1680-/image-1657786127981.png)](https://wiki.elseta.com/uploads/images/gallery/2022-07/image-1657786127981.png) The next step is to ensure that the WCC Lite is reachable by your computer, you can do it in many ways. One of them is to connect it to your PC via ethernet cable to the WCC Lite ETH0. After making sure there is a connection you can test it by opening your internet browser and entering the IP of the WCC Lite. If you have the default settings and WCC Lite is connected to your PC via an ethernet cable, then the IP is **192.168.1.1** Now you can open the **copy.bat** file. It will ask for the IP of the WCC Lite at first, enter the IP. Next is the username and password. If the defaults are left, the username will be **root** and password - **wcclite**. Your command window should look like this: [![image-1657787503476.png](https://wiki.elseta.com/uploads/images/gallery/2022-07/scaled-1680-/image-1657787503476.png)](https://wiki.elseta.com/uploads/images/gallery/2022-07/image-1657787503476.png) After installing you exit the command line and the SNMP is installed on your device. The WCC Lite .MIB file can be downloaded from here -> [ELSETA-WCCLITE-MIB.mib](https://wiki.elseta.com/attachments/37) The next step is to download a SNMP trap watcher program. For this example we are going to use MIB Browser, which can be downloaded from here -> [MIB browser setup.exe](https://wiki.elseta.com/attachments/551) After installing the program you will need to upload the downloaded [ELSETA-WCCLITE-MIB.mib](https://wiki.elseta.com/attachments/37) file to the MIB Browser: [![image-1692691690384.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692691690384.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692691690384.png) ### Setting up Now you will need to allow the telemetry agent service on WCC Lite to send the core data about the device resources' usage. Server address is your computer's IPv4 address. The usual port for SNMP is **162**. Set the sending period as needed and press Save & Apply. The screen should look something like this: [![image-1692690481929.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692690481929.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692690481929.png) After setting up the Telemetry agent tab navigate to Network -> Firewall -> Traffic rules. Enable the Allow-SNMP packet and edit the destination port to match the one in Telemetry agent screen (for this example it is 162): [![image-1692692627444.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692692627444.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692692627444.png) Next step is to change the port to 162 in the installed mini\_snmpd on WCC Lite. You can do that via the Ubuntu terminal. Log into WCC Lite by typing in **ssh root@192.168.1.1** . The password is **wcclite** . Now type **/usr/bin/mini\_snmpd -h** and after pressing enter you will see this screen: [![image-1692698709618.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692698709618.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692698709618.png) Now you will need to type in these commands: **/usr/bin/mini\_snmpd -p 162** and **/usr/bin/mini\_snmpd -P 162** to change the port to 162. [![image-1692698977130.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692698977130.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692698977130.png) After these changes you can now go back to the MIB Browser program and change the address to the IP you used while connecting to WCC Lite web. For example: [![image-1692699624139.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692699624139.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692699624139.png) ### Monitoring If no errors occurred you should be able to monitor the data about WCC Lite resources' usage with SNMP. For example, by pressing right click on the *private* folder and pressing the Walk option, you will see the window bellow, which represents the result table of resource usage. [![image-1692703270166.png](https://wiki.elseta.com/uploads/images/gallery/2023-08/scaled-1680-/image-1692703270166.png)](https://wiki.elseta.com/uploads/images/gallery/2023-08/image-1692703270166.png)

The given [ELSETA-WCCLITE-MIB.mib](https://wiki.elseta.com/attachments/37) contains an old version, so as of now, the results might not be accurate or they may not show at all. Update of the MIB file is needed.

# M-Bus Serial Communication Setup Guide ### Description This article describes how to establish communication between WCC Lite and a meter using the Meter-Bus protocol. ### Physical Link Setup: WCC Lite to Meter Connection Set up your computer and connect Ethernet cable to WCC Lite ETH0 port. Login with default credentials and setup basic required settings (name, network, users, etc. ). You can find configuration tutorials in [How to](https://wiki.elseta.com/books/how-to) articles.

This feature is available in firmware version **1.7 or earlier**.

[![Pav_wcc.png](https://wiki.elseta.com/uploads/images/gallery/2023-12/scaled-1680-/pav-wcc.png)](https://wiki.elseta.com/uploads/images/gallery/2023-12/pav-wcc.png) The WCC Lite lacks a built-in hardware interface for M-Bus connectivity, requiring the use of an RS485 or RS232 to M-Bus Master Converter for establishing a connection. In the illustrated example, a Schneider IEM2135 meter was used alongside the M-Bus 10 RS485/M-Bus Master Converter for data exchange. #### Example When the meter configuration parameters match the ones in the Excel sheet, communication can be established. In the example, we also set up IEC104\_SCADA communication along with M-Bus for smooth integration with the IEM2135 meter. Configuration for the example showed in the illustration -> [Download](https://wiki.elseta.com/attachments/574) The guidelines for creating your own configuration will be presented in the following segment. ### Configuration ##### M-Bus parameters for *Device* tab
**Parameter** **Type** **Description** **Required **Default value** (when not specified) **Range**
Min Max
namestring User-friendly device nameYes
descriptionstringDescription of a deviceNo
device\_aliasstringAlphanumeric string to identify a deviceYes
enablebooleanEnabling/disabling a deviceNo101
protocolstringProtocol to be used.Yes mbus serial
scan\_rate\_msintegerAll reads and writes will be executed within the timeframe in milliseconds.No10000
poll\_delay\_msintegerMinimum time delay in milliseconds to wait before sending any data on port.No200
timeout\_msintegerTimeout of waiting for an incoming response in millisecondsYes 060000
addressintegerDevice addressYes
devicestringCommunication portYes PORT1PORT2
baudrateintegerCommunication speed, baud/s Yes 9600 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
databitsintegerData bit count for communication Yes 8 6 9
stopbitsintegerStop bit count for communication Yes 1 1 2
paritystring Communication parity option Yes none none, even, odd
##### M-Bus parameters for the *Signals* tab
**Parameter** **Type** **Description** **Required **Default value** (when not specified) **Range**
Min Max
signal\_namestring User-­friendly signal name Yes
device\_aliasstring Device alias from a Devices tab Yes
signal\_aliasstring Unique alphanumeric name of the signal to be used Yes
enableboolean Enabling/disabling of an individual signal No10 1
loginteger Enable logging in the event log No0
number\_typestringType of a number (FLOAT, DOUBLE, DIGITAL, etc.)Yes
job\_todostring Tag job as single or multiple comma-separated OBIS codes Yes
tag\_job\_todostringTag sub jobYes
Optional parameters for signals are available on this page -> [Optional parameters for signals](https://wiki.elseta.com/books/manual/page/182-optional-parameters-for-signals). If you wish to include mathematical expressions in your signals, the guidelines can be found on this page -> [Mathematical functions](https://wiki.elseta.com/books/manual/page/183-mathematical-functions). ### Debugging If M-Bus does not work properly (e.g. no communication between devices, data is corrupted, etc.), a user can launch a debug session from command-line interface and find out why the link is not functioning properly.

On the web interface's protocol connections page, M-bus devices will not be displayed. If the connection is established correctly, it can be observed on the imported signals page.

To launch a debugging session, a user should stop the *pooler* process and run the *pooler* command with respective flags. - Step 1: Open the command terminal on your computer. - Step 2: Connect via SSH, example of the command **ssh root@192.168.1.1** and then enter your designated password. - Step 3: Service must be stopped by entering the following command into the wcclite: **/etc/init.d/pooler stop** - Step 4: After service is stopped it must be started with the preferred configuration file (JSON files found in /etc) and a debug level 7: **pooler -c /etc/pooler/pooler.json -­d7** - Step 5: Once the problem is diagnosed normal operations can be resumed with the following command: **/etc/init.d/pooler start** ##### POOLER command line debugging options ``` -h [ ––help ] Display help information

-V [ ––version ] Show version

-d Set debugging level

-c [ ––config ] Config path

-s [ ––serial ] Show serial port data

-r [ ––raw ] Show raw telegram data

-B [ ––mbus ] Show M-Bus driver output ``` One example of debugging involves using the following command -> **pooler -c /etc/pooler/pooler.json -B -d7 -s**. In this mode, both request packets and received packets are visible, along with the M-Bus driver output showing translated signal values received. This information can be instrumental in determining the correct configuration for the signal sheet. Additionally, messages regarding incorrect M-Bus frames can be observed, aiding in identifying potential wiring mistakes.# Add ssh-key #### Functionality The SSH key functionality in the WCC Lite device allows you to authenticate securely without needing to enter a password each time you access the device via SSH. This method uses public-key cryptography to ensure a secure connection. This feature enables you to paste public SSH keys into the provided interface, granting access to users whose private keys match the uploaded public keys. This enhances security and simplifies the login process.

The add SSH key functionality was implemented in WCC Lite starting from firmware version v1.9.3.

### Generating SSH Keys To use this functionality, you first need to generate an SSH key pair on your local machine. Here are the steps for generating a key pair: 1\. **Open a terminal window**. 2\. **Run the following command**: ```sh  ssh-keygen ``` 3\. **Follow the prompts**: - You will be asked to enter a file in which to save the key. Press Enter to accept the default location. - Enter a passphrase for additional security, or leave it empty for no passphrase [![image-1721655057265.png](https://wiki.elseta.com/uploads/images/gallery/2024-07/scaled-1680-/image-1721655057265.png)](https://wiki.elseta.com/uploads/images/gallery/2024-07/image-1721655057265.png) 4\. The generated keys will be saved in the `.ssh` directory in your home folder. The public key will be named `id\_rsa.pub` and the private key `id\_rsa`. ### Adding the Public Key to the WCC Lite Device 1\. Copy the content of your public key**:** ``` cat ~/.ssh/id_rsa.pub ``` [![image-1721721321085.png](https://wiki.elseta.com/uploads/images/gallery/2024-07/scaled-1680-/image-1721721321085.png)](https://wiki.elseta.com/uploads/images/gallery/2024-07/image-1721721321085.png) 2\. Access the WCC Lite web interface and navigate to the SSH-KEYS section. *System -> Administration* [![image-1721653963899.png](https://wiki.elseta.com/uploads/images/gallery/2024-07/scaled-1680-/image-1721653963899.png)](https://wiki.elseta.com/uploads/images/gallery/2024-07/image-1721653963899.png) 3\. Paste the copied public key into the text box provided. Ensure that each key is on a new line if you are adding multiple keys. [![image-1721654024569.png](https://wiki.elseta.com/uploads/images/gallery/2024-07/scaled-1680-/image-1721654024569.png)](https://wiki.elseta.com/uploads/images/gallery/2024-07/image-1721654024569.png) 4\. Save the changes to apply the new keys. [![image-1721653982535.png](https://wiki.elseta.com/uploads/images/gallery/2024-07/scaled-1680-/image-1721653982535.png)](https://wiki.elseta.com/uploads/images/gallery/2024-07/image-1721653982535.png) ### Using the SSH Key for Authentication After adding the public key to your WCC Lite device, you can now authenticate using the corresponding private key without entering a password. 1\. Open a terminal window. 2\. Use the SSH command to connect to your device: ``` ssh root@192.168.1.1 ```

Replace `root` with the username (which is `root` in this case) and `192.168.1.1` with the IP address of your WCC Lite device.

You should now be able to access the WCC Lite device securely and conveniently using your SSH key pair.# Data Export ### Introduction This article describes how to configure Wcc Lite to export data to external servers step by step.

Data export functionality is available since firmware version v1.5.0, of WCC Lite.

[![Data Export.png](https://wiki.elseta.com/uploads/images/gallery/2024-09/scaled-1680-/gCcdata-export.png)](https://wiki.elseta.com/uploads/images/gallery/2024-09/gCcdata-export.png) Fig. 1 Wcc Lite's gathered data export to external server ### First step: Configuring the Devices sheet of excel configuration To fully configure the "Data Export" device and it's signals, user can use the tables provided in the manual of Wcc Lite -> [Data Export section](https://wiki.elseta.com/link/1215#bkmrk-data-export-%28data-ex) or use the tables below in this article. Important to notice that some parameters to declare the Data Export device and it's signals are required and some of them are optional. In this article we will mainly use the required ones and a few of the optional parameters, to reach the desired outcome of signals exporting. Also, some parameters has default values, even if the parameters are not required, so please make sure that the default value is the same as needed, otherwise change it to the correct one from the available choices and describe it in excel configuration. *Data export (data-export) parameters for Devices tab table:*
**Parameter** **Type** **Description** **Required **Default value** (when not specified) **Range**
Min Max
namestringUser-friendly device name Yes
device\_aliasstringDevice alias to be used in configuration Yes
enablebooleanEnabling/disabling of a device No101
protocolstringSelection of protocol Yes Data Export
timeoutintegerThe time frame during which transmission to the remote server has to be completed (**in seconds**) No5
typestringSelection of file format Nocsv-simplecvs-periodic csv-simple, json-simple, json-samples
hoststringA URL of the remote server where files should be sent Yes
upload\_rate\_sec integerFrequency of generated file uploads (**in seconds)** No60
records\_buffer\_size integerA maximum amount of data change entries to hold before initiating the logging mechanism No100
logging\_period\_sec integerDescribe how frequently the data buffer of records\_buffer\_size is saved to the file No
10
1
3600
log\_folder stringA folder in the WCC Lite file system to save generated files (**”/var/cache/data-export”**) No
timestamp stringSelection of time format Nounixtimestampunixtimestamp, iso8601
compress stringSelection of file compression mechanism Nononenone, gz, tar.gz
compress\_password stringEnable the feature of file password protection No yes, true
csv\_field\_separator stringColumns separator in .csv file format No"," - (comma)"," - (comma) ";" - (semicolon) "." - (dot) " " - whitespace) "|" - (pipe)
csv\_decimal\_separator stringDecimal separator in values No"." - (dot)"." - (dot) "," - (comma)

The same symbols cannot be selected for both csv\_field\_separator and csv\_decimal\_separator. In such case both of them will be set to default values ­ ”.” and ”,” respectively.

The data generation rate may be going to be bigger than what the data buffer can hold (controlled by *records\_buffer\_size* and *logging\_period\_sec*). To make sure that no data loss occurs there’s an additional data logging call made in case the data buffer reaches a *records\_buffer\_size* value. For this example configuration, the Wcc Lite's template configuration for IOMod 8AI Modbus RTU protocol is being used. Simply in Devices sheet add the information required for Data Export service. As it can be seen in **Fig. 2** to declare the Data Export device in Devices sheet a few parameters were used: ***name**, **description**, **device\_alias**, **enable**, **protocol**, **type**, **upload\_rate\_sec**, **record\_buffer\_size**, **timestamp*** and ***host***. [![image-1727685097922.png](https://wiki.elseta.com/uploads/images/gallery/2024-09/scaled-1680-/image-1727685097922.png)](https://wiki.elseta.com/uploads/images/gallery/2024-09/image-1727685097922.png) Fig. 2 Describing the Data Export service in Devices sheet of excel configuration #### Host URL format rules The parameter host is highly configurable and might contain a considerable amount of information: • *Protocol* - FTP or HTTP (encrypted and encrypted); • *URL address* - both resolved and non-resolved; • *Authentication* - pair of users and/or passwords; • *Port* - useful when non-standard value is used; • *Endpoint* - a place in the server to which a call is made The format for the host parameter can be summarized as: `[ h t t p ( s ) / f t p ( s ) ] : / / [ [ u s e r ] : [ p a s s w o r d ]@] [ URL ] [ : p o r t ] / [ e n d p o i n t ]` Options are printed in square brackets. A protocol has to be selected, otherwise HTTP will be used as a default. The user and password pair is optional, but if the user: password pair is used, it should proceed with the @ sign. HTTP and FTP use default or user-assigned ports. By default HTTP uses port 80, while HTTPS uses port 443, FTP sends data over port 21, FTPS - over port 990. Make sure that these ports are open in the firewall on both the server and client side, otherwise, data will not be sent successfully. Finally, a POST request (for HTTP) or upload (for FTP) can be made to a specific place (endpoint). This endpoint should be described after a URL and port (if used). ### Second step: Configuring the DataExport sheet of excel configuration Signals to be sent are configured differently than signals for most other protocols. As data export service only transmits signals and does no data processing, usual signal logic is not used for them. That means that: • Signals for data export service are not seen in the *Imported Signals* tab; • Signals for data export service are configured in a different Excel sheet called DataExport The parameters to be filled in the DataExport sheet are shown in the table below. *Data export (data-export) parameters for the DataExport tab*
**Parameter** **Type** **Description** **Required **Default value** (when not specified) **Range**
Min Max
device\_alias stringDevice alias to be used in configuration Yes Yes
device\_name stringUser-friendly device name as in the Device sheet Yes
tag\_namestringUser-friendly signal name Yes
source\_device\_aliasstringdevice\_alias of a source device Yes
source\_signal\_aliasstringsource\_alias of a source signal Yes
enablebooleanEnabling/disabling of a measurement to be transmitted and logged No101
attributestringAn additional attribute to be attached to a signal No
To configure Wcc Lite to export data to an external server user must declare the signals for every measurement that needs to be exported, as well as describe the device (Data Export) in Devices sheet. This is done simply by linking signals from other protocols to the signals declared for exporting data. In **Fig. 3** it is shown how measurements from IOMod 8AI (Signals\_IOMod sheet ***device\_alias*** and ***signal\_alias***) are linked to the signals (DataExport sheet ***source\_device\_alias*** and ***source\_signal\_alias***) that will be exported to the server, which is declared as "Host" parameter in Devices sheet of excel configuration. [![image-1727679471995.png](https://wiki.elseta.com/uploads/images/gallery/2024-09/scaled-1680-/image-1727679471995.png)](https://wiki.elseta.com/uploads/images/gallery/2024-09/image-1727679471995.png) Fig. 3 Linking of the measurements from IOMod 8AI to Data Export signals ### Data representation in HTTP(S) server First thing to mention, that if user wants to export the data to an external server, the Wcc Lite should have access to the internet. This is done simply by connecting Wcc Lite's ETH1 port to the Ethernet port of the internet router. [![image-1727692655347.png](https://wiki.elseta.com/uploads/images/gallery/2024-09/scaled-1680-/image-1727692655347.png)](https://wiki.elseta.com/uploads/images/gallery/2024-09/image-1727692655347.png) Fig. 4 Wcc Lite's ETH1 port connected to the internet router for internet access For the representation of data in HTTP(S) or FTP(S) servers, user can use one of the available servers that can be found online. In this specific example Pipedream.com online HTTP server was used. When registered to the site, generate the URL for the server. This URL can be seen in example configuration Devices tab "host" parameter for Data Export device (*https://eo1167h7o8m7ur6.m.pipedream.net).* When the communication between Wcc Lite and IOMod is normal, and Wcc Lite is gathering measurements through Modbus RTU protocol, these measurement, as described before, are linked to Data Export signals. These signal values then are exported to the predefined HTTP(S) server in a defined file format. On the Pipedream.com online server a POST request (for HTTP) is being done and the data has been exported to it. As it can be seen in the **Fig. 5**, first URL is the same as the one declared in "Host" parameter for the Data Export service. Then the File and it's name, where the gathered data is being put and the URL on the bottom to download this file. How these measurements are represented in json\_samples format can be seen in **Fig. 6** and in the *tag-log-1727347342174741-322120016.json* file on the bottom of this article. Also to see other file formats for exported data please check [Data Export](https://wiki.elseta.com/link/1215#bkmrk-format-of-exported-d) article in Wcc Lite manual. [![image-1727694123312.png](https://wiki.elseta.com/uploads/images/gallery/2024-09/scaled-1680-/image-1727694123312.png)](https://wiki.elseta.com/uploads/images/gallery/2024-09/image-1727694123312.png) Fig. 5 Information in Pipedream.com HTTP server about the data packet exported from Wcc Lite [![image-1727695036056.png](https://wiki.elseta.com/uploads/images/gallery/2024-09/scaled-1680-/image-1727695036056.png)](https://wiki.elseta.com/uploads/images/gallery/2024-09/image-1727695036056.png) Fig. 6 Measurements exported in json-samples format ##### Files used in this article: 1\. [IOMod8AI\_data\_export.xlsx](https://wiki.elseta.com/attachments/621) [2. tag-log-1727347342174741-322120016.json](https://wiki.elseta.com/attachments/620)