DeviceSupervisor Agent User's Manual

DeviceSupervisor Agent User's Manual


DeviceSupervisor Agent

User's Manual

(Applicable for IG & EC)

Version3.0,April 2024


www.inhandnetworks.com.cn

The software described in this manual is according to the license agreement, can only be used in accordance with the terms of the agreement.

Copyright Notice

© 2024 InHand Networks All rights reserved.

Trademarks

The InHand logo is a registered trademark of InHand Networks.

All other trademarks or registered trademarks in this manual belong to their respective manufacturers.

Disclaimer

The company reserves the right to change this manual, and the products are subject to subsequent changes without prior notice. 9. We shall not be responsible for any direct, indirect, intentional or unintentional damage or hidden trouble caused by improper installation or use.


Getting Started

1.Introduction

The DeviceSupervisor Agent (hereinafter referred to as DSA) is a data acquisition and cloud software that runs on gateways, offering users convenient data collection, data processing, Data on the cloud, and protocol conversion functionalities. It supports a variety of industrial protocols such as Modbus, ISO on TCP, EtherNet/IP, as well as power protocols like DNP3, IEC 60870, and IEC 61850.

Version 1.2.X of DSA is referred to as DSA 1.0, version 2.X.X is referred to as DSA 2.0, and version 3.X.X is referred to as DSA 3.0. This manual takes collecting PLC data and uploading it to EMQX's online MQTT server as an example to explain how DSA 3.0 implements PLC data collection and data uploading to the cloud through DSA.

The overall process is shown in the figure below:


1.1 Preparation of hardware equipment and its data collection environment

1.1.1 Hardware Wiring

1.1.1.1 Serial/Ethernet Wiring

Power on the gateway and connect the IG gateway and PLC according to the topology using an Ethernet/serial cable. (The topology diagram of the EC series and the IG series is the same, taking IG502 as an example)



IG502 serial port terminal wiring instructions are as follows:

1.1.2 Set up InGateway to access PLC

For details about the default IP address of the InGateway network port, see the IP address information on the nameplate. In order for the InGateway to access the Ethernet PLC through the network port, the network port must be in the same network segment as the PLC.

1.1.3 Configure InGateway for network connectivity.

For information on the latest software releases and features of InGateway products, please visit the Resource Certer

1.3.3.1 EC Series

When using DSA, the firmware version should be 'V2.0.10' or later for the EC942 and 'V2.0.1' or later for the EC312

Update the firmware version as shown in the figure (the firmware version will take effect after the firmware version is restarted):

1.3.3.2 IG Series

When using DSA, the SDK version should be py3sdk-V1.4.5 or later. Please refer to the table for the minimum firmware version requirements:

IG Series

The firmware version number of the lowest legacy naming convention

The firmware version number of the minimum new version of the naming convention

IG974

V2.0.0.r14106

V2.0.3

IG902

V2.0.0.r14047

V2.0.3

IG532

V2.0.0.r14238

V2.0.1

IG504

V2.0.5

IG502

V2.0.0.r14045

V2.0.5

Update the firmware version as shown in the image:

Update the SDK as shown in the image:


2.Install and manage DSA

2.1 Install and run DSA

2.1.1 EC series

2.1.1.1 Installation and Running of Python App

To install and run Python App (hereinafter referred to as App) in the EC series, please refer to the following process:

Click the "Add" button and select the App package file to be installed, and then click Confirm.



After a successful import, you can view the imported App as shown in the following diagram:


2.1.1.2 Update Python App Runtime Configuration

If the installed App supports modifying the runtime method by importing a configuration file, you can follow the process below to update the App's runtime configuration: 



After a successful import, it will run according to the imported configuration file.

2.1.1.3 Update the version of Python App

Usually, if you need to update the version of the Python App, you only need to import the new version of the App on the following page. 


After the update is completed, it will appear as shown below:


2.1.1.4 View/Download Logs

View/download the logs during the running of the App in the interface as shown: 


After selecting the log level in "Level", logs lower than this level will not be displayed and saved. Log level sorting: ERROR>WARN>INFO>DEBUG>All.

To download the log, click the "Download" button.

2.1.2 IG Series

2.1.2.1 Installation and Running of Python App

To install and run a Python App (hereinafter referred to as the App) on the IG series, please refer to the following process: 

Before installing the App, ensure that the Python SDK is installed and the Python edge computing engine is enabled, as shown in the diagram below:



Click the "Add" button and select the App package file you need to install, then click confirm.



After a successful import, you can view the imported App as shown in the diagram below:




Check the enable box to run the App.



Once enabled, the App will run on IG series products and automatically run every time the device is powered on.


2.1.2.2 Update Python App Runtime Configuration

If the installed App supports modifying the running method by importing a configuration file, click the "Import Configuration" button and select the configuration file you need to import, then click confirm.



After a successful import, restart the App, and once restarted, it will run according to the imported configuration file.


2.1.2.3 Update the version of Python App

To update the version of a Python App, you typically only need to import the new version of the App.



After the update is completed, the interface will appear as shown in the diagram below:


2.1.2.4 View/Download Logs

View/download the logs during the running of the App in the interface as shown:



After setting the log level, logs higher than this level will be displayed and saved. The log level is set in the Parameter Settings interface, and the log level is sorted: ERROR>WARN>INFO>DEBUG


3. Quick start

This tutorial takes the Modbus TCP protocol as an example to introduce a simple example of how DSA can quickly start collecting device data and upload the data to the EMQX MQTT public cloud service, as well as receive MQTT messages and write values.

3.1 Enable Modbus Simulator

The tutorial uses ModRSsim2 as the Modbus TCP Slave. Run the ModRSsim2.exe software and configure the port number as shown in the diagram:

3.2Configure Southbound Controller

After running device_supervisor, add a southbound controller. In the controller protocol, select the Modbus TCP protocol and configure the relevant parameters.





  1. Name: Controller name, for example: Modbus TCP
  1. Controller Protocol: Select Modbus TCP
  1. IP Address: Fill in the IP address of the PC where the Modbus simulator is installed;
  1. Port Number: Default port 502;
  1. Slave Address: Default is sufficient.


3.3 Add Measuring Point

In the list of measuring points, add the device measuring points needed for collection and configure the measuring point's name, address, data type, etc., as shown in the diagram below: 




Once configured, click “Confirm” to add the measuring points. After creating the measuring points, wait a few seconds; if the controller connection status is still disconnected, perform the following actions to find the reason:

  1. Check if the IP and port were entered correctly when creating the controller.
  2. Check if the gateway can access the IP and port of the simulator.

3.4 Configure MQTT Cloud Service 

Enable the MQTT cloud service and configure the server address, MQTT client ID, port number, and other parameters as shown in the diagram:



  1. Server Address: MQTT server address, for example, EMQX MQTT public cloud server address broker.emqx.io
  1. Client ID: Custom client ID, which is the unique identifier for connecting to the server.
  1. Port Number: MQTT server port number, for example, EMQX MQTT public cloud server port 1883


Once configured, click submit and wait a few seconds. The MQTT connection status should be visible in the status bar as connected successfully. If it constantly shows as connecting, perform the following actions to find the reason:
  1. Check if the device can access the Internet;
  2. Check if the server address and port and other configuration information are correct.

If the connection drops after a while, check if the MQTT client ID has been used, or consider changing the client ID.

3.5 Configure MQTT Publish/Subscribe Scripts

After the MQTT connection is successful, add a publishing script as shown below:


  1. Name: Custom publishing script name
  1. Trigger Source Type: For example, select "Measuring Point Group"
  1. Group/Label: Select the group where the measuring point is located. The example uses the default group.
  1. Topic: Publish topic, the example uses inhand_pub
  1. Qos(MQTT): supports 0, 1, 2
  1. QuickFunction: Just use the default

As shown in the figure below, add a subscription script:



  1. Name: Custom publishing script name
  1. Topic: Publish topic, the example uses inhand_pub
  1. Qos(MQTT): supports 1
  1. Payload type: Select Plaintext in the tutorial
  1. QuickFunction:

# Enter your python code.

import json

from common.Logger import logger

from quickfaas.measure import write_plc_values

 

def write_callback(message, userdata):

logger.debug("write plc response: %s, userdata:%s" % (message, userdata))

 

def main(topic, payload, cloudName):

    logger.debug("subscribe topic: %s, payload: %s, cloudName: %s" % (topic, payload, cloudName))

    write_plc_values(message=json.loads(payload), callback=write_callback, userdata="")

3.6View data/write values on EMQX public cloud client

The tutorial uses the client tool provided by the EMQX official website to connect to the public EMQX broker to view the data uploaded by the gateway to the MQTT Broker.

On the EMQX official website (https://www.emqx.com/zh/mqtt/public-mqtt5-broker), choose to use the MQTT client tool online for testing

Click "New Connection" in the pop-up window that opens. After filling in the Name field in the pop-up interface, the rest of the configuration does not need to be modified. Finally, click "Connect".



In the MQTT client, write the value of the simulator collected by the gateway, as shown in the following figure, modify the value of the measurement point "WORD" collected by the gateway to 10, Paylaod:{"WORD": 10}

4. Concept

DSA Internal System Overview Block Diagram



  1. Controller:The controller refers to the component on the gateway page that enables and manages various collection protocols.
  1. (Southbound) Driver:The (southbound) driver refers to the software program in the gateway that communicates with PLC devices. It is usually developed specifically for certain manufacturers or device types and communicates using the device manufacturer's management protocols or APIs, such as Modbus, OPC, etc.
  1. Measuring Point:A measuring point refers to a collection point for PLC devices configured on the gateway.
  1. Grouping:Grouping refers to dividing measuring point data or alarm items into different groups within the gateway according to different needs and application scenarios for easier management.
  1. Protocol Conversion:Protocol conversion refers to forwarding data collected from the southbound direction through other protocols.
  1. Event Bus:The event bus refers to the message channel used for communication between various services within the gateway using MQTT messages.
  1. Data Preprocessing: Divided into alarms and data transformation.
  1. Alarm:An alarm refers to the configuration of alarm conditions for collected data within the gateway, which triggers an alarm when activated.
  1. Data Transformation:Data transformation refers to configuring data calculations and mapping values for collected data within the gateway.
  1. QuickFunction:QuickFunction refers to script functions configured within the gateway.
  1. Historical Database:Cache of historical data collected at measuring points

Functional characteristics

1. Measuring point monitoring

1.1 Monitoring list

In the "Monitoring List" interface, you can add controllers and measuring points to collect PLC data, and view the status and configuration information of the controller as well as data collection information.

On the current page, the controller can be edited, copied, deleted, etc.; the measuring points can be added, imported, exported, deleted, etc.

The page display of the monitoring list is as shown in the figure:

1.1.1 Add/Edit Controller

Click the "Add"/"Edit" button, select the controller protocol, such as Modbus RTU, and configure the controller's slave address, communication method, polling cycle and other parameters on the add controller page. Note: Controller names cannot be repeated.

In the advanced settings, the controller's message processing can be configured. For example, in the advanced settings of the Modbus RTU controller, parameters such as byte order, timeout time, and communication time can be configured.

1.1.2 Copy Controller

In industrial settings, there are often many similar PLC configuration parameters and measuring point configurations. To achieve rapid configuration, we have introduced the "Copy Controller" function. This feature allows us to quickly add controllers and measurement point configurations with similar settings, avoiding repetitive configuration tasks. Click on the "..." in the top right corner of the controller card to display more controller actions, then click "Copy". After configuring one controller, you can quickly add a second one; the copy controller will duplicate all the measurement points under the controller.



After clicking the "Copy" button, you can modify the differing configurations as needed, such as the controller name, slave address, etc., and then submit.



Upon completion of the copy, as shown in the diagram, the system will automatically generate measurement points and controller information identical to the first controller:


1.1.3 Disable/Enable Controller

When collecting data from multiple PLC devices and the gateway controller status or collected data is abnormal, we enable only the problematic controller for easy log viewing and real-time communication packet inspection. Click on the "..." in the top right corner of the controller card to display more controller actions, and select "Disable". After that, the controller will no longer perform data collection and reporting.


After disabling, the controller card will turn gray, as shown in the diagram.


When you want to re-enable the controller, click on the "..." in the top right corner of the controller card and select "Enable". The controller will then resume data collection and reporting.

1.1.4 Real-Time Communication Messages

When the controller status displays as abnormal or there is abnormal data collection, viewing the real-time communication messages between the gateway controller and the PLC devices becomes crucial. DSA supports displaying channel real-time communication messages. Select a controller at will, click "..." in the upper right corner of the controller card, and click "Real-time Communication Messages" to display all communication message interactions of the current channel.For example, if two Modbus RTU protocol controllers are enabled and both use an RS485 communication port, the real-time communication messages will show the communication messages of both controllers.

The display effect of real-time communication messages is as follows (Note: If you need to download communication messages, you need to enable "Store Communication Messages" in the advanced settings of the controller configuration before the "Download" button will be displayed. Communication messages of all controllers The text is displayed and saved in HEX format):

1.1.5 Add Measuring Point

In the "Measuring Point List," you can add measuring points to collect data from PLC devices. Click the "Add" button, and in the pop-up box, configure the measuring point parameters, such as adding a measurement point under a Modbus RTU protocol controller and configuring the measurement point name, address, data type, etc. (Note: The measurement point name must be unique within its controller).

In the "Measuring Point List," the "Import" button allows you to import the measurement points from a CSV file into the current gateway; the "Export" button enables you to export the current gateway's measurement point configurations to a CSV file. For details on the specific measurement point CSV file, refer to the Measuring Point CSV File Parameter Description.

1.2 Group

Group allows you to manage measuring points in the monitoring list by dividing them into groups. After the measuring points are grouped, the storage of historical data and measuring point reporting intervals are managed according to the configured groups. If you need to configure different reporting intervals for the measuring points or need to report corresponding data of the measuring points according to different MQTT topics, you can add a new group to manage the measuring points with different requirements. (Note: The default group cannot be deleted)

The group interface is shown in the figure:

For specific group CSV files, please refer to the Grouping CSV File Parameter Description

Add a new group on the group page. The interface is as follows:


Add group parameters Introduction:

  1. Name: Group name
  1. Reporting Interval: the reporting interval of the measuring point in the group.
  1. Periodically Upload Onchange Data :When enabled, Onchange data with unchanged values will also upload data according to the Onchange reporting cycle. The default is off.
  1. Onchange Reporting Interval: A fixed reporting interval for Onchange data.
               Historical Data is a data storage function provided by DSA. DSA can create data tables for measuring point groups and insert the grouped data into the database according to the specified storage strategy. It can be configured by the following parameters:
  1. Max Number: The maximum number of historical data stored in a single group.
  1. Storage policy: Storage interval of historical data
  1. Same AS the Reporting Interval: Store historical data according to reporting interval.
  1. Independent Storage Interval: customize the storage interval of historical data.
  1. Storage Method: The storage method of historical data. Switching the storage path will clear the stored historical data
  1. Gateway Storage: Historical data is stored in the storage space of the gateway itself.
  1. USB: Historical data is stored in a USB storage space external to the gateway.
  1. SD Card: Historical data is stored in the SD card storage space external to the gateway.

After adding a group, when adding a measuring point, you can choose to associate the measuring point with the group or select the measuring point in the list of measuring points to add to the specified group. The measuring points in the group will report data according to the reporting interval of the group.


Click "Export Historical Data" to export the group's historical data in CSV format


Click "Clear Historical Data" to clear the historical data stored in this group.

1.3 Historical Database

The historical database is used to store the historical data of the measuring points. After enabling the "Store Historical Data" function in the configuration of the measuring points, the data of the measuring points can be stored in the historical database. The historical data of measuring points is stored according to the groups they belong to. This arrangement makes it more convenient to locate and export historical data for specific measuring points.

2. Alarm

2.1 Real-time Alarms

After configuring alarm rules and when alarms are triggered, the real-time alarm page will display all triggered alarm items. 

In the real-time alarm table, some parameters from the alarm configuration, such as "Name," "Controller," "Alarm Level," etc., will be shown.

  1. Status: The current trigger status of the alarm item, displayed as "Triggered"
  2. Value: The value at the moment the alarm was triggered
  3. Time: The time when the alarm was triggered
  4. Action: An option to navigate to the "Historical Alarms" page for more details

Below is an example of a real-time alarm display interface.

2.2 Alarm Rules

Alarm rules can help us monitor the value of measuring points on the gateway side, and remind us in time when it exceeds the normal range. For example, in industrial scenarios, the range of voltage and current values and the start and stop status of some equipment need to be focused on. When we configure the alarm rules for collecting these data measuring points on the gateway side, if an alarm is triggered, the MQTT cloud service can be used to report the notification in time to avoid unnecessary losses.

On the alarm rules page, configure the alarm rules by clicking the "Add" button. In the pop-up box, set up the alarm rule parameters. The parameters include:

  1. Name: Alarm name
  2. Controller: The controller to which the alarm measuring point belongs
  3. Measuring point name: The name of the measuring point that triggered the alarm
  4. Alarm level: From low to high support "Remind", "Warning", "Secondary", "Important", "Serious"
  5. Alert Condition:
  1. Judgment condition: Support "=", "! = ", ">", "≥", "<", "≤"
  1. Logical conditions:
  1. No logic condition: The alarm is judged only by a single judgment condition
  1. && : Judging an alarm by two judging conditions
  1. | | : To determine an alarm, use a logical OR relationship between two conditions. This means that the alarm is triggered if either of the two conditions is met.
  1. Alarm content: the alarm content
  2. Alarm label: The alarm label is used to classify the alarm and facilitate quick selection when the alarm is uploaded to the cloud

The following picture shows an alarm with alarm level of alert, which belongs to the default tag. This alarm is generated when the value of the measuring point is >30 and <50; When it is not in this range, no alarm will be generated or the alarm will be eliminated.


In the "Alarm Rules" page, "Import" and "Export" CSV files of alarm rules refer to the Alarm Rules CSV file parameter description

The "Add to Label" function can help us quickly switch multiple alarm items to the alarm label. The following picture is the batch addition of alarm items to the "group_test" alarm label.

2.3 History Alarms

The historical alarms page can help us view the history of all alarm items, including triggered and recovered alarms. This function can help us understand the reason and time when the gateway side triggers/recovers the alarm items.

In the current page, you will see information about all the historical alarms that have been triggered and recovered.

The current page displays parameters that include those configured on the "Alarm Rules" page, such as "Name," "Controller," "Alarm Level," and "Alarm Content." Other parameters in the table are as follows:

  1. "Status" : There are two states, which are "triggered" and "Restored". "Triggered" means that the current alarm item is triggering an alarm; "Restored" means that the current alarm item has returned to normal.
  2. "Value" : The value of the alarm item at the moment the current state has been triggered or has been restored.
  3. "Time" : The time when the alarm was triggered or restored.
  4. "Operation" : Click the "Details" button to see the detailed information when the current alarm item is triggered or restored, and the "Delete" button can delete the current alarm item in the history of alarms.

2.4 Alarm Label

The alarm label can help us manage the alarm items. When the alarm item triggers an alarm, the MQTT message needs to be reported. Directly selecting the alarm label can quickly include all the alarm items under the alarm label. And when we need to report MQTT messages with different topics, we can add an alarm label to group different alarm items, and then select the corresponding label in different MQTT topics.

Go to the alarm label page to view the content of the alarm label.

In the table on the current page, there will be an alarm label named "default" by default (Note: this label cannot be deleted, and the rest of the added alarm labels can be deleted).

After clicking the "Add" button, configure the name of the alarm label in the pop-up box. (Note: This name is unique throughout the alarm label and cannot be repeated).


In the "Alarm Label" page, "Import" and "Export" Alarm rule CSV files, please refer to the Alarm label CSV file parameter introduction

Note: When deleting a label, the alarm items belonging to the current label in the "Alarm Rule" will be deleted together

3. Cloud

In industrial scenarios, the collected data needs to be reported to the cloud platform to help enterprises achieve centralized management, intelligent analysis and remote management of data. In DSA, we can enable and configure corresponding cloud services in the cloud service interface to help customers quickly connect to use mainstream cloud services.

3.1 MQTT Cloud Services

In the current page, you can view the connection status and configuration information of the current MQTT cloud service, and you can edit, import, export and other operations on the MQTT cloud service. Click the "Add" button to add a new MQTT cloud platform. For example, when we need to report data to multiple cloud platforms at the same time, we can add a new MQTT platform to connect to the cloud platform to report data. (Note: the name of the MQTT platform cannot be repeated, and the name of the default MQTT cloud platform is "Default"). As shown in the figure, add an MQTT platform with the name "test" :

The interface after adding is as shown in the figure:

After checking Enable cloud services, MQTT cloud services can be selected in the "Cloud Types" of the configuration interface. "Cloud Types" : The currently supported cloud platforms are "MQTT", "MQTT SparkPlugB", "iSCADA Cloud", "White Eagle Energy Manager", "Alibaba Cloud", "AWS IoT", "Azure IoT".


  1. "Clear Offline Cache" : This function can clear MQTT messages that failed to be published after the MQTT Cloud service went offline. For example, when we debug the MQTT function and the offline data generated do not want to be reported to the cloud platform, we can use this function to clear the offline data (Note: only messages with Qos greater than or equal to 1 are cached).
  1. "Import" : Select the configuration file of the MQTT cloud service to import the MQTT configuration in the file and the script in the message management. This function can quickly configure and enable the cloud service. For example, when configuring the same cloud service on different gateways, the configuration file exported after configuring one gateway can be directly imported into other gateways for use.
  1. "Export" : Click to export the configuration of the cloud and the script in the message management to a "cloud.json" file.
In the "cloud measuring point Settings" interface, you can shield the measuring point (after shielding, the measuring point will not be reported), modify the name of the cloud measuring point and other operations.


  1. "Cloud Measuring Point Name" : The name of the measuring point reported to the cloud platform is reported with the name in the current configuration item
  1. "Mute" : After muted, the measuring point will no longer be reported to the cloud platform
  1. "Import" and "Export" can respectively import the configuration information of the upper cloud measuring point Settings to the current gateway, or export the upper cloud measuring point information of the current gateway (note: the CSV file in the upper cloud measuring point Settings only saves the change of the name of the upper cloud measuring point or the muted measuring point). For the specific introduction of CSV file parameters, please refer to the Description of CSV fileparameters for Settings of Upper cloud measuring points
  1. "Message Management" : Here you can add publish script and subscribe script. Only when the script is added, can the message be published to the cloud platform and subscribe to the message of the cloud platform (Note: after enabling the MQTT SparkPlugB cloud service, the message is added by default and cannot be added but can only be modified)

4. Protocol

In industrial settings, data often exhibits diversity and complexity, and different application scenarios may require different communication protocols to meet their specific needs. DSA's protocol conversion functionality enables data to be uploaded in various application scenarios through different protocols. For example, using the Modbus TCP Slave protocol, data collected by controllers can be forwarded to SCADA servers.


The status page allows you to view the connection and running status of the current protocol (Note: not all protocols have status pages, such as BACnet Server protocol)


The configuration page can configure and view the connection parameters and add the mapping table function for the current protocol. For example, in the Modbus TCP Slave configuration interface, you can configure the Modbus TCP Slave port number, the maximum number of connections and other parameters. In the mapping table, you can perform add/edit, import/export and other operations.

For the specific mapping table CSV file, please refer to the Mapping table CSV file parameter introduction

For specific protocol configuration, please refer to the Appendix: Protocol conversion

5. Parameter Settings

In the parameter setting screen, you can configure the general Settings of the gateway. Such as setting gateway serial port parameters, storage configuration and custom parameters.

5.1Serial port Settings

In the serial port Settings page, you can configure the parameters of the serial port, such as the configuration of the serial port baud rate, data bits, etc.

The parameters of serial port Settings are shown in the figure:

The parameters are explained as follows (same for RS232 and RS485) :

  1. Baud Rate: support 300, 1200, 2400, 4800, 9600, 19200, 39400, 57600, 115200, 230400. The default is 9600
  1. Data Bits: 8 and 7 are supported. The default is 8
  1. Parity: supports no check, odd check and even check. The default is no parity
  1. Stop bit: 1 and 2 are supported. The default is 1

Click the "Submit" button to save your configuration after you've modified it.

5.2 Storage Configuration

In the storage configuration interface, you can configure the log storage of the gateway, the MQTT offline data storage and the communication packet storage of the controller.

The parameters of storage configuration are shown in the figure:

The parameters are explained as follows:

  1. Log level: The log level of the log output, the log below this level will not be displayed in the log. The log level from lowest to highest supports DEBUG,INFO,WARNING,ERROR. The default is INFO
  1. Historical alarm max: The maximum number of historical alarms in an alarm. Default 2000
  1. Offline Data storage Method: Support USB,SD card, gateway storage. The default is gateway storage
  1. Offline Data Max: The maximum number of offline data storage. Default 10000
  1. Offline Data Upload Period: The frequency of offline data reporting after offline data and other MQTT connections. Default 200ms
  1. Offline data retransmission policy: Support "retransmit all the time" and "retransmit a specified number of times and then discard". The default is "always retransmit". "Always retransmit" : The offline data will be retransmitted until the response from the server is received. "Retransmit the specified number of times and then discard" : After the specified number of retransmissions, if the response from the server is not received, the offline data will be discarded and the next one will be sent.
  1. After selecting "retransmit and discard after a specified number of times", two options will appear:
  1. Maximum Retransmission: The maximum number of times you can republish after a failure to publish. The default is 3 repostings
  1. Retransmission timeout: The amount of time to wait when Posting a message if no acknowledgement or reply is received, the default is 1000ms
  1. Communication Message Storage Method: Support USB,SD card, gateway storage. The default is gateway storage
  1. Max Stored Communication Messages:2000 by default

After modifying the configuration, click the "Submit" button to save the configuration. If you do not want to save the current changes, click the "Reset" button to restore the last saved configuration

5.3 Custom Parameter

Custom parameters are to define some global parameters, which can be used in cloud service configuration, fast function scripts. Set a global parameter to use, you can modify it more conveniently and quickly. For example, when a parameter needs to be used in multiple custom fast functions, if a custom parameter is used, then when the parameter value is changed, only the parameter value of the custom parameter interface is changed.

5.3.1Configure custom parameters

The parameters for custom parameters look like this:

By default, there are two parameters (note: these two parameters cannot be deleted or modified) :

  1. SN: The SN code of the device
  1. MAC: The MAC address of the device

If you want to add custom parameters, click the "Add" button, fill in the "Parameters" and "Parameters value" in the pop-up window, and click the "Confirm" button to add the modified value.

The "Import" and "Export" buttons can import the custom parameter configuration file to the current gateway and export the custom parameter of the current gateway into a configuration file respectively. For the specific CSV file, please refer to: Custom parameters CSV file parameter introduction

5.3.2Use custom parameters

You can add your own common parameters in custom parameters to be used as wildcards in cloud services and custom fast functions. The method is ${parameter name}, as shown in the following figure:

Custom parameters can also be used in scripts to get all custom parameters via the get_global_parameter() function.

An example script is as follows: (This script can output all the custom parameters in a log)

from common.Logger import logger

from quickfaas.global_dict import get_global_parameter

def main():logger.debug('get global dict: %s' % get_global_parameter()) 

In the custom fast function, add the script as shown:

The output will be:

6. Custom QuickFunctions

In the custom quickfunctions screen, you can add Python scripts to implement private logic (new scripts are enabled in a threaded manner). Custom fast function scripts support three trigger modes: periodic trigger; Local Subscription Message Trigger; QuickFunction start trigger.

The custom quick function interface button is introduced as shown below:

6.1 Periodic Trigger

A period-triggered quickfunction will trigger the script to run after the period ends

Below is a custom quickfunction that adds a 10-second cycle trigger, using the default script. This script will log "Timer start" and "Timer end" every 10 seconds.

The instructions for each parameter are as follows:

  1. Name: Any non-repeating name
  1. Mode: Select periodic trigger
  1. Periodic: The period that triggers this quickfunction. Units can be chosen: hours, minutes, seconds, the default is seconds.
  1. Entry Function: Stay the same as the entry function name in the script
  1. QuickFunction: Use Python code to customize the task logic of this periodic trigger script.

6.2Local Subscription Message Trigger

Local subscribe message trigger triggers the run script once when subscribed to the Topic that needs to be subscribed. The Topic on the gateway Event Bus can be looked from the  Event BUS

Below is the local subscribe message fast function that adds a subscribe controller write value message. This script will be triggered when a value is written to the controller. With the default script, the write value message will be printed to the log

The parameters are described as follows:

  1. Name: Any non-repeating name
  1. Mode: Select local subscribe message to trigger
  1. Subscribe to Topic: Subscribe to the Topic of gateway internal messages
  1. Entry Function: Keep the same name as the entry function in the script
  1. Function code: Use Python code to customize the task logic of this periodic trigger script.

6.3QuickFunction start trigger

The QuickFunction start trigger, only when the fast function start is complete, triggers the run script once.

The diagram below shows how to add a quickfunction in the QuickFunction Start Trigger mode. Using the default script, "QuickFunction start" will be printed in the logs when the quickfunction is initiated.

The parameters are described as follows:

  1. Name: Any non-repeating name
  2. Mode: Select Quickfunction start trigger
  3. Entry Function: Keep the same name as the entry function in the script
  4. QuickFunction: Use Python code to customize the task logic of this periodic script.


Appendix: List of southbound drivers

AllenBrandly (Rockwell)

EtherNet/IP (CompactLogix)

EtherNet/IP is an industrial Ethernet protocol, which is used to realize communication and data exchange between devices in industrial control systems. It is based on the standard TCP/IP protocol stack, and added to it the application layer protocol used in the field of industrial automation, providing the support of real-time, reliability and security.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select EtherNet/IP (CompactLogix)
  3. IP Address: IP address
  4. Port: Port information
  5. Polling Interval: the time interval of data collection (seconds), for example, set to 10S, then all the measuring points under the controller are polled every 10S
  6. Enable Multiple polling Interval: Once enabled, you can configure an additional polling interval and select certain measuring points under the controller to use the polling interval. This function can be used to distinguish the measuring points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  7. Polling Interval 2: It is an additional polling interval (in seconds) that needs to be set after enabling multiple polling interval;
  8. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connect Timeout: the timeout time for establishing the connection.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameters" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: the address of the measuring point
  3. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. BYTE: An 8-bit unsigned number
    3. SINT: 8-bit signed number
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. DWORD: 32-bit unsigned integer
    7. DINT: 32-bit signed integer
    8. FLOAT: 32-bit floating point number
    9. STRING: 8-bit string
    10. BCD16:16-bit BCD code
  4. Read Bit Data: When the data type is selected other than BIT,FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  5. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  6. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  7. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  8. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  9. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  10. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  11. Unit: Measuring point unit
  12. Description: Description of the measuring point
  13. Group: The group to which the measuring point belongs
  14. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  15. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  16. No: No computation is performed, the raw data value collected is used
  17. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  18. Decimal Places: The number of decimal places that need to be retained after the operation
  19. Data High Limit: The upper limit of the data of the measuring point
  20. Data lower Limit: the lower limit of the data at the measuring point
  21. High Limit Of Proportion: the upper limit of the data after the proportion operation
  22. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  23. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  24. Decimal Places: The number of decimal places to be retained after the operation
  25. Magnification: The multiplier that needs to be scaled up or down
  26. Offset: The data value that needs to be increased or decreased after the multiplier operation
  27. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  28. Start Bit: The bit offset at which the intercept of the original data begins
  29. End Bit: The bit offset that ends the interception of the original data
  30. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  31. Decimal Places: The number of decimal places that need to be retained after the operation
  32. Magnification: The multiplier that needs to be scaled up or down
  33. Offset: The data value that needs to be increased or decreased after the multiplier operation
  34. PT: Additional PT multiplier
  35. CT: Additional CT magnification
  36. Value mapping: Configurable measuring points for specific values converted to other values.
  37. Source Value: The raw value of the collected measuring point.
  38. Target Value: The expected value of the converted measuring point.
  39. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data
  40. Example description of measuring point address:

A1: Consistent with the PLC address, pay attention to the data type should also be consistent;

Program:MainProgram.A1: If the variable is local, prefix it with the program name;

slot=2; A1: Addresses can also carry additional slot information;

i=A[0] : If A in PLC is based on A bool array of uint type, each bit in A can be accessed using this way;

B[0] : If B is an array, each element can be accessed using an index

EtherNet/IP (Micro)

EtherNet/IP (Micro) is a variant of the EtherNet/IP protocol designed for smaller devices and resource-constrained environments. Compared with the standard EtherNet/IP protocol, EtherNet/IP (Micro) uses a more simplified message format and lightweight communication mechanism in the communication process to reduce resource consumption and communication overhead.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select EtherNet/IP (MIcro)
  1. IP Address: IP address
  1. Port: Port information
  1. Polling Interval: the time interval of data collection (seconds), for example, set to 10S, then all the measuring points under the controller are polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling interval and select certain measuring points under the controller to use the polling interval. This function can be used to distinguish the measuring points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: It is an additional polling interval (in seconds) that needs to be set after enabling multiple polling interval;
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connect Timeout: the timeout time for establishing the connection.
  1. Slot:PLC slot
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameters" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.

Adding measuring points

  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: the address of the measuring point
  3. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. BYTE: An 8-bit unsigned number
    3. SINT: 8-bit signed number
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. DWORD: 32-bit unsigned integer
    7. DINT: 32-bit signed integer
    8. BCD16:16-bit BCD code
    9. FLOAT: 32-bit floating point number
    10. STRING: 8-bit string
    11. BCD16:16-bit BCD code
  4. Read Bit Data: When the data type is selected other than BIT,FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  5. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  6. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  7. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  8. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  9. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  10. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  11. Unit: Measuring point unit
  12. Description: Description of the measuring point
  13. Group: The group to which the measuring point belongs
  14. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  15. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  16. No: No computation is performed, the raw data value collected is used
  17. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  18. Decimal Places: The number of decimal places that need to be retained after the operation
  19. Data High Limit: The upper limit of the data of the measuring point
  20. Data lower Limit: the lower limit of the data at the measuring point
  21. High Limit Of Proportion: the upper limit of the data after the proportion operation
  22. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  23. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  24. Decimal Places: The number of decimal places to be retained after the operation
  25. Magnification: The multiplier that needs to be scaled up or down
  26. Offset: The data value that needs to be increased or decreased after the multiplier operation
  27. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  28. Start Bit: The bit offset at which the intercept of the original data begins
  29. End Bit: The bit offset that ends the interception of the original data
  30. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  31. Decimal Places: The number of decimal places that need to be retained after the operation
  32. Magnification: The multiplier that needs to be scaled up or down
  33. Offset: The data value that needs to be increased or decreased after the multiplier operation
  34. PT: Additional PT multiplier
  35. CT: Additional CT magnification
  36. Value mapping: Configurable measuring points for specific values converted to other values.
  37. Source Value: The raw value of the collected measuring point.
  38. Target Value: The expected value of the converted measuring point.
  39. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data
  40. Example description of measuring point address:
A1: Consistent with the PLC address, pay attention to the data type should also be consistent;
Program:MainProgram.A1: If the variable is local, prefix it with the program name;
slot=2; A1: Addresses can also carry additional slot information;
i=A[0] : If A in PLC is based on A bool array of uint type, each bit in A can be accessed using this way;
B[0] : If B is an array, each element can be accessed using an index

EtherNet/IP (MicroLogix)

EtherNet/IP (MicroLogix) refers to the use of EtherNet/IP protocol for communication in the MicroLogix controller family

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select EtherNet/IP (MIcroLogix)
  1. IP Address: IP address
  1. Port: Port information
  1. Polling Interval: the time interval of data collection (seconds), for example, set to 10S, then all the measuring points under the controller are polled every 10S
  1. Enable Multiple polling Interval: Once enabled, you can configure an additional polling interval and select certain measuring points under the controller to use the polling interval. This function can be used to distinguish the measuring points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: It is an additional polling interval (in seconds) that needs to be set after enabling multiple polling interval;
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connect Timeout: the timeout time for establishing the connection.
  1. Communication Message Settings:

Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameters" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.


Adding measuring points
Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Address: the address of the measuring point
  2. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. BYTE: An 8-bit unsigned number
    3. SINT: 8-bit signed number
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. DWORD: 32-bit unsigned integer
    7. DINT: 32-bit signed integer
    8. FLOAT: 32-bit floating point number
    9. STRING: 8-bit string
  3. Read Bit Data: When the data type is selected other than BIT,FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  4. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  5. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  6. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  7. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  8. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  9. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  10. Unit: Measuring point unit
  11. Description: Description of the measuring point
  12. Group: The group to which the measuring point belongs
  13. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  14. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  15. No: No computation is performed, the raw data value collected is used
  16. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  17. Decimal Places: The number of decimal places that need to be retained after the operation
  18. Data High Limit: The upper limit of the data of the measuring point
  19. Data lower Limit: the lower limit of the data at the measuring point
  20. High Limit Of Proportion: the upper limit of the data after the proportion operation
  21. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  22. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  23. Decimal Places: The number of decimal places to be retained after the operation
  24. Magnification: The multiplier that needs to be scaled up or down
  25. Offset: The data value that needs to be increased or decreased after the multiplier operation
  26. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  27. Start Bit: The bit offset at which the intercept of the original data begins
  28. End Bit: The bit offset that ends the interception of the original data
  29. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  30. Decimal Places: The number of decimal places that need to be retained after the operation
  31. Magnification: The multiplier that needs to be scaled up or down
  32. Offset: The data value that needs to be increased or decreased after the multiplier operation
  33. PT: Additional PT multiplier
  34. CT: Additional CT magnification
  35. Value mapping: Configurable measuring points for specific values converted to other values.
  36. Source Value: The raw value of the collected measuring point.
  37. Target Value: The expected value of the converted measuring point.
  38. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data
  39. Example description of measuring point address:

A9:0: ASCII

B2:0: Bit

N2:0:Integer

L17:0:Long Integer

ST2:0:String

F8:5:Floating

S:1/15:Status

C2:0:Counter

T2:0:Timer

I:0/15:Input

O:0/15:Output


EtherNet/IP (Unconnected)

EtherNet/IP (Unconnected) refers to a method of communication used in the EtherNet/IP protocol. Unconnected means that there is no need to establish a persistent connection when communicating, and each communication is independent and immediate. This method is similar to the connectionless communication method in the UDP protocol, which is more lightweight and flexible, and is suitable for some scenarios with less stringent real-time requirements.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select EtherNet/IP (Unconnected)
  3. IP Address: IP address
  4. Port : Port information
  5. Polling Interval: the time interval of data collection (seconds), for example, set to 10S, then all the measuring points under the controller are polled every 10S
  6. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling interval and select certain measuring points under the controller to use the polling interval. This function can be used to distinguish the measuring points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  7. Polling Interval 2: It is an additional polling interval (in seconds) that needs to be set after enabling multiple polling interval;
  8. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connect Timeout: the timeout time for establishing the connection.
  1.      Slot:PLC slot
  2. Communication Message Settings:
  1.     Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameters" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.

Adding measuring points

Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Symbol: the address of the measuring point
  2. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. BYTE: An 8-bit unsigned number
    3. SINT: 8-bit signed number
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. DWORD: 32-bit unsigned integer
    7. DINT: 32-bit signed integer
    8. FLOAT: 32-bit floating point number
    9. STRING: 8-bit string
  3. Read Bit Data: When the data type is selected other than BIT,FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  4. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  5. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  6. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  7. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  8. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  9. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  10. Unit: Measuring point unit
  11. Description: Description of the measuring point
  12. Group: The group to which the measuring point belongs
  13. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  14. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  15. No: No computation is performed, the raw data value collected is used
  16. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  17. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  18. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  19. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  20. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
  21. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data
  22. Example description of measuring point address:

A1: Consistent with the PLC address, pay attention to the data type should also be consistent;

Program:MainProgram.A1: If the variable is local, prefix it with the program name;

slot=2; A1: Addresses can also carry additional slot information;

i=A[0] : If A in PLC is based on A bool array of uint type, each bit in A can be accessed using this way;

B[0] : If B is an array, each element can be accessed using an index


*SLC Net

SLC Net stands for "Symbian Limited Compatibility Network" and it is the network communication protocol for Symbian OS. Symbian OS is a kind of operating system that has been widely used in smart phones and mobile devices. It provides a wealth of functions and application support.

Adding controllers
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select *SLC Net
  3. IP Address: IP address
  4. Port: Port information
  5. Polling Interval: the time interval of data collection (seconds), for example, set to 10S, then all the measuring points under the controller are polled every 10S
  6. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling interval and select certain measuring points under the controller to use the polling interval. This function can be used to distinguish the measuring points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  7. Polling Interval 2: It is an additional polling interval (in seconds) that needs to be set after enabling multiple polling interval;
  8. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connect Timeout: the timeout time for establishing the connection.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameters" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.


Adding measuring points

Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Address: the address of the measuring point
  2. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. BYTE: An 8-bit unsigned number
    3. SINT: 8-bit signed number
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. DWORD: 32-bit unsigned integer
    7. DINT: 32-bit signed integer
    8. FLOAT: 32-bit floating point number
    9. STRING: 8-bit string
    10. BCD16:16-bit BCD code
  3. Read Bit Data: When the data type is selected other than BIT,FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  4. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  5. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  6. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  7. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  8. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  9. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  10. Unit: Measuring point unit
  11. Description: Description of the measuring point
  12. Group: The group to which the measuring point belongs
  13. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  14. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  15. No: No computation is performed, the raw data value collected is used
  16. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  17. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  18. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  19. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  20. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
  21. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data
  22. Example description of measuring point address:

A9:0: ASCII variable

B2:0: Bit variable

N2:0: Integer variables

F8:5: Floating point

S:1/15: Status variable

ST2:0: String

C2:0: Counter

I:0/15: Input

O:0/15: Output

R9:0: Control

T2:0: Timer

L9:0: Long Integer

DLT meter

DLT645-1997

    DLT645-1997 is a version of the Chinese national standard GB/T 645-1997 "Multi-function Meter Communication Protocol". This standard specifies the communication protocol and data format between the multi-function meter and the external equipment, which is used for data exchange and communication between the meter and the monitoring system.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select DLT645-1997
  3. Slave: Table Number
  4. Endpoint: Support RS485 and RS232
  5. Polling Interval: the time interval of data collection (seconds), for example, set to 10S, then all the measuring points under the controller are polled every 10S
  6. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling interval and select certain measuring points under the controller to use the polling interval. This function can be used to distinguish the measuring points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  7. Polling Interval 2: It is an additional polling interval (in seconds) that needs to be set after enabling multiple polling interval;
  8. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
    1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Communication time setting:
    1. Communication Interval Time: The interval time between message exchanges, i.e., after receiving a response from the device, it will wait for a communication interval before sending the next request message.
  1. Communication Message Settings:
    1. Store of Communication Message: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameters" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: The address of the measuring point, the address format supports 0000 or 00-00.
  3. Data type: Measuring point data type, including:
    1. WORD: 16-bit unsigned integer
    2. INT: 16-bit signed integer
    3. DWORD: 32-bit unsigned integer
    4. DINT: 32-bit signed integer
    5. FLOAT: 32-bit floating point number
    6. DOUBLE: A 64-bit floating point number
    7. STRING: 8-bit string
  4. Read Bit Data: When the data type is selected other than FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  5. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  6. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  7. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  8. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
  9. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  10. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  11. Unit: Measuring point unit
  12. Description: Description of the measuring point
  13. Group: The group to which the measuring point belongs
  14. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  15. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  16. No: No computation is performed, the raw data value collected is used
  17. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  18. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  19. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  20. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  21. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
    LT645-2007

DLT645-2007 is a version of the Chinese national standard GB/T 645-2007 "Multi-function Meter Communication Protocol". This standard is an important version of the DLT645 series of standards, which is used to specify the communication protocol and data format between the multifunctional electric energy meter and the external equipment.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select DLT645-2007
  3. Slave: Table Number
  4. Endpoint: Support RS485 and RS232
  5. Polling Interval: the time interval of data collection (seconds), for example, set to 10S, then all the measuring points under the controller are polled every 10S
  6. Enable Multiple polling Interval: Once enabled, you can configure an additional polling interval and select certain measuring points under the controller to use the polling interval. This function can be used to distinguish the measuring points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  7. Polling Interval 2: It is an additional polling interval (in seconds) that needs to be set after enabling multiple polling interval;
  8. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
    1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  2. Communication time setting:
    1. Communication Interval Time: The interval time between message exchanges, i.e., after receiving a response from the device, it will wait for a communication interval before sending the next request message.
    2. Initialization on Open: Whether to perform the operation of activation command when opening the serial port. After opening, add FE FE FE FE to the packet frame header.
  1. Communication Message Settings:
    1. Store Communication Message: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameters" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1.      Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Address: The address of the measuring point, the address format supports 0000 or 00-00.
  1. Data type: Measuring point data type, including:
  1. WORD: 16-bit unsigned integer
  1. INT: 16-bit signed integer
  1. DWORD: 32-bit unsigned integer
  1. DINT: 32-bit signed integer
  1. FLOAT: 32-bit floating point number
  1. DOUBLE: A 64-bit floating point number
  1. STRING: 8-bit string
  1. Read Bit Data: When the data type is selected other than FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  1. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  1. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  1. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  1. Read and write permissions:
  1. Read: read-only, not writable
  1. Read/Write: Readable and writable
  1. Mode:
  1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
  1. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
  1. Never: Only used locally, no need to upload data from the cloud
  1. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  1. Unit: Measuring point unit
  1. Description: Description of the measuring point
  1. Group: The group to which the measuring point belongs
  1. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  1. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  1. No: No computation is performed, the raw data value collected is used
  1. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Data High Limit: The upper limit of the data of the measuring point
  1. Data lower Limit: the lower limit of the data at the measuring point
  1. High Limit Of Proportion: the upper limit of the data after the proportion operation
  1. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  1. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  1. Decimal Places: The number of decimal places to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  1. Start Bit: The bit offset at which the intercept of the original data begins
  1. End Bit: The bit offset that ends the interception of the original data
  1. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. PT: Additional PT multiplier
  1. CT: Additional CT magnification
  1. Value mapping: Configurable measuring points for specific values converted to other values.
  1. Source Value: The raw value of the collected measuring point.
  1. Target Value: The expected value of the converted measuring point.
    LT645-2007 over TCP

DLT645-2007 over TCP refers to the DLT645-2007 communication protocol applied to TCP/IP network communication mode. DLT645-2007 is a version of the multi-function meter communication protocol, and TCP is a common transmission control protocol used to achieve reliable data transmission in the network. The communication mode of DLT645-2007 over TCP can make full use of the reliability and stability of TCP protocol to ensure the safe transmission and reliable reception of data. This method is suitable for remote monitoring and management of electric energy data scenarios, such as power system monitoring, energy management systems, etc.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select DLT645-2007 over TCP
  1. Station No: Table number
  1. IP Address: The IP address of the meter
  1. Port: The port information of the meter
  1. Polling Interval: It is the time interval of collecting data (seconds), for example, it is set to 10S, then all the measuring points under the controller are polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: It is an additional polling cycle (in seconds) that needs to be set after enabling multiple polling cycles;
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
    1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
    2. Connect Timeout: the timeout time for establishing the connection.
    3. Initialize activation: Whether to activate the command when opening the serial port. After opening, add FE FE FE FE to the packet frame header.
  1. Communication Timing Settings:
    1. Communication Interval: The interval time between message exchanges, i.e., after receiving a response from the device, it will wait for a communication interval before sending the next request message.
  1. Communication Message Settings:
    1. Storage of communication messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameters" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: Address of measuring point, address format only supports 00-00 format (" - "must be added).
  3. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. BYTE: An 8-bit unsigned integer
    3. SINT: 8-bit signed integer
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. BCD16:16-bit BCD code
    7. DWORD: 32-bit unsigned integer
    8. DINT: 32-bit signed integer
    9. FLOAT: 32-bit floating point number
    10. DOUBLE: A 64-bit floating point number
    11. STRING: 8-bit string
  4. Read Bit Data: When the data type is selected other than FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  5. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  6. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  7. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  8. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
  9. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  10. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  11. Unit: Measuring point unit
  12. Description: Description of the measuring point
  13. Group: The group to which the measuring point belongs
  14. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  15. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  16. No: No computation is performed, the raw data value collected is used
  17. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  18. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  19. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  20. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  21. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.

*DLT698

DLT698 is an implementation of Chinese national standard GB/T 26880-2011 "Power information acquisition system communication protocol", it is based on the IEC 62056 series standard (DLT645) power information acquisition system communication protocol. DLT698 is mainly used for data acquisition, transmission and management in electric power information acquisition system. It is a general communication protocol in electric power industry.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select *DLT698
  3. Station No: Support RS485 and RS232
  4. Polling Interval: the time interval of data collection (seconds), for example, set to 10S, then all the measuring points under the controller are polled every 10S
  5. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling interval and select certain measuring points under the controller to use the polling interval. This function can be used to distinguish the measuring points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  6. Polling Interval 2: It is an additional polling interval (in seconds) that needs to be set after enabling multiple polling interval;
  7. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
    1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Communication Timing Settings:
    1. Communication Interval Time: The interval time between message exchanges, i.e., after receiving a response from the device, it will wait for a communication interval before sending the next request message.
  1. Communication Message Settings:
    1. Store Communication Message: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameters" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: Address of measuring point, address format only supports 00-00 format (" - "must be added).
  3. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. BYTE: An 8-bit unsigned integer
    3. SINT: 8-bit signed integer
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. BCD16:16-bit BCD code
    7. DWORD: 32-bit unsigned integer
    8. DINT: 32-bit signed integer
    9. FLOAT: 32-bit floating point number
    10. DOUBLE: A 64-bit floating point number
    11. STRING: 8-bit string
  4. Read Bit Data: When the data type is selected other than FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  5. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  6. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  7. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  8. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
  9. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  10. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  11. Unit: Measuring point unit
  12. Description: Description of the measuring point
  13. Group: The group to which the measuring point belongs
  14. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  15. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  16. No: No computation is performed, the raw data value collected is used
  17. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  18. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  19. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  20. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  21. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.

IEC 60870

IEC 101

IEC 101 is a standard protocol developed by the International Electrotechnical Commission (IEC) for telecommunication. It is a communication protocol for monitoring and control of power systems, which is mainly used for applications such as remote monitoring, control, data acquisition and protection in power systems.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: IEC 101 is selected
  3. Communication Mode: support “Balanced Transmission” and “Unbalanced Transmission”, “Unbalanced Transmission” only supports one side of the communication at the same time to send data, belongs to half duplex, suitable for RS485 scenario, “Balanced Transmission” can support both sides of the communication to send data at the same time, belongs to full duplex, suitable for RS232 scenario
  4. Link Address Size: support 1 and 2. The number of bits or bytes used to represent the address of a device in the link layer
  5. Link Address: A unique identifier used in the link layer to identify a communicating device
  6. ASDU Size: The byte length of the application service data unit, which is the length of the CA public address, the ASDU field is used to distinguish different sub-stations on this link. If more than one substation needs to be collected, more than one controller needs to be configured. 1 and 2 are supported, the default is 2, in bytes
  7. ASDU Address: Application service data unit public address, also known as CA public address. An address or identifier used in a protocol to identify and distinguish between different ASdus
  8. IOA Size: information object address byte length, the length of IOA determines the number and range of monitoring points, the default is 2, unit byte
  9. COT Size: transmission cause byte length, determines the number of transmission causes that can be represented, the default is 2, unit byte
  10. Originator Address: Used to identify the address of the device or system that sends the data packet, identifying the source of the data packet
  11. Endpoint: support RS485 and RS232
  12. General Interrogation Interval: the time interval during which the system regularly sends the total call command
  13. Counter Interrogation Interval: The time interval at which the control system regularly sends the power total call command
  14. Description: Note information can be added to this controller
Advanced Settings:
  1. Timeout: The timeout time of the device response after the reading request is initiated to the device when the measuring point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Link confirmation timeout: the maximum time for the initiator to wait for a response from the receiver when a packet is interacting
  1. Clock Sysc: When enabled, a clock synchronization command is periodically sent to the slave device to inform the device of the current system time or calibration value
  1. Clock Sync Interval: The frequency at which clock synchronization commands are sent
  1. Operate Mode: supports "Direct Operate" and "Select then Operate ". The "Direct Operate" command is sent directly by the master station to the remote device, and the device performs the corresponding operation immediately after receiving the command, without waiting for additional confirmation or response. In the " Select then Operate" mode, the master station first sends a selection command to the remote device, which indicates that the device is ready to perform a specific action, but does not execute it immediately for the time being. Upon receiving the selection command, the device will place the action in the pending state and send an acknowledgement response to the master indicating that the selection command has been accepted. The master then sends another action command that instructs the device to perform a specific action. After receiving the operation command, the device performs the corresponding operation and sends an acknowledgement response to the master station, indicating that the operation has been performed.
  1. Communication message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the " Realtime Communication Message " page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.

Adding measuring points

  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Register Type: Select the Type Identification (TI) of IEC101 from the dropdown menu.
  3. IOA Size: Identifies the address of the information object, an integer from 1 to 16777215
  4. Data type: Depending on the address type, the data types supported in the data type are also different. After you select an address type, select the actual supported data type from the drop-down list.
  5. Read Bit Data: When the data type is selected other than FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  6. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  7. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  8. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  9. Read and write permissions: Depending on the address type, the supported read and write permissions are different. After you select an address type, select the actual supported read and write permissions from the drop-down list.
  10. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  11. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  12. Unit: Measuring point unit
  13. Description: Description of the measuring point
  14. Group: The group to which the measuring point belongs
  15. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  16. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  17. No: No computation is performed, the raw data value collected is used
  18. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  19. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  20. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  21. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  22. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.

IEC 104

IEC 104 is an international standard protocol for remote communication in power systems. It was developed by the International Electrotechnical Commission (IEC) and is a communication protocol for monitoring, controlling, and protecting power systems. The IEC 104 protocol is built on top of the TCP/IP network protocol and usually uses TCP or UDP as the transport layer protocol to achieve reliable transmission of data in the network. It adopts a distributed and object-oriented communication model, and supports client-server and multicast communication modes.

IEC 104 protocol is mainly used for communication between remote terminal unit (RTU), remote control device, remote communication device and other equipment. It provides an efficient and reliable data transmission mechanism, which supports a variety of data types and function codes, such as telemetry data collection, remote communication information transmission, remote operation execution, etc.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway

  1. Protocol: Select IEC 104
  2. IP Address: Master IP address
  3. ASDU address: The byte length of the application service data unit, that is, the length of the CA public address, the ASDU field is used to distinguish between different sub-stations on this link. If multiple substations need to be collected, multiple controllers need to be configured

  1. Port: Master port information
  2. COT Size: Transfer cause byte length, determines the number of transfer causes that can be represented, the default is 2
  3. General Interrogation Interval: The time interval during which the system sends the total call command on a regular basis
  4. Counter Interrogation Interval: The time interval at which the control system regularly sends the power total call command
Advanced Settings:
  1. K Value: The maximum number of I format (information) APDU (k) that has not been confirmed. Range 1-32, default 12.
  2. W value: Receiver acknowledges after receiving w I format (information) APdus, range 1-32, default 8.
  3. T0 Timeout (S) : T0 timeout is the timeout that the master waits for a response from the slave after sending the start frame. If no response frame is received from the slave within the T0 timeout period, the master will consider the communication failed and act accordingly. Range 1-3000, default is 30 in seconds.
  4. T1 Timeout (S) : t1 stipulates that after the sender sends an I format packet or U format (control) packet, it must be accepted by the receiver within the time of t1, otherwise the sender considers that the TCP connection has a problem and should re-establish the connection. Range 1-3000, default is 15 in seconds.
  5. T2 Timeout (S) : t2 stipulates that after receiving an I format packet, if the receiver does not receive a new I format packet after t2 time, it must send an S format (monitoring) frame to the sender to acknowledge the received I format packet. Range 1-3000, default is 10, in seconds. Note: T2 < T1
  6. T3 Timeout (S) : t3 stipulates that the dispatcher or the sub-station RTU will retrigger the timer t3 every time it receives an I frame, S frame or U frame. If no packet is received within t3, it will send a test link frame to the other side. Range 1-3000, default is 20, the unit is seconds. Note: T3 > T1
  7. Clock Sys: When enabled, a clock synchronization command will be sent to the slave device periodically to inform the device of the current system time or calibration value
  8. Clock Sync Interval: The frequency at which clock synchronization commands are sent
  9. Operate Mode: Support "direct operation" and "select operation". The "Direct operation" command is sent directly by the master station to the remote device, and the device performs the corresponding operation immediately after receiving the command, without waiting for additional confirmation or response. In the "Operation after Selection" mode, the master station first sends a selection command to the remote device, which indicates that the device is ready to perform a specific action, but does not execute it immediately for the time being. Upon receiving the selection command, the device will place the action in the pending state and send an acknowledgement response to the master indicating that the selection command has been accepted. The master then sends another action command that instructs the device to perform a specific action. After receiving the operation command, the device performs the corresponding operation and sends an acknowledgement response to the master station, indicating that the operation has been performed.
  10. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.


Adding measuring points
  1.      Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Register Type: Select the Type Identification (TI) of IEC104 from the dropdown menu.
  3. IOA Size: Identifies the address of the information object, an integer from 1 to 16777215
  4. Data type: Depending on the address type, the data types supported in the data type are also different. After you select an address type, select the actual supported data type from the drop-down list.
  5. Read Bit Data: When the data type is selected other than FLOAT,STRING, the value of any bit data in the integer can be read when enabled.
  6. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  7. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  8. Decimal Places: The length of the data after the decimal point when the data type is FLOAT, the maximum is 6 digits
  9. Read and write permissions: Depending on the address type, the supported read and write permissions are different. After you select an address type, select the actual supported read and write permissions from the drop-down list.
  10. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  11. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  12. Unit: Measuring point unit
  13. Description: Description of the measuring point
  14. Group: The group to which the measuring point belongs
  15. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measuring point belongs, and the historical data will be stored according to the storage policy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  16. Data Calculation: When the data type of the measuring point is not BIT or STRING, and the bitwise value is not enabled, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  17. No: No computation is performed, the raw data value collected is used
  18. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  19. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  20. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  21. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  22. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.

Modbus

Modbus ASCII

Modbus ASCII is a Modbus communication protocol based on ASCII character encoding for data exchange and device control in serial communication. It is a variant of the Modbus protocol and usually runs on serial communication media such as RS-232 or RS-485. The Modbus ASCII protocol is commonly used in industrial control systems for data exchange between devices and control operations. It supports a variety of function codes, including read/write registers, read/write coils, etc., which can be used to realize the monitoring and control of remote devices. The Modbus ASCII protocol is simple and easy to use, and is suitable for smaller scale systems and devices

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select Modbus ASCII
  3. Slave: The unique identification of the slave device
  4. Endpoint: Support RS485 and RS232, default use RS485
  5. Polling Interval: It is the time interval of data collection (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  6. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  7. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  8. Description: You can add comment information to this controller
Advanced Settings:
  1. Byte order:
  1. 16 Bit Int: Both AB and BA are supported, and AB endianness is used by default
  1. 32 Bit Int: Supports ABCD, CDAB, DCBA, BADC, defaults to ABCD byte order
  1. 32 Bit Float: ABCD, CDAB, DCBA, BADC are supported, and ABCD byte order is used by default
  1. 64 Bit Int: supports ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG, defaults to ABCDEFGH
  1. 64 Bit Float: ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG are supported
Byte order, ABCDEFGH is used by default
  1. Enable Package Reporting: Measurement points under controllers with this feature enabled can be configured for individual polling cycles (in milliseconds). Measurement points that have " Enable Package Reporting " enabled collect data according to the set polling cycle and frequency, and publish the aggregated data to the local MQTT topic "ds2/eventbus/south/upload/msec/data/{controllerName}". A quick function with the mode "Local Subscription Message Trigger" can be added on the "Custom Quick Functions" page to subscribe to this topic, where the grouped data can be processed within the quick function.
  2. Packet Data Polling Interval: The polling period for group packet data.
  3. Millisecond Data uploading: How many times the group packet data is polled, it is reported uniformly.
  4. Continuous Collection: Whether to carry out batch acquisition of the measurement points under the controller. For example, in the modbus protocol, after starting batch acquisition, all the measurement points with continuous addresses will be read in one read request, which can effectively improve the collection efficiency.
  1. Continuous Collection Address: After enabling continuous collection, the maximum number of measurement points allowed to be collected at one time should be configured.
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Communication time setting:
  1. Communication Interval Time: the interval time of packet interaction, that is, after receiving the response of the device, it will wait for a communication interval before sending the next request packet.
  2. Write function code settings:
  1. Coil Outputs Write Function Code: Supports 15 (to write multiple coil registers at once) and 05 (to write a single coil register at a time), 15 is used by default
  1. Holding Register Write Function Code: Supports 16 (write multiple hold registers at a time) and 06 (write a single hold register at a time), uses 16 by default
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: the address of the measuring point. Support 0X (coil register), 1X (discrete register), 3X (input register), 4X (hold register)
  3. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. WORD: 16-bit unsigned integer
    3. INT: 16-bit signed integer
    4. BCD16:16-bit BCD code
    5. DWORD: 32-bit unsigned integer
    6. DINT: 32-bit signed integer
    7. BCD32:32-bit BCD code
    8. FLOAT: 32-bit floating point number
    9. DOUBLE: 64-bit floating point number
    10. ULONG: 64-bit unsigned integer
    11. LONG: 64-bit signed integer
    12. STRING: 8-bit string
  4. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  5. Size: The length of the STRING when the data type is String
  6. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  7. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  8. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  9. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  10. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  11. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  12. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  13. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  14. Unit: Measuring point unit
  15. Description: Description of the measuring point
  16. Group: The group to which the measuring point belongs
  17. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  18. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  19. No: No computation is performed, the raw data value collected is used
  20. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  21. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  22. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  23. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  24. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
    3. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

Modbus RTU

Modbus RTU (Remote Terminal Unit) is a commonly used serial communication protocol, which is used for data exchange and control operations between devices in industrial control systems. It is a variant of the Modbus protocol and usually runs on serial communication media (such as RS-232, RS-485). The Modbus RTU protocol supports a variety of function codes, including read/write hold registers, read/write coils, etc., which can be used to monitor and control remote devices. It has been widely used in the field of industrial control, because of its simple to use, low cost, reliable and stable characteristics, suitable for all sizes and types of industrial control systems.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select Modbus RTU
  3. Slave: The unique identification of the slave device
  4. Endpoint: Support RS485 and RS232, default use RS485
  5. Polling Interval: It is the time interval of data collection (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  6. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  7. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  8. Description: You can add comment information to this controller
Advanced Settings:
  1. Byte order:
  1. 16 Bit Int: Both AB and BA are supported, and AB endianness is used by default
  1. 32 Bit Int: Supports ABCD, CDAB, DCBA, BADC, defaults to ABCD byte order
  1. 32 Bit Float: ABCD, CDAB, DCBA, BADC are supported, and ABCD byte order is used by default
  1. 64 Bit Int: supports ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG, defaults to ABCDEFGH
  1. 64 Bit Float: ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG are supported
  1. Byte order, ABCDEFGH is used by default
  1. Enable Package Reporting: Measurement points under controllers with this feature enabled can be configured for individual polling cycles (in milliseconds). Measurement points that have " Enable Package Reporting " enabled collect data according to the set polling cycle and frequency, and publish the aggregated data to the local MQTT topic "ds2/eventbus/south/upload/msec/data/{controllerName}". A quick function with the mode "Local Subscription Message Trigger" can be added on the "Custom Quick Functions" page to subscribe to this topic, where the grouped data can be processed within the quick function.Packet Data Polling Interval: The polling period for group packet data.
  2. Packet Data Polling Interval: The polling period for group packet data.
  3. Millisecond Data uploading: How many times the group packet data is polled, it is reported uniformly.
  4. Continuous Collection: Whether to carry out batch acquisition of the measurement points under the controller. For example, in the modbus protocol, after starting batch acquisition, all the measurement points with continuous addresses will be read in one read request, which can effectively improve the collection efficiency.
  1. Continuous Collection Address: After enabling continuous collection, the maximum number of measurement points allowed to be collected at one time should be configured.
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Communication time setting:
  1. Communication Interval Time: the interval time of packet interaction, that is, after receiving the response of the device, it will wait for a communication interval before sending the next request packet.
  1. Write function code settings:
  1. Coil Outputs Write Function Code: Supports 15 (to write multiple coil registers at once) and 05 (to write a single coil register at a time), 15 is used by default
  1. Holding Register Write Function Code: Supports 16 (write multiple hold registers at a time) and 06 (write a single hold register at a time), uses 16 by default
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: the address of the measuring point. Support 0X (coil register), 1X (discrete register), 3X (input register), 4X (hold register)
  3. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. WORD: 16-bit unsigned integer
    3. INT: 16-bit signed integer
    4. BCD16:16-bit BCD code
    5. DWORD: 32-bit unsigned integer
    6. DINT: 32-bit signed integer
    7. BCD32:32-bit BCD code
    8. FLOAT: 32-bit floating point number
    9. DOUBLE: 64-bit floating point number
    10. ULONG: 64-bit unsigned integer
    11. LONG: 64-bit signed integer
    12. STRING: 8-bit string
  4. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  5. Size: The length of the STRING when the data type is String
  6. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  7. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  8. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  9. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  10. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  11. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  12. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  13. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  14. Unit: Measuring point unit
  15. Description: Description of the measuring point
  16. Group: The group to which the measuring point belongs
  17. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  18. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  19. No: No computation is performed, the raw data value collected is used
  20. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  21. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  22. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  23. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  24. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
    3. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

Modbus RTU over TCP

Modbus RTU over TCP refers to a way to wrap the Modbus RTU protocol in the TCP/IP network protocol for transmission. In this mode, Modbus RTU data frames are encapsulated in TCP packets and transmitted over the TCP/IP network. In Modbus RTU over TCP, Modbus RTU data frames are encapsulated in the data part of the TCP packet and transmitted over a TCP connection. After receiving the TCP packet, the receiver parses it out of the Modbus RTU data frame before processing and responding. This method retains the original characteristics of Modbus RTU protocol, while taking advantage of the reliability and flexibility provided by TCP/IP network, and is suitable for industrial control systems of all sizes and complexities.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select Modbus RTU over TCP
  3. IP Address: The IP address of the slave
  4. Port :The port information of the slave
  5. Slave: The unique identification of the slave device
  6. Endpoint: Support RS485 and RS232, default use RS485
  7. Polling Interval: It is the time interval of data collection (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  8. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  9. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  10. Description: You can add comment information to this controller
Advanced Settings:
  1. Byte order:
  1. 16 Bit Int: Both AB and BA are supported, and AB endianness is used by default
  1. 32 Bit Int: Supports ABCD, CDAB, DCBA, BADC, defaults to ABCD byte order
  1. 32 Bit Float: ABCD, CDAB, DCBA, BADC are supported, and ABCD byte order is used by default
  1. 64 Bit Int: supports ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG, defaults to ABCDEFGH
  1. 64 Bit Float: ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG are supported
Byte order, ABCDEFGH is used by default
  1. Enable Package Reporting: Measurement points under controllers with this feature enabled can be configured for individual polling cycles (in milliseconds). Measurement points that have " Enable Package Reporting " enabled collect data according to the set polling cycle and frequency, and publish the aggregated data to the local MQTT topic "ds2/eventbus/south/upload/msec/data/{controllerName}". A quick function with the mode "Local Subscription Message Trigger" can be added on the "Custom Quick Functions" page to subscribe to this topic, where the grouped data can be processed within the quick function.Packet Data Polling Interval: The polling period for group packet data.
  2. Packet Data Polling Interval: The polling period for group packet data.
  3. Millisecond Data uploading: How many times the group packet data is polled, it is reported uniformly.
  4. Continuous Collection: Whether to carry out batch acquisition of the measurement points under the controller. For example, in the modbus protocol, after starting batch acquisition, all the measurement points with continuous addresses will be read in one read request, which can effectively improve the collection efficiency.
  1. Continuous Collection Address: After enabling continuous collection, the maximum number of measurement points allowed to be collected at one time should be configured.
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Communication time setting:
  1. Communication Interval Time: the interval time of packet interaction, that is, after receiving the response of the device, it will wait for a communication interval before sending the next request packet.
  1. Write function code settings:
  1. Coil Outputs Write Function Code: Supports 15 (to write multiple coil registers at once) and 05 (to write a single coil register at a time), 15 is used by default
  1. Holding Register Write Function Code: Supports 16 (write multiple hold registers at a time) and 06 (write a single hold register at a time), uses 16 by default
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: the address of the measuring point. Support 0X (coil register), 1X (discrete register), 3X (input register), 4X (hold register)
  3. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. WORD: 16-bit unsigned integer
    3. INT: 16-bit signed integer
    4. BCD16:16-bit BCD code
    5. DWORD: 32-bit unsigned integer
    6. DINT: 32-bit signed integer
    7. BCD32:32-bit BCD code
    8. FLOAT: 32-bit floating point number
    9. DOUBLE: 64-bit floating point number
    10. ULONG: 64-bit unsigned integer
    11. LONG: 64-bit signed integer
    12. STRING: 8-bit string
  4. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  5. Size: The length of the STRING when the data type is String
  6. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  7. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  8. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  9. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  10. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  11. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  12. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  13. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  14. Unit: Measuring point unit
  15. Description: Description of the measuring point
  16. Group: The group to which the measuring point belongs
  17. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  18. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  19. No: No computation is performed, the raw data value collected is used
  20. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  21. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  22. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  23. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  24. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
    3. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

Modbus TCP

Modbus TCP is an Ethernet-based version of the Modbus protocol that uses the TCP/IP protocol for communication. Unlike the traditional Modbus RTU protocol, Modbus TCP allows devices to communicate directly over Ethernet without any dedicated hardware or communication interfaces. Therefore, Modbus TCP has a higher communication rate and a wider range of applications.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  2. Protocol: Select Modbus TCP
  3. IP Address: The IP address of the slave
  4. Port :The port information of the slave
  5. Slave: The unique identification of the slave device
  6. Endpoint: Support RS485 and RS232, default use RS485
  7. Polling Interval: It is the time interval of data collection (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  8. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  9. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  10. Description: You can add comment information to this controller
Advanced Settings:
  1. Byte order:
  1. 16 Bit Int: Both AB and BA are supported, and AB endianness is used by default
  1. 32 Bit Int: Supports ABCD, CDAB, DCBA, BADC, defaults to ABCD byte order
  1. 32 Bit Float: ABCD, CDAB, DCBA, BADC are supported, and ABCD byte order is used by default
  1. 64 Bit Int: supports ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG, defaults to ABCDEFGH
  1. 64 Bit Float: ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG are supported
Byte order, ABCDEFGH is used by default
  1. Enable Package Reporting: Measurement points under controllers with this feature enabled can be configured for individual polling cycles (in milliseconds). Measurement points that have " Enable Package Reporting " enabled collect data according to the set polling cycle and frequency, and publish the aggregated data to the local MQTT topic "ds2/eventbus/south/upload/msec/data/{controllerName}". A quick function with the mode "Local Subscription Message Trigger" can be added on the "Custom Quick Functions" page to subscribe to this topic, where the grouped data can be processed within the quick function.Packet Data Polling Interval: The polling period for group packet data.
  2. Packet Data Polling Interval: The polling period for group packet data.
  3. Millisecond Data uploading: How many times the group packet data is polled, it is reported uniformly.
  4. Continuous Collection: Whether to carry out batch acquisition of the measurement points under the controller. For example, in the modbus protocol, after starting batch acquisition, all the measurement points with continuous addresses will be read in one read request, which can effectively improve the collection efficiency.
  1. Continuous Collection Address: After enabling continuous collection, the maximum number of measurement points allowed to be collected at one time should be configured.
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Communication time setting:
  1. Communication Interval Time: the interval time of packet interaction, that is, after receiving the response of the device, it will wait for a communication interval before sending the next request packet.
  1. Write function code settings:
  1. Coil Outputs Write Function Code: Supports 15 (to write multiple coil registers at once) and 05 (to write a single coil register at a time), 15 is used by default
  1. Holding Register Write Function Code: Supports 16 (write multiple hold registers at a time) and 06 (write a single hold register at a time), uses 16 by default
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measurement points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: the address of the measuring point. Support 0X (coil register), 1X (discrete register), 3X (input register), 4X (hold register)
  3. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. WORD: 16-bit unsigned integer
    3. INT: 16-bit signed integer
    4. BCD16:16-bit BCD code
    5. DWORD: 32-bit unsigned integer
    6. DINT: 32-bit signed integer
    7. BCD32:32-bit BCD code
    8. FLOAT: 32-bit floating point number
    9. DOUBLE: 64-bit floating point number
    10. ULONG: 64-bit unsigned integer
    11. LONG: 64-bit signed integer
    12. STRING: 8-bit string
  4. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  5. Size: The length of the STRING when the data type is String
  6. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  7. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  8. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  9. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  10. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  11. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  12. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  13. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  14. Unit: Measuring point unit
  15. Description: Description of the measuring point
  16. Group: The group to which the measuring point belongs
  17. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  18. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  19. No: No computation is performed, the raw data value collected is used
  20. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  21. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  22. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  23. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  24. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
    3. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

Modbus RTU Slave

A Modbus RTU Slave is a party that exists as a passive device in the Modbus RTU communication protocol, which receives and responds to commands from the Master and provides data to the master.

In the controller of the gateway, the Modbus RTU Slave is used as a read-only collector, and the registers in the Slave are configured to passively wait for the data packets sent by the master.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Modbus RTU Slave is selected
  1. Slave: The unique identification of the slave device
  1. Endpoint: Support RS485 and RS232, default use RS485
  1. Status expiration time: When the controller or the measurement point does not receive a new message within the specified time, the state will be automatically updated to offline
  1. Advanced Settings:
  1. Byte order:
  1. 16 Bit Int: Both AB and BA are supported, and AB endianness is used by default
  1. 32 Bit Int: Supports ABCD, CDAB, DCBA, BADC, defaults to ABCD byte order
  1. 32 Bit Float: ABCD, CDAB, DCBA, BADC are supported, and ABCD byte order is used by default
  1. 64 Bit Int: supports ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG, defaults to ABCDEFGH
  1. 64 Bit Float: ABCDEFGH, GHEFCDAB, HGEFDCBA, BADCFEHG are supported
Byte order, ABCDEFGH is used by default
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measurement points

  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Address: the address of the measuring point. Support 0X (coil register), 4X (hold register)
  1. Data type: Measuring point data type, including:
  1. BIT: 0 or 1
  1. WORD: 16-bit unsigned integer
  1. INT: 16-bit signed integer
  1. BCD16:16-bit BCD code
  1. DWORD: 32-bit unsigned integer
  1. DINT: 32-bit signed integer
  1. BCD32:32-bit BCD code
  1. FLOAT: 32-bit floating point number
  1. DOUBLE: 64-bit floating point number
  1. ULONG: 64-bit unsigned integer
  1. LONG: 64-bit signed integer
  1. STRING: 8-bit string
  1. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  1. Size: The length of the STRING when the data type is String
  1. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  1. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  1. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  1. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  1. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  1. Read and write permissions:
  1. Read: read-only, not writable
  1. Read/Write: Readable and writable
  1. Write: Only write, not read
  1. Mode:
  1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
  1. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
  1. Never: Only used locally, no need to upload data from the cloud
  1. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  1. Unit: Measuring point unit
  1. Description: Description of the measuring point
  1. Group: The group to which the measuring point belongs
  1. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  1. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  1. No: No computation is performed, the raw data value collected is used
  1. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Data High Limit: The upper limit of the data of the measuring point
  1. Data lower Limit: the lower limit of the data at the measuring point
  1. High Limit Of Proportion: the upper limit of the data after the proportion operation
  1. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  1. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  1. Decimal Places: The number of decimal places to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  1. Start Bit: The bit offset at which the intercept of the original data begins
  1. End Bit: The bit offset that ends the interception of the original data
  1. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. PT: Additional PT multiplier
  1. CT: Additional CT magnification
  1. Value mapping: Configurable measuring points for specific values converted to other values.
  1. Source Value: The raw value of the collected measuring point.
  1. Target Value: The expected value of the converted measuring point.
  1. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

OPC

OPC DA

OPC DA stands for "OPC Data Access" and is a communication specification for enabling real-time data communication and exchange. It is based on Microsoft's COM/DCOM (Component Object Model/Distributed Component Object Model) technology, which aims to provide a standardized method for the development of OPC DA. It enables industrial automation equipment from different manufacturers to exchange data with OPC DA compatible software.

Adding controllers
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select OPC DA
  1. IP Address: The IP address of the device
  1. Host Name: The server name defined when installing and configuring that server
  1. Polling Interval: is the time interval of data collection (seconds), for example, set to 10S, then all measurement points under the controller will be polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Enable package Reporting: Measurement points under controllers with this feature enabled can be configured for individual polling cycles (in milliseconds). Measurement points that have " Enable Package Reporting " enabled collect data according to the set polling cycle and frequency, and publish the aggregated data to the local MQTT topic "ds2/eventbus/south/upload/msec/data/{controllerName}". A quick function with the mode "Local Subscription Message Trigger" can be added on the "Custom Quick Functions" page to subscribe to this topic, where the grouped data can be processed within the quick function.Packet Data Polling Interval: The polling period for group packet data.
  1. Packet Data Polling Interval: The polling period for group packet data.
  1. Millisecond Data uploading: How many times the group packet data is polled, it is reported uniformly.
  1. Continuous Collection: Whether to carry out batch acquisition of the measurement points under the controller. For example, in the modbus protocol, after starting batch acquisition, all the measurement points with continuous addresses will be read in one read request, which can effectively improve the collection efficiency.
  1. Continuous Collection Address: After enabling batch acquisition, the maximum number of measurement points allowed to be collected at one time should be configured.
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connection Timeout: the timeout time for establishing the connection.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Address: the address of the measuring point. 
  1. Data type: Measuring point data type, including:
  1. BIT: 0 or 1
  1. BYTE: An 8-bit unsigned number
  1. SINT: 8-bit signed number
  1. WORD: 16-bit unsigned integer
  1. INT: 16-bit signed integer
  1. DWORD: 32-bit unsigned integer
  1. DINT: 32-bit signed integer
  1. FLOAT: 32-bit floating point number
  1. DOUBLE: 64-bit floating point number
  1. ULONG: 64-bit unsigned integer
  1. LONG: 64-bit signed integer
  1. STRING: 8-bit string
  1. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  1. Size: The length of the STRING when the data type is String
  1. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  1. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  1. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  1. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  1. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  1. Read and write permissions:
  1. Read: read-only, not writable
  1. Read/Write: Readable and writable
  1. Write: Only write, not read
  1. Mode:
  1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
  1. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
  1. Never: Only used locally, no need to upload data from the cloud
  1. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  1. Unit: Measuring point unit
  1. Description: Description of the measuring point
  1. Group: The group to which the measuring point belongs
  1. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  1. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  1. No: No computation is performed, the raw data value collected is used
  1. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Data High Limit: The upper limit of the data of the measuring point
  1. Data lower Limit: the lower limit of the data at the measuring point
  1. High Limit Of Proportion: the upper limit of the data after the proportion operation
  1. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  1. Offset And Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  1. Decimal Places: The number of decimal places to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  1. Start Bit: The bit offset at which the intercept of the original data begins
  1. End Bit: The bit offset that ends the interception of the original data
  1. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. PT: Additional PT multiplier
  1. CT: Additional CT magnification
  1. Value mapping: Configurable measuring points for specific values converted to other values.
  1. Source Value: The raw value of the collected measuring point.
  1. Target Value: The expected value of the converted measuring point.
  1. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

OPC UA

OPC UA is a machine-to-machine communication protocol for industrial automation, developed and maintained by the OPC Foundation. OPC UA provides a standardized way to enable different devices and systems to communicate with each other.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select OPC UA
  1. Services URL: Fill in the server address plus port, for example: 192.168.2.1:4801
  1. Polling Interval: is the time interval of data collection (seconds), for example, set to 10S, then all measurement points under the controller will be polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  1. Authentication: Support anonymous login, user name and password, authentication certificate three ways. The default is anonymous login.
  1. Security Policy:
  1. Message security mode (Note: when the security policy is None, message security mode can only be None; When the security policy is automatic detection, all three security modes can be selected; For other security policies, the message security mode can be selected among signature, signature and encryption.)
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Enable package Reporting: Measurement points under controllers with this feature enabled can be configured for individual polling cycles (in milliseconds). Measurement points that have " Enable Package Reporting " enabled collect data according to the set polling cycle and frequency, and publish the aggregated data to the local MQTT topic "ds2/eventbus/south/upload/msec/data/{controllerName}". A quick function with the mode "Local Subscription Message Trigger" can be added on the "Custom Quick Functions" page to subscribe to this topic, where the grouped data can be processed within the quick function.Packet Data Polling Interval: The polling period for group packet data.
  1. Packet Data Polling Interval: The polling period for group packet data.
  1. Millisecond Data uploading: How many times the group packet data is polled, it is reported uniformly.
  1. Continuous Collection: Whether to carry out batch acquisition of the measurement points under the controller. For example, in the modbus protocol, after starting batch acquisition, all the measurement points with continuous addresses will be read in one read request, which can effectively improve the collection efficiency.
  2. Continuous Collection Address: After enabling batch acquisition, the maximum number of measurement points allowed to be collected at one time should be configured.
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connection Timeout: the timeout time for establishing the connection.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. NS(Namespace Index):An integer value used to identify and distinguish different namespaces, ranging from 0-65535
  1. Address Type:String and Number are supported
  1. Identifier:If the address type is String, you can fill in any string; If it is a Number, integer values are supported
  1. Data type: Measuring point data type, including:
  1. BIT: 0 or 1
  1. BYTE: An 8-bit unsigned number
  1. SINT: 8-bit signed number
  1. WORD: 16-bit unsigned integer
  1. INT: 16-bit signed integer
  1. DWORD: 32-bit unsigned integer
  1. DINT: 32-bit signed integer
  1. FLOAT: 32-bit floating point number
  1. DOUBLE: 64-bit floating point number
  1. ULONG: 64-bit unsigned integer
  1. LONG: 64-bit signed integer
  1. STRING: 8-bit string
  1. Is Array:Enable this feature if the measuring point is of array type.
  1. Array Index:Represents the position of the current point in the array, for example, the first element is indexed at 0, the second element is indexed at 1, and so on.
  1. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  1. Size: The length of the STRING when the data type is String
  1. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  1. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  1. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  1. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  1. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  1. Read and write permissions:
  1. Read: read-only, not writable
  1. Read/Write: Readable and writable
  1. Mode:
  1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
  1. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
  1. Never: Only used locally, no need to upload data from the cloud
  1. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  1. Unit: Measuring point unit
  1. Description: Description of the measuring point
  1. Group: The group to which the measuring point belongs
  1. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  1. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  1. No: No computation is performed, the raw data value collected is used
  1. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Data High Limit: The upper limit of the data of the measuring point
  1. Data lower Limit: the lower limit of the data at the measuring point
  1. High Limit Of Proportion: the upper limit of the data after the proportion operation
  1. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  1. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  1. Decimal Places: The number of decimal places to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  1. Start Bit: The bit offset at which the intercept of the original data begins
  1. End Bit: The bit offset that ends the interception of the original data
  1. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. PT: Additional PT multiplier
  1. CT: Additional CT magnification
  1. Value mapping: Configurable measuring points for specific values converted to other values.
  1. Source Value: The raw value of the collected measuring point.
  1. Target Value: The expected value of the converted measuring point.
  1. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

*OPC UA PUBSUB

OPC UA PUBSUB is a communication mechanism in OPC UA (OPC Unified Architecture), which stands for "OPC UA Publisher/Subscriber". It is a communication method based on publish/subscribe model, which is used to publish and subscribe real-time data in industrial automation system.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select *OPC UA PUBSUB
  1. Middleware: Select the protocol used by OPCUA PUBSUB, which only supports UDP
  1. Publish Address: The destination address to send data to
  1. Subscribe address: The destination address from which data is received
  1. Publisher Id: A unique identifier that identifies the publisher, an unsigned 32-bit integer
  1. Subscribe Id: A unique identifier identifying the subscriber, unsigned 32-bit integer
  1. Status expiration time: When no new message is received by the controller or the measurement point within the specified time, the state will be automatically updated to offline
  1. Server Port: The port information of the server enabled by opcua pubsub. Note that the same port cannot be used with other services
  1. Description: You can add comment information to this controller
Adding measuring points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Sub Group Id: Keep the same as the Pub Group Id of the measurement point on the publishing side, ranging from 1-65535
  3. Sub Writer Id: Same as Pub Writer ld of this test point on publish side, range 1-65535
  4. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. BYTE: An 8-bit unsigned number
    3. SINT: 8-bit signed number
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. DWORD: 32-bit unsigned integer
    7. DINT: 32-bit signed integer
    8. FLOAT: 32-bit floating point number
    9. DOUBLE: 64-bit floating point number
    10. ULONG: 64-bit unsigned integer
    11. LONG: 64-bit signed integer
    12. STRING: 8-bit string
  5. Is Array:Enable this feature if the measuring point is of array type.
    1. Array Index:Represents the position of the current point in the array, for example, the first element is indexed at 0, the second element is indexed at 1, and so on.
  6. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  7. Size: The length of the STRING when the data type is String
  8. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  9. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  10. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  11. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  12. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  13. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
  14. Pub Group Id: The publication group ID to which the measurement point belongs, range: 1-65535
  15. Pub Writer Id: Publication write ID to which the measurement point belongs, range: 1-65535
  16. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  17. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  18. Unit: Measuring point unit
  19. Description: Description of the measuring point
  20. Group: The group to which the measuring point belongs
  21. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  22. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  23. No: No computation is performed, the raw data value collected is used
  24. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  25. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  26. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  27. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
    1. Value mapping: Configurable measuring points for specific values converted to other values.
    2. Source Value: The raw value of the collected measuring point.
  28. Target Value: The expected value of the converted measuring point.

SIEMENS (Siemens)

*Fetch/Write

"Fetch/Write" refers to a data exchange operation commonly found in the field of industrial automation. It is commonly used to describe the process of fetching data (Fetch) from and writing data (Write) to a control device (e.g. PLC, sensor, etc.).

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select *Fetch/Write
  1. IP Address: The IP address of the device
  1. Port: The port information of the device
  1. Polling Interval: It is the time interval of collecting data (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connect Timeout: the timeout time for establishing the connection.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.


Adding measurement points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Address: the address of the measuring point. Example: I1.6, Q1
  1. Data type: Measuring point data type, including:
  1. BIT: 0 or 1
  1. BYTE: An 8-bit unsigned number
  1. SINT: 8-bit signed number
  1. BCD16:16-bit BCD code
  1. WORD: 16-bit unsigned integer
  1. INT: 16-bit signed integer
  1. DWORD: 32-bit unsigned integer
  1. DINT: 32-bit signed integer
  1. FLOAT: 32-bit floating point number
  1. DOUBLE: 64-bit floating point number
  1. ULONG: A 64-bit unsigned integer
  1. LONG: 64-bit signed integer
  1. STRING: 8-bit string
  1. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  1. Size: The length of the STRING when the data type is String
  1. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  1. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  1. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  1. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  1. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  1. Read and write permissions:
  1. Read: read-only, not writable
  1. Read/Write: Readable and writable
  1. Mode:
  1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
  1. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
  1. Never: Only used locally, no need to upload data from the cloud
  1. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  1. Unit: Measuring point unit
  1. Description: Description of the measuring point
  1. Group: The group to which the measuring point belongs
  1. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  1. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  1. No: No computation is performed, the raw data value collected is used
  1. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Data High Limit: The upper limit of the data of the measuring point
  1. Data lower Limit: the lower limit of the data at the measuring point
  1. High Limit Of Proportion: the upper limit of the data after the proportion operation
  1. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  1. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  1. Decimal Places: The number of decimal places to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  1. Start Bit: The bit offset at which the intercept of the original data begins
  1. End Bit: The bit offset that ends the interception of the original data
  1. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. PT: Additional PT multiplier
  1. CT: Additional CT magnification
  1. Value mapping: Configurable measuring points for specific values converted to other values.
  1. Source Value: The raw value of the collected measuring point.
  1. Target Value: The expected value of the converted measuring point.

ISO on TCP

"ISO on TCP" refers to communication over TCP/IP networks using a set of standards defined by ISO (International Organization for Standardization). ISO is an international standard-setting organization responsible for developing standards for a variety of industries, including information technology, communications, manufacturing, and more.

In the field of industrial automation, ISO provides many standards related to communication and data exchange, some of which can be applied to TCP/IP networks. These standards usually cover the data exchange protocol, communication interface, data format and other aspects of the specification, so that different equipment and systems can exchange data and communication.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select ISO on TCP
  1. IP Address: The IP address of the device
  1. Port: The port information of the device
  1. Mode: Two are supported, Rack/Slot and TSAP
  1. Rack/Slot:
  1. Rack number: The rack number of the PLC
  1. Slot number: The slot number information of the PLC
  1. TSAP:
  1. Client TSAP: Usually includes Rack number, Slot number as well as specific TSAP address
  1. Server-side TSAP: Usually includes Rack number, Slot number, and specific TSAP address
  1. Polling Interval: It is the time interval of collecting data (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Enable Package Reporting: Measurement points under controllers with this feature enabled can be configured for individual polling cycles (in milliseconds). Measurement points that have " Enable Package Reporting " enabled collect data according to the set polling cycle and frequency, and publish the aggregated data to the local MQTT topic "ds2/eventbus/south/upload/msec/data/{controllerName}". A quick function with the mode "Local Subscription Message Trigger" can be added on the "Custom Quick Functions" page to subscribe to this topic, where the grouped data can be processed within the quick function.
  1. Packet Data Polling Interval: The polling period for group packet data.
  1. Millisecond Data uploading: How many times the group packet data is polled, it is reported uniformly.
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connect Timeout: the timeout time for establishing the connection.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measurement points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Address Type:
  1. Rack/Slot mode:
  1. I: Input register
  1. Q: Output register
  1. M: Internal register
  1. DB: Data register
  1. TSAP mode:
  1. I: Input register
  1. Q: Output register
  1. M: Internal register
  1. V: Data register
  1. Data type: Measuring point data type, including:
  1. BIT: 0 or 1
  1. BYTE: An 8-bit unsigned number
  1. SINT: 8-bit signed number
  1. BCD16:16-bit BCD code
  1. WORD: 16-bit unsigned integer
  1. INT: 16-bit signed integer
  1. DWORD: 32-bit unsigned integer
  1. DINT: 32-bit signed integer
  1. FLOAT: 32-bit floating point number
  1. DOUBLE: 64-bit floating point number
  1. ULONG: 64-bit unsigned integer
  1. LONG: 64-bit signed integer
  1. STRING: 8-bit string
  1. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  1. Size: The length of the STRING when the data type is String
  1. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  1. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  1. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  1. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  1. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  1. Read and write permissions:
  1. Read: read-only, not writable
  1. Read/Write: Readable and writable
  1. Mode:
  1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
  1. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
  1. Never: Only used locally, no need to upload data from the cloud
  1. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  1. Unit: Measuring point unit
  1. Description: Description of the measuring point
  1. Group: The group to which the measuring point belongs
  1. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  1. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  1. No: No computation is performed, the raw data value collected is used
  1. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Data High Limit: The upper limit of the data of the measuring point
  1. Data lower Limit: the lower limit of the data at the measuring point
  1. High Limit Of Proportion: the upper limit of the data after the proportion operation
  1. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  1. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  1. Decimal Places: The number of decimal places to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  1. Start Bit: The bit offset at which the intercept of the original data begins
  1. End Bit: The bit offset that ends the interception of the original data
  1. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. PT: Additional PT multiplier
  1. CT: Additional CT magnification
  1. Value mapping: Configurable measuring points for specific values converted to other values.
  1. Source Value: The raw value of the collected measuring point.
  1. Target Value: The expected value of the converted measuring point.
  1. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

PPI

PPI (Point-to-Point Interface) is a serial communication interface protocol developed by Siemens Corporation to connect the Siemens S7 series programmable logic controller (PLC) and its peripheral devices. PPI is mainly used for simple data transmission and communication tasks, such as connecting HMI (Human-Machine Interface), programming devices, and other external devices.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select PPI
  1. Station Number: Consistent with the device, range 0-255
  1. Communication mode: support RS485 and RS232, default RS485
  1. Polling period: It is the time interval of data collection (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  1. Enable multi-polling cycle: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Communication time setting:
  1. Communication Interval Time: the interval time of packet interaction, that is, after receiving the response of the device, it will wait for a communication interval before sending the next request packet.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measurement points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Address Type:
  1. I: Input register
  1. Q: Output register
  1. M: Internal register
  1. V: Data register
  1. Address: The address of the measurement point.
  1. Data type: Measuring point data type, including:
  1. BIT: 0 or 1
  1. BYTE: An 8-bit unsigned number
  1. SINT: 8-bit signed number
  1. BCD16:16-bit BCD code
  1. WORD: 16-bit unsigned integer
  1. INT: 16-bit signed integer
  1. DWORD: 32-bit unsigned integer
  1. DINT: 32-bit signed integer
  1. FLOAT: 32-bit floating point number
  1. DOUBLE: 64-bit floating point number
  1. ULONG: 64-bit unsigned integer
  1. LONG: 64-bit signed integer
  1. STRING: 8-bit string
  1. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  1. Size: The length of the STRING when the data type is String
  1. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  1. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  1. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  1. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  1. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  1. Read and write permissions:
  1. Read: read-only, not writable
  1. Read/Write: Readable and writable
  1. Mode:
  1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
  1. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
  1. Never: Only used locally, no need to upload data from the cloud
  1. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  1. Unit: Measuring point unit
  1. Description: Description of the measuring point
  1. Group: The group to which the measuring point belongs
  1. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  1. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  1. No: No computation is performed, the raw data value collected is used
  1. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Data High Limit: The upper limit of the data of the measuring point
  1. Data lower Limit: the lower limit of the data at the measuring point
  1. High Limit Of Proportion: the upper limit of the data after the proportion operation
  1. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  1. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  1. Decimal Places: The number of decimal places to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  1. Start Bit: The bit offset at which the intercept of the original data begins
  1. End Bit: The bit offset that ends the interception of the original data
  1. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. PT: Additional PT multiplier
  1. CT: Additional CT magnification
  1. Value mapping: Configurable measuring points for specific values converted to other values.
  1. Source Value: The raw value of the collected measuring point.
  1. Target Value: The expected value of the converted measuring point.
  1. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

*PPI over TCP

"PPI over TCP" refers to the communication mode of transmitting PPI (Point-to-Point Interface) data over TCP/IP network. In traditional industrial automation systems, PPI is usually connected to Siemens S7 series programmable logic controllers (PLCS) and their peripheral devices through serial interfaces (such as RS485). However, with the development of industrial networks, more and more applications begin to use TCP/IP networks to replace the traditional serial connection for remote access and data exchange.

Adding a controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select *PPI over TCP
  1. Station No: The station number of the device, in the range 0-255
  1. IP Address: The IP address of the device
  1. Port: The port information of the device
  1. Polling Interval: It is the time interval of collecting data (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connection Timeout: the timeout time for establishing the connection.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measurement points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  1. Address: The address of the measurement point. Example: I1, Q1
  1. Data type: Measuring point data type, including:
  1. BIT: 0 or 1
  1. BYTE: An 8-bit unsigned number
  1. SINT: 8-bit signed number
  1. BCD16:16-bit BCD code
  1. WORD: 16-bit unsigned integer
  1. INT: 16-bit signed integer
  1. DWORD: 32-bit unsigned integer
  1. DINT: 32-bit signed integer
  1. FLOAT: 32-bit floating point number
  1. DOUBLE: 64-bit floating point number
  1. ULONG: 64-bit unsigned integer
  1. LONG: 64-bit signed integer
  1. STRING: 8-bit string
  1. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  1. Size: The length of the STRING when the data type is String
  1. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  1. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  1. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  1. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  1. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  1. Read and write permissions:
  1. Read: read-only, not writable
  1. Read/Write: Readable and writable
  1. Mode:
  1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
  1. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
  1. Never: Only used locally, no need to upload data from the cloud
  1. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  1. Unit: Measuring point unit
  1. Description: Description of the measuring point
  1. Group: The group to which the measuring point belongs
  1. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  1. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  1. No: No computation is performed, the raw data value collected is used
  1. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Data High Limit: The upper limit of the data of the measuring point
  1. Data lower Limit: the lower limit of the data at the measuring point
  1. High Limit Of Proportion: the upper limit of the data after the proportion operation
  1. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  1. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
  1. Decimal Places: The number of decimal places to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  1. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
  1. Start Bit: The bit offset at which the intercept of the original data begins
  1. End Bit: The bit offset that ends the interception of the original data
  1. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
  1. Decimal Places: The number of decimal places that need to be retained after the operation
  1. Magnification: The multiplier that needs to be scaled up or down
  1. Offset: The data value that needs to be increased or decreased after the multiplier operation
  2. PT: Additional PT multiplier
  1. CT: Additional CT magnification
  1. Value mapping: Configurable measuring points for specific values converted to other values.
  1. Source Value: The raw value of the collected measuring point.
  1. Target Value: The expected value of the converted measuring point.
  1. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

*WebApi

Siemens' Web API (Web Application Programming Interface) is an HTTP-based interface for communication and data exchange with Siemens' industrial automation equipment and systems. It allows developers to access and manipulate data and functions on Siemens devices through network connections, enabling the monitoring, control, and integration of automation systems.

Adding controllers
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Controller Protocol: Select *WebApi
  1. IP Address: The IP address of the device
  1. Port: The port information of the device
  1. Polling Interval: It is the time interval of collecting data (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  1. Description: You can add comment information to this controller
Advanced Settings:
  1. Timeout Settings:
  1. Timeout: The timeout time for the device to respond after the reading request is initiated to the device when the measurement point is collected. If the device does not respond to the reading request within the set collection timeout time, it is still the failure of this collection.
  1. Connection Timeout: the timeout time for establishing the connection.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measurement points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Address: The address of the measurement point. Example: I1, Q1
  3. Data type: Measuring point data type, including:
    1. BIT: 0 or 1
    2. BYTE: An 8-bit unsigned number
    3. SINT: 8-bit signed number
    4. BCD16:16-bit BCD code
    5. WORD: 16-bit unsigned integer
    6. INT: 16-bit signed integer
    7. DWORD: 32-bit unsigned integer
    8. DINT: 32-bit signed integer
    9. FLOAT: 32-bit floating point number
    10. DOUBLE: 64-bit floating point number
    11. ULONG: 64-bit unsigned integer
    12. LONG: 64-bit signed integer
    13. STRING: 8-bit string
  4. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  5. Size: The length of the STRING when the data type is String
  6. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  7. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  8. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  9. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  10. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  11. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
  12. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  13. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  14. Unit: Measuring point unit
  15. Description: Description of the measuring point
  16. Group: The group to which the measuring point belongs
  17. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  18. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  19. No: No computation is performed, the raw data value collected is used
  20. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  21. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  22. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  23. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  24. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
Simple driver protocol

One of the distinguishing features of industrial automation is "fragmentation". This feature brings a lot of work and obstacles to digital work. In industry, there is such a kind of equipment:

A large number of models;

The function of a single device (from the perspective of communication) is relatively simple, the number of data (measuring points) is small, and the need for read and write fetch instructions is not many;

The communication protocol is question-answering, that is, "request-response" model;

Each model has its own unique communication protocol, which is usually a relatively simple parsing of binary bytes;

The length of the packet is generally less than 100 bytes, and the parsing is relatively simple for engineers to understand;

Simple Drive protocol is a general data acquisition protocol, which can solve the above problems.

Easy COM

Add controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select Easy COM
  1. Endpoint: Support RS485 and RS232, default use RS485
  1. Polling Interval: It is the time interval of data collection (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  1. Description: You can add comment information to this controller
Command List:
  1. Read data: Enabled by default
  1. Read Command: Hex formulates long request packet, the dynamic data part of the packet needs to be filled with 00
  1. Response Length: The length of the response packet
  1. Response header check:
  1. Head Length: The length in bytes of the header of the packet
  1. Expect Head: The hexadecimal value of the header of the desired packet
  1. Response checksum check:
  1. Start Byte: The number of bytes in the packet in which the content of the start check is located
  1. End Byte: The length of the check content
  1. Check Method: support CRC16, SUN16, SUM8, default use CRC16
  1. Check Byte order: Support "Consistent with the controller" and " As opposed to the controller ". If SUM8 is selected for validation, this option is not present. Controller endianness is configured in advanced settings
  1. Write Date:
  1. Write Command: Hex formulates long request packet, the dynamic data part of the packet needs to be filled with 00
  1. Add Parity:
  1. Check Method: Support CRC16, SUN16, SUM8, default is CRC16
  1. Start Byte: Start from the first byte to calculate the check value
  1. End Byte: The number of bytes to check from the start byte
  1. Check Byte Order: supports "Consistent with the controller" and " As opposed to the controller ". If SUM8 is selected for validation, this option is not present. Controller endianness is configured in Advanced Settings
  1. Response Length: The length of the response packet after the data is written. Range 1-256 bytes
  1. Response header Check:
  1. Head Length: The length of the header of the packet
  1. Expect head: The hexadecimal value of the header of the desired packet
  1. Response Checksum Check:
  1. Start Byte: The number of bytes in the packet in which the content of the start check is located
  1. End Byte: The length of the check content
  1. Check Method: support CRC16, SUN16, SUM8, default use CRC16
  1. Check Byte Order: Support "consistent with the controller" and "contrary to the controller". If SUM8 is selected for validation, this option is not present. Controller endianness is configured in Advanced Settings
Advanced Settings:
  1. Byte Order: Two are supported, "High byte first" and "Low Byte first"
  1. Timeout: The timeout time of the device response after the read request is initiated to the device when the measurement point is collected. If the device does not respond to the read request within the set acquisition timeout time, it is still the acquisition failure.
  1. Communication time setting:
  1. Communication Interval Time: the interval time of packet interaction, that is, after receiving the response of the device, it will wait for a communication interval before sending the next request packet.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measurement points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Measuring Point Byte Order:support " Consistent with the controller" and " As opposed to the controller". Controller endianness is configured in Advanced Settings
  3. Conversion Method:support "HEX2DEC(hexadecimal to 10)", "BCD2DEC(BCD code to 10)", "IEEE754(standard floating point number)", "data minus 33H to take BCD", "data minus 33H to take HEX", "data minus 33H to take ASCII"
  4. Data type: Measuring point data type, including:
    1. BYTE: an 8-bit unsigned number
    2. SINT: 8-bit signed number
    3. BCD16:16-bit BCD code
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. DWORD: 32-bit unsigned integer
    7. DINT: 32-bit signed integer
    8. FLOAT: 32-bit floating-point number
    9. DOUBLE: 64-bit floating point number
    10. STRING: 8-bit string
  5. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  6. Size: The length of the STRING when the data type is String
  7. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  8. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  9. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  10. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  11. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  12. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  13. Read Data Offset Address: The starting address of the current measurement point in the packet. The address of the first byte of the packet is 0, and so on.
  14. Read Data Byte Length: The byte length of the current measurement point in the packet
  15. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  16. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  17. Unit: Measuring point unit
  18. Description: Description of the measuring point
  19. Group: The group to which the measuring point belongs
  20. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  21. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  22. No: No computation is performed, the raw data value collected is used
  23. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  24. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  25. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  26. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  27. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
  28. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

Easy TCP

Add controller
  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select Easy TCP
  1. IP Address: The IP address of the communication peer
  1. Port: Port information of the communication peer
  1. Polling Interval: It is the time interval of data collection (seconds), for example, it is set to 10S, then all the measurement points under the controller are polled every 10S
  1. Enable Multiple Polling Interval: Once enabled, you can configure an additional polling cycle and select certain measurement points under the controller to use the polling cycle. This function can be used to distinguish the measurement points that need high frequency and low frequency acquisition, and make efficient use of gateway and PLC performance.
  1. Polling Interval 2: An additional polling cycle (in seconds) that needs to be set when multiple polling cycles are enabled.
  1. Description: You can add comment information to this controller
Command List:
  1. Read data: Enabled by default
  1. Read Command: Hex formulates long request packet, the dynamic data part of the packet needs to be filled with 00
  1. Response Length: The length of the response packet
  1. Response header check:
  1. Head Length: The length in bytes of the header of the packet
  1. Expect Head: The hexadecimal value of the header of the desired packet
  1. Response checksum check:
  1. Start Byte: The number of bytes in the packet in which the content of the start check is located
  1. End Byte: The length of the check content
  1. Check Method: support CRC16, SUN16, SUM8, default use CRC16
  1. Check Byte order: Support "Consistent with the controller" and " As opposed to the controller ". If SUM8 is selected for validation, this option is not present. Controller endianness is configured in advanced settings
Write Date:
  1. Write Command: Hex formulates long request packet, the dynamic data part of the packet needs to be filled with 00
  1. Add Parity:
  1. Check Method: Support CRC16, SUN16, SUM8, default is CRC16
  1. Start Byte: Start from the first byte to calculate the check value
  1. End Byte: The number of bytes to check from the start byte
  1. Check Byte Order: supports "Consistent with the controller" and " As opposed to the controller ". If SUM8 is selected for validation, this option is not present. Controller endianness is configured in Advanced Settings
  1. Response Length: The length of the response packet after the data is written. Range 1-256 bytes
  1. Response header Check:
  1. Head Length: The length of the header of the packet
  1. Expect head: The hexadecimal value of the header of the desired packet
  1. Response Checksum Check:
  1. Start Byte: The number of bytes in the packet in which the content of the start check is located
  1. End Byte: The length of the check content
  1. Check Method: support CRC16, SUN16, SUM8, default use CRC16
  1. Check Byte Order: Support "consistent with the controller" and "contrary to the controller". If SUM8 is selected for validation, this option is not present. Controller endianness is configured in Advanced Settings
Advanced Settings:
  1. Byte Order: Two are supported, "High byte first" and "Low Byte first"
  1. Timeout: The timeout time of the device response after the read request is initiated to the device when the measurement point is collected. If the device does not respond to the read request within the set acquisition timeout time, it is still the acquisition failure.
  1. Communication time setting:
  1. Communication Interval Time: the interval time of packet interaction, that is, after receiving the response of the device, it will wait for a communication interval before sending the next request packet.
  1. Communication Message Settings:
  1. Store Communication Messages: The controller with this function enabled will store communication messages. The storage path and number can be set in the "Default Parameter" of the "Parameter Settings" page. If you need to download the stored communication message, you can enter the "Realtime Communication Message" page of the specified controller in the "Measure Monitor" page, and click the "Download" button to download.
Adding measurement points
  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Measuring Point Byte Order:support " Consistent with the controller" and " As opposed to the controller". Controller endianness is configured in Advanced Settings
  3. Conversion Method:support "HEX2DEC(hexadecimal to 10)", "BCD2DEC(BCD code to 10)", "IEEE754(standard floating point number)", "data minus 33H to take BCD", "data minus 33H to take HEX", "data minus 33H to take ASCII"
  4. Data type: Measuring point data type, including:
    1. BYTE: an 8-bit unsigned number
    2. SINT: 8-bit signed number
    3. BCD16:16-bit BCD code
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. DWORD: 32-bit unsigned integer
    7. DINT: 32-bit signed integer
    8. FLOAT: 32-bit floating-point number
    9. DOUBLE: 64-bit floating point number
    10. STRING: 8-bit string
  5. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  6. Size: The length of the STRING when the data type is String
  7. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  8. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  9. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  10. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  11. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  12. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
    3. Write: Only write, not read
  13. Read Data Offset Address: The starting address of the current measurement point in the packet. The address of the first byte of the packet is 0, and so on.
  14. Read Data Byte Length: The byte length of the current measurement point in the packet
  15. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  16. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  17. Unit: Measuring point unit
  18. Description: Description of the measuring point
  19. Group: The group to which the measuring point belongs
  20. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  21. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  22. No: No computation is performed, the raw data value collected is used
  23. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  24. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  25. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  26. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  27. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.
  28. Enable Package Reporting: This field is visible when the controller enables group packet reporting. When the measuring point is enabled, it will report data in accordance with the packet reporting logic set by the controller in addition to the group reporting data

Virtual controller

The virtual controller is mainly a data display controller designed for secondary development equipment acquisition by the gateway. The data collected by the secondary development App can be transmitted to the internal gateway through the internal MQTT message bus, and the data is displayed in the virtual controller's measurement point by calling the script API that writes the controller's measurement point value.

Adding controllers

  1. Name: The name of the controller, which is unique in the controller list for the entire gateway
  1. Protocol: Select the virtual controller
  1. Status expiration time: If set to greater than 0, the state will be automatically updated to offline if no new message is received by the virtual controller or measurement point within the specified time; If it is equal to 0, the controller will never show offline after it has been online.
  1. Description: You can add comment information to this controller

Adding measurement points

  1. Measuring Point Name: The name of the measuring point (the name of the measuring point cannot be repeated under the same controller)
  2. Data type: Measuring point data type, including:
    1. BYTE: An 8-bit unsigned number
    2. SINT: 8-bit signed number
    3. BCD16:16-bit BCD code
    4. WORD: 16-bit unsigned integer
    5. INT: 16-bit signed integer
    6. DWORD: 32-bit unsigned integer
    7. DINT: 32-bit signed integer
    8. FLOAT: 32-bit floating point number
    9. DOUBLE: 64-bit floating point number
    10. STRING: 8-bit string
  3. Decimal Places: The length of the data after the decimal point when the data type is FLOAT or DOUBLE ,the maximum is 6 digits
  4. Size: The length of the STRING when the data type is String
  5. Character Encoding Format: ASCII, UTF-8, UTF-16 little endian, UTF-16 big endian, GB2312 little endian, GB2312 big endian. Only data type selection STRING is valid.
  6. Read Bit Data: The value of any bit data in the integer can be read when enabled.
  7. Register Bit: When the bitwise value is enabled, the bit offset of the measuring point when reading the bit data.
  8. Negative Value: When the bitwise value is enabled or the data type is BIT, you can choose whether to negate the result of the read.
  9. Value mapping:When enabled, maps the 0 and 1 values of a BIT point to False and True
  10. Read and write permissions:
    1. Read: read-only, not writable
    2. Read/Write: Readable and writable
  11. Mode:
    1. Periodic: Periodically reports data according to the reporting period of the group it belongs to
    2. Onchange: When the value of the measuring point changes, the data will be reported periodically according to the reporting period of the group
    3. Never: Only used locally, no need to upload data from the cloud
  12. Onchange Deadzone: When the upload mode is Onchange, you can set the value change within a certain range to be treated as no change. If the data has configuration data operation, the value after operation is used to detect whether the value change exceeds the dead zone.
  13. Unit: Measuring point unit
  14. Description: Description of the measuring point
  15. Group: The group to which the measuring point belongs
  16. Store Historical Data: When enabled, the historical data table will be generated with the name of the group to which the measurement point belongs, and the historical data will be stored according to the storage strategy set by the group. The stored historical data can be exported as CSV files or obtained by calling Python API.
  17. Data Calculation: When the data type of the measurement point is not BIT or STRING, it supports simple operation processing through data operation, and the processed data value can be reported to the cloud platform. The value mapped to the protocol conversion (Modbus Slave or OPC UA Server, etc.) defaults to the original data value collected rather than the calculated data value
  18. No: No computation is performed, the raw data value collected is used
  19. Ratio Conversion: the collected data value is mapped to a data value in the range of the upper and lower limits of the ratio in equal proportion to the data value, such as mapping the data collected in the sensor to the actual temperature and humidity. The calculation formula is the calculated data value = (upper limit of proportion - lower limit of proportion)/(upper limit of data - lower limit of data) * (original data value - lower limit of data) + lower limit of proportion
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Data High Limit: The upper limit of the data of the measuring point
    3. Data lower Limit: the lower limit of the data at the measuring point
    4. High Limit Of Proportion: the upper limit of the data after the proportion operation
    5. Lower Limit Of Proportion: The lower limit of the data after the scale operation
  20. Offset and Zoom: calculate the original data value according to the multiplier and offset. The formula is the calculated data value = (original data value * multiplier) + offset
    1. Decimal Places: The number of decimal places to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
  21. Bit Trunction: Intercepts a segment of data in the original data as a data value. FLOAT type measuring points do not support this operation
    1. Start Bit: The bit offset at which the intercept of the original data begins
    2. End Bit: The bit offset that ends the interception of the original data
  22. PT/CT: Calculate the original data value according to the magnification, offset, PT and CT, the formula is [(original value * magnification)+ offset]*PT*CT
    1. Decimal Places: The number of decimal places that need to be retained after the operation
    2. Magnification: The multiplier that needs to be scaled up or down
    3. Offset: The data value that needs to be increased or decreased after the multiplier operation
    4. PT: Additional PT multiplier
    5. CT: Additional CT magnification
  23. Value mapping: Configurable measuring points for specific values converted to other values.
    1. Source Value: The raw value of the collected measuring point.
    2. Target Value: The expected value of the converted measuring point.

Appendix: Protocol conversion

Modbus TCP Slave

Modbus TCP Slave configuration

In the Modbus TCP Slave configuration page, enable Modbus TCP Slave, the interface is shown as follows:


Modbus TCP Slave configuration interface parameters:

  1. Port: The port number of modbus TCP, support 1-65535, the default is 502.
  1. 16-bit integer byte order: The gateway is fixed to AB byte order
  1. 32-bit integer byte order: The gateway is fixed to ABCD byte order
  1. 32 bit float byte order: The gateway is fixed to ABCD byte order
  1. 64-bit integer byte order: The gateway is fixed to ABCDEFGH byte order
  1. Max-Connection: 1-32 supported, default is 5 connections.
  1. Mapping value Settings: Support Data original value and Data caculation value. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data operation)

After configuring Modbus TCP Slave parameters, click "Submit" button to enable Modbus TCP Slave function. In the Status of Modbus TCP Slave page, you can view the running status and connected device information.


Configure the Modbus TCP Slave Mapping Table


Click the "Add" button in the interface that pops up to configure a mapping table with a different slave address (Note: map table name and slave address are not repeatable)

The figure is to add a Modbus mapping table with name 2 and slave address 2


After the successful addition, the interface displays as shown in the figure:



Click the "Edit" button to modify the slave address on the mapping table of the current page. When the number of mapping tables of the page is greater than 2, click the "Delete" button to delete the mapping table. Delete mapping table 2 as shown below:



The following figure is adding measuring points to the Modbus TCP Slave mapping table:


  1. Description of the parameters to add the mapping:

  1. Controller: Southbound controller device

  1. Measure: The measuring point in the southbound controller

  1. Read/Write: The same as the read and write permissions of the measurement point in the southbound controller (cannot be modified)

  1. Original Data Type: Same as the data type of the point in the southbound controller (immutable)

  1. Mapping Data Type: The data type of the measurement point in the Modbus TCP Slave

  1. Start Mapping Address: the start address of the register of the measure point in Modbus TCP Slave
  2. Mapping address: Automatically calculated and displayed according to the starting mapping address and data type.
The following figure is batch adding measurement points to the Modbus TCP Slave mapping table:

Introduction to batch adding mapping parameters:

  1. Start Mapping Address: the start address of the register of the currently selected measurement point in Modbus TCP Slave

  1. Mapping Address: According to the starting mapping address, the selected measurement point and the data type of the measurement point, the current map address range of the measurement point is calculated and displayed

  1. Mapping Data Type: The data type of the current measurement point in Modbus TCP Slave can be configured.

IEC 104 Server

IEC 104 Server configuration

On the IEC 104 Server configuration page, after enabling IEC 104 Server, the interface is as shown below:


IEC 104 Server configuration interface parameters description:

Basic Settings:

  1. COT Size: The length of the transmission reason in bytes, the COT field is used to identify the transmission reason. 1 and 2 are supported, the default is 2
  1. ASDU Size: The length of the application service data unit, which is the length of the CA public address, the ASDU field is used to distinguish between different substations on this link. 1 and 2 are supported, the default is 2
  1. Connection mode:
  1. TCP server:
  1. Port Number: Configure the port of the TCP server
  1. TCP Client:
  1. Server IP address/domain name: Configured in client mode, TCP server address or domain name you want to connect to
  1. Port Number: The port of the server
  1. Mapping Value Setting: Support Data original value and Data caculation value. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data caculation)
  1. Server list: In general, the station address of the link address field and the Application Service Data Unit (ASDU) public address can be set to the same value. In some cases, there can be more than one application service data unit (ASDU) public address under the station address of one link layer address area, such as: a substation collects information of several nearby satellite stations and then transmits it to the main station. In this case, there can be more than one common address of the application service data unit. At this point, you can add multiple servers here to represent multiple sub-stations. Here's an example of adding an ASDU address of 2 (Note: Addresses are not repeatable) :

If the serial number in the Server list is greater than 2, then you can remove the unwanted ASDU address. Here's how to delete an ASDU address with serial number 1:


Advanced Settings:

  1. Enable Spontaneous reporting: When enabled, the slave will actively send data to the master
  1. K Value: The maximum number of I format (information) APDU (k) that has not been acknowledged. Range 1-32, default 12.
  1. W Value: Acknowledgement by the receiver upon receipt of w I format (information) APdus, range 1-32, default 8.
  1. T0 Timeout (S) : T0 timeout is the timeout that the master waits for a response from the slave after sending the start frame. If no response frame is received from the slave within the T0 timeout period, the master will consider the communication failed and act accordingly. Range 1-3000, default is 30 in seconds.
  1. T1 Timeout (S) : t1 stipulates that after the sender sends an I format packet or U format (control) packet, it must be acknowledged by the receiver within the time of t1, otherwise the sender believes that the TCP connection has a problem and should re-establish the connection. Range 1-3000, default is 15 in seconds.
  1. T2 Timeout (S) : t2 stipulates that after receiving an I format packet, if the receiver does not receive a new I format packet after t2 time, it must send an S format (monitoring) frame to the sender to acknowledge the received I format packet. Range 1-3000, default is 10, in seconds. Note: T2 < T1
  1. T3 Timeout (S) : t3 stipulates that the dispatcher or the sub-station RTU will retrigger the timer t3 every time it receives an I frame, S frame or U frame. If no packet is received within t3, it will send a test link frame to the other side. Range 1-3000, default is 20, the unit is seconds. Note: T3 > T1
  1. Maximum Connection: 1-32 supported, 5 by default
  1. Time Setting: Only local time is supported
  1. Byte Order: Fixed to ABCD

After the IEC 104 Server parameters are configured, click the "Submit" button to enable the IEC 104 Server function. In the Status page of IEC 104 Server, you can view the operating status and connected device information.


Configure the IEC 104 Server Mapping Table

The following figure is to add the measurement points to the IEC 104 Server mapping table (note: read-only measurement points can be mapped only once, read-write measurement points can be mapped twice) :


Introduction to adding mapping parameters:

  1. Controller: Southbound controller device
  2. Measure: The measuring point in the southbound controller
  3. Read/Write: The same as the read and write permissions of the measurement point in the southbound controller (cannot be modified)
  4. Original Data Type: Same as the data type of the point in the southbound controller (immutable)
  5. Type ID: Shows the supported type ID based on the measurement point type

Display based on point data permissions and data types:

  1. Single-Point Information (read-only or read-write points, supported point type: BIT) :

[1] M_SP_NA_1

[30] M_SP_TB_1

  1. Double-Point Information (read-only or read-write points, supported point types: all point types except BIT,FLOAT and STRING) :

[3] M_DP_NA_1

[31] M_DP_TB_1

  1. Step Position Information (read-only or read-write points are acceptable, supported point types are BYTE,SINT) :

[5] M_ST_NA_1

[32] M_ST_TB_1

  1. Bitstring (32 bit) (read-only or read/write point, support site types: BYTE, SINT, WORD, INT, DWORD, DINT, BCD) :

[7] M_BO_NA_1

[33] M_BO_TB_1

  1. Measured Value (Normalized) (read-only or read/write point, support site types: BYTE, SINT, WORD, INT, DWORD, DINT, FLOAT, BCD) :

[9] M_ME_NA_1

[21] M_ME_ND_1

[34] M_ME_TD_1

  1. Measured Value(Scaled) (read-only or read-write points, supported point types: BYTE,SINT,WORD,INT,BCD) :

[11] M_ME_NB_1

[35] M_ME_TE_1

  1. Measured Value (Short Float) (read-only or read/write point, support site types: BYTE, SINT, WORD, INT, DWORD, DINT, Float, BCD) :

[13] M_ME_NC_1

[36] M_ME_TF_1

  1. Integrated the Totals (read-only or read/write point, support site types: BYTE, SINT, WORD, INT, DWORD, DINT, BCD) :

[15] M_IT_NA_1

[37] M_IT_TB_1

  1. Parameter (read-only or read/write point, support site types: BYTE, SINT, WORD, INT, DWORD, DINT, FLOAT, BCD) :

[110] P_ME_NA_1

[111] P_ME_NB_1

[112] P_ME_NC_1

  1. Single Command (read and write points only, BIT type supported) :

[45] C_SC_NA_1: Single remote command

[58] C_SC_TA_1: Single remote command with time tag.

  1. Double Command (read and write points only, all points except BIT,FLOAT and STRING are supported) :

[46] C_DC_NA_1

[59] C_DC_TA_1

  1. Regulating Step Command (only read and write points are supported, supported point types: BYTE,SINT) :

[47] C_RC_NA_1

[60] C_RC_TA_1

  1. Set point command - Measured Value (Normalized) (measuring point only supports, speaking, reading and writing, and support the site types: BYTE, SINT, WORD, INT, DWORD, DINT, FLOAT, BCD) :

[48] C_SE_NA_1

[61] C_SE_TA_1

  1. Set point command-Measured Value(Scaled) (read and write points only supported, supported point types: BYTE,SINT,WORD,INT,BCD) :

[49] C_SE_NB_1

[62] C_SE_TB_1

  1. The Set point command - Measured Value (Short Float) (measuring point only supports, speaking, reading and writing, and support the point of types: BYTE, SINT, WORD, INT, DWORD, DINT, Float, BCD) :

[50] C_SE_NC_1

[63] C_SE_TC_1

  1. Bitstring command (32 bit) (only point support, speaking, reading and writing, and support the site types: BYTE, SINT, WORD, INT, DWORD, DINT, BCD) :

[51] C_BO_NA_1

[64] C_BO_TA_1

  1. Mapping Data Types: Datatypes mapped in IEC 104 Server
  1. ASDU Address: ASDU address selection in the Server list
  1. Start IOA: Identifies the address of the information object in the communication transmission.
  1. Mapping Address: Determined by the type ID and the starting IOA value

The following figure is batch adding measurement points to the IEC 104 Server mapping table


Batch adding mapping interface parameters:

  1. ASDU address: Select according to the ASDU address added in the server list when configuring
  1. Type ID: Based on the type ID, the supported measurement point information is displayed
Refer to the type ID in the introduction to Add Mapping parameters for specific types.
  1. Start IOA: Starting mapping address
  1. Mapping Address: According to the starting mapping address, the currently added mapping address range of the measurement point is displayed
  1. Mapping Data Type: You can configure the data type of the current measuring point in IEC 104 Server.

OPCUA Server

OPCUA Server configuration

On the OPCUA Server configuration page, after enabling OPCUA Server, the interface is as shown below:


OPCUA Server configuration interface parameters description:

  1. Port: OPCUA server's port number, range: 1-65535
  1. Max-Connection: Maximum number of client connections supported, range: 1-32
  1. Anonymous: When anonymous login is disabled, two configuration items "Username" and "Password" will be displayed
  1. UserName: Set the username used by the client connection
  1. Password: Set the password used for the client connection

After the username and password are configured, the client connection will not be able to connect to the server without entering the correct username and password.

  1. Server Certificate: After importing, OPCUA server will authenticate the client with the certificate key
  1. Server Private Key: After import OPCUA server will authenticate the client with the certificate key
  1. Identifier Type: Numeric and String are supported, and String type is used by default
  1. Mapping Value Settings: Data original value and data caculation value are supported. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data operation)

After configuring the OPCUA Server parameters, click the "Submit" button to enable the OPCUA Server function. On the status page of OPCUA Server, you can view the operating status and connected device information.


Configure the OPCUA Server Mapping Table

The following figure is to add measurement points to the OPCUA Server mapping table:

  1. Mapping Data Type: The current measurement point is mapped to the data type in OPCUA Server

Check the point you want to add to the mapping table. Finally, click "OK" to add the point to the mapping table

Modbus RTU Slave

Modbus RTU Slave configuration

In the configuration page of Modbus RTU Slave, after enabling Modbus RTU Slave, the interface is as shown below:


Modbus RTU Slave configuration interface parameters:

  1. Communication mode: support RS485 and RS232, the default is RS485
  2. Baud Rate: can be configured in the "Parameter Settings" page
  3. Data Bits: can be configured on the "Parameter Settings" page
  4. Parity: can be configured in the "Parameter Settings" page
  5. Stop Bits: can be configured in the "Parameter Settings" page
  6. 16-bit integer byte order: The gateway is fixed to AB byte order
  7. 32-bit integer byte order: The gateway is fixed to ABCD byte order
  8. 32-bit float byte order: The gateway is fixed to ABCD byte order
  9. 64-bit integer byte order: The gateway is fixed to ABCDEFGH byte order
  10. Mapping value setting: support Data original value and Data caculation value. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data operation)

After configuring Modbus RTU Slave parameters, click "Submit" button to enable Modbus RTU Slave function. In the status page of Modbus RTU Slave, you can view the running status information.


Configure the Modbus RTU Slave Mapping Table

Configuring the Modbus RTU Slave mapping table can be referred to Configuring the "Modbus TCP Slave mapping table"

IEC 101 Server

IEC 101 Server configuration

On the IEC 101 Server configuration page, after enabling IEC 101 Server, the interface is as shown below:


IEC 101 Server configuration interface parameters description:

Basic Settings:

  1. Communication Mode: Support RS232,RS485,TCP Transparent transmission
  2. Link Mode: support Balanced Transmission and Unbalanced Transmission, Unbalanced Transmission only supports one side of the communication at the same time to send data, belongs to half duplex, suitable for RS485 scenario, Balanced Transmission can support both sides of communication to send data at the same time, belongs to full duplex, suitable for RS232 scenario
  3. Protocol Mode: IEC60870-5-101 and DL/T634.5101. IEC60870-5-101 is more suitable for international power automation systems, and DL/T634.5101 is suitable for Chinese power systems.
  4. Link Address Size: 1 and 2 are supported. The number of bits or bytes used to represent the address of a device in the link layer
  5. Link Address: A unique identifier used in the link layer to identify a communicating device
  6. ASDU Size: The length of the application service data unit, that is, the length of the CA public address, the ASDU field is used to distinguish between different sub-stations on this link. 1 and 2 are supported, the default is 2
  7. IOA Size: The length of the IOA determines the number and range of monitoring points. 1, 2, and 3 are supported. The default is 3
  8. COT Size: The length of the transmission reason in bytes. COT field is used to identify the transmission reason. 1 and 2 are supported. Default is 2.
  9. Mapping Value Settings: Support Data original values and Data caculation values. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data operation)
  10. Server List: In general, the station address of the link address field and the Application Service Data Unit (ASDU) public address can be set to the same value. In some cases, there can be more than one application service data unit (ASDU) public address under the station address of one link layer address area, such as: a substation collects information of several nearby satellite stations and then transmits it to the main station. In this case, there can be more than one common address of the application service data unit. At this point, you can add multiple servers here to represent multiple sub-stations. Here's an example of adding an ASDU address of 2 (Note: Addresses are not repeatable) :


If the order number in the Server list is greater than 2, then the unwanted ASDU address can be removed. (Server list serial number is greater than or equal to 1), the following figure is to delete an ASDU address with serial number 1:

If the communication mode is selected TCP transparent transmission parameter description:

  1. Heartbeat Retry Interval: The time interval for the server to send a heartbeat packet and wait for a response from the client. The default is 10 seconds, ranging from 1-3600
  1. Keeplive Retry: The number of times the server attempts to resend a heartbeat packet when it does not receive a response from the client. The default is 5 retries, ranging from 1-100
  1. Heartbeat max idle time: The maximum time the server will allow a connection to remain idle without receiving a response from the client. The default is 100 seconds, ranging from 1-65535
  1. Serial Buffer Frame: The number of data frames received by the system cache. The default is 4 frames. Range 1-4
  1. Packet Size: The length of each data frame in serial communication. The default is 1024, and 1-1024 bytes are supported
  1. Force Transmit Timer: The time interval between each data frame in serial communication. The default is 100 ms, and 10-65535 ms is supported
  1. Min Reconnect Interval: The minimum time interval to reconnect after being disconnected. 15 seconds by default, 15-60 seconds is supported.
  1. Max Reconnect Interval: The maximum time interval to reconnect after being disconnected. 15 seconds by default, 15-3600 seconds is supported
  1. Multi-server policy: Multiple data centers (or server centers) are used in the system to handle TCP pass-through connections, and some policy is used to manage the distribution and processing of these connections. The policy supports parallel and polling modes, and the default is to use parallel.
  1. Send Access Request Message: The master station (or client) sends a request to the remote device (or server) to establish a communication connection. The purpose of this request packet is to request the remote device to establish a connection with the master station for data exchange and communication. Once enabled, the contents of the packet must be entered.
  1. Destination IP address: The destination IP address is the IP address of the remote device or server, which is the network address of the receiver. This IP address is used to send the packet to the correct destination so that the remote device can receive and process this request and establish a communication connection. The following is an example of adding the destination IP address:


After the addition is complete, you can edit and delete the destination address you added.

Advanced Settings:

  1. Enable Spontaneous: The device is able to proactively send data to the master (or client) instead of waiting for the master to make a request. The default is enabled.
  1. Link confirmation timeout: The maximum time you can wait for the other party to confirm the connection while the connection is being established. The default is 2000 milliseconds. Range 50-2147483647
  1. Idle Timeout: The maximum amount of time that a connection can wait without data exchange after it has been established. The default is 10,000 milliseconds. Range 50-2147483647
  1. Time Setting: Only local time is supported
  1. Byte Order: Only ABCD format is supported

Once the IEC 101 Server parameters are configured, click the "Submit" button to enable the IEC 101 Server function. In the status page of IEC 101 Server, you can check the running status.


Configure the IEC 101 Server Mapping Table

The mapping table of IEC 101 Server supports three types: Telemetering, Telesignalling and Telecontrol.

  1. Telemetering: Telemetering refers to the function of obtaining continuous measurement values from remote sites. These measurements can include real-time values of parameters such as current, voltage, power, and energy. The IEC 101 Server can send query commands to remote sites to obtain telemetry values for specific equipment or systems and monitor and record them as needed.
  1. Telesignalling: Telesignalling refers to the function of obtaining discrete status information from remote sites. This information can include the on/off status of equipment, alarm states, and more. The IEC 101 Server can send query commands to remote sites to obtain the telesignalling status of specific equipment or systems and monitor and record them as needed.
  1. Telecontrol: Telecontrol refers to the capability to control devices or systems at remote sites. The IEC 101 Server can send control commands to remote sites, such as turning switches on/off, adjusting equipment parameters, etc., to achieve remote control of remote devices.

The following figure shows the addition of measurement points to the IEC 101 Server mapping table


Introduction to adding mapping parameters:

  1. Controller: Southbound controller device
  1. Measure: Measuring point in the southbound controller (Note: telemetry only supports measuring points of non-BIT data type, telemetry and remote control only support measuring points of BIT data type)
  1. Read/Write: the same as the read and write permissions of the measurement point in the southbound controller (cannot be modified)
  1. Original Data Type: Same as the data type of the point in the southbound controller (immutable)
  1. Mapping Data Type: The data type of the measurement point in IEC 101 Server
  1. ASDU Address: ASDU address selection in the Server list
  1. Type ID: The type ID of the Telemetering is fixed to: [13] M_ME_NC_1; The type ID of Telesignalling is fixed: [1] M_SP_NA_1; The type ID of the Telecontrol is fixed: [45] C_SC_NA_1
  1. Start IOA: Identifies the address of the information object in the communication transmission.
  1. Mapping Address: Determined by the type ID and the starting IOA value

The following figure is batch adding measurement points to the IEC 101 Server mapping table


Batch adding mapping interface parameters (batch added measurement points only show the measurement points that meet the type ID and meet the search criteria) :

  1. ASDU Address: ASDU address selection in the Server list
  1. Type ID: The type ID of the Telemetering is fixed to: [13] M_ME_NC_1; The type ID of Telesignalling is fixed: [1] M_SP_NA_1; The type ID of the Telecontrol is fixed: [45] C_SC_NA_1
  1. Start IOA: Identifies the address of the information object in the communication transmission. The address of the first check point checked and the addresses of the remaining check points sorted from top to bottom
  1. Mapping Address: According to the starting mapping address, the current mapping address range of the measurement point is calculated and displayed

SL651

SL651 configuration

On the configuration page of SL651, after enabling SL651, the interface looks like the following picture:


IEC 101 Server configuration interface parameters description:

  1. Central Station Address: A unique identifier to distinguish each central station, the default is 1, range 1-225
  1. Telemetry Address: Enter a 10-digit telemetry address consisting of a borough number and a station number
  1. Telemetry Type: supports "500 Tons/Day or more", "100-500 Tons/day" and "Below 100 Tons/Day". By default "Below 100 Tons/Day" is used
  1. Password: The connection password for the central station, no longer than 4 characters
  1. Mapping Value Settings: support Data original value and Data caculation value. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data caculation)
  1. Central Station List: (Add at least one central station)


  1. IP address: The IP address of the central station
  1. Port: Port information of the central station
  1. Enable whole slice reporting: In every whole slice (i.e. 15 minutes) time interval, the data is automatically reported.
  1. Reporting Cycle: The default reporting period is 60 seconds. With full reporting enabled, the default reporting period will be 900 seconds. Range 1-86400 seconds
  1. Communication Timeout: Communication timeout is usually the maximum time you can wait for a response from the other party while establishing a communication connection or sending data. If no response is received from the other party within the set timeout period, the communication is usually considered to have failed or expired. The default is 5 seconds, ranging from 1-3600 seconds

After configuring the SL651 parameters, click the "Submit" button to enable the SL651 function. On the status page of the SL651, you can view the running status and connected device information.


Configure the SL651 Mapping Table

The following figure is to add the measurement points to the SL651 mapping table (Note: Feature type measurement points are configured in order to be added to the mapping table.)


The introduction to the parameters of the Add Map interface is as follows:

  1. Mapping Data type: The data type in SL651 can be configured according to the actual situation.
  1. Element Type: Select measurement points based on their application scenarios.

HJ212 Clinent

HJ212 Client Config

In the Configuration page of HJ212 Client, after enabling HJ212 Client, the interface is as shown below:


HJ212 Client Configuration interface parameters description:

  1. Mapping Value Setting: support Data original value and Data caculation value. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data caculation)
  1. Platform Settings:

After clicking the "Add" button, the following screen will be displayed:


            Add platform parameter introduction:

  1. Platform Name: Custom do not repeat the name
  1.  Platform IP Address: The IP address of the server
  1. Platform Port: The port number of the server
  1. MN Coding: Unique identification of the device with a maximum support of 24 characters
  1. Password: A security credential for authentication that cannot exceed 24 characters
  1. Communication Mode: Only Upload Mode is supported
  1. TCP Heartbeat Interval: In TCP communication, the time interval between sending heartbeat packets
  1. TCP Reconnect Interval: The time interval between reattempts to establish a connection after a TCP connection has been dropped

Data Settings:


Add Dataset parameters Introduction:

  1. DatasetName: Custom non-duplicate name
  1. System coding: The system code specified according to the monitoring system, such as 21 for surface water quality detection. A maximum of two characters is supported
  1. Upload Interval: The time interval between reports

After configuring the HJ212 Client parameters, click the "Submit" button to enable the HJ212 Clinet function. In the HJ212 Clinet status page, you can view the running status and connected device information.


Configure the HJ212 Client Mapping Table

The following figure is to add the measurement points to the HJ212 Client mapping table (Note: The mapping table can only be added if the measurement points are filled in for both the monitoring factor and the data set. If only one item is filled in, click the "Confirm" button and an error will be reported)



Description of parameters for adding mapping:

  1. Mapping Data Type: The data type in HJ212 Client
  1. Monitoring Factor Coding: it is used to distinguish different detection parameters or detection factors, and match specific detection parameters according to the actual significance of the measurement points
  1. Dataset: Select according to the dataset at the time of configuration

BACnet IP Server

BACnet IP Server Configuration

In the BACnet IP Server Configuration page, after enabling BACnet IP Server, the interface is as shown below:


BACnet IP Server Configuration interface parameters description:

  1. Port: The port number used by the gateway to enable this server function
  1. Local Device ID: A unique identifier for each BACnet device in the network it is in
  1. Enable BBMD (allows devices to communicate by broadcast mode, thus enabling communication across network segments) :
  1. BBMD IP: The IP address of the device used to manage BACnet broadcast communication, the BBMD device is responsible for managing the routing and forwarding of BACnet broadcast messages to ensure that broadcast messages can be transmitted across different network segments.
  1. BBMD TTL: The maximum number of transmission hops or lifetime allowed for a BACnet broadcast message when it crosses the network. It is used to limit the transmission range of a broadcast message in the network and prevent the message from spreading without limit, thus reducing network load and improving security
  1. Mapping value setting: support Data original value and Data caculation value. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data caculation)

Configure the BACnet IP Server Mapping Table

The following figure is to add measurement points to the BACnet IP Server Mapping Table


Add mapping interface parameters:

  1. Controller: southbound controller device
  1. Measure: The measuring point in the southbound controller
  1. Read/Write: The same as the read and write permissions of the measurement point in the southbound controller (cannot be modified)
  1. Original Data Type: Same as the data type of the point in the southbound controller (immutable)
  1. Object Type: When the data type is BIT, it can be mapped to the following types: Digital Input, Digital Output, Digital Value. Data types other than BIT and STRING can be mapped to the following types: Analog Input, Analog Output, Analog Value, Multi-state Input, Multi-state Output, Multi-state Value.
  1. Mapping Data Type: The data type of the measurement point in BACnet IP Server
  1. Instance Number: Used to identify different object instances in the network, ranging from 0-511
  1. Mapping Address: Automatically generated based on object type.

The following figure is batch adding measurement points to the BACnet IP Server mapping table:


Introduction of parameters for Batch Add Map:

  1. Object Type: Select from the drop-down box. According to the selected object type, the following table will show the matching measurement points
  1. Instance Number: The instance number of the starting point of the selected point
  1. Mapping Address: According to the object type, the instance number and the selected measurement point, the corresponding mapping address range is automatically generated
  1. Mapping Data Type: The data type of the measurement point in BACnet IP Server

DNP3 Outstation

DNP3 Outstation Configuration

On the DNP3 Outstation Configuration page, after enabling DNP3 Outstation, the interface is as follows:


DNP3 Outstation Configuration interface parameters:

Basic Settings:

  1. Communication Mode: Support TCP and UDP, default use TCP
  1. Local Port: The Outstation usually listens to a local port number in order to communicate with the master station
  1. Select UDP as the communication method:
  1. Remote IP Address: The IP address to which the UDP datagram is sent
  1. Remote Port: The destination address port from which the UDP datagram is sent
  1. Slave Address: A unique identifier for a device or site in the DNP3 communication network
  1. Master address: A unique identifier for the master station in the DNP3 communication network that is responsible for sending requests and control commands
  1. Mapping Value Setting: Support Data original value and Data caculation value. The default is Data original Value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data operation)

Advanced Settings:

  1. Enable unsolicited response: When enabled:
  1. Unsolicited confirm timeout: The timeout that the Outstation waits for the response of the master after sending data to the master. If the Outstation does not receive a response from the master within the timeout period, the Outstation may consider the communication failed
  1. Data link confirm mode: When enabled:
  1. Data link response timeout: The link message timeout is the timeout period for waiting for a link message after establishing a communication link between the master station and the Outstation
  1. Data link max retry: After establishing a communication link, the upper limit of the number of times the master or Outstation will attempt to retransmit link messages if an acknowledgment message (ACK) is not received from the other party.
  1. Maximum fragment size: The maximum number of bytes that can be transmitted in a DNP3 frame.
  1. Application layer timeout: After the application layer sends data, the timeout time to wait for the other party to reply

After configuring the DNP3 Outstation parameters, click the "Submit" button to enable the DNP3 Outstation function. On the status page of DNP3 Outstation, you can view the operating status and connected device information.


Configure the DNP3 Outstation Mapping Table

Here's how to add a single measurement point to the DNP3 Outstation mapping table:


Description of the parameters for adding the mapping:

  1. Controller: Southbound controller device
  1. Measure: The measuring point in the southbound controller
  1. Read/write: The same as the read and write permissions of the measurement point in the southbound controller (cannot be modified)
  1. Original Data Type: Same as the data type of the point in the southbound controller (immutable)
  1. Register Type: When the measuring point data type is BIT, it can be mapped to the following types: Digital Input, Digital Output; When the data type is not BIT and STRING, it can be mapped to the following types: Analog Input, Analog Output, Counter Input. When the address type is a digital input, the group number is 1 and the variant is 1; When the address type is numeric output, the group number is 10 and the variant is 2; When the address type is analog input, the group number is 30 and the variant is 5. When the address type is analog output, the group number is 40 and the variant is 1; When the address type is counter input, the group number is 20 and the variant is 1.
  1. Mapping Data Type: The data type of the measurement point in the DNP3 Outstation
  1. Mapping Address: Automatically generated according to the address type.

The following figure is batch adding measurement points to DNP3 Outstation mapping table:


Introduction to Batch Add Map parameters:

  1. Register Type: After selection, the matching measurement point information will be displayed automatically in the table
  1. Mapping Address: According to the selected address type and the selected measurement point, the mapping address range of the added measurement point is automatically displayed.
  1. Mapping Data Type: The data type of the measurement point in DNP3 Outstation

IEC 61850 Server

IEC 61850 Server Configuration

On the IEC 61850 Server Configuration page, after enabling IEC 61850 Server, the interface is as shown below:


IEC 61850 Server Configuration interface parameters:

Basic Settings:

  1. Port: The port number of the server enabled by the gateway, which should avoid conflicts with ports enabled by other services
  1. IED Name: A unique identifier that is named according to the specific application and requirements. It should generally be descriptive and clearly express the function or location of the IED. INHAND is used by default.
  1. LD Name: Logical device names are defined when configuring and managing IEDs to distinguish between different functional units and identify them in communication
  1. Control Mode: Support four kinds of "Direct With Normal Security", "Sbo With Normal Security", "Direct With Enhanced Security", "Sbo With Enhanced Secunty".
  1. Enable password connection: After enabling, fill in the password to connect to the IEC 61850 Server
  1. Password: Set the connection password for connecting to IEC 61850 Server
  1. Mapping Value Setting: support Data original value and Data caculation value. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data caculation)

Data set Settings:


Add dataset interface parameters Instructions:

  1. DatasetName: Customize a non-repeatable dataset name
  1. Enable Report: A mechanism used to periodically send information about data changes, commonly used to monitor equipment status and parameter changes in power systems, off by default
  1. Report Control Name: Defines the parameters and behavior of the report. A report control block will typically be assigned a unique name that is used to refer to and identify the report in the configuration.
  1. Report ID: A value that uniquely identifies the report control block.
  1. Configuration revision: Used to identify the specific version of a configuration file or configuration item
  1. Buffer: Events that occur in the reporting mechanism are temporarily stored in a buffer inside the device or system to wait for transmission to the client
  1. Integrity period: The period for checking the integrity of the data in the report. It defines the update frequency of the reported data, that is, how long the data in the report remains valid and reliable
  1. Buffer time: The time interval during which the reported data is buffered before it is sent. When data in a report is updated, the data can be buffered for a certain amount of time so that other data updates that occur during that time can be merged into the same report, reducing the number of reported transmissions and the communication load
  1. Trigger Options: Trigger conditions for sending report data, support "Data change", "Quality change ", "Data update", "Integrity", "General Interrogation" (multiple options)
  1. Optional Fields: After selecting the parameters, the received report will contain the configurable optional parameter information. Support "Sequence number", "Time stamp", "Reason for inclusion", "Dataset name", "Data reference", "Buffer overflow", "Entry ID", "Configuration revision" (multiple options)

After configuring the IEC 61850 Server parameters, click the "Submit" button to enable the IEC 61850 Server function. In the status page of IEC 61850 Server, you can view the operating status and connected device information.


Configure the IEC 61850 Server Mapping Table

The following figure is to add measurement point 1 of the southbound controller to the mapping table of the IEC 61850 Server:


Description of parameters to add the mapping:

  1. Controller: Southbound controller device
  1. Measure: The measuring point in the southbound controller
  1. Read/Write: The same as the read and write permissions of the measurement point in the southbound controller (cannot be modified)
  1. Original Data Type: Same as the data type of the point in the southbound controller (immutable)
  1. Data Object Type: Depending on the data type of the selected measurement point, the options for the data object type are different. (Controllable object types are only supported if the reading and writing permission of the measurement point is Read/Write)
  1. BIT: Single point state information, controllable single point
  1. SINT BYTE, WORD, INT, BCD, DWORD, DINT, BCD32, ULONG, LONG: two point state information, controllable double points, integer status information, controllable state of integer
  1. SINT BYTE, WORD, INT, BCD, DWORD, DINT, BCD32, ULONG, LONG, FLOAT, DOUBLE, measurements, controllable simulation instruction information.
  1. Mapping Data Type: The data type of the measurement point in IEC 61850 Server
  1. Mapping Address: Automatically display according to the starting mapping address.
  1. Add to dataset:
  1. Dataset Name: Enable After adding to a dataset, select from the drop-down box. The content of the drop-down box is the configured data set when IEC 61850 Server is configured.

The following figure is the configuration interface for batch adding measurement points to the IEC 61850 Server mapping table (Note: "dataset name" is optional) :


Introduction to Batch Add Map parameters:

  1. Data Object Type: According to the data object type table, the supported southbound measurement points are displayed. Correspondence (Note: controllable measuring points only show Read and Write permissions as: Read/Write) :
  1. SPS,SPC: BIT data type;
  1. DPS,DPC,INS,INC: SINT, BYTE, WORD, INT, BCD, DWORD, DINT, BCD32, ULONG, LONG data types;
  1. DPS,DPC,INS,INC,MV,APC: BYTE, SINT, WORD, INT, BCD, DWORD, DINT, BCD32, ULONG, LONG, FLOAT, DOUBLE data type.
  1. Mapping Data Type: The data type of the measurement point in IEC 61850 Server

SNMP Agent

SNMP Agent configuration

On the Configuration page of the SNMP Agent, after enabling the SNMP Agent, the interface is as shown below:


SNMP Agent configuration interface parameters description:

  1. Port: The port number of SNMP, the default is 161
  1. Version: Three major versions are supported, namely V1, V2C, V3. The default is the V3 version used
  1. If the protocol version used is V3:
  1. User Name: The SNMPv3 secure name used to authenticate during communication.
  1. Enable Auth: Once enabled:
  1. Authentication Method: MD5 and SHA are supported
  1. Authentication password: Authentication mechanism, under authNoPriv and authPriv level, the authentication password needs to be provided to verify the identity of the sender of the message.
  1. Enable Encipher: When configuring SNMPv3 users, you need to ensure that the encryption option is enabled for each user and provide the corresponding encrypted password.
  1. Encryption Method: supports DES, AES128
  1. Encryption Password: Encrypts the content of the message.
  1. If using V1 and V2C:
  1. Community: This is similar to a password and is used to identify the user or management system that is allowed to access the SNMP agent
  1. Read/Write: Configure Read and write permissions of measuring points in the mapping table, support Read, Read/Write.
  1. Enable Trap: If enabled, SNMP Agent will detect whether the data of the mapping point has changed, and report Trap message if it has changed. When enabled:
  1. Trap Ip: The destination address IP of the reported Trap message
  1. Trap Port: The port of the destination address of the reported Trap message, default is 162
  1. Version: Three major versions are supported, namely V1, V2C, V3. The default is the V3 version used
  1. If the protocol version used is V3:
  1. Engine ID: The engine ID is used to generate and verify the security parameters of the message, such as authentication password and encryption password. Usually a hexadecimal string of variable length
  1. User Name: The SNMPv3 secure name used to authenticate during communication.
  1. Enable Auth:
  1. Authentication enabled or not: Once enabled:
  1. Auth Method: MD5 and SHA are supported
  1. Auth Password: Authentication mechanism, under authNoPriv and authPriv level, the authentication password needs to be provided to verify the identity of the sender of the message.
  1. Whether encryption is enabled or not: When configuring SNMPv3 users, you need to ensure that the encryption option is enabled for each user and provide the corresponding encrypted password.
  1. Auth Method: supports DES, AES128
  1. Auth Password: Encrypts the content of the message.
  1. If using V1 or V2C:
  1. Community: This is similar to a password and is used to identify the user or management system that is allowed to access the SNMP agent
  1. Mapping value setting: supports Data original value and Data caculation value. The default is Data original value (Data original value: the actual value collected by the southbound device; Data caculation value: the value after the gateway data caculation)

After configuring the SNMP Agent parameters, click the "Submit" button to enable the SNMP Agent function. In the status page of SNMP Agent, you can view the running status information.


Configure the SNMP Agent Mapping Table

The following image is to add the measurement point 1 of the southbound controller to the SNMP Agent:


Description of the parameters to add the mapping:

  1. Controller: Southbound controller device
  1. Measure: The measuring point in the southbound controller
  1. Read/Write: Same as the read and write permissions of the point in the southbound controller (immutable)
  1. Original Data Type: Same as the data type of the point in the southbound controller (immutable)
  1. Mapping Data Type: The data type of the measurement point in SNMP Agnet
  1. OID: The node address used to uniquely identify the management information. An OID is an identifier consisting of a series of numbers used to represent various objects in the network, such as devices, interfaces, parameters, etc. Each managed object is identified by a unique OID. The structure of an OID is a series of numbers separated by dots. In DSA OID is generated automatically

Shown below is to choose the point after 2, 4, generate the OID node address, measuring point correspondence address is 2, point 4 correspondence address is 3 (batch add OID node address mapping interface omitted ". 1.3.6.1.4.1.36153.1.2.0. ")


Introduction to Batch Add Map parameters:

  1. OID: After checking the measurement point that you want to add in bulk, press the checked measurement point from front to back to generate the node address range in turn.
  1. Mapping Data Type: The data type of the measuring point in the SNMP Agent

Appendix: Cloud services

Instructions for using standard MQTT cloud services

1. EMQX Client configuration

The EMQX's official website (https://www.emqx.com/zh/mqtt/public-mqtt5-broker), select online using MQTT client tool for testing


Click on "New Connection" in the pop-up window that opens, after filling in the Name field in the interface that pops up afterwards, the rest of the configuration does not need to be modified, and finally click on "Connect".



2. Edge Computing Gateway configuration

2.1 Connect to EMQX's free server

The data collection configuration for standard MQTT cloud services is shown in the diagram (for configuring the Modbus controller and instructions, please refer to the Quick Start):


2.2 Connect to EMQX's free server

On the “MQTT Cloud Service” page, after enabling cloud services, select "MQTT" in the "Cloud  Types" section and fill in the corresponding parameters.Here's the configuration information for our example:

  1. Server address: broker.emqx.io
  1. Client ID: Any ID that is unique to the server

Leave the rest as default

Click the "Submit" button when the configuration is complete, as shown below:


The description of each parameter is as follows:

Basic Settings:

  1. Server Address: The server address used to establish the MQTT network connection
  1. Client ID: Any ID that is unique to the server
  1. Enable Authority: Once enabled, you can set the MQTT username and password
  1. MQTT username: The Username needed to connect to the MQTT server after the server has enabled the authentication mechanism for username passwords
  1. MQTT password: The Password to be used to connect to the MQTT server after the server has enabled the authentication mechanism for username and password

Advanced Settings:

  1. Port: The port of the MQTT server address
  1. Keep Alive: The time interval at which the client sends heartbeats
  1. TLS encryption:
  1. Disable: Turns off TLS encryption
  1. Symmetric Encryption (client and server share one account and key) :
  1. Identity: The account number saved on the server and used to verify identity
  1. Pre-shared Key: The key associated with the account stored on the server that is used to encrypt the request or the digest of the request
  1. Asymmetric Encryption (client generates a unique key pair, and client and server share the public key) :
  1. Verification Method: Two types are supported: Verify client CA and Verify client cer and key
  1. Verify Server Cert: When enabled, the server certificate will be verified for validity
  1. Verify client CA: This uses a certificate issued by a third-party trusted certificate authority that is preinstalled with the gateway
  1. Verify client cer and key: It uses a certificate issued by a certificate authority it creates
  1. rootCA: The CA root certificate
  1. Client Private Key: The certificate file used for data encryption and decryption
  1. Client Cert: The certificate file used for client authentication
  1. Clear Session: It clears the session and reestablishes the session when the connection is disconnected and reconnected
  1. MQTT Version: The version of MQTT used by the connection when establishing MQTT

Last-Will and Testament:

  1. Topic: Will message topic
  1. Qos: Will message level
  1. Retain: When enabled, the broker keeps the latest messages and sends them to the subscriber as soon as a new MQTT client subscribes to the corresponding topic
  1. Payload: The published testament message
2.3 Publish the message to the MQTT server

Publish and subscribe messages in Message Management configuration after submission. Here's how to configure a publish message with the name inhand_pub and the Topic pubdata:


The publish message configuration parameters are described as follows:

  1. Name: user-defined release name (Note: this name is unique in the message management of all cloud services and the release message name in the custom fast function)
  1. Trigger Source Type: The type of the release message, supporting "Measuring Point Group" and "Alarm Message".
  1. Group/Label: Select according to the " Trigger Source Type ", if it is " Measuring Point Group ", select the group of the measuring point, if it is " Alarm Message ", select the label of the alarm.
  1. Hide Offline Data: When enabled, off-line measurement points will be blocked and no longer published
  1. Topic: A custom Topic
  1. Qos(MQTT): Publishes Qos, which is recommended to be consistent with the Qos of the MQTT server
  1. Entry Function: Keep the same name as the entry function in the script
  1. Quickfuction: Customize the group package and release logic using Python code. (Just use the default code provided)

Subscribe to messages in the EMQX online client

After the connection is successful, select the message type as JSON, click "New Subscription", in the pop-up window, Topic and Qos fill in the Topic and Qos of the message published by the gateway, and finally click "Confirm". Finally, you can view the data reported by the gateway

 



2.4 Subscribe to MQTT messages

Here's a subscribe message configured with the name inhand_sub,Topic subdata, and JSON Payload:


The subscribe message configuration parameters are explained as follows:

  1. Name: Custom subscription name (Note: this name is unique in the message management of all cloud services and the name of subscription messages in custom fast functions)
  1. Topic: The same as the publisher's Topic
  1. Qos (MQTT) : Subscribe to Qos, which is recommended to be consistent with the Qos of the MQTT server
  1. EntryFunction: Keep the same name as the entry function in the script
  1. Payload Type: Plaintext, Base64, JSON, HEX supported
  1. QuickFunction: Use Python code to customize the unpacking and subscription logic. When adding a subscription message, there is a default subscription script, and the default script can subscribe to the message. You can modify this script according to your needs.

Publish a message in the EMQX online client

Using the publish function of the online tool, fill out the publish message and choose JSON for the message type. The Topic, Qos and the Topic, Qos subscribed by the gateway are kept the same, and finally click the "Publish" button, that is, the published message can be viewed in the gateway log



Instructions for using MQTT SparkPlugB

1. Ignition Configuration

Use Ignition software to view the data uploaded by the gateway and the data delivered to the gateway. You can download the Ignition software Download Ignition by Inductive Automation


After installation, do the following



In the window that appears, select "Standard Edition." Set a username password and finally click on "Start Gateway"


Set the Ignition login username password



Download "Designer Launcher" and add Designer after installation





Click here to download the MQTT-Engine-signed.modl module.


Import the MQTT-Engine-signed.modl module you just downloaded from Config > Modules






After adding, an MQTT ENGINE configuration item will appear in the Config interface menu bar. Click to enter the Configuration




Uncheck these two functions. Fill in the address of the server, the EMQX server, for example, URL: TCP: / / broker. EMQX. IO: 1883. Finally click "Save Changes"




 

Once the configuration is complete, open the Designer Launcher software and double-click on the Designer you just added. Fill in Ignition's username and password.




Create a Project, just add a Project Name and finally click "Create New Project"



2. Edge Computing Gateway configuration

2.1 Data Collection Configuration

The data collection configuration for Standard MQTT Cloud Services is illustrated in the diagram (for Modbus controller setup and instructions, please refer to the Quick Start):


2.2 Connect to the MQTT server

On the MQTT Cloud Services page, after enabling cloud services, select "MQTT SparkPlugB" in the "Cloud Types" section and fill in the corresponding parameters.

This example uses the EMQX server as a case study. The sample configuration is as follows:

  1. Server Address: broker.emqx.io
  1. Client ID: Any unique ID for the server
  1. GroupID: The group to which the current gateway belongs. (Note: The gateway's SN is the Node ID)

The rest of the settings can be left as default.

After submitting the configuration, the gateway will automatically generate scripts for publishing and subscribing.

The parameters are explained as follows:

Basic Settings:

  1. Server Address: The server address used to establish the MQTT network connection
  1. Client ID: Any ID that is unique to the server
  1. GroupID: The group to which the current gateway belongs. (Note: The gateway's SN is the Node ID)
  1. Enable Authority: Once enabled, you can set the MQTT username and password
  1. MQTT username: The Username needed to connect to the MQTT server after the server has enabled the authentication mechanism for username passwords
  1. MQTT password: The Password to be used to connect to the MQTT server after the server has enabled the authentication mechanism for username and password

Advanced Settings:

  1. Port: The port of the MQTT server address
  1. Keep Alive: The time interval at which the client sends heartbeats
  1. TLS encryption:
  1. Disable: Turns off TLS encryption
  1. Symmetric Encryption (client and server share one account and key) :
  1. Identity: The account number saved on the server and used to verify identity
  1. Pre-shared Key: The key associated with the account stored on the server that is used to encrypt the request or the digest of the request
  1. Asymmetric Encryption (client generates a unique key pair, and client and server share the public key) :
  1. Verification Method: Two types are supported: Verify client CA and Verify client cer and key
  1. Verify Server Cert: When enabled, the server certificate will be verified for validity
  1. Verify client CA: This uses a certificate issued by a third-party trusted certificate authority that is preinstalled with the gateway
  1. rootCA: The CA root certificate
  1. Client Private Key: The certificate file used for data encryption and decryption
  1. Client Cert: The certificate file used for client authentication
  1. Verify client cer and key: It uses a certificate issued by a certificate authority it creates
  1. Clear Session: It clears the session and reestablishes the session when the connection is disconnected and reconnected
  1. MQTT Version: The version of MQTT used by the connection when establishing MQTT
2.3 Publish messages to the MQTT server

View the data published by the gateway via Ignition. (Note: The software cannot parse some data types because the values of the gateway and this software defined data type are different)



2.4 Subscribe to MQTT messages

Double-click the value of the point you want to modify in Ignition, and then type Enter. In the subsequent pop-up window, click "Write Once". Finally, you can see the modified value in the point monitor on the gateway.




Alibaba Cloud IoT User introduction

1. Alibaba Cloud Configuration

If you have already configured the corresponding products and devices in Alibaba Cloud's iot cloud platform, you can directly check the next section 4.1.3.2 Edge Computing Gateway Configuration. Otherwise, please follow the following process to configure the products and devices in the iot cloud platform. Visit Alibaba Cloud official website https://www.aliyun.com and log in. After logging in, select "Iot Platform".


Click "Activited" after entering the Iot Platform


1.1 Creating Product

Step 1: Create the product

Enter the following page and click "Create Product".


Here is an example of adding a street lighting product. Note: The data format only supports "ICA Standard Data Format", and the authentication method only supports "Device Secret".

Step 2: Define features for the product (optional)

Once created, click "Go to Function Definition"


Click "Edit Draft" to configure the feature definition for your product.


Click "Add Self-defined Feature" and configure the corresponding "services" and "events," see Add Single TSL Model for an introduction to services and events. Note: When configuring the service, the invocation mode only supports asynchronous.



Configuring the service (not required when using  Custom Topic)

 


Click "Add Parameter" under "Input Parameter" and configure the appropriate input parameters.

 

Configure the “Events” (you don't need to configure this when using custom Topic)

 

Under "Output Parameter" click "Add Parameter" and configure the appropriate output parameters.

 


Click "Release Online" when the configuration is complete to submit the configuration.


Step 3: Export the Object Model TSL

After the product configuration is completed, click "TSL Model" on the "Define Feature" page, then select "Full TSL" and click "Export TSL File" for subsequent use. Note: Do not select "reduced object model" when exporting object model, otherwise it may lead to abnormal data reporting.



1.2 Creating the device

Go to Devices > Devices > Device List and click Add Device.


Select the product created in the previous step and configure the other parameters.


Click "Learn more" to view the details of the device after adding successfully.

 

The "Device Information" page looks like this:


At this point, the corresponding products and devices have been configured in the iot cloud platform of Alibaba Cloud.

2. Edge computing gateway configuration

2.1 Data Collection Configuration

The data collection configuration for Standard MQTT Cloud Services is illustrated in the diagram (for Modbus controller setup and instructions, please refer to the Quick Start):

 

2.2 Connect to Alibaba Cloud

On the MQTT Cloud Service page, check "Enable Cloud " and select the type as "Alibaba Cloud" Alibaba Cloud IoT has two authentication methods: Unique-certificate-per-device Authentication and Unique-certificate-per-product. For detailed information about authentication methods, please refer to Alibaba Cloud device security certification

When connecting to Alibaba Cloud IoT using the " Unique-certificate-per-device Authentication " authentication method, choose the authentication method as " Unique-certificate-per-device Authentication." The example configuration is as follows:


The parameters are described as follows:

  1. Region ID: For the configuration of the Region ID, refer to the Region and zone document where the region name is East China 2, thus use cn-shanghai.


  1. Authentication Method: Choose the authentication method according to the actual situation, and use one machine and one secret this time
  2. ProductKey: Go to the "Devices > Devices >IoTTest" page, click "View" after "DeviceSecret" to copy the authentication information.


  1. DeviceName: Get the ProductKey of the same machine.
  2. DeviceSecret: Gets the ProductKey of the same machine secret of the method.
  3. TSL Model: Import the Thing Model file saved when importing Create product. Note: In "Message Management," if only "Custom Topic" type messages are used, importing the TSL Model is not necessary. 
The following figure shows the successful connection to Alibaba cloud IoT:

When using the authentication method of "Unique-certificate-per-product" to establish a connection with Alibaba Cloud IoT, choose the authentication method of "Unique-certificate-per-product". The example configuration is as follows:

 

Note:

When the authentication method is " Unique-certificate-per-product ", "Dynamic Registration" needs to be enabled.

Only non-activated devices support the establishment of connection with Alibab Cloud IoT through the mode of Unique-certificate-per-product and the device is automatically activated after the connection is established. After activation, the device switches to Unique-certificate-per-device Authentication connection with Ali Cloud IoT. You can check whether the device has an activation time on the device page to determine whether the device has been activated.



The parameters are explained as follows:

  1. Region ID: Same as Unique-certificate-per-device Authentication
  2. Auth Method: Choose the authentication method according to the actual situation, and use Unique-certificate-per-product this time
  3. ProductKey: Go to the page of "Devices > Devices > Aliyun IoT" and click "View" after "ProductSecret" to copy the authentication information.

  1. DeviceName: The name of the device, to obtain the ProductKey of the same machine.
  2. ProductSecret: Gets the ProductKey of the same type of method.
  3. TSL Model: Import the Thing Model file saved during the import of Create a productNote: It is not necessary to import the Thing Model when only using "Custom Topic" type messages in "Message Management."

The following figure shows the successful connection to Alibaba Cloud IoT:


2.3 Publish the message to Aliyun IoT

Add publish on the MQTT Cloud Service page. There are three types of Add publish supported: Custom Topic, Properties, and Events.

For the data format requirements during data reporting, refer to the TSL model development

Note: When using Attribute reporting and Event reporting, please ensure that the "TSL Model TSL" matches the thing model of the product in Alibaba Cloud IoT.

2.3.1 Custom Topic

An example configuration for Posting a message with a Custom Topic type is as follows:


The Posting message configuration parameters are described as follows:

  1. Name: user-defined release name (Note: this name is unique in the message management of all cloud services and the release message name in the custom fast function)
  1. Trigger Source Type: The type of the release message, supporting "Measuring Point Group" and "Alarm Message".
  1. Group/Label: Select according to the "Trigger Source Type", if it is Measuring Point Group", select the group of the measurement point, if it is "Alarm Message", select the label of the alarm.
  1. Hide Offline Data: When enabled, off-line measurement points will be blocked and no longer published
  1. Type: Support "Custom Topic", "Properties", "Events".
  1. Topic: Publish Topic, which is consistent with the Topic class whose "Operation Authorization" is "Publish" in "Devices > Products > AliyunIoT > Topic Categories > Topic Category" page of Aliyun IoT. Note: The ProductKey and DeviceName information in the theme will be completed automatically. Just copy the topic information after ${deviceName}/ when configurating the theme.


  1. Qos(MQTT) : Published Qos, recommended to be consistent with the Qos of the MQTT server.
  1. Entry Function: Keep the same name as the entry function in the script
  1. QuikFunction: Use Python code to customize the group package and publishing logic. When adding publishing messages, there is a default publishing script, and the default script can publish messages. You can modify this script according to your needs.
2.3.2Properties

You can go to "Devices> Product > Aliyun IoT > Define Feature" page to view the product attribute events and other information. The example product has an attribute named "Working Status" with the identifier of "LightStatus". Using the example script, the value of the "LightStatus" variable can be uploaded to Alibaba Cloud IoT through the attribute report, and the configuration is as follows.


Please refer to Custom topic for the description of the configuration parameters of the release message.

Use the default Topic.

Example function code:

# Enter your python code.

import json

import random

from common.Logger import logger

from quickfaas.aliyuniot import thing_post_property

def main(message):

    logger.debug(message)

    for measure in message['measures']:

        if measure['name'] == 'LightStatus':

            thing_post_property(__topic__, {"LightStatus": measure['value']})  

The attribute status can be viewed in "Devices> Devices > IoTTest > TSL Data > Status" page of Alibaba Cloud IoT.


Events

You can go to the "Device Management > Product > Ali Cloud IoT > Function Feature" page to view the product's attribute events and other information. The sample product has an event named "Event test" with an identifier of "event_test". Using the example script, the value of "event_test" variable can be uploaded to Alibaba Cloud IoT through event reporting, as configured below.

See Custom topic for a description of the configuration parameters for publishing messages.

Use the default Topic.

Example function code:

# Enter your python code.

import json

import random

from common.Logger import logger

from quickfaas.aliyuniot import thing_trigger_event

 

 

def main(message):

    logger.debug(message)

    if message['measureName'] == 'event_test':

       thing_trigger_event(__topic__, ("event_test", {"ErrorCode": message['value']}))

When triggering an event report, you need to configure an alarm rule for the "event_test" measurement point. The alarm information is as follows (for configuring alarm rules, please refer to: 2.2 Alarm Rules):

 

After configuring the alarm rule, modifying the measurement point's value to be greater than 15 will trigger an event message report. You can view the property status on the "Devices > Devices > IoTTest > TSL Data > Events" page in Alibaba Cloud IoT.

 


2.4 Subscribe to Aliyun IoT's messages

On the MQTT Cloud Services page, add subscription messages under "Message Management > Subscribe". Subscription messages support four types of messages: Custom Topic, Service Call, Property Setting and RRPC.

2.4.1 Custom topic

An example configuration with a custom topic message type is as follows:


The subscribe message configuration parameters are explained as follows:

  1. Name: Custom subscription name (Note: this name is unique in the message management of all cloud services and the name of subscription messages in custom fast functions)
  2. Type: Support 4 types, namely: Custom Topic, Service Call, Property Setting, RRPC.
  3. Topic: Subscribe Topic, which is consistent with the Topic class whose "operation permission" is "Subscribe" in "Devices > Products > Ali Cloud IoT > Topic Categories > Topic Category" page of Ali Cloud IoT. Note: The ProductKey and DeviceName information in the topic will be completed automatically. Just copy the topic information after ${deviceName}/ when configurating the topic.
  4. Qos: Subscribe to Qos, default is 1.
  5. Entry Function: Keep the same name as the entry function in the script
  6. Payload types: Plaintext, Base64, JSON, HEX supported
  7. QuickFunction: Use Python code to customize the unpacking and subscription logic. When adding a subscription message, there is a default subscription script, and the default script can subscribe to the message. You can modify this script according to your needs.
2.4.2 Service Call

The following is an example of a service call that can accept the "Service test" setup instruction issued by Aliyun IoT. Note: When using the service test, make sure that the "TSL Model" in the gateway is consistent with the thing model of the product in Aliyun IoT.


For the explanation of Service Call parameters, please refer to Custom Topic. (Note: Unlike Custom Topic, you need to modify the default Topic. The service identifier can be obtained under "Devices > Product> Aliyun IoT >Define Feature ").

 

Example function code:

# Enter your python code.

import json

import random

from common.Logger import logger

from quickfaas.aliyuniot import thing_answer_service

 

def main(topic, payload):

    logger.info(topic)

    topic = topic + "_reply"

    thing_answer_service(topic, {"Power": random.randint(0, 10)})

Enter the "Maintenance > Online debug > Debugging real equipment > service calls" page of Alibaba Cloud IoT to select the corresponding products and equipment for service call test; Check the service call information in the "Devices > Devices > IoTTset> TSL Model> Invoke Service" page.




2.4.3 Property Settings

The following is an example of property setting, which can accept the "Working status" instruction issued by Ali Cloud IoT. Note: When using the property Settings, make sure that the "TSL Model" in the gateway is consistent with the TSL Model of the product in Aliyun IoT.


Please refer to Custom topic for instructions on subscribe message configuration parameters.

Example function code:

# Enter your python code.

import json

from common.Logger import logger

from quickfaas.measure import write_plc_values

def write_callback(message, userdata):

    logger.debug("write plc response: %s, userdata:%s" % (message, userdata))

def main(topic, payload, cloudName):

    logger.debug("subscribe topic: %s, payload: %s, cloudName: %s" % (topic, payload, cloudName))

    write_plc_values(message={"LightStatus":json.loads(payload)['params']['LightStatus']}, callback=write_callback, userdata="")

Enter the "Maintenance > Online Debug > Debugging real equipment > Property Debugging" page of Ali Cloud IoT to select the corresponding products, devices, debugging functions and methods for attribute setting testing; Check the running status of the equipment in the "Devices > Devices> IoTTest >TSL Model > Status" page.



2.4.4 RRPC

See Custom topic for instructions on subscribe message configuration parameters. (Note: Please select Base64 for Payload type)

Example code function:

# Enter your python code.

import json

import base64

from common.Logger import logger

from quickfaas.aliyuniot import thing_answer_rrpc

 

 

def main(topic, payload):

    logger.debug(topic)

    logger.debug(base64.b64decode(payload))

    topic = topic.replace("request", "response")

    thing_answer_rrpc(topic, payload)

After configuring the gateway, click the link here to enter the interface of calling RRPC service.


When the value of "success" in the result information is true, the delivery is considered successful

"RequestBase64Byte" means you want to send a Base64-encoded message. For example, the Base64-encoded value for {" Power ":1} is eyJQb3dlciI6IDF9.

Finally, you will be able to view the sent message in the gateway log


AWS IoT Instructions

1. AWS IoT Configuration

If you've already configured the things, policies, and certificates in the AWS IoT console, you can go straight to the next section 4.1.4.2 Edge Computing Gateway Configuration. Otherwise, follow the process below to configure the IoT console. Visit the AWS official website https://aws.amazon.com/ and log in to the console. Users in China region can use AWS services in AWS China region at https://cn-northwest-1.console.amazonaws.cn. It should be noted that the data of the two are independent of each other. Select "IoT Core" after logging into the console, or "AWS IoT" when using AWS services in China. Once logged in, search for "Amazon IoT" and once inside create an item and attach policies and download certificates.










2. Edge Computing Gateway configuration

2.1 Data Collection Configuration

The data collection configuration for the Standard MQTT Cloud Service is illustrated in the diagram (for Modbus controller setup and instructions, please refer to the Quick Start):


2.2 Connect to AWS IoT

On the MQTT Cloud Services page, check "Enable Cloud" and select the type as "AWS IoT." An example configuration is as follows:


The parameters are described as follows:

  1. Endpoint: The address of the AWS IoT end node, which can be obtained from the "Settings" page of AWS IoT. Remove the "-ats" from the address when using "VeriSign Class 3 Public Primary G5 Root CA Certificate"

  2. Client ID: Any unique ID
  3. Certificate For Thing: Import the item certificate downloaded when creating the item or a custom certificate
  4. Private key: Import the private key downloaded when creating the item or a custom private key
  5. rootCA: Import the CA certificate used for server authentication, you can either import the CA1 certificate downloaded when creating the item, or download the corresponding CA certificate from here (Amazon Root CA1 or Starfield Root CA certificate is recommended). "Amazon Root CA 3" certificates are not currently supported
  6. Port: 8883

Use the default configuration for the rest


2.3 Publish messages to AWS IoT

Add a publish message in MQTT Cloud Service > Message Management with the following configuration:


Example function code:

# Enter your python code.

import json

from common.Logger import logger

from quickfaas.awsiot import awsiot_publish

 

 

def main(message):

    logger.debug(message)

    awsiot_publish(__topic__, json.dumps(message), __qos__)

The publish message configuration parameters are described as follows:

  1. Name: user-defined release name (Note: this name is unique in the message management of all cloud services and the release message name in the custom fast function)
  2. Trigger Source Type: The type of the published message, supporting "Measuring Point Group" and "Alarm Message".
  3. Group/Label: Select according to the " Trigger Source Type ", if it is " Measuring Point Group ", select the group of the measurement point, if it is " Alarm Message ", select the label of the alarm.
  4. Hide Offline Data: When enabled, off-line measurement points will be blocked and no longer published
  5. Topic: Custom Topic
  6. Qos(MQTT) : QoS is released
  7. Entry Function: Keep the same name as the entry function in the script
  8. QuikFunction: Customize the group package and release logic using Python code.

Subscribe to messages in AWS IoT

Go to the "test /MQTT test client" page of AWS IoT and enter the publishing Topic of the gateway in "Subscribe to a topic", this document is awsiot/test.


After subscribing to the message, after subscribing to the topic, you can view the content of the received message in the Subscribe topic page.


2.4 Subscribe to AWS IoT messages

Add a subscribe message in MQTT Cloud Services > Message Management with the following configuration:


  1. Name: Custom subscription name (Note: this name is unique in all cloud services' message management and subscription messages in custom fast functions)
  1. Topic: The subscription topic, which is consistent with the topics published by AWS
  1. Qos(MQTT) : Subscribe to Qos, defaults to 1.
  1. Entry Function: Keep the same name as the entry function in the script
  1. Payload Type: Plaintext, Base64, JSON, HEX supported
  1. QuickFunction: Use Python code to customize the unpacking and subscription logic. When adding a subscription message, there is a default subscription script, which can subscribe to the message. You can modify this script according to your needs.

Configure the Topic and Payload of the published message in AWS. After clicking Publish, the published message will be viewed in the gateway's log




Instructions for Azure IoT

1. Azure IoT Configuration

If you have already configured the corresponding IoT Hub and IoT device in Azure IoT, you can directly check the next section Edge Computing Gateway configuration. Otherwise, follow the process below to configure Azure IoT. Log in to Azure by visiting https://portal.azure.cn/.

1.1 Creating the device

Once logged in to Azure, select "IoT Hub"



Click "Create" to create an IoT Hub.



Click "Create new" to create a resource group, or use an existing resource group.




After successful creation, create a device. It looks like this:




The following screenshot shows the successful creation:


2. Edge Computing Gateway configuration

2.1 Data Collection Configuration

The data collection configuration for the Standard MQTT Cloud Service is illustrated in the diagram (for Modbus controller setup and instructions, please refer to the Quick Start):


2.2 Connect Azure IoT

On the MQTT Cloud Service page, select Enable Cloud Service and set Type to Azure IoT. The following is an example configuration:


The parameters are described as follows:

  1. Auth Method: There are three authentication methods (Symmetric Key; X.509 Self-Signed; X.509 CA Signed), chosen based on the type of authentication the device was created with.
  1. Connection String: The primary connection string of the Azure IoT Device, you can select the appropriate device from Azure IoT's IoT Hub and copy the primary connection string to here

2.3 Publish messages to Azure IoT

Add a publish message in MQTT Cloud Services > Message Management with the following configuration:


The release message configuration parameters are explained as follows:

  1. Name: user-defined release name (Note: this name is unique in the message management of all cloud services and the release message name in the custom fast function)
  2. Trigger Source Type: The type of the release message, supporting "Measuring Point Group" and "Alarm Message".
  3. Group/Label: Select according to the " Trigger Source Type ", if it is " Measuring Point Group ", select the group of the measurement point, if it is " Alarm Message ", select the label of the alarm.
  4. Hide Offline Data: When enabled, off-line measurement points will be blocked and no longer published
  5. Topic: A custom Topic
  6. Qos(MQTT) :Qos is released
  7. Entry Function: Keep the same name as the entry function in the script
  8. QuickFunction: Customize the group package and release logic using Python code. (Just use the default code provided)

Use VS Code's Azure IoT Tools plugin to establish a connection to IoT Hub

Once you've posted your message after submitting, use the Azure IoT Tools plugin of Visual Studio Code software (hereinafter referred to as VS Code) to view the messages sent to Azure IoT. You can visit: https://code.visualstudio.com/Download for the corresponding Visual Studio Code software (hereinafter referred to as the v Code). Once VS Code is installed, open VS Code and click on "Extensions", enter Azure IoT Tools in the search box and install the Azure IoT Tools plugin.


 

You can see the Azure module on the left after the installation.


Click on "Explorer > AZURE IOT HUB" to expand AZURE IOT HUB. Click on "... > Set IoT Hub Connection String "Set the IoT Hub connection string. Enter the IoT Hub connection string in the prompt box. The connection string for the IoT Hub is available from the "Policy Name > iothubowner" page for the specified IoT hub.

 


Enter the connection string and press Enter under "AZURE IOT HUB" to see the created Azure IoT Device and the connection status.

Right click on the specified Azure IoT Device and select Start Monitoring Built-in Event Endpoint from the menu to see the data pushed by the gateway to the IoT Hub.


Fill in the string shown below in the pop-up window to view the reported data



2.4 Subscribe to Azure IoT messages

Add a subscribe message in MQTT Cloud Services > Message Management with the following configuration:


  1. Name: Custom subscription name (Note: this name is unique in all cloud services' message management and subscription messages in custom fast functions)
  1. Topic: The subscription topic, which is consistent with the topics published by AWS
  1. Entry Function: Keep the same name as the entry function in the script
  1. Payload Type: Plaintext, Base64, JSON, HEX supported
  1. QuickFunction: Customize unpacking and subscription logic using Python code. This script can be modified according to your needs.

Example function code:

# Enter your python code.

import json

from common.Logger import logger

def main(topic, payload)

    logger.debug(topic)

    logger.debug(json.loads(payload))

Right click on the specified Azure IoT Device and select Send C2D Message to Device from the menu to send the data to the gateway.


Enter the data you want to send in the send box, such as {" message ":" hello "}


After hitting Enter to send the data, you can see a log of the successful delivery of the message in the Output window


At the same time, you can also view the sent message in the log of the gateway side

 


Appendix: Exported configuration files

Measuring Point CSV File Parameter Description

  1. MeasuringPointName: measuringPointName
  1. ControllerName: The name of the controller to which it belongs
  1. GroupName: Group to which it belongs
  1. UploadType: Upload mode; supports periodic, onchange, and never
  1. DeadZonePercent: Change dead zone
  1. DataType: The type of data
  1. ArrayIndex: The array index. This parameter should be configured for the OPC UA protocol or OPC UA PUBSUB protocol
  1. EnableBit: This is a bitwise value
  1. BitIndex: Bits
  1. reverseBit: Take the inverse
  1. -Sheldon: The Address.
  1. Decimal: The number of decimal places, only configured when the data type is a FLOAT or DOUBLE
  1. Len: Length, only configured for STRING data type
  1. CodeType: The character encoding format, only configured for STRING data type
  1. ReadWrite: Read and write permission
  1. Unit: Unit
  1. -Sheldon: The Description.
  1. Transform Type: data operation, none, gain, zoom, ptct, PT/CT, bit, numMapping, numeric mapping.
  1. MaxValue: upper limit of data
  1. MinValue: Lower bound on the data
  1. MaxScale: Upper limit of proportion
  1. MinScale: Lower limit of scale
  1. Gain: Multiplier
  1. Offset: The offset
  1. startBit: The starting bit
  1. endBit: The end bit
  1. Pt: Pt
  1. Ct: Ct
  1. Mapping_table: Map table for numeric mappings, for example to configure original value as 1, map value as 2, the content of this entry is [{'source': 1, 'target': 2}]
  1. TransDecimal:
  1. bitMap: Enables numeric mapping to 1 when the data type is BIT, or after using bit interception, and 0 otherwise
  1. msecSample: When the controller enables packet reporting, the measurement point is configured to be 1 when packet reporting is enabled, and 0 otherwise
  1. storageLwTSDB: Stores historical data
  1. DataEndianReverse: The test point byte order of the test point of the simple drive protocol, which is 0 when consistent with the controller and 1 when opposite to the controller
  1. ReadOffset: Start reading bytes
  1. ReadLength: Reads the length in bytes
  1. WriteOffset: Start writing bytes
  1. WriteLength: The length in bytes to write
  1. DataParseMethod: The resolution method of the measure point for the simple drive protocol
  1. BitId: Obsolete
  1. pollCycle: Polling cycle. 0 is polling cycle, 1 is polling cycle 2

Grouping CSV File parameter instructions

  1. GroupName: Group name
  1. UploadInterval: Reporting period
  1. EnablePerOnchange: Periodically report Onchange data
  1. OnchangePeriod: Onchange reporting period
  1. LwTSDBSize: Maximum number of entries. Range 1-150000
  1. strategy: Store the strategy. 1: Synchronize with the reporting cycle; 2: independent storage cycle
  1. storagePeriod: Storage period in seconds. Range 1-86400
  1. historyDataMode: Storage method. gateway: Gateway storage; usb: USB; sd: SD card
  1. historyDataPath: Storage path

Alarm Rules CSV file parameter description

  1. AlarmName: Alarm name
  1. ControllerName: Controller name
  1. MeasuringPointName: MeasuringPointName
  1. AlarmLevel: Alarm level
  1. Condition1: Judge condition 1. "=", "! = ", ">", "p", "<", "" or less is the corresponding" eq ", "neq", "gt" and "egt", "lt" and "elt.
  1. Operand1: Determines the numerical value of condition 1, which can only be an integer or decimal number
  1. CombineMethod: Determines the condition. None: no logical condition; and: && logical condition; Or: | | logical condition
  1. Condition2: judge condition 2. "=", "! = ", ">", "p", "<", "" or less is the corresponding" eq ", "neq", "gt" and "egt", "lt" and "elt.
  1. Operand2: Determines the numerical value of condition 2, which can only be an integer or decimal number
  1. AlarmContent: The alarm content, which cannot be longer than 70 characters
  1. AlarmTag: Alarm tag

Alarm tag CSV file parameter description

  1. AlarmLableName: Alarm label name, ranging from 1-240 bytes

Description of CSV file parameters for setting up cloud measurement points

  1. MeasuringPointName: The name of the measuring point
  1. ControllerName: The name of the controller
  1. GroupName: Group name
  1. UploadName: The name of the upper cloud measurement point
  1. Hide: Shield. 0 is for not masking the measurement point; 1 is a shielded measurement point

Map table CSV file parameter description

Modbus TCP Slave

  1. Measuring Point Name: Measuring point name
  1. Controller Name: The name of the controller to which the measuring point belongs
  1. readWrite: read and write permission, the value is the same as the read and write permission of the measure point in the controller.
  1. Data Type: The original data type, which is consistent with the data type of that measure point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This matches the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, or null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. Start Mapping Address: The start address in the registers of Modbus TCP Slave.

IEC 104 Server

  1. Measuring Point Name: The name of the measuring point
  1. Controller Name: The name of the controller to which the measuring point belongs
  1. Data Type: The original data type that matches the data type of the point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This matches the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, or null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. ASDU: ASDU address, select from the Server list in the IEC 104 Server configuration. Range 0-65534
  1. Type Id: Type ID
  1. startIOA: Starting IOA address, range 1-16777215

Modbus RTU Slave

  1. Measuring Point Name: Measuring point name
  1. Controller Name: The name of the controller to which the measuring point belongs
  1. readWrite: read and write permission, the value is the same as the read and write permission of the measure point in the controller.
  1. Data Type: The original data type, which is consistent with the data type of that measure point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This corresponds to the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, and null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. Start Mapping Address: Start address in the registers of the Modbus RTU Slave.

IEC 101 Server

  1. Measuring Point Name: The name of the measuring point
  1. Controller Name: The name of the controller to which the measuring point belongs
  1. readWrite: read and write permission, the value is the same as the read and write permission of the measure point in the controller.
  1. Data Type: The original data type, which is consistent with the data type of that measure point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This matches the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, or null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. ASDU: ASDU address, select from the Server list in the IEC 101 Server configuration. Range 0-65534
  1. Type Id: Type ID
  1. startIOA: Starting IOA address, range 1-16777215

SL651

  1. Measuring Point Name: Measuring point name
  1. Controller Name: The name of the controller to which the measuring point belongs
  1. readWrite: read and write permission, the value is the same as the read and write permission of the measure point in the controller.
  1. Data Type: The original data type that matches the data type of the point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This matches the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, or null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. Identifi: Feature type

HJ212 Client

  1. Measuring Name: The name of the measuring point
  1. Controller Name: The controller
  1. readWrite: read and write permissions, values to be consistent with the read and write permissions of the measure points in the controller.
  1. Data Type: The original data type, which is consistent with the data type of that measure point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This matches the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, or null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. Encode: The code of the monitor factor
  1. Block: data set

BACnet Server

  1. Control Name: Controller
  1. Measuring Point Name: Measuring point name
  1. Read/Write: read and write permissions, values that match the read and write permissions of the measure points in the controller.
  1. Data Type: The original data type, which is consistent with the data type of that measure point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This is consistent with the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, or null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. Object Type: The object type. Analog input: AI, analog output: AO, analog value: AV, polymorphic input: MSI, polymorphic output: MSO, polymorphic value: MSV
  1. Instance Number: Instance number, range 0-511

DNP3 Outstation

  1. Measuring Name: The name of the measuring point
  1. Controller Name: The controller
  1. readWrite: read and write permissions, values to be consistent with the read and write permissions of the measure points in the controller.
  1. Data Type: The original data type, which is consistent with the data type of that measure point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This matches the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, or null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. Object Type: The address type of the mapped address
  1. Instance Number: Mapped address

IEC 61850 Server

  1. Measuring Name: The name of the measuring point
  1. Controller Name: The controller
  1. readWrite: read and write permissions, values to be consistent with the read and write permissions of the measure points in the controller.
  1. Data Type: The original data type, which is consistent with the data type of that measure point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This matches the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, or null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. CDC Type: Data object type
  1. Data Attribute Reference: Mapping address
  1. Add Data Set: Add to the data set
  1. Data Set Name: Data set name

SNMP Agent

  1. Measuring Name: The name of the measuring point
  1. Controller Name: The controller
  1. readWrite: read and write permissions, values to be consistent with the read and write permissions of the measure points in the controller.
  1. Data Type: The original data type, which is consistent with the data type of that measure point in the controller
  1. Mapping Data Type: The mapping data type
  1. EnableBit: This corresponds to the bitwise value of the point in the controller, which is 1 if the point is enabled, 0 if it is not enabled, and null if it is not configured. For example, EnableBit is null if the point's raw data type is FLOAT.
  1. OID: Address of OID node

Custom parameters CSV file parameter instructions

  1. Note: The exported CSV file does not contain information about SN and MAC
  1. key: Parameters
  1. value: The value of the parameter

Description of cloud service profile parameters

Standard MQTT cloud service

  1. "clouds" : Configuration information for cloud services
  1. "type" : "Standard MQTT"
  1. "cacheSize" : Cache size setting, ranging from 1 to 65535
  1. "enable" : 0: Disable the cloud service, 1: enable the cloud service
  1. "args" : set of parameters specific to different cloud services
  1. "host" : server address
  1. "clientId" : client ID
  1. "auth" : 0: User authentication is not enabled; 1: user authentication is enabled
  1. "username" : The username
  1. "passwd" : Password
  1. "key" : client private key
  1. "cert" : Client certificate
  1. "rootCA" : CA certificate
  1. "port" : Port number
  1. "keepalive" : to Keep Alive
  1. "tls" : 0: TLS encryption is not enabled; 1: symmetric encryption; 2: asymmetric encryption
  1. "cleanSession" : Cleansession the Session
  1. "mqttVersion" : MQTT version; V3.1 / v3.1.1
  1. "tlsAuth" : authentication method (" caSigned ": CA signature; "caSelfSigned" : CA self-signed)
  1. "verifyServer" : Verifies the server certificate
  1. "willTopic" : Will message Topic
  1. "willQos" : Will message Qos
  1. "willRetain" : Will message Retain
  1. "willPayload" : Will message Payload
  1. "rootCA_content" : CA certificate content
  1. "cert_content" : client private key content
  1. "key_content" : client certificate content
  1. "uploadRules" : The configuration of the upper cloud measurement point
  1. "quickfaas" : Message management configuration
  1. "uploadFuncs" : Publish script configuration
  1. "downloadFuncs" : Subscribe to the script configuration

MQTT SparkPlugB

  1. "clouds" : Configuration information for cloud services
  1. "type" : "Standard MQTT"
  1. "cacheSize" : Cache size setting, ranging from 1 to 65535
  1. "enable" : 0: Disable the cloud service, 1: enable the cloud service
  1. "args" : set of parameters specific to different cloud services
  1. "host" : server address
  1. "clientId" : client ID
  1. "groupId" : group ID
  1. "auth" : 0: User authentication is not enabled; 1: user authentication is enabled
  1. "username" : The username
  1. "passwd" : Password
  1. "key" : client private key
  1. "cert" : Client certificate
  1. "rootCA" : CA certificate
  1. "port" : Port number
  1. "keepalive" : to Keep Alive
  1. "tls" : 0: TLS encryption is not enabled; 1: symmetric encryption; 2: asymmetric encryption
  1. "cleanSession" : Cleansession the Session
  1. "mqttVersion" : MQTT version; V3.1 / v3.1.1
  1. "tlsAuth" : authentication method (" caSigned ": CA signature; "caSelfSigned" : CA self-signed)
  1. "verifyServer" : Verifies the server certificate
  1. "willTopic" : Will message Topic
  1. "willQos" : Will message Qos
  1. "willRetain" : Will message Retain
  1. "willPayload" : The will message Payload
  1. "rootCA_content" : CA certificate content
  1. "cert_content" : client private key content
  1. "key_content" : client certificate content
  1. "uploadRules" : The configuration of the upper cloud measurement point
  1. "quickfaas" : Message management configuration
  1. "uploadFuncs" : Publish script configuration
  1. "downloadFuncs" : Subscribe to the script configuration

Aliyun IoT

  1. "clouds" : Configuration information for cloud services
  1. "type" : "Aliyun IoT"
  1. "cacheSize" : Cache size setting, range 1 to 65535
  1. "enable" : 0: Disable the cloud service, 1: enable the cloud service
  1. "args" : set of parameters specific to different cloud services
  1. "host" : Region ID
  1. "connType" : Authentication type: 0: one machine one secret; 1: one type, one conntype
  1. "productKey" : Aliyun ProductKey
  1. "deviceName" : Aliyun DeviceName
  1. "deviceSecret" : Aliyun DeviceSecret (one machine, one secret)
  1. "productSecret" : Aliyun ProductSecret (One type One Secret)
  1. "thingTSL" : Ali Cloud Thing model TSL
  1. "port" : port number
  1. "keepalive" : to Keep Alive
  1. "tls" : 0: off; 1: enabled
  1. "cleanSession" : Clears the Session
  1. "mqttVersion" : MQTT version; V3.1 / v3.1.1
  1. "uploadRules" : Configuration of measuring points on the cloud
  1. "quickfaas" : Message management configuration
  1. "uploadFuncs" : Publish script configuration
  1. "downloadFuncs" : Subscribe to the script configuration

AWS IoT

  1. "clouds" : Configuration information for cloud services
  1. "type" : "AWS IoT"
  1. "cacheSize" : Cache size setting, ranging from 1 to 65535
  1. "enable" : 0: Disable the cloud service, 1: enable the cloud service
  1. "args" : set of parameters specific to different cloud services
  1. "endPoint" :    AWS IoT endpoint node
  1. "clientId" : client ID
  1. "cert" : The certificate of the item
  1. "key" : The private key
  1. "rootCA" : CA certificate
  1. "port" : Port number
  1. "keepalive" : to Keep Alive
  1. "cleanSession" : To clear the Session
  1. "mqttVersion" : MQTT version; V3.1 / v3.1.1
  1. "rootCA_content" : CA certificate content
  1. "cert_content" : The certificate content of the item
  1. "key_content" : Private key content
  1. "uploadRules" : Uploading cloud measurement point configuration
  1. "quickfaas" : Message management configuration
  1. "uploadFuncs" : Publish script configuration
  1. "downloadFuncs" : Subscribe to the script configuration

Azure IoT

  1. "clouds" : Configuration information for cloud services
  1. "type" : "AWS IoT"
  1. "cacheSize" : Cache size setting, ranging from 1 to 65535
  1. "enable" : 0: Disable the cloud service, 1: enable the cloud service
  1. "args" : set of parameters specific to different cloud services
  1. "authType" : authentication method
  1. "connectionString" : Azure IoT connection string
  1. "uploadRules" : configuration of measurement points on the cloud
  1. "quickfaas" : Message management configuration
  1. "uploadFuncs" : Publish script configuration
  1. "downloadFuncs" : Subscribe to the script configuration

Developer Guide

QuickFunction API Reference

This section describes the Python API used internally by the gateway, which provides a set of featent-rich interfaces that enable users to implement various operations and data processing on the gateway by writing Python scripts. This section will provide you with the necessary information and sample code to help you take full advantage of the features and performance of the product.

1. Publish Measuring Points/Alarms/Custom Data to cloud (publish QuickFunction)

  1. import API for publishing data to the cloud API:

API:from quickfaas.remotebus import publish

publish(topic, payload, qos=1, wizard_data=None, cloud_name="default")

  1. topic: The topic to publish the data on
  1. payload: The payload of the published data
  1. qos: The message level at which the data is published
  1. wizard_data: When the first push message fails, it is stored in the offline cache according to the topic, payload, qos specified by wizard_data (or using the sent topic, payload, qos if wizard_data is not specified), waiting for the connection to be restored and then uploaded to the MQTT server in chronological order
  1. The wizard_data format is as follows:

{"topic":<topic>, "qos":<qos>, "payload":<payload>}

  1. cloud_name: This specifies which cloud to publish to and can be used when multiple clouds are used together

When configuring the "publish" fast function, the message parameter of the fast function has two formats (depending on whether it is passed to wizard_api or not).

The entry function contains wizard_api parameter. The following script is an example (default script)

# Enter your python code.

import json

from common.Logger import logger

from quickfaas.remotebus import publish

def main(message, wizard_api, cloudName):

    logger.debug("publish topic:%s, payload: %s, cloudName: %s" % (__topic__, message, cloudName))

    publish(__topic__, json.dumps(message), __qos__, cloud_name=cloudName)

Example of the incoming message data format:

{

    "timestamp": 1713498600,

    "timestampMsec": 1713498600121,

    "group_name": "default",

    "values": {

        "Modbus": {

            "word": {

                "raw_data": 22,

                "timestamp": 1713498592,

                "status": 1,

                "timestampMsec": 1713498592261

            }

        }

    }

}

The Entry Function does not contain a wizard_api parameter, and an example script looks like this:

# Enter your python code.

import json

from common.Logger import logger

from quickfaas.remotebus import publish

def main(message, cloudName):

    logger.debug("publish topic:%s, payload: %s, cloudName: %s" % (__topic__, message, cloudName))

    publish(__topic__, json.dumps(message), __qos__, cloud_name=cloudName)


Example of the incoming message data format:

{

    "timestamp": 1713498680,

    "timestampMsec": 1713498680121,

    "group": "default",

    "measures": [

        {

            "ctrlName": "Modbus",

            "name": "word",

            "health": 1,

            "timestamp": 1713498672,

            "timestampMsec": 1713498672278,

            "value": 22

        }

    ]

}

2. Update the controller's measure-point values

Import the API for writing measure-point values:

from quickfaas.measure import write

from quickfaas.measure import write_plc_values (recommended)

Write

  1. API prototype (write) :

write(message, timeout=60, cloudName=None)

  1. message: Write a metering point message in the following format:

Format 1: {"measures1": 12}. If the measurepoint name is duplicated or does not exist, an exception will be thrown indicating that the write value has failed

Format 2: {"controller1": {"measures1": 12}}

Format 3: [{" name ":" controller1 ", "measures" : [{" name ":" measures1 ", "value" : 12}]}]

  1. timeout: Write the timeout of the response of the measure point, the default is 60S
  1. cloudName: It represents which cloud platform invokes the write instruction (used to determine whether the measurement point under the current cloud platform is blocked or renamed), optional

An example script is as follows (write) :

from common.Logger import logger

from quickfaas.measure import write

def action_name():

    write_request = {"measures1": 12}

    logger.debug('write plc response: %s' % write(write_request))

 

    write_request = {"controller1": {"measures1": 12}}

    logger.debug('write plc response: %s' % write(write_request))

   

    write_request = [{"name": "controller1", "measures":[{"name": "measures1", "value": 12}]}]

logger.debug('write plc response: %s' % write(write_request))

Format 1 and Format 2 return data content (write) :

[

    {

        "device": "controller1",

        "var_name": "measures1",

        "result": "OK"   ,# "OK" for success, "Failed" for failure

        "error": "Success"

    }

]

Format 3's return data content (write) :

[

    {

        "name": "controller1",

        "measures":[

            {

                "name": "measures1",

                'error_code': 0, # 0 for success, non-0 for failure

                 "error_reason": "Success"

            }

        ]

    }

]

write_plc_values (recommended)

API prototype (write_plc_values) :

write_plc_values(message, callback=None, userdata=None, timeout=60, cloudName=None)

  1. message: Write a measuring point message in the following format:

Format 1: {"measures1": 12}. If the measurepoint name is duplicated or does not exist, an exception will be thrown indicating that the write value has failed

Format 2: {"controller1": {"measures1": 12}}

Format 3: [{" name ":" controller1 ", "measures" : [{" name ":" measures1 ", "value" : 12}]}]

  1. callback: Write the callback function to be executed when the PLC value returns

For DS1.0 compatibility, the callback function also supports three arguments

  1. userdata: The parameter passed to the callback function
  1. timeout: The timeout to write the response of the point, the default is 60S
  1. cloudName: It represents which cloud platform invokes the write instruction (used to determine whether the measurement point under the current cloud platform is blocked or renamed), optional

An example script (write_plc_values) :

from common.Logger import logger

from quickfaas.measure import write_plc_values


def write_callback(message, userdata):

    logger.debug("write plc response: %s, userdata:%s" % (message, userdata))

 

def write_callback2(message, userdata, wizard_api):

    logger.debug("write plc response: %s, userdata:%s" % (message, userdata))

   

def action_name():

    write_request = {"measures1": 12}

    write_plc_values(message=write_request, callback=write_callback, userdata="")

 

    write_request = {"controller1": {"measures1": 12}}

    write_plc_values(message=write_request, callback=write_callback, userdata="")

   

    write_request = [{"name": "controller1", "measures":[{"name": "measures1", "value": 12}]}]

write_plc_values(message=write_request, callback=write_callback2, userdata="")

Format 1 and Format 2 callback functions return the data contents (write_plc_values) :

[

    {

        "device": "controller1",

        "var_name": "measures1",

        "result": "OK"   ,# "OK" for success, "Failed" for failure

        "error": "Success"

    }

]

The callback function for Format 3 returns the data contents (write_plc_values) :

[

    {

        "name": "controller1",

        "measures":[

            {

                "name": "measures1",

                'error_code': 0, # 0 for success, non-0 for failure

                 "error_reason": "Success"

            }

        ]

    }

]

 3.  Recall the controller's measuring point data

API to import test point data for the recall controller:

      from quickfaas.measure import recall

      from quickfaas.measure import recall2 (recommended)

recall

  1. API prototype (recall) :

recall(names=None, recall_type="measure", timeout=10, realTime=True)

  1. names: List of recall names
  1. When recall_type is "measure" :
None or [], which means get all measure points from all controllers

[{"name": "controller1", "measures": []}], to get all measures for controller1

[{"name": "controller1", "measures": ["measure1", "measure2"]}], stands for getting data from measure1 and measure2 under controller1

  1. When recall_type is "group" :

["group1", "group2"] for getting data from groups "group1" and "group2"

                     recall_type: The type of data to recall

  1. "measure": Recall data by measure point (if names=[], that is, if no measure name is specified, recall all measure points on the device)
  1. "group": Recall data by measure point (this mode data is uploaded via the group data message channel)
  1. timeout: recall test point response timeout, default 10 seconds
  1. realTime: Whether to read real-time data, set to True will immediately re-read a recall point and return the latest read value; Defaults to False and only works if recall_type = "measure"

An example script is as follows (recall) :

from common.Logger import logger

from quickfaas.measure import recall

def action_name():

    # Recall all measure-point data under all controllers

    logger.debug('recall all plc measures: %s' % recall())

   

    # Recall all measure data under the controller (controller1)

    logger.debug('recall controller1 plc measures: %s' % recall([{"name": "controller1", "measures": []}]))

   

    # Recall data from measure1 and measure2 from controller (controller1)

    logger.debug('recall controller1 plc measures: %s' % recall([{"name": "controller1", "measures": ["measure1", "measure2"]}]))

   

    # Recall data for groups "group1" and "group2"

recall(["group1", "group2"], "group")

Data content to be recalled (recall) :

[

      {

          "name": "controller1",

          "health": 1,

          "timestamp": 1582771955,

          "measures":[

              {

                  "name": "measures1",

                  "health": 1,

                  "timestamp": 1582771955,

                  "value": 12

              },

            {

                  "name": "measures2",

                  "health": 1,

                  "timestamp": 1582771955,

                  "value": 1.23

              }

          ]

      }

]

recall2 (recommended)

  1. API prototype (recall2) :

recall2(names=None, recall_type="measure", callback=None, userdata=None, timeout=10, realTime=True)

  1. names: List of recall names
  1. When recall_type is "measure" :

None or [], which means get all measure points from all controllers

[{"name": "controller1", "measures": []}], to get all measures for controller1

[{"name": "controller1", "measures": ["measure1", "measure2"]}], which means to get data from "measure1" and "measure2" in controller1

  1. When recall_type is "group" :

["group1", "group2"] for getting data from groups "group1" and "group2"

  1. recall_type: The type of data to recall
  1. "measure": Recall data by measure point (if names=[], that is, if no measure name is specified, recall all measure points on the device)
  1. "group": Recall data by measure point (this mode data is uploaded via the group data message channel)
  1. callback: Callback function to execute when the data is recalled

For compatibility with DS1.0, the callback function also supports three parameters

  1. userdata: The parameter passed to the callback function
  1. timeout: The timeout for the response of the recall point, 10 seconds by default
  1. realTime: Whether to read real-time data, set to True will immediately re-read a recall point and return the latest read value; Defaults to False and only works if recall_type = "measure"

An example script is as follows (recall2) :

from common.Logger import logger

from quickfaas.measure import recall2

def recall2_callback(message, userdata):

    logger.debug("recall2 response message: %s, userdata:%s" % (message, userdata))

 

def recall2_callback2(message, userdata, wizard_api):

    logger.debug("recall2 response message: %s, userdata:%s" % (message, userdata))

   

def action_name():

    # Recall all measure-point data under all controllers

    recall2(callback=recall2_callback, userdata="")

   

    # Recall all measure point data under controller1

    recall2(names=[{"name": "controller1", "measures": []}], callback=recall2_callback, userdata="")

   

    # Recall the data from "measure1" and "measure2" in controller1

    recall2(names=[{"name": "controller1", "measures": ["measure1", "measure2"]}], callback=recall2_callback2, userdata="")

   

    # Recall data for groups "group1" and "group2"

recall2(["group1", "group2"], "group")

Data content of the recall (recall2) :

{

    "timestamp": 1589507333.2521989,

    "values": {

        "controller1": {

            "measure1": {

                "raw_data": 12,

                 "timestamp": 1582771955,

                "status": 1

            },

            "measure2": {

                "raw_data": 1.23,

                 "timestamp": 1582771955,

                "status": 1

            }

        }

    }

}

4. Get global parameters

Import the API for getting global parameters:

from quickfaas.global_dict import get

from quickfaas.global_dict import get_global_parameter(recommended)

API prototype:

get()

get_global_parameter()

An example script is as follows:

from common.Logger import logger

from quickfaas.global_dict import get

from quickfaas.global_dict import get_global_parameter

def action_name():

    logger.debug('get global dict: %s' % get())

logger.debug('get global dict: %s' % get_global_parameter())

Returned data content:

# get interface

[

    {

        "key": "SN",

        "value": "GL9021025088033"

    }

]

 

# get_global_parameter interface

 {

                 "SN": "GL9021025088033"

 }

5. Get the controller connection status

Import Get API to get controller connection status:

from quickfaas.controller import get_status

from quickfaas.controller import get_controller_status (recommended)

API prototype:

get_status(controller=None)

get_controller_status(controller=None)

An example script is as follows:

from common.Logger import logger

from quickfaas.controller import get_status, get_controller_status

def action_name():

    logger.debug('controller status: %s' % get_status())

   

    logger.debug('controller status: %s' % get_controller_status())

   

# result: [{"name": "dev1", "health": 0, "timestamp": 1606784851}]

 

Return data content:

# get_status interface

[

    {

        "name": "dev1",

        "health": 0,

        "timestamp": 1606784851

    }

]

 

# get_controller_status interface

 {

       "dev1": {

                "health": 0,

        "timestamp": 1606784851

       }

 }

6. Get the cloud connection status

Import Get API to get controller connection status:

from quickfaas.clouds import get_status

API prototype:

get_status(cloud_name="default")

An example script is as follows:

from common.Logger import logger

from quickfaas.clouds import get_status

def action_name():

logger.debug('cloud connection status: %s' % get_status())

Return data content:

# Return True online

# Return False offline

7. Get the global configuration

Import the API for getting global parameters:

from quickfaas.config import get

API prototype:

def get(runningConfig=True, timeout=10)

 An example script is as follows:

from common.Logger import logger

from quickfaas.config import get

def action_name():

logger.debug('globle config: %s' % get())

Return data contents:

#Global JSON configuration information

8. Setting global configuration

Import the API for getting global parameters:

from quickfaas.config import set

API prototype:

def set(config, timeout=10)

An example script is as follows:

from quickfaas.config import get, set

def action_name():

    global_config = get()

    #Example Modify the global_config configuration

set(global_config)

Return data content: none

9. Read the file in the script

Import the API for reading files:

from quickfaas.file import faas_read_file

API prototype:

def faas_read_file(filePath, mode='r', encode='utf-8', size=-1)

filePath: the file path;

mode: mode determines the mode in which the file is opened: read-only, write, append, etc. See the complete list of all possible values below. This parameter is optional and defaults to read-only (r) file access mode. This is the same as the mode parameter in python's open functional interface

encode: This is the same encoding format as the encoding parameter in python's open functional interface, defaulting to utf-8

size: The size to read in bytes; if size is not specified, the whole file is returned, the same as the size parameter in python's read functional interface

An example script is as follows:

# Enter your python code.

import json

from common.Logger import logger

from quickfaas.file import faas_read_file

 

def main(message):

    try:

        file_path = "/var/user/app/device_supervisor/test.txt"

        data = faas_read_file(file_path, mode='r', encode='utf-8')

        if data:

            logger.info("data: %s" % data)

    except Exception as e:

        logger.error("Exception: %s" % (e))

Return data contents:

# a string of everything in the file; Throws an exception if an error occurs

10. Write to a file in your script

 Import the API for reading files:

from quickfaas.file import faas_write_file

API prototype:

def faas_write_file(filePath, mode='w', data='', encode='utf-8')

  1. filePath: the file path;
  1. mode: mode determines the mode in which the file is opened: read-only, write, append, etc. See the complete list of all possible values below. This parameter is optional and the default file access mode is to write only 'w'. This is the same as the mode parameter in python's open functional interface
  1.  data: The content (string) to be written to the file; Defaults to an empty string
  1. encode: The encoding format, which is the same as the encoding parameter in python's open functional interface, defaults to utf-8

 An example script is as follows:

# Enter your python code.

import json

from common.Logger import logger

from quickfaas.file import faas_write_file,faas_read_file

 

def main(message):

    try:

        file_path = "/var/user/app/device_supervisor/test.txt"

        faas_write_file(file_path, mode='w', data="test3", encode='utf-8')

    except Exception as e:

        logger.error("Exception: %s" % (e))

Returned data content: none; An exception will be thrown if an error occurs

11. Compatible with DS1 API description

get_group

API prototype:

wizard_api.get_group()

An example script is as follows:

# Enter your python code.

import json

from common.Logger import logger

def main(message, wizard_api):

    # Get group configuration

    response = wizard_api.get_group()

logger.debug("group config:%s" % response)

 

Returned data content:

[

    {

        "name": "default",

        "uploadInterval": 10

    },

    {

        "name": "group1",

        "uploadInterval": 10

    }

]

update_group

API prototype:

wizard_api.update_group(group_data)

An example script is as follows:

# Enter your python code.

import json

from common.Logger import logger

 

 def main(message, wizard_api):

    # update the group configuration information

    group_data = {"group_name":"group1", "upload_interval": 10}

    response = wizard_api.update_group(group_data)

logger.debug("update group config response:%s" % response)

 Return data content:

{

  "results": {

    "group_name":"group1",

    "upload_interval": 10

  }

}

12. LwTSDB Time Series Data General API

1. Insert

API Prototype:

Def insert_request(table_name, insert_data, noack=0, callback=None, userdata=None, timeout=30)

Parameter description:

  1. table_name: The name of the data table
  1. insert_data: Data that needs to be inserted into the database

The format is::{"<timestamp>": {"controller1": {"measure1": [<measure1_health>, <measure1_value>], "measure2": [<measure2_health>, <measure2_value>]}}}

  1. noack: whether a response is required, 0: a response is required, 1: no response is required
  1. callback: the callback function of the data return, which can be None to indicate that the returned data is not received (this parameter is meaningful when noack is 0)
  1. Prototype: :d EF insert_callback(message, userdata)
  1. userdata: the parameter of the callback function (this parameter is only meaningful when noack is 0)
  1. timeout: the timeout period of the request (30 seconds by default)

An example of the data returned by the callback function

{

  "return_code": 0,

  "return_msg":"okay"

}

The following is an example of a script:

import time

from common.Logger import logger

from quickfaas.LWTSDB import insert_request

def insert_callback(message, userdata):

        logger.debug("%s response message:%s" % (userdata, message))

def action_name():

    insert_data = [

        {str(int(time.time())): {"controller1": {"measure1": [1, 100], "measure2": [1, "test"]}}}

    ]

#Insert a piece of data into the time series database and do not require a response

    insert_request('default', insert_data, 1)

#A piece of data is inserted into the time series database and a response is required

insert_request('default', insert_data, 0, callback=insert_callback, userdata="insert")

2. Find

API prototype:

def query_ request ( table_name , start_time =None, end_time =None, filter=None, limit=1000, offest =0, callback=None, userdata =None, timeout=30)

Parameter Description:

  1. table_name : Data table name
  1. start_time : start time; the format is: %Y-%m-%d %H:%M:%S, such as: 2023-01-09 12:00:00
  1. end _time : End time; the format is: %Y-%m-%d %H:%M:%S, such as: 2023-01-09 16:00:00
  1. filter : Get the filtering rules for data (filter measuring point names, set black and white lists); the format is:
  1. {"default": " accept_all ", " black_list ": {"controller1": ["measure1", "measure2"]}, " white_list ": []}
  1. default:

" accept_all ": returns all measurement points by default, except the measurement points in the blacklist ;

" deny_all ": By default, all measurement points will not be returned, except for the measurement points in the whitelist ;

  1. black_list : Blacklist measuring point name list
  1. white_list : Whitelist measuring point name list
  1. limit: Limit the maximum number of entries that can be obtained at one time;
  1. offest : skip the number of matching records, usually used in combination with limit;
  1. callback: the callback function returned by getting the data
  1. Prototype: def query_ callback ( message, userdata )
  1. userdata : parameters passed to the callback function
  1. timeout: request timeout (default 30 seconds)

Remark:

When the start_time field is None, it means TIMESTAMP < end_time , and the default is descending order.

When the end_time field is None, it means TIMESTAMP >= start_time , and the default is ascending order.

When start_time and end_time are both None, it means querying the entire data table. The default is ascending order.

the callback function :

{

"total": 1000,

        "offset": 0,

        "size": 100,

"data ":[

{"1669630340": {"controller1": {"measure1": [1, 100], "measure2": [1, "test1"]}}},

{"1669630350": {"controller1": {"measure1": [1, 101], "measure2": [1, "test2"]}}}

]

}

An example script is as follows:

from common.Logger import logger

from quickfaas.LWTSDB import query_request

 

 

def query_ callback ( message, userdata ):

        logger.debug ("%s response message:%s" % ( userdata , message))

 

 

def action_ name ( ):

#Query all data in the default data table

    query_ request ( 'default', callback= query_callback , userdata ="query")

 

#Query the default data table data (data after '2023-01-09 12:00:00')

    query_ request ( 'default', '2023-01-09 12:00:00', callback= query_callback , userdata ="query")

 

#Query the default data table data (the latest data after '2023-01-09 16:00:00')

    query_ request ( 'default', '2022-12-09 16:00:00', limit=1, callback= query_callback , userdata ="query")

   

# Query the default data table data (data before '2023-01-09 16:00:00')

    query_ request ( 'default', end_time ='2023-01-09 16:00:00', callback= query_callback , userdata ="query")

   

# Query the default data table data (the last data before '2023-01-09 16:00:00')

    query_ request ( 'default', end_time ='2023-01-09 16:00:00', limit=1, callback= query_callback , userdata ="query")

   

# Query the default data table data (from '2023-01-09 12:00:00' to '2023-01-09 16:00:00')

    query_ request ( 'default', '2023-01-09 12:00:00', '2023-01-09 16:00:00', callback= query_callback , userdata ="query")

   

# Query the default data table data (from '2023-01-09 12:00:00' to '2023-01-09 16:00:00', and filter out the measurement points with the measurement point name "measure1")

filter = {"default": " accept_all ", " black_list ": {"controller1": ["measure1"]}}

    query_ request ( 'default', '2023-01-09 12:00:00', '2023-01-09 16:00:00', filter, callback= query_callback , userdata ="query")

   

# Query the default data table data (from '2023-01-09 12:00:00' to '2023-01-09 16:00:00', and only the measurement point named "measure1")

    filter = {"default": "deny_all", "white_list": {"controller1": ["measure1"]}}

    query_request('default', '2023-01-09 12:00:00', '2023-01-09 16:00:00', filter, callback=query_callback, userdata="query")

3. Delete

API prototype

def remove_ request ( table_name , start_time =None, end_time =None, noack =0, callback=None, userdata =None, timeout=30)

Parameter Description:

  1. table_name : data table name;
  1. start_time : the starting time of time series data; when start_time is None, it means TIMESTAMP < end_time
  1. end_time : The deadline for time series data; when end_time is None, it means TIMESTAMP >= start_time
  1. noack : whether a response is required; 0: a response is required, 1: a response is not required
  1. callback: callback function for data return; it can be None to indicate that no return data will be received ( this parameter is meaningful only when noack is 0)
  1. Prototype: def remove_ callback ( message, userdata )
  1. userdata : parameter passed to the callback function ( this parameter is meaningful only when noack is 0)
  1. timeout: request timeout (default 30 seconds)
  1. Note: When start_time and end_time are None at the same time, it means clearing the entire data table.

 the callback function :

{

" return _code ": 0,

" return _msg":"okay "

}

An example script is as follows:

from common.Logger import logger

from quickfaas.LWTSDB import remove_request

 

 

def remove_ callback ( message, userdata ):

        logger.debug ("%s response message:%s" % ( userdata , message))

 

 

def action_ name ( ):

# Clear the time series database data and require a response

    remove_ request ( 'default' , callback = remove_callback , userdata = "remove")

 

# Clear the time series database data, no response required

    remove_request ( 'default', noack = 1)

   

# Delete the time series database data (from '2023-01-09 12:00:00' to '2023-01-09 16:00:00') and require a response

    remove_ request ( 'default', '2023-01-09 12:00:00', '2022-12-09 16:00:00', 0, callback= remove_callback , userdata ="remove")

   

# Delete time series database data (delete data after '2023-01-09 16:00:00'), and a response is required

    remove_ request ( 'default', '2023-01-09 16:00:00', callback= remove_callback , userdata ="remove")

   

# Delete time series database data (delete data before '2023-01-09 16:00:00'), and a response is required

    remove_request('default', end_time='2023-01-09 16:00:00', callback=remove_callback, userdata="remove")


Event Bus

This section describes the important topics and payloads of the gateway's internal message bus. By reading this section, you will understand and how specific topics and Payloads can be used for data transfer and processing. This will allow you to use the gateway functionality more flexibly.

1. Southbound message bus

1.1 Topic

driver publishes controller measurement point value:

ds2/eventbus/south/read/{driverServiceId}

  1. {driverServiceId}: the ServiceId of the current driver, which can be viewed in the logs.
  2. The following figure shows how to view the ServiceId of the enabled ModbusDriver (Note: The ModbusDriver is not fixed at 2000, and the ServiceId is different depending on the order in which the controller is enabled. Please refer to the actual driverServiceId displayed in the logs).

Driver release millisecond data information:

ds2/eventbus/south/upload/msec/data/{controllerName}

{controllerName}: the name of the controller that publishes millisecond-level data


DataHub writes the value of the measurement point to the driver:

ds2/eventbus/south/write/{requestServiceId}

{requestServiceId}: the publisher of the message, whose ServiceId is 1010

 

The driver returns the result of writing the measurement point value to DataHub:

ds2/eventbus/south/write/{requestServiceId}/response

{requestServiceId}: the publisher of the message, whose ServiceId is 1010


Modbus Broadcast writes:

ds2/eventbus/south/modbus/broadcast/write

1.2 Payload

1.2.1 Definition of General Southbound Point Message Reporting Format:

{

    "controllers": [

        {

            "name": "con1"   ,                                                // controller name

                  "Version" : "d3b0c5fc05cb72e7759c95f346e29f8d", / / controller configuration version information (virtual controller can not to this field)

            "health": 1   ,                                                                 // Controller health status, 1-normal, 0 -- abnormal

            "timestamp": 1582771955 ,              // controller health update time

            "measures":[

                {

                    "name": "measures1"       , // measure point name

                    "health": 1  ,                               // point health status, 1 -- normal, 0 -- abnormal

                    "timestamp": 1582771955, // Query operation Unix timestamp

                    "value": 12                                   // The data type is the same as the measurement point data type

                }

            ]

        }

    ]

}

 1.2.2 General southbound millisecond point message reporting format definition:

[

  {

    "controller":["con1", 1, 1646910377],

    "measure": {

      "mea1": [1, 100],

      "mea2": [1, 100]

    }

  },

        {

    "controller":["con1", 1, 1646910377],

    "measure": {

      "mea1": [1, 100],

      "mea2": [1, 100]

    }

  }

]

Notes:

controller data: controller[0] represents the controller name, controller[1] represents the controller health status, and controller[2] represents the acquisition timestamp

measure data: key stands for the name of the measurement point, measure[0] stands for the health status of the measurement point, measure[1] stands for the value of the measurement point

 1.2.3 General South Point Write Value message format definition:

{

  "msg_id": 43461834341   ,              // message ID

  "timestamp": 1610335020088 , // timestamp

  "payload": [

    {

        "name": "con1"    ,                       // controller name

        "measures":[

            {

                "name": "measures1", // measure point name

                "value": 12           // measurepoint value

            }

        ]

    }

 ]

}

 1.2.4 Definition of general Southbound Point Write Response message format:

{

  "msg_id": 43461834341   ,      // message ID

  "timestamp": 1610335020088, // timestamp

  "payload": [

    {

        "name": "con1"    ,              // controller name

        "measures":[

            {

                "name": "measures1"        , // measure point name

                      "value": 12       ,                               // measurepoint value

                "error_code": 0  ,              //0: success, 1: write failed

                      "error_reason":      ""             // Description of the error reason

            }

        ]

    }

 ]     // Load

}

 1.2.5 Modbus Broadcast Write Value message format:

{

        "protocol": "Modbus-RTU"  ,// communication protocol, Modbus-RTU/Modbus-TCP

        "endpoint": "rs485"      ,                // serial port

        "slave": 1        ,                                                          // slave address

        "registers": [

    {

      "function": 1     ,                        // function code

      "address": 100  ,                        // address

      "length": 1 ,                                // Length

      "value": ""                                           // Value to write to register, base64 encoded

    }

  ]

}



    • Related Articles

    • InGateway902 User Manual

      1. Product Introduction 1.1 Overview The InGateway902 (IG902 for short) series is a new-generation series of 4G edge computing gateways developed by InHand Networks for the Industrial IoT sector. It provides omnipresent, uninterrupted Internet access ...
    • EC300 User Manual

      Edge Computer EC300 Series User Manual (Applicable for IEOS V2.0.0 and above) Version1.1, February 2024 www.inhandnetworks.com The software described in this manual is provided according to the license agreement and can only be used according to the ...
    • EC900 User Manual

      Edge Computer EC900 Series User Manual (Applicable for Debian10,IEOS V2.0.0 and above) Version2.0, October 2023 www.inhandnetworks.com The software described in this manual is provided according to the license agreement and can only be used according ...
    • EC954 User's Munual_V2.0

      Edge Computer EC950 Series User's Manual (Compatible with Debian 11, IEOS V2.0.0 and above versions) Version 2.0, January 2024 www.inhandnetworks.com.cn The software described in this manual is according to the license agreement, can only be used in ...
    • InSwitch Series Web Configuration Manual V1.0

      Chapter 1 Basic Configuration 1.1 HTTP protocol configuration Switches support not only can be configured by CLI and SNMP protocol, it also supports being configured by web. HTTP service port configuration and time configuration of abnormal message ...