当前位置:网站首页>Engineering monitoring multi-channel vibrating wire sensor wireless acquisition instrument external digital sensor process
Engineering monitoring multi-channel vibrating wire sensor wireless acquisition instrument external digital sensor process
2022-07-25 13:50:00 【Hebei stable control technology】

1. Data access logic of digital sensor
VS Device support in RS485 The interface is externally connected with a digital sensor , Single type 、 Multi type digital sensor access .
Single type digital sensor : Using registers DS_SENSOR(282) To set the type and number of single type digital sensors ( See the table below ). VS It will automatically send sensor reading instructions , When VS After receiving the data output by the sensor, parse the data and update it to the channel register CHxx Inside , Finally, it is sent to the remote server .
Multiple types of digital sensors : Using registers MDS_EN(290) To set the number of types of multi type sensors , Set to 0 When, it means that the multi type digital sensor function is turned off . Using registers MDS01~08(291~298) To set the type code and quantity of each type separately ( See the table below ). When MDS_EN The value of high byte is 0 when , The read sensor data will be saved in CHxx Register , After all sensors are read, they are sent to the remote server . And when MDS_EN The high byte of is 1 It will be sent to... Independently after reading each sensor TCP The server .

With VS The firmware version of the device is constantly updated , The types of digital sensors supported will also continue to increase .
2. Digital sensor start channel assignment
register DS_CHNUM(299) It is used to set which channel the read digital sensor data starts to occupy , The default is 1. The number of channels occupied by a single digital sensor depends on the specific sensor type , for example : Each laser rangefinder will occupy 1 Channels , Each biaxial tilt sensor will occupy 2 Channels , The three-axis accelerometer will occupy 3 Channels . VSxxx According to the type and number of sensors DS_CHNUM The specified channel starts allocating channel registers in turn CHxx.
for example : DS_CHNUM=17;DS_SENSOR=0x0203;MDS_EN=0x0002;MDS01=0x0302;MDS02=0x0C03; Indicates that the data of the digital sensor is from CH17 Start occupying , A single type digital sensor laser rangefinder is connected externally 3 individual + Multiple types of digital sensors 2 class ( The first 1 Class is biaxial inclinometer 2 individual , The first 2 Class is static level 3 individual ), common 8 Digital sensors , Then the channel allocation is shown in the following table .

3. Multi type digital sensor independent transmission protocol
When sending sensor data independently , Each sensor is a separate packet , Send to the preset TCP The server . Packet string , The structure is as follows :
UDID>MDS+ Sensor type code + The first x A sensor > The first x package / total x package > Sensor data , Checksum character , Carriage return line feed, such as :“861234567812345>MDS0B03>1/1>1234DF\r\n”
861234567812345:VS Unique equipment identification code MDS: Fixed string , Indicates that the data in this package is multi type digital sensor data sent independently 0B:16 Base number 0x0B, namely 10 It's binary 11, Indicates that the type of this sensor is 11( Gold code displacement sensor ).03:16 Base number 0x03, Indicates that this packet of data is the... Of this type of sensor 3 A sensor .1/1: Indicates that this sensor has only 1 Packet data , This is the first 1 package .1234: The value of the sensor ,16 Base string , Corresponding 10 Into the system for 4660, For this sensor , Express 4660mm.DF: The sum check value of all the previous bytes .
\r\n: Carriage return line feed symbol
Be careful : Sensor type code 、 Number 、 Sensor data , It's all 16 Base string , Every two characters represent 1 Bytes , The data in the above example 1234 Express 0x12 and 0x34.
边栏推荐
- einsum(): operands do not broadcast with remapped shapes [original->remapped]: [1, 144, 20, 17]->[1,
- 刷题-洛谷-P1047 校门外的树
- Brush questions - Luogu -p1047 trees outside the school gate
- NoSQL, relational database, row and column database comparison and analogy
- 命名空间与库
- Azure Devops (XIV) use azure's private nuget warehouse
- Canvas judgment content is empty
- Blocking queue for concurrent programming
- Arduino code of key state machine for realizing single, double click, long press and other functions with esp32 timed interrupt
- Lesson of C function without brackets
猜你喜欢

Nodejs link MySQL error: Er_ NOT_ SUPPORTED_ AUTH_ MODEError: ER_ NOT_ SUPPORTED_ AUTH_ MODE

在线问题反馈模块实战(十三):实现多参数分页查询列表
![Error of Tencent cloud [100007] this env is not enable anonymous login](/img/a2/a209a0d94e3fbf607242c28d87e2dd.png)
Error of Tencent cloud [100007] this env is not enable anonymous login

刷题-洛谷-P1150 Peter的烟

刷题-洛谷-P1059 明明的随机数

"Digital security" alert NFT's seven Scams

刷题-洛谷-P1085 不高兴的津津

Brush questions - Luogu -p1150 Peter's smoke

Canal realizes MySQL data synchronization

Sports luxury or safety luxury? Which type of Asian Dragon and Volvo S60 should we start with?
随机推荐
Mxnet implementation of densenet (dense connection network)
JS array indexof includes sort() colon sort quick sort de duplication and random sample random
Construction and practice of yolov7 in hands-on teaching
Brush questions - Luogu -p1152 happy jump
力扣(LeetCode)205. 同构字符串(2022.07.24)
命名空间与库
刷题-洛谷-P1161 开灯
剑指offer专项突击版第10天
互斥锁、自旋锁、读写锁……理清它们的区别和应用
Canvas judgment content is empty
[platform IO compile hifive1 revb] * * * [.pio\build\hifive1 revb\src\setupgpio.o] solution to error 1
Turn off automatic update when brew executes commands
redis集群的三种方式
ES6数组去重 new Set()
Leetcode 113. 路径总和 II
Applet H5 get mobile number scheme
Stay on Alibaba cloud mqtt IOT platform
移动端网站,独立APP,网站排名策略有哪些?
Three ways of redis cluster
stable_ Baselines quick start