Skip to content

1. Sensor Introduction

Model catalog

Search for these models in ThinkLink by name or ID.

Model typeNameid_namePlatform model ID
RPC[ADW2xx GET] paraadw2xx_get_23109102274327663087623
RPC[ADW2xx SET] paraadw2xx_set_23109102273573074243589
TemplateADW2xx-23109102273965933727749
Thing Model[ADW2xx-23109]adw2xx_23109102271576388407301
Thing Model[ACREL-23109-ADW2xx资产] 区域聚合adw2xx_asset_23109119677189950959616
Parameter Thing Model[ADW2xx-PARA]adw2xx_para_23109102272760276848645

ADW2xx is an Acrel multi-channel DIN-rail multi-circuit power meter, mainly used for full electrical parameter measurement of multiple three-phase circuits. The device can connect up to 4 three-phase current input circuits at the same time, and can measure voltage, current, power, power factor, frequency, energy, and other parameters.

In this solution, ADW2xx is used as a multi-user electricity meter. One collector collects data from one ADW2xx device. Since ADW2xx contains multiple internal channels/circuits, each channel is uploaded independently as one data packet. The channel number is determined by the value of the 2nd byte in the uplink data.

2. Product Features

The ADW2xx multi-circuit power meter has the following features:

  • Supports full electrical parameter measurement for 1 to 4 three-phase circuits.
  • Supports three-phase voltage, three-phase current, zero-sequence current, and frequency collection.
  • Supports active power, reactive power, apparent power, and total power measurement.
  • Supports three-phase power factor and total power factor measurement.
  • Supports forward active energy, reverse active energy, forward reactive energy, and reverse reactive energy metering.
  • Supports RS-485 communication using the Modbus-RTU protocol.
  • Supports independent reading and uploading of multi-channel data, suitable for multi-user electricity meter scenarios.
  • Supports access to LoRaWAN networks through KC21/KC11, and supports data parsing, sub-device differentiation, and third-party platform forwarding on the ThinkLink platform.

3. Scope of Application

This integration solution applies to the following scenarios:

  • Multi-user electricity metering.
  • Multi-circuit energy monitoring in buildings, parks, apartments, commercial complexes, and similar scenarios.
  • Connecting a single ADW2xx multi-channel meter to ThinkLink through one LoRaWAN collector.
  • Power monitoring scenarios where different users or electrical circuits need to be distinguished by channel.
  • Scenarios where third-party platforms need to subscribe to electricity meter telemetry data through MQTT.

4. Collector Information

4.1 Hardware Information

ItemDescription
Collector modelKC21 / KC11
Collection interfaceRS-485
Communication protocolModbus-RTU
Collection targetADW2xx multi-channel electricity meter
Collection methodOne collector collects data from one ADW2xx
Reporting methodLoRaWAN
Power supply220V / 12V / battery power, selected according to the actual collector model and on-site power conditions

4.2 Wiring Information

Power and Communication Interface

The ADW2xx meter is connected to the KC21/KC11 collector through RS-485. The collector reads the register data of each ADW2xx channel through Modbus-RTU and reports it to ThinkLink through LoRaWAN.

ADW2xxKC21/KC11
RS-485 ARS-485 A
RS-485 BRS-485 B
Power terminalConnect according to the on-site ADW2xx power supply requirements
Collector power supplyConnect 220V / 12V / battery power according to the KC21/KC11 model

The ADW2xx main unit supports an RS-485 interface and the Modbus-RTU protocol. The supported communication baud rate is 1200 to 38400. In the EB configuration of this document, the default setting is 9600 bps, 8N1.

Sensor Interface

ADW2xx is a multi-circuit power meter. Each current circuit is connected through an external current transformer. CH1 to CH4 correspond to 4 three-phase current circuits respectively. Voltage and current transformer wiring should follow the wiring diagram in the ADW2xx manual.

This solution does not involve additional sensor interfaces. The collector only reads the Modbus registers of the ADW2xx through RS-485.

5. Data Collection

In this solution, Modbus-RTU function code 0x03 is used to read the following ADW2xx registers.

Each ADW2xx channel is read independently and uploaded independently. The reported data distinguishes the current channel number through the value of the 2nd byte:

Reported dataTypeCorresponding channel
9CH1
10CH2
11CH3
12CH4

In the thing model script, the field ch comes from the 2nd byte of the uplink frame, namely index:1. When ch > 8, the script executes ch = ch - 9. Therefore, the final output channel number is:

Original ch valueParsed ch valueCorresponding channel
90CH1
101CH2
112CH3
123CH4

5.1 Register Definition

5.1.1 Channel Reading Range

ChannelStart addressEnd addressDescription
CH10x01000x013DCH1 electrical parameters
CH20x01560x0193CH2 electrical parameters
CH30x01AC0x01E9CH3 electrical parameters
CH40x02020x023FCH4 electrical parameters

Each channel reads the same type of content. The register addresses are offset by channel.

5.1.2 CH1 Register Definition

Register addressField nameField identifierUnitData type
0x0100-0x0101Phase A voltageuaVfloat
0x0102-0x0103Phase B voltageubVfloat
0x0104-0x0105Phase C voltageucVfloat
0x0106-0x0107AB line voltageuabVfloat
0x0108-0x0109BC line voltageubcVfloat
0x010A-0x010BCA line voltageucaVfloat
0x010C-0x010DFrequencyfreqHzfloat
0x010E-0x010FPhase A currentiaAfloat
0x0110-0x0111Phase B currentibAfloat
0x0112-0x0113Phase C currenticAfloat
0x0114-0x0115Zero-sequence currenti0Afloat
0x0116-0x0117Phase A active powerpaWfloat
0x0118-0x0119Phase B active powerpbWfloat
0x011A-0x011BPhase C active powerpcWfloat
0x011C-0x011DTotal active powerptWfloat
0x011E-0x011FPhase A reactive powerqavarfloat
0x0120-0x0121Phase B reactive powerqbvarfloat
0x0122-0x0123Phase C reactive powerqcvarfloat
0x0124-0x0125Total reactive powerqtvarfloat
0x0126-0x0127Phase A apparent powersaVAfloat
0x0128-0x0129Phase B apparent powersbVAfloat
0x012A-0x012BPhase C apparent powerscVAfloat
0x012C-0x012DTotal apparent powerstVAfloat
0x012E-0x012FPhase A power factorpfafloat
0x0130-0x0131Phase B power factorpfbfloat
0x0132-0x0133Phase C power factorpfcfloat
0x0134-0x0135Total power factorpftfloat
0x0136-0x0137Phase A forward active energyepfakWhfloat
0x0138-0x0139Phase B forward active energyepfbkWhfloat
0x013A-0x013BPhase C forward active energyepfckWhfloat
0x013C-0x013DTotal forward active energyepftkWhfloat

5.1.3 CH2 to CH4 Register Description

The field meanings of CH2, CH3, and CH4 are the same as CH1. The register addresses are as follows:

FieldCH2 addressCH3 addressCH4 address
Phase A voltage0x0156-0x01570x01AC-0x01AD0x0202-0x0203
Phase B voltage0x0158-0x01590x01AE-0x01AF0x0204-0x0205
Phase C voltage0x015A-0x015B0x01B0-0x01B10x0206-0x0207
AB line voltage0x015C-0x015D0x01B2-0x01B30x0208-0x0209
BC line voltage0x015E-0x015F0x01B4-0x01B50x020A-0x020B
CA line voltage0x0160-0x01610x01B6-0x01B70x020C-0x020D
Frequency0x0162-0x01630x01B8-0x01B90x020E-0x020F
Phase A current0x0164-0x01650x01BA-0x01BB0x0210-0x0211
Phase B current0x0166-0x01670x01BC-0x01BD0x0212-0x0213
Phase C current0x0168-0x01690x01BE-0x01BF0x0214-0x0215
Zero-sequence current0x016A-0x016B0x01C0-0x01C10x0216-0x0217
Phase A active power0x016C-0x016D0x01C2-0x01C30x0218-0x0219
Phase B active power0x016E-0x016F0x01C4-0x01C50x021A-0x021B
Phase C active power0x0170-0x01710x01C6-0x01C70x021C-0x021D
Total active power0x0172-0x01730x01C8-0x01C90x021E-0x021F
Phase A reactive power0x0174-0x01750x01CA-0x01CB0x0220-0x0221
Phase B reactive power0x0176-0x01770x01CC-0x01CD0x0222-0x0223
Phase C reactive power0x0178-0x01790x01CE-0x01CF0x0224-0x0225
Total reactive power0x017A-0x017B0x01D0-0x01D10x0226-0x0227
Phase A apparent power0x017C-0x017D0x01D2-0x01D30x0228-0x0229
Phase B apparent power0x017E-0x017F0x01D4-0x01D50x022A-0x022B
Phase C apparent power0x0180-0x01810x01D6-0x01D70x022C-0x022D
Total apparent power0x0182-0x01830x01D8-0x01D90x022E-0x022F
Phase A power factor0x0184-0x01850x01DA-0x01DB0x0230-0x0231
Phase B power factor0x0186-0x01870x01DC-0x01DD0x0232-0x0233
Phase C power factor0x0188-0x01890x01DE-0x01DF0x0234-0x0235
Total power factor0x018A-0x018B0x01E0-0x01E10x0236-0x0237
Phase A forward active energy0x018C-0x018D0x01E2-0x01E30x0238-0x0239
Phase B forward active energy0x018E-0x018F0x01E4-0x01E50x023A-0x023B
Phase C forward active energy0x0190-0x01910x01E6-0x01E70x023C-0x023D
Total forward active energy0x0192-0x01930x01E8-0x01E90x023E-0x023F

5.2 Status Bit Definition

The current thing model script uses the status field for status judgment:

javascript
if((tdata?.status&0x02)===0x02) {
    // time out , just update the status.
}

The status bit definition is as follows:

Status bitMeaningProcessing logic
status & 0x02Modbus collection timeoutKeep the previous telemetry data and only update the status

When a collection timeout occurs, the platform does not overwrite the original valid electrical parameter data. It only updates the device status to prevent business data from being cleared due to timeout.

6. EdgeBus Model

ADW2xx itself is not a LoRaWAN device and needs to be connected through a KC21/KC11 collector. Therefore, this solution requires EB code. EdgeBus is responsible for generating Modbus collection tasks, periodically reading the registers of each ADW2xx channel, and reporting the data in packets through LoRaWAN.

6.1 EB Configuration Parameters

ParameterValue
Business code23109
Business version13
Device templateADW2xx-23109
Baud rate9600
Data bits8
Stop bits1
ParityNo parity
LoRaWAN reporting port23
Uplink version identifier0x87
Default number of collected devices2
Number of channels per device4
Collection protocolModbus-RTU
Function code0x03

Parameter Index Definition

ParameterAPP IndexField nameTypeDescription
Device 1 query period70period1uint32leUnit: seconds
Device 2 query period74period2uint32leUnit: seconds
Device 1 RS-485 address150addr1uint8Modbus address
Device 2 RS-485 address151addr2uint8Modbus address

The current user scenario is “one collector collects one device”. Therefore, in actual deployment, usually only period1 and addr1 are used. The code reserves the configuration capability for 2 ADW2xx devices.

6.2 EB Code

typescript
import { Buffer } from "buffer";
import { buildOtaFile } from "@EBSDK/run";
import {
    ActionAfertExpr, CalcData,
    CrcMode,
    CvtRule,
    EBBuffer,
    EBModel,
    ExprCondition,
    LoraUpEvent,
    QueryEvent, SetUpCovDataType,
    UserConfUPItem,EventInfoItem
} from "@EBSDK/EBCompiler/all_variable";
import { CheckbitEnum, getOtaConfig, HwTypeEnum, UpgrdTypeEnum } from "@EBSDK/otaConfig";
////////////////////////////////////////////////////////////////////////////////////////
let eventInfo:UserConfUPItem[]=[]
let otaConfig = getOtaConfig({
    BaudRate: 9600,
    StopBits: 1,
    DataBits: 8,
    Checkbit: CheckbitEnum.NONE,
    Battery: false,
    ConfirmDuty: 60,
    BzType: 23109,
    BzVersion: 13
})
for(let i=0;i<2;i++){
    let name="ADW2XX_3M_4CH_"+(i+1).toString();
    let periodIndex=70+i*4
    let addrIndex=150+i
    for (let j=0;j<4;j++){
        let start="0x100"
        let end="0x13D"
        if (j===1) { start="0x156";end="0x193"
        }else if(j===2){start="0x1AC";end="0x1E9"
        }else if(j===3){start="0x202";end="0x23F"}
        let userConf:UserConfUPItem={
            name:name,dataType:(9+j).toString(), port:23, version:"0x87",upPeriod:"10y",
            quInfo:[
                { protocol:"modbus",code:"0x03", periodIndex:periodIndex,
                    indexAPP:addrIndex, indexCMD:0, copySize:1,isLast:true,
                    listVal:[{ start:start, end:end}]
                }
                ]
        }
        eventInfo.push(userConf);
    }
}
const MODBUS_TT = (ebModel: EBModel) => {
    for (let i=0; i<eventInfo.length; i++){
        let event=new EventInfoItem(eventInfo[i]);
        event.upEventSetup()
        event.eventInstall()
    }
    return JSON.stringify(ebModel, null, 2)
}
buildOtaFile(import.meta.url, otaConfig, MODBUS_TT)

6.3 Description

Current EB logic description:

  1. The EB code is configured by default for 2 ADW2xx devices, with each ADW2xx containing 4 channels.
  2. The current user scenario is “one collector collects one device”, so in actual use, mainly the first ADW2xx is enabled, namely addr1 and period1.
  3. Each channel independently generates one Modbus collection task.
  4. Each channel independently uploads one data packet. The LoRaWAN port is uniformly 23.
  5. The uplink frame version identifier is 0x87.
  6. The channel number is distinguished by dataType:
    • 9: CH1
    • 10: CH2
    • 11: CH3
    • 12: CH4
  7. During thing model parsing, the 2nd byte is read as the ch field, and 9 to 12 are converted to 0 to 3 for channel differentiation on the platform side.
  8. Since ADW2xx is a multi-user meter, ThinkLink can use the sub_device mechanism to parse each channel as a different sub-device, enabling channel-based device management for multi-user meters.

7. Thing Model

7.1 Basic Thing Model Information

ItemDescription
Thing model nameADW2xx-23109
Device modelADW2xx
Business code23109
LoRaWAN Port23
Frame version0x87
Uplink frame length130 bytes
RSSI includedYes
Battery voltage includedYes, battery:4
Channel judgment method2nd byte ch
Sub-device differentiation methodsub_device = tdata.addr + 1000
javascript
let frameInfo = {
    port:23,
    dataLen:130,
    rssi:true,
    battery:4,
    tagList:[
        { index:0, tag:0x87 }
    ]
}
Field nameField identifierUnitByte positionTypeDecimal places
CHch1uint8
Phase A voltageuaV6floatbe3
Phase B voltageubV10floatbe3
Phase C voltageucV14floatbe3
AB line voltageuabV18floatbe3
BC line voltageubcV22floatbe3
CA line voltageucaV26floatbe3
FrequencyfreqHz30floatbe3
Phase A currentiaA34floatbe3
Phase B currentibA38floatbe3
Phase C currenticA42floatbe3
Zero-sequence currenti0A46floatbe3
Phase A active powerpaW50floatbe3
Phase B active powerpbW54floatbe3
Phase C active powerpcW58floatbe3
Total active powerptW62floatbe3
Phase A reactive powerqavar66floatbe3
Phase B reactive powerqbvar70floatbe3
Phase C reactive powerqcvar74floatbe3
Total reactive powerqtvar78floatbe3
Phase A apparent powersaVA82floatbe3
Phase B apparent powersbVA86floatbe3
Phase C apparent powerscVA90floatbe3
Total apparent powerstVA94floatbe3
Phase A power factorpfa98floatbe3
Phase B power factorpfb102floatbe3
Phase C power factorpfc106floatbe3
Total power factorpft110floatbe3
Phase A forward active energyepfakWh114floatbe3
Phase B forward active energyepfbkWh118floatbe3
Phase C forward active energyepfckWh122floatbe3
Total forward active energyepftkWh126floatbe3

7.3 Thing Model Script

7.3.1 Data Thing Model Script

javascript
let port=msg?.userdata?.port || null;

let frameInfo = {
    port:23,
    dataLen:130,
    rssi:true,
    battery:4,
    tagList:[
        { index:0, tag:0x87 }
    ]
}

let appInfo = [
    { name:"CH", field_name:"ch", unit:"", index:1, type:"uint8" },

    { name:"Phase A voltage", field_name:"ua", unit:"V", index:6, type:"floatbe", decimal:3 },
    { name:"Phase B voltage", field_name:"ub", unit:"V", index:10, type:"floatbe", decimal:3 },
    { name:"Phase C voltage", field_name:"uc", unit:"V", index:14, type:"floatbe", decimal:3 },

    { name:"AB line voltage", field_name:"uab", unit:"V", index:18, type:"floatbe", decimal:3 },
    { name:"BC line voltage", field_name:"ubc", unit:"V", index:22, type:"floatbe", decimal:3 },
    { name:"CA line voltage", field_name:"uca", unit:"V", index:26, type:"floatbe", decimal:3 },

    { name:"Frequency", field_name:"freq", unit:"Hz", index:30, type:"floatbe", decimal:3 },

    { name:"Phase A current", field_name:"ia", unit:"A", index:34, type:"floatbe", decimal:3 },
    { name:"Phase B current", field_name:"ib", unit:"A", index:38, type:"floatbe", decimal:3 },
    { name:"Phase C current", field_name:"ic", unit:"A", index:42, type:"floatbe", decimal:3 },
    { name:"Zero-sequence current", field_name:"i0", unit:"A", index:46, type:"floatbe", decimal:3 },

    { name:"Phase A active power", field_name:"pa", unit:"W", index:50, type:"floatbe", decimal:3 },
    { name:"Phase B active power", field_name:"pb", unit:"W", index:54, type:"floatbe", decimal:3 },
    { name:"Phase C active power", field_name:"pc", unit:"W", index:58, type:"floatbe", decimal:3 },
    { name:"Total active power", field_name:"pt", unit:"W", index:62, type:"floatbe", decimal:3 },

    { name:"Phase A reactive power", field_name:"qa", unit:"var", index:66, type:"floatbe", decimal:3 },
    { name:"Phase B reactive power", field_name:"qb", unit:"var", index:70, type:"floatbe", decimal:3 },
    { name:"Phase C reactive power", field_name:"qc", unit:"var", index:74, type:"floatbe", decimal:3 },
    { name:"Total reactive power", field_name:"qt", unit:"var", index:78, type:"floatbe", decimal:3 },

    { name:"Phase A apparent power", field_name:"sa", unit:"VA", index:82, type:"floatbe", decimal:3 },
    { name:"Phase B apparent power", field_name:"sb", unit:"VA", index:86, type:"floatbe", decimal:3 },
    { name:"Phase C apparent power", field_name:"sc", unit:"VA", index:90, type:"floatbe", decimal:3 },
    { name:"Total apparent power", field_name:"st", unit:"VA", index:94, type:"floatbe", decimal:3 },

    { name:"Phase A power factor", field_name:"pfa", unit:"", index:98, type:"floatbe", decimal:3 },
    { name:"Phase B power factor", field_name:"pfb", unit:"", index:102, type:"floatbe", decimal:3 },
    { name:"Phase C power factor", field_name:"pfc", unit:"", index:106, type:"floatbe", decimal:3 },
    { name:"Total power factor", field_name:"pft", unit:"", index:110, type:"floatbe", decimal:3 },

    { name:"Phase A forward active energy", field_name:"epfa", unit:"kWh", index:114, type:"floatbe", decimal:3 },
    { name:"Phase B forward active energy", field_name:"epfb", unit:"kWh", index:118, type:"floatbe", decimal:3 },
    { name:"Phase C forward active energy", field_name:"epfc", unit:"kWh", index:122, type:"floatbe", decimal:3 },
    { name:"Total forward active energy", field_name:"epft", unit:"kWh", index:126, type:"floatbe", decimal:3 },
]

let tdata={}

let payParser=new PayloadParser({
    device:device,
    msg:msg,
    frameInfo:frameInfo,
    appInfo:appInfo,
})

tdata= payParser.telemetry()

if((tdata?.status&0x02)===0x02) {
    // time out , just update the status.
    const status=tdata.status
    tdata={ ...(device.telemetry_data?.[thingModelId] ?? {})}
    tdata.status=status
}

if(tdata?.ch>8) {
    tdata.ch=tdata.ch-9
}

return {
    sub_device:tdata==undefined ? null : (tdata.addr+1000),
    telemetry_data: tdata,
    server_attrs: null,
    shared_attrs: null
}

7.3.2 Parameter Thing Model Script

javascript
let port=msg?.userdata?.port || null;

const rpcName="adw2xx_23109_set";

let paraDef = {
    app_70:{name: "period1", field_name: "period1", unit:"S", type: "uint32le"},
    app_74:{name: "period2", field_name: "period2", unit:"S", type: "uint32le"},
    app_150:{name: "addr1", field_name: "addr1", unit:"", type: "uint8"},
    app_151:{name: "addr2", field_name: "addr2", unit:"", type: "uint8"}
}

if (port!==214) {
    let checkData=Utils.paraCheck(rpcName,device.server_attrs,device.shared_attrs)
    return {
        server_attrs: checkData.sdata,
        action:checkData.action,
    }
}

let pdata=(new PayloadParser({
    device:device,
    msg:msg,
    paraInfo:paraDef,
})).paras()

let checkData= Utils.paraCheck(rpcName,pdata)

return {
    telemetry_data: pdata,
    server_attrs: checkData.sdata,
    shared_attrs: pdata,
    action: checkData.action,
}

8. Third-Party Platform Data Subscription

8.1 MQTT Topic

latex
/v32/{Organization Account}/tkl/up/telemetry/{eui}

Example:

latex
/v32/{Organization Account}/tkl/up/telemetry/{eui}

Where:

ParameterDescription
ThinkLink organization account
LoRaWAN device EUI

8.2 Reported Data Example

The following example shows the reported data from the CH1 channel of an ADW2xx multi-user meter. In actual business scenarios, each channel independently reports one data packet and is distinguished by the ch field.

json
{
    "eui": "6353012af10a9331",
    "active_time": "2026-02-05T08:35:48.000Z",
    "thingModelId": "23109",
    "thingModelIdName": "ADW2xx-23109",
    "telemetry_data": {
        "snr": 13.5,
        "rssi": -51,
        "battery": 3.37,
        "addr": 1,
        "ch": 0,
        "ua": 220.125,
        "ub": 219.876,
        "uc": 220.342,
        "uab": 380.456,
        "ubc": 381.012,
        "uca": 379.998,
        "freq": 50.002,
        "ia": 12.345,
        "ib": 11.876,
        "ic": 12.021,
        "i0": 0.012,
        "pa": 2300.125,
        "pb": 2201.456,
        "pc": 2250.789,
        "pt": 6752.370,
        "qa": 120.123,
        "qb": 118.456,
        "qc": 121.789,
        "qt": 360.368,
        "sa": 2310.125,
        "sb": 2210.456,
        "sc": 2260.789,
        "st": 6781.370,
        "pfa": 0.995,
        "pfb": 0.996,
        "pfc": 0.995,
        "pft": 0.995,
        "epfa": 1234.567,
        "epfb": 1220.345,
        "epfc": 1218.901,
        "epft": 3673.813,
        "status": 0
    }
}

Channel Description

telemetry_data.chCorresponding channel
0CH1
1CH2
2CH3
3CH4

Sub-Device Description

In the current thing model script:

javascript
sub_device:tdata==undefined ? null : (tdata.addr+1000)

The platform distinguishes lower-level devices based on the sub-device address. For multi-user meter scenarios, it is recommended to combine addr and ch for business-side user/circuit binding. For example:

ADW2xx addressChannelBusiness meaning
10User / circuit 1
11User / circuit 2
12User / circuit 3
13User / circuit 4

9. RPC

9.1 RPC Name

RPC typeRPC name
Configure parametersadw2xx_23109_set
Read parametersadw2xx_23109_set

9.2 Parameter Definition

Parameter nameField nameAPP IndexUnitTypeDescription
period1period170Suint32leDevice 1 query/upload period
period2period274Suint32leDevice 2 query/upload period, reserved
addr1addr1150uint8Device 1 Modbus address
addr2addr2151uint8Device 2 Modbus address, reserved

The current scenario is one collector collecting one ADW2xx. Therefore, the main configuration is:

json
{
    "period1": 300,
    "addr1": 1
}

9.3 RPC Code

9.3.1 Configure Parameter RPC

javascript
let classMode = (device && device.shared_attrs && device.shared_attrs.class_mode) || "ClassA";

const rpcName="adw2xx_23109_set";

let paraDef = {
    app_70:{name: "period1", field_name: "period1", unit:"S", type: "uint32le"},
    app_74:{name: "period2", field_name: "period2", unit:"S", type: "uint32le"},
    app_150:{name: "addr1", field_name: "addr1", unit:"", type: "uint8"},
    app_151:{name: "addr2", field_name: "addr2", unit:"", type: "uint8"}
}

let frames=RPCHelper.buildFrame({
    paraDef:paraDef,
    params:params
});

let redoBuffer=RPCHelper.redo()

let dnBuffer=Buffer.alloc(frames.writeBuffer.length+frames.readBuffer.length);

frames.writeBuffer.copy(dnBuffer,0)
frames.readBuffer.copy(dnBuffer,frames.writeBuffer.length)

logger.info("set para")

let msgQue=Utils.makeParaSetMSG({
    device:device,
    classMode:classMode,
    rpcName:rpcName,
    params:params,
    paraDownBuffer:dnBuffer,
    extraAppBuffer:redoBuffer
})

if (msgQue.length==0) return null

return msgQue

9.3.2 Read Parameter RPC

javascript
let paraDef = {
    app_70:{name: "period1", field_name: "period1", unit:"S", type: "uint32le"},
    app_74:{name: "period2", field_name: "period2", unit:"S", type: "uint32le"},
    app_150:{name: "addr1", field_name: "addr1", unit:"", type: "uint8"},
    app_151:{name: "addr2", field_name: "addr2", unit:"", type: "uint8"}
}

let frames=RPCHelper.buildFrame({
    paraDef:paraDef,
    params:params
});

let msg=RPCHelper.makeMSG({
    msgType:Utils.msgType.paras,
    device:device,
    dnBuffer:frames.readBuffer,
    sleepTime:0,
})

return [msg]

9.3.3 RPC Call Example

Configure the ADW2xx address as 1 and the collection period as 300 seconds:

json
{
    "method": "adw2xx_23109_set",
    "params": {
        "period1": 300,
        "addr1": 1
    }
}

Reserved parameters for using a second device:

json
{
    "method": "adw2xx_23109_set",
    "params": {
        "period1": 300,
        "addr1": 1,
        "period2": 300,
        "addr2": 2
    }
}

10. Template Selection

Search for the following template in the ThinkLink platform:

latex
ADW2xx-23109

Or search by business type:

latex
Multi-circuit power meter
Multi-user meter
Modbus electricity meter
ADW2xx
Acrel ADW2xx

11. Integration Notes

  1. ADW2xx is a multi-channel electricity meter. Each channel is uploaded as one separate data packet.
  2. The current channel number is determined by the 2nd byte of the uplink data.
  3. dataType=9 to 12 correspond to CH1 to CH4 respectively.
  4. In the thing model, when ch > 8, the value is reduced by 9 and converted to the platform internal channel numbers 0 to 3.
  5. The default EB code supports 2 ADW2xx devices, with 4 channels per device. When the current project is deployed as “one collector collects one device”, only addr1 and period1 need to be configured.
  6. The ADW2xx communication parameters must be consistent with the EB configuration: 9600 bps, 8 data bits, 1 stop bit, no parity.
  7. When the RS-485 bus is long or the on-site environment has strong interference, it is recommended to check shield grounding, terminal resistance, and A/B polarity.