1. Sensor Overview
Model catalog
Search for these models in ThinkLink by name or ID.
| Model type | Name | id_name | Platform model ID |
|---|---|---|---|
| RPC | [CZ580 GET] para | cz580_get_22106 | 98886806983938053 |
| RPC | [CZ580 SET] para | cz580_set_22106 | 103495861979320325 |
| Template | CZ580 | 98890586718736390 | |
| Thing Model | [CZ580] | cz580_22106 | 98662809595809797 |
| Thing Model | [CZ-22106-CZ580资产] 区域聚合 | cz580_asset_22106 | 119677174411063305 |
| Parameter Thing Model | [CZ580-PARA] | cz580_para_22106 | 103496386170851335 |
CZ580 is a rotational speed transmitter manufactured by Shanghai Chuanzhen Electronic Technology Co., Ltd. It performs non-contact rotational speed measurement based on the laser reflective-strip sensing principle, and can output either a 4–20 mA signal or an RS485 (Modbus-RTU) signal. It is suitable for rotational speed monitoring of various rotating machines.
The measurement range of the device is 0 to 10,000 rpm, making it suitable for low-speed applications and also capable of zero-speed detection.
In this integration solution, the device model is CZ580, the business code is 22106, and the template name is CZ580.
2. Product Features
According to the manufacturer’s documentation, the CZ580 has the following features:
- Strong output signal
- High anti-interference capability
- Non-contact measurement
- Wide operating range, suitable for low-speed measurement
- Can be used in harsh environments such as smoke, oil vapor, and water mist
3. Application Scope
CZ580 can be widely used in the following scenarios:
- Speed measurement of large rotating machinery in the power industry
- Rotational equipment speed monitoring in the metallurgical industry
- Speed measurement of compressors, motors, fans, pumps, and other equipment in the petrochemical industry
- Speed measurement of large rotating machinery in the paper industry
- Workpiece processing speed monitoring
- Steel pipe coating line speed monitoring
- Gear rotational speed measurement
4. Collector Information
4.1 Hardware Information
The data acquisition device used in this solution is KC21.
- Device model: KC21
- Interface: RS-485
- Power supply: 220V / 12V
4.2 Wiring Information
Power Supply and Communication Interface
The RS485 output wiring definition of CZ580 is as follows:
- Red wire: 9–30 VDC
- Green wire: GND
- Yellow wire: RS485-A
- Blue wire: RS485-B
Sensor Interface
In this solution, the CZ580 has a built-in RS485 output interface and can be directly connected to the RS485 interface of KC21.
The power supply range of the sensor itself is 9–30 VDC.
5. Data Acquisition
In this solution, the following registers are read through Modbus:
- 102: Number of sensing points per revolution
- 2048–2049: Processed speed value, float, high word first
- 2052–2053: Raw speed value, float, high word first
At the platform side, the following parameter addresses are defined:
- Upload period parameter address: 70
- Collection period parameter address: 74
And it is required that:
- Collection period < Upload period
5.1 Register Definitions
According to the manufacturer’s Modbus register table, the main register definitions are as follows:
| Address (Decimal) | Item Description | Data Type | Description |
|---|---|---|---|
| 0 | IN1 speed value | UShort | Speed value processed by sensing point count and scaling factor |
| 1 | IN1 display decimal places | UShort | Read-only, write invalid |
| 5–6 | IN1 speed value | ULong | Raw speed = input frequency × 60 |
| 100 | IN1 measurement speed selection | UShort | 0: high speed, 1: medium speed, 2: low speed |
| 101 | IN1 display decimal places | UShort | Range 0–3 |
| 102 | IN1 sensing points per revolution | UShort | Range 1–9999 |
| 103 | IN1 scaling decimal places | UShort | Range 0–6 |
| 104 | IN1 scaling factor | UShort | Range 1–65535 |
| 2048–2049 | IN1 speed value | float | Processed speed value |
| 2052–2053 | IN1 speed value | float | Raw speed value = input frequency × 60 |
| 7166 | Communication parameter modification enable register | Short | Write 0xCCAA to enable communication parameter modification |
| 7167 | RS485 address | Short | Range 1–247 |
| 7168 | RS485 baud rate | Short | 0–6, corresponding to 2400–115200 |
| 7169 | RS485 data format | Short | Range 0–3 |
Supported Modbus function codes:
- 03H, 04H: Read parameters
- 06H, 10H: Modify parameters
6. EdgeBus Model
6.1 EB Configuration Parameters
The main configuration parameters are as follows:
name:"CZ580"port:22version:"0x86"dataType:"0x06"upPeriodIndex:70- Default Modbus serial parameters:
BaudRate:9600StopBits:1DataBits:8Checkbit:NONE
BzType:22106BzVersion:11SwVersion:31
6.2 EB Code
import {Buffer} from "buffer";
import {buildOtaFile} from "@EBSDK/run";
import {LoraUpEvent} from "@EBSDK/EBCompiler/all_variable";
import {EBModel} from "@EBSDK/EBCompiler/EBModel/EBModel";
import {EventInfoItem} from "@EBSDK/EBCompiler/plugins/EBHelper";
import type {UserConfUPItem} from "@EBSDK/EBCompiler/plugins/EBHelper";
import {CheckbitEnum, getOtaConfig, HwTypeEnum} from "@EBSDK/otaConfig";
////////////////////////////////////////////////////////////////////////////////////////
const eventInfo:UserConfUPItem[]=[
{
name:"CZ580",port:22, version:"0x86",dataType:"0x06",upPeriodIndex:70,
quInfo:[
{
protocol:"modbus",code:"0x03", periodIndex:74,//addr:"0x01",
indexAPP:150, indexCMD:0, copySize:1,isLast:false,//period:"900s",payIndex:3,ackAddrIndex:0,
listVal:[
{ start: "102", end: "102"},
]
},
{
protocol:"modbus",code:"0x03", periodIndex:74,//addr:"0x01",
indexAPP:150, indexCMD:0, copySize:1,isLast:false,//period:"900s",payIndex:3,ackAddrIndex:0,
listVal:[
{ start: "2048", end: "2049",covType:"FloatBE",covAppIndex:110}, //
{ start: "2052", end: "2053" ,covType:"FloatBE",covAppIndex:114}
]
}
]
}
]
let otaConfig = getOtaConfig({
SwVersion:31,
BaudRate: 9600,
StopBits: 1,
DataBits: 8,
Checkbit: CheckbitEnum.NONE,
Battery: true,
ConfirmDuty: 60,
BzType: 22106,
BzVersion: 11
})
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:
- EdgeBus reports business data through Port 22.
- It first reads register 102 to obtain the number of sensing points per revolution.
- Then it reads registers 2048–2049 and 2052–2053 to obtain the processed speed value and raw speed value respectively.
- Upload period and collection period are separated:
- 70 = upload period
- 74 = collection period
- The Modbus address is managed through APP parameter 150.
- Floating-point registers use FloatBE / IEEE754 high word first format.
7. Thing Model
7.1 Basic Information of the Thing Model
Telemetry Thing Model
- Name: [CZ580]
- id Name: cz580_22106
Parameter Thing Model
- Name: [CZ580-PARA]
- id Name: cz580_para_22106
7.2 Uplink Frame Structure
The uplink data frame structure is as follows:
let frameInfo={
port:22, dataLen:16,rssi:true,battery:4,
tagList:[{ index:0, tag:0x86 }, { index:1, tag:0x06 }]
}Field definitions are as follows:
- index 6:
ratio,uint16BE - index 8:
INI1Speed1,floatBE - index 12:
INI1RawSpeed1,floatBE
7.3 Thing Model Scripts
7.3.1 Telemetry Thing Model Script
let port=msg?.userdata?.port || null;
if(port!=22) return null
let frameInfo={
port:22, dataLen:16,rssi:true,battery:4,
tagList:[{ index:0, tag:0x86 }, { index:1, tag:0x06 }]
}
let appInfo = [
{ name: "ratio", field_name: "ratio", unit:"", index: 6, type: "uint16BE",decimal:1},
{ name: "INI1Speed1", field_name: "INI1Speed1", unit:"", index: 8, type: "floatBE",decimal:1},
{ name: "INI1RawSpeed1", field_name: "INI1RawSpeed1", unit:"", index: 12, type: "floatBE",decimal:1},
]
let payParser=new PayloadParser({
device:device,
msg:msg,
frameInfo:frameInfo,
appInfo:appInfo,
})
let tdata= payParser.telemetry()
return {
telemetry_data: tdata,
server_attrs: null,
shared_attrs: null
}7.3.2 Parameter Thing Model Script
let port=msg?.userdata?.port || null;
const rpcName="cz580_set_para_22106"
let paraInfo= {
app_38: { name: "pwron_delay", field_name: "pwron_delay", unit: "ms", index: 38, type: "uint16le" },
app_70: {name: "period_up", field_name: "period_up", unit: "s", type: "uint32LE"},
app_74: {name: "period_read", field_name: "period_read", unit: "s", type: "uint32LE"},
app_110: {name: "cov_INI1Speed1", field_name: "cov_INI1Speed1", unit: "", type: "floatBE",decimal:1},
app_150: {name: "addr_modbus", field_name: "addr_modbus", 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
/v32/{Organization Account}/tkl/up/telemetry/{eui}
8.2 Example Reported Data
According to the fields defined in this template’s thing model, the sample formatted data is as follows:
{
"eui": "6353012af10a9331",
"active_time": "2026-02-05T08:35:48.000Z",
"thingModelId": "22106",
"thingModelIdName": "cz580_22106",
"telemetry_data": {
"snr": 13.5,
"rssi": -51,
"battery": 3.37,
"ratio": 1,
"INI1Speed1": 3000.0,
"INI1RawSpeed1": 3000.0
}
}Description:
thingModelIdshould actually follow the platform-generated value; here, business code 22106 is used only as an example.thingModelIdNamecorresponds to the telemetry thing model cz580_22106.ratiocorresponds to the parameter related to sensing points per revolution collected by the device.INI1Speed1is the processed speed value.INI1RawSpeed1is the raw, unprocessed speed value.
9. RPC
9.1 RPC Names
Parameter Configuration RPC
- Name: [CZ580 SET] para
- id Name: cz580_set_para_22106
Parameter Read RPC
- Name: [CZ580 GET] para
- id Name: cz580_get_22106
9.2 Parameter Definitions
| Parameter Address | Name | field_name | Unit | Type | Description |
|---|---|---|---|---|---|
| app_38 | pwron_delay | pwron_delay | ms | uint16le | Power-on delay |
| app_70 | period_up | period_up | s | uint32LE | Upload period |
| app_74 | period_read | period_read | s | uint32LE | Collection period |
| app_110 | cov_INI1Speed1 | cov_INI1Speed1 | floatBE | Speed change threshold | |
| app_150 | addr_modbus | addr_modbus | uint8 | Modbus address |
9.3 RPC Code
Parameter Configuration RPC
let classMode = (device && device.shared_attrs && device.shared_attrs.class_mode) || "ClassA";
let intervalms = classMode === "ClassA" ? 0 : 2000;
const rpcName="cz580_22106_set"
let paraDef= {
app_38: { name: "pwron_delay", field_name: "pwron_delay", unit: "ms", index: 38, type: "uint16le" },
app_70: {name: "period_up", field_name: "period_up", unit: "s", type: "uint32LE"},
app_74: {name: "period_read", field_name: "period_read", unit: "s", type: "uint32LE"},
app_110: {name: "cov_INI1Speed1", field_name: "cov_INI1Speed1", unit: "", type: "floatBE",decimal:1},
app_150: {name: "addr_modbus", field_name: "addr_modbus", 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 msgQueParameter Read RPC
let classMode = (device && device.shared_attrs && device.shared_attrs.class_mode) || "ClassA";
let sleepMs = classMode === "ClassA" ? 500 : 5000;
let paraDef= {
app_38: { name: "pwron_delay", field_name: "pwron_delay", unit: "ms", index: 38, type: "uint16le" },
app_70: {name: "periodUP", field_name: "periodUP", unit: "s", type: "uint32LE"},
app_74: {name: "periodRead", field_name: "periodRead", unit: "s", type: "uint32LE"},
app_110: {name: "cov_INI1Speed1", field_name: "cov_INI1Speed1", unit: "℃", type: "floatBE",decimal:1},
app_150: {name: "addr", field_name: "addr", 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:sleepMs,
})
return [msg]10. Template Selection
In the ThinkLink platform, search for the template:
- CZ580
Or search by business type:
- 22106 / Speed Transmitter / RS485 Modbus Speed Acquisition
Supplementary Notes
- The manufacturer’s default Modbus parameters are:
These parameters can be modified through the host computer tool.
- Address: **1**
- Baud rate: **9600**
- Data bits: **8**
- Parity: **None**
- If RS485 communication parameters need to be modified, register 7166 must first be written with 0xCCAA to enable modification, and then parameters such as address, baud rate, and data format can be written.
- The manufacturer’s documentation provides the following Modbus frame examples:
- Read speed:
01 03 00 00 00 01 84 0A - Write sensing points per revolution:
01 10 00 66 00 01 02 00 0C AF 93
- Read speed: