In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the method of Qt detector management". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of Qt detector management".
I. Preface
The detector is the core and key hardware in the whole system. The terminal node hardware is equipped with a detection chip device, which is responsible for detecting the corresponding gas concentration at the front end, recording the value, waiting for the controller rotation training data to reply, and the controller information table also has the most fields. To store tag, controller name, detector name, register address, model, gas type, gas symbol, upper limit value, lower limit value, maximum value, zero suppression, range, state, sound, map, storage, decimal point, alarm delay, alarm type, X coordinate, Y coordinate.
The meanings of each field are as follows:
Numbering: the number of the node, starting with 1.
Tag: the position number of the detector, used to uniquely identify a detector.
Controller: corresponds to the name of the mounted master device.
Detector: the name of the detector, easy to remember, you can fill in the geographical location.
Ground address: the detector corresponds to the numbered index of the controller.
Type number: the type of the detector, select from the drop-down box.
Type of gas: the detector corresponds to the type of gas collected.
Gas type: the detector corresponds to the type of gas collected.
Upper limit: the upper limit of the alarm.
Lower limit value: lower limit value for alarm
Maximum value: the maximum warning value, which is displayed if it is exceeded.
Zero suppression: the minimum warning value, less than this value displays 0, which is greater than the real value.
Range: assuming that the range is 0.25, the actual number = analog / 4000* the range analog is the collected value.
Shape: enabled by default, and can be disabled when a detector is not picked up.
Sound: the corresponding sound file after the alarm.
Map: the map file where the probe is located.
Storage: the detector records the period of storage, in minutes. That is, how often the records are stored locally.
Decimal point: calculates the number of decimal places corresponding to the data bits of the parsed data.
Alarm delay: after the alarm, how long to deal with, in order to filter the false positives caused by data jitter deviation. The default is 0.
Alarm type: HH LL HL.
X coordinate: the X coordinate of the detector on the map.
Y coordinate: the Y coordinate of the detector on the map.
The values of tag, model, upper and lower limit do not need special description and treatment, and the maximum value, zero elimination, measuring range and decimal point need to be mentioned specially. The maximum value is mainly used to filter beyond the range of the detector and return a very large value, while the interface shows that the value is very unreasonable and ugly. For example, it is unreasonable for the normal temperature to return a few thousand degrees. There must be something wrong. Check it. If the display of several thousand degrees on the interface is obviously illogical, you need to set a maximum value, and once the collected value exceeds this value, you can display the maximum value, and there is no need to display the real value. Zero elimination means that sometimes the detector will have some slight fluctuations, or even collect a negative value, it is necessary to set a minimum value, once the collected value is less than this value, it will be displayed as 0, at this time, it may be a failure of the detector. The meaning of the range is to do an operation on the collected value, generally speaking, the collected value is an analog quantity, which needs to be converted into a real value, and this range is converted as a formula. The decimal point means that the value collected by the detector below may be a data magnified 100x and 1000 times. You need to take the decimal place to be the real value. For example, if you set 1 decimal place, the real value collected is 1000.
Alarm delay and alarm type these two are the flash points of the whole system, features, alarm delay is to prevent the increase of jitter false alarm, such as setting the alarm delay of 3 seconds, which means that after receiving the alarm, do not immediately go to the police, wait 3 seconds to check whether the node is still an alarm, then really trigger the alarm, if not, generally speaking, it is caused by jitter, do not deal with it. Alarm type is the most difficult part in the coding of the whole system, and it is the most difficult. Why? According to our ordinary people's understanding, less than the minimum value is called the low report, greater than the maximum value is called the high report, and those within the range of the minimum and maximum values are normal values. In fact, it is not this kind of conventional logic, and the world is simple and complex. Some cases are less than the minimum value is the normal value, greater than the minimum value is the low report, and greater than the maximum value is the high report, such as oxygen, and this is the case in most of the gas detection industry. The logic of this algorithm has been going on for a long time at that time, but it can't be turned around.
According to the different alarm types set, the upper limit is 100 and the lower limit is 25.
HH said that more than 25 is an understatement and more than 100 is an overstatement.
HL said that less than 25 is an understatement and more than 100 is an overreport.
LL said that less than 25 is an overreport and below 100 is an underreport.
II. Functional features
Collect data port, support serial port + network port, serial port support free setting of serial number + baud rate, network support free setting of IP address + communication port, each port supports collection cycle, default one address per second, support setting communication timeout times, default 3 times, support maximum reconnection time, used to re-read offline devices.
Controller information, you can add the controller name, select the controller address + controller model, and set the number of detectors under the controller.
Detector information, can add tag, free to choose detector type, gas type, gas symbol, high reported value, low reported value, buffer value, clear zero value, whether enabled, alarm sound, background map, storage cycle, numerical conversion decimal places, alarm delay time, alarm type (HH,LL,HL) and so on.
Controller model + detector type + gas type + gas symbol, all can be configured freely.
Maps can be imported and deleted, and all detectors can be dragged and saved freely.
Port information + controller information + detector information, support import and export + export to excel+ printing.
Run record + alarm record + user record, support multi-condition combination query, such as time period + controller + detector, etc., all records can be exported to excel+ printing.
Records exported to excel support all versions of table files such as excel+wps and do not rely on software such as excel.
You can delete data within a specified time range, support automatic cleaning of early data, and set the maximum number of saved records.
Support alarm short message forwarding, support multiple receiving mobile phone numbers, you can set the sending interval, such as instant sending or sending all alarm messages once every 6 hours, the text message content is too long, automatically split multiple text messages.
Support alarm email forwarding, support multiple receiving mailboxes, can set sending interval, such as immediate sending or sending all alarm messages once every 6 hours, support attachment sending.
Overreport color + underreport color + normal color + 0 value color + curve background + curve color, etc., are free to choose.
The Chinese title + English title + logo path + copyright of the software can be set freely.
Provide switch settings for boot operation + alarm sound + automatic login + remember password and so on.
Alarm sound can be set to play the number of times, the interface provides 17 kinds of skin file selection.
Cloud data synchronization is supported, and the information of cloud database can be set, such as database name, user name + password, etc.
Support network forwarding and network reception, after the network reception is turned on, the software receives data from udp for analysis. Network forwarding supports multiple target IP, so it realizes the software of local collection, and freely transfers the data to the client to view the detector data at any time.
Automatically remember the user's last stay in the interface + other information, restart and apply automatically.
The alarm automatically switches to the corresponding map, and the detector button flashes.
Double-click the detector icon to control it back.
Support user rights management, administrator + operator two categories, user login + user exit, can remember the password and automatic login, more than three error messages and close the program.
Support four monitoring modes, equipment panel monitoring + map monitoring + table data monitoring + curve data monitoring, free to switch, four synchronous applications.
Support alarm relay linkage, a tag can link multiple modules and relay numbers across serial ports, and support many-to-many.
The local data store supports sqlite+mysql and remote data synchronization to the cloud database. Automatically reconnect.
The data collected by the local device is uploaded to the cloud in real time so that it can be extracted by other methods such as APP or web.
Two kinds of data sources are supported, one is serial port and network to collect equipment data through protocol, the other is database collection. The database acquisition mode can be used as a general system.
Comes with a device simulation tool that supports 16 device data simulations, as well as database data simulations to test data when there is no device.
The default communication protocol uses modbus protocol, and later increases the support of mqtt and other Internet of things protocols to make a general system.
Supports all windows operating systems + linux operating systems and other operating systems.
Third, effect picture
4. The core code void frmConfigNode::on_btnAdd_clicked () {/ / filters the number limit in the key file int count = model- > rowCount (); if (! AppKey::Instance ()-> checkCount (count)) {return;} model- > insertRow (count); int nodeID = model- > index (count-1,0). Data (). ToInt () + 1 QString positionID = model- > index (count-1,1). Data (). ToString (); QString deviceName = model- > index (count-1,2). Data (). ToString (); QString nodeName = model- > index (count-1,3). Data (). ToString (); int nodeAddr = model- > index (count-1,4). Data (). ToInt () + 1; QString nodeType = model- > index (count-1,5). Data (). ToString () QString nodeClass = model- > index (count-1,6). Data (). ToString (); QString nodeSign = model- > index (count-1,7). Data (). ToString (); float nodeUpper = model- > index (count-1,8). Data (). ToFloat (); float nodeLimit = model- > index (count-1,9). Data (). ToFloat (); float nodeMax = model- > index (count-1,10). Data (). ToFloat () Float nodeMin = model- > index (count-1,11). Data (). ToFloat (); float nodeRange = model- > index (count-1,12). Data (). ToFloat (); QString nodeEnable = model- > index (count-1,13). Data (). ToString (); QString nodeSound = model- > index (count-1,14). Data (). ToString (); QString nodeImage = model- > index (count-1,15). Data (). ToString () Int saveInterval = model- > index (count-1,16). Data (). ToInt (); int dotCount = model- > index (count-1,17). Data (). ToInt (); int alarmDelay = model- > index (count-1,18). Data (). ToInt (); QString alarmType = model- > index (count-1,19). Data (). ToString (); int nodeX = model- > index (count-1,20). Data (). ToInt () Int nodeY = model- > index (count-1,21). Data (). ToInt (); / / automatically increments int id = positionID.right (3). ToInt (); if (id > 0) {positionID = QString ("% 1% 2") .arg (positionID.left (positionID.length ()-3)) .arg (id + 1,3,10, QChar ('0')) } / / position increment nodeX + = App::DeviceWidth + 5; if (nodeX > App::MapWidth-100) {nodeX = 5; nodeY + = App::DeviceHeight + 5;} / / automatically fill the tail sequence increment if (nodeName.startsWith ("detector -")) {nodeName = QString ("detector-1") .arg (nodeAddr) } else if (nodeName.startsWith ("device -")) {nodeName = QString ("device -% 1") .arg (nodeAddr);} else if (nodeName.startsWith ("device #")) {nodeName = QString ("device # 1") .arg (nodeAddr);} else if (nodeName.startsWith ("device")) {nodeName = QString ("device 1") .arg (nodeAddr) } if (count = = 0) {nodeID = 1; positionID = "AT-40001"; deviceName = DBData::DeviceInfo_Count > 0? DBData::DeviceInfo_DeviceName.first (): "Dispatch Room Controller"; nodeName = "detector-1"; nodeAddr = 1; nodeType = "FT-2104"; nodeClass = "GAS"; nodeSign = "PPM"; nodeUpper = 100; nodeLimit = 20; nodeMax = 1000; nodeMin = 5; nodeRange = 0; nodeEnable = "enabled" NodeSound = "11.wav"; nodeImage = DBData::MapNames.count () > 0? DBData::MapNames.first (): "none"; saveInterval = 60; dotCount = 0; alarmDelay = 0; alarmType = "HH"; nodeX = 5; nodeY = 5; if (App::WorkMode = = 2) {positionID = "AT-10001"; nodeType = "WF-GM-DT"; nodeClass = "radiation" NodeSign = "ugy/h"; nodeUpper = 2.5; nodeLimit = 1000; nodeMax = 1000000;}} / / set the newly added row default model- > setData (model- > index (count, 0), nodeID); model- > setData (model- > index (count, 1), positionID); model- > setData (model- > index (count, 2), deviceName) Model- > setData (model- > index (count, 3), nodeName); model- > setData (model- > index (count, 4), nodeAddr); model- > setData (model- > index (count, 5), nodeType); model- > setData (model- > index (count, 6), nodeClass); model- > setData (model- > index (count, 7), nodeSign); model- > setData (model- > index (count, 8), nodeUpper); nodeUpper > model- (model- > model- (model-, 9), model-)) Model- > setData (model- > index (count, 10), nodeMax); model- > setData (model- > index (count, 11), nodeMin); model- > setData (model- > index (count, 12), nodeRange); model- > setData (model- > index (count, 13), nodeEnable); model- > setData (model- > index (count, 14), nodeSound); model- > setData (model- > index (count, 15), nodeImage); nodeImage > model- (model- > model- (model-, 16), model-) Model- > setData (model- > index (count, 17), dotCount); model- > setData (model- > index (count, 18), alarmDelay); model- > setData (model- > index (count, 19), alarmType); model- > setData (model- > index (count, 20), nodeX); model- > setData (model- > index (count, 21), nodeY); ui- > tableView- > setCurrentIndex (model- > index (count, 0)) } void frmConfigNode::on_btnSave_clicked () {model- > database (). Transaction (); if (model- > submitAll ()) {model- > database (). Commit (); DBHelper::loadNodeInfo (); / / update the tag emit positionIDChanged () of the associated table first;} else {model- > database (). Rollback () QUIHelper::showMessageBoxError ("failed to save information, information cannot be empty, please fill in again!");}} void frmConfigNode::on_btnDelete_clicked () {if (ui- > tableView- > currentIndex () .row ()
< 0) { QUIHelper::showMessageBoxError("请选择要删除的探测器!"); return; } if (QUIHelper::showMessageBoxQuestion("确定要删除该探测器吗?") == QMessageBox::Yes) { int row = ui->TableView- > currentIndex (). Row (); model- > removeRow (row); model- > submitAll (); / / load all data actively, otherwise the number of rows obtained is canFetchMore () {model- > fetchMore ();} int count = model- > rowCount (); ui- > tableView- > setCurrentIndex (model- > index (count-1,0)) }} void frmConfigNode::on_btnReturn_clicked () {model- > revertAll ();} void frmConfigNode::on_btnClear_clicked () {int count = model- > rowCount (); if (count select () }} Thank you for your reading. the above is the content of "what is the method of Qt detector management". After the study of this article, I believe you have a deeper understanding of what the method of Qt detector management is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.