UC100 可配置属性

你可以通过 API 修改物模型的可配置属性来更新设备的设置。本文档提供 UC100物模型的可配置参数以及如何使用它们。

使用方法

  1. 参考UC100 的可配置属性及其默认值。
  2. 复制示例代码,去掉不需要修改的注释和参数。
  3. 根据详细信息编辑所需的属性。
    注: 确保编辑后的示例代码符合JSON格式要求。
  4. 使用编辑后的示例代码作为主体参数 更新设备属性

可配置属性

以下代码表示UC100物模型中的所有可配置属性及其默认值。

注:
  • 单击属性可查看其详细说明和有效值。
  • 根据需要配置示例代码,然后将其作为主体参数 更新设备属性 来快速完成配置。
{
    "properties": {
        "reporting_interval": 1200,    // The interval for data reporting (second).
        "data_storage_enable": false,    // Do NOT allow the device to store data.
        "retransmission_enable": false,    // Disable data retransmission.
        "retransmission_interval":{    // The interval for data retransmission (second).
            "interval":600
        },
        "retrival_interval":{   // The interval for data retrieval (second).
            "interval": 60
        }, 
        "modbus_channel_1":[    // Default settings of channel 1.
            {
                "oper": false,    // Disable channel 1.
                "channel_id": 1,    // Channel ID.
                "name_len": 1,    // Channel name length.
                "name": "",    // Channel name.
                "slave_id": ,    // Slave ID.
                "address": 1200,    // Register start address.
                "type": 0,    // Data type.
                "sign_bit": false    // Set this channle as unsigned.
            }
        ],       
        "modbus_channel_2":[    // Default settings of channel 2.
            {
                "oper": false,
                "channel_id": 2,
                "name_len": 1,
                "name": "",
                "slave_id": ,
                "address": 1200,
                "type": 0,
                "sign_bit": false
            }
        ],
        ... // Up to 32 channels are supported.
        "modbus_channel_32":[    // Default settings of channel 32.
            {
                "oper": false,
                "channel_id": 32,
                "name_len": 1,
                "name": "",
                "slave_id": ,
                "address": 1200,
                "type": 0,
                "sign_bit": false
            }
        ]              
    }
}

描述

下表提供了UC100可配置属性的描述和有效值。
Parameter Type Description
reporting_interval Integer

Specify the interval for data reporting (Unit: Second).

  • Default value: 1200
  • Valid value: 60 - 64800
data_storage_enable Boolean

Decide whether to allow the device to store data.

Valid value:
  • false: Disallow (Default value).
  • true: Allow.
retransmission_enable Boolean

Decide whether to enable data retransmission, which allows the device to log time point of network disconnection periodically resend the accumulated data during the disconnection period upon reconnection.

Valid value:
  • false: Disable (Default value).
  • true: Enable.
retransmission_interval Struct
注: This setting ONLY takes effect when retransmission_enable is set to true.
The interval for data retransmission.
interval Integer
Specify the interval for data retransmission (Unit: Second).
  • Default value: 600
  • Valid value: 30 - 1200
retrival_interval Struct The time interval for data retrieval
interval Integer
Specify the time interval for data retrieval (Unit: Second).
  • Default value: 60
  • Valid value: 30 - 1200
modbus_channel_1 Array Settings of channel ID 1.
oper Boolean Whether to enable this channel.
Valid value:
  • false: Disallow (Default value).
  • true: Allow.
channel_id Enum Specify the channel ID.

Default value: 1

name_len Integer

Specify the length for channel name.

  • Default value: 1
  • Valid value: 1 - 16
name String Specify the channel name.
slave_id Integer Specify the slave ID.
address Integer

Specify the register start address.

  • Default value: 1200
  • Valid value: 0 - 65535
type Enum Specify the data type.

Valid value: Refer to Valid value – Channel data type.

sign_bit Boolean Decide whether this channel is signed.
Valid value:
  • false: Unsigned (Default value).
  • true: Signed.
modbus_channel_2 Array Settings of channel ID 2.
oper Boolean Whether to enable this channel.
Valid value:
  • false: Disallow (Default value).
  • true: Allow.
channel_id Enum Specify the channel ID.

Default value: 2

name_len Integer

Specify the length for channel name.

  • Default value: 1
  • Valid value: 1 - 16
name String Specify the channel name.
slave_id Integer Specify the slave ID.
address Integer

Specify the register start address.

  • Default value: 1200
  • Valid value: 0 - 65535
type Enum Specify the data type.

Valid value: Refer to Valid value – Channel data type.

sign_bit Boolean Decide whether this channel is signed.
Valid value:
  • false: Unsigned (Default value).
  • true: Signed.
...
modbus_channel_32 Array Settings of channel ID 32.
oper Boolean Whether to enable this channel.
Valid value:
  • false: Disallow (Default value).
  • true: Allow.
channel_id Enum Specify the channel ID.

Default value: 32

name_len Integer

Specify the length for channel name.

  • Default value: 1
  • Valid value: 1 - 16
name String Specify the channel name.
slave_id Integer Specify the slave ID.
address Integer

Specify the register start address.

  • Default value: 1200
  • Valid value: 0 - 65535
type Enum Specify the data type.

Valid value: Refer to Valid value – Channel data type.

sign_bit Boolean Decide whether this channel is signed.
Valid value:
  • false: Unsigned (Default value).
  • true: Signed.
Valid value – Channel data type
  • 0: Coil (Default value)
  • 1: Discrete
  • 2: Input Register(INT16_AB)
  • 3: Input Register(INT16_BA)
  • 4: Input Register(INT32_ABCD)
  • 5: Input Register(INT32_BADC)
  • 6: Input Register(INT32_CDAB)
  • 7: Input Register(INT32_DCBA)
  • 8: Input Register(INT32_AB)
  • 9: Input Register(INT32_CD)
  • 10: Input Register(FLOAT_ABCD)
  • 11: Input Register(FLOAT_BADC)
  • 12: Input Register(FLOAT_CDAB)
  • 13: Input Register(FLOAT_DCBA)
  • 14: Holding Register(INT16_AB)
  • 15: Holding Register(INT16_BA)
  • 16: Holding Register(INT32_ABCD)
  • 17: Holding Register(INT32_BADC)
  • 18: Holding Register(INT32_CDAB)
  • 19: Holding Register(INT32_DCBA)
  • 20: Holding Register(INT32_AB)
  • 21: Holding Register(INT32_CD)
  • 22: Holding Register(FLOAT_ABCD)
  • 23: Holding Register(FLOAT_BADC)
  • 24: Holding Register(FLOAT_CDAB)
  • 25: Holding Register(FLOAT_DCBA)