0 Introduction
With the introduction of electronic technology and computer automatic control technology, the automation and intelligence level of alarm facilities are constantly improving. At the same time, with the increase of high-rise buildings and large comprehensive buildings, the alarm system has become more complicated and three-dimensional, and the alarm system has been asked to be multifunctional, that is, not only anti-theft, but also fire prevention, harmful gas alarm and a series of other requirements. Accurately and timely obtaining and recording alarm information can help security personnel to respond quickly, reduce losses, and provide a basis for future analysis of the cause. The current graphic alarm system mainly has the following types: one is a multi-level alarm system composed of alarm modules such as partition controllers, alarms, and master controllers. The PC is mainly connected to the master controller and is only responsible for reporting, printing, display and other functions; the other is based on video monitoring, which alarms by capturing and processing images. There are dedicated hosts and equipment. Although it is powerful, it is expensive. According to the above background, a graphic alarm system was developed with a PC as the main control machine.
LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is the abbreviation of laboratory virtual instrument integrated development platform. It is one of the most widely used virtual instrument development environments in the world. It has industrial standard graphical programming tools and is mainly used to develop test, measurement, and control systems. LabVIEW has many similarities with traditional programming languages, such as data types, data operations, control structures, etc., but LabVIEW uses graphical languages for programming, making programming more flexible and convenient. The host computer software of this system is written in LabVIEW, which can reduce the difficulty of development, shorten the development cycle, and can make quick changes to the system according to user needs.
1 System Configuration
The alarm system is mainly composed of hardware and software. The hardware part includes various types of sensors, defense zone modules, USB/RS-485 adapters, PCs and communication cables; the software part is mainly a graphic alarm software developed using LabVIEW. The defense zone module is mainly composed of AT89C2051 microcontroller, SN75176 bus transceiver and address encoder. When the sensor is working normally, the I/O port is low level, and when there is an alarm, a high level is generated. After the I/O port receives the alarm signal, the address code of the sensor that generates the alarm is sent to the host computer through the SN75176 bus transceiver through the alarm bus. The alarm bus includes two RS485 data lines and two power lines. The use of USB/RS485 adapter enables the system to have both the strong expansion capability of USB bus and the long transmission distance of RS485 bus. When the host computer receives the address code sent by the defense zone module, it transfers the address code to the ACCESS database, obtains the detailed information of the sensor corresponding to the address code from the database, and then issues an alarm in three ways: graphics, text, and sound. The recording module records the alarm for future query.
2 Software Design
2.1 Database Connection
Access database is a relational data management system with the advantages of small database, low system resource occupation and good compatibility with Windows. It can store, process and manage data information according to user-defined relationships. It consists of many basic tables to store different information and design the relationship between tables. LabVIEW provides a variety of external program interfaces, such as ActiveX and .NET, so it can be connected to the database through methods such as ADO, DA0, ADO.NET, etc. LabSQL is used to connect LabVIEW and Access database. LabSQL is an open source database access tool through ADO and can be called as a normal VI. The monitoring point information table in the Access database consists of the following fields: sensor address code, sensor type, sensor floor, sensor area, sensor label, sensor coordinates (X coordinate, Y coordinate). The alarm information record table consists of fields such as sensor address code, type, alarm time, and alarm date. The management personnel authority table consists of fields such as personnel number, login record, and authority code. When an alarm message is generated, the zone module will send the address code of the sensor that generated the alarm to the PC. After the system receives the address code, it first uses ADO Connection Create. vi establishes a connection with ADO, and then opens the DSN through ADO Connection Open.vi, which is specified by ConnectionString. Use the ConcatenateStrings string synthesis function to combine the address code into a complete SQL query statement. ADO SQL execute.vi can obtain detailed information about the sensor through this query statement.
[page]
2.2 Graphic alarm
The main function of the graphic alarm is to display the floor plan on the screen and prompt the alarm point. The existing graphic alarm system generally adopts two methods. One is the built-in drawing program of the program. The advantage of this method is that it does not rely on other drawing software and is easy to use, but the drawing ability is weak and the map effect is not good. The second is to establish a connection with other professional drawing software (such as: AUTOCAD). Although this method can obtain high-quality maps, it is difficult for users to complete the map alone, and it is not convenient to change the map later. This system no longer restricts the drawing software. Users can use any drawing software to draw the map. As long as the picture is saved in JPG or BMP picture format and released to the specified location, the system will automatically call the map file.
The alarm point is displayed as a flashing dot on the map. The Bresenham algorithm is used to draw the circle to generate the arc. The circle with the center at the origin has four symmetry axes x=0, y=0, x=y, x=-y. The symmetry of the circle can reduce the amount of calculation. If a point (x, y) on the arc is known, the other 7 points about the four symmetry axes can be obtained. This property is called the eight symmetry of the circle. Therefore, as long as one-eighth of the arc is scanned and converted, the pixel set of the entire arc can be obtained. The recursive formula for the Bresenham algorithm to generate one-eighth of the arc is:
After querying the detailed information of the address, ADO SQL execute.vi outputs the query results in array form. Through the Index Array function, the map file name corresponding to the address code can be obtained. Then, the relative path is formed through the Concatenate Strings function, and the complete path can be created through the build path after matching the base path. Read JPEG Fjle.vi can read the map file through this path and transfer the map file to Draw FlattendedPixmap.vi in the form of image data. At the same time, the Index Array function also obtains the coordinates of the sensor, but because the result is a string, it must be converted into a number through Decimal string To Number, and then bundled and transferred to Draw Flattended Pixmap.vi. Then, the Bresenham algorithm is implemented using the formula node, and the graphic display of the alarm point is realized through DrawFlattended Pixmap.vi.
2.3 Communication Module
The communication module is mainly responsible for the communication between the host computer and the defense zone module. The communication module calls the defense zone module through patrol inspection. If the defense zone module works normally and no alarm occurs, the defense zone module will give a response to the host computer. After receiving the response, the host computer will continue to call the next defense zone module. If an alarm occurs, the defense zone module will send the address code of the alarm probe to the host computer. If the defense zone module does not respond within the specified time, the communication module will repeat the call once. If there is still no response, a fault alarm will be generated and the next defense zone module will continue to be called. The communication module can flexibly set the transmission speed according to the transmission distance. The transmission rate is set to 1200 baud by default. At this speed, the transmission distance can reach about 2 kilometers.
[page]
2.4 Recording Module
The recording module is mainly responsible for storing the alarm information, and can query and print it. The alarm information includes the alarm probe ID, location, type, and alarm date and time. The storage function mainly saves the alarm records into a database or Excel file for future query and statistics. The operator can view and print the data, but does not have the authority to change the data. The printing function is realized through a printer.
When an alarm message is generated, GetData/Time In Sermonds.vi obtains the current date and time, displays the time in the specified format through Format Data/Timestring.vi, and then displays the time and other information through an array through Build Array.vi.
3 Conclusion
The graphic alarm system provides a graphical operation interface for security personnel, which is conducive to accurate and intuitive monitoring, and can quickly make judgments and reduce losses. The use of LabVIEW for development reduces the workload and makes the program flexible, which is conducive to future modifications according to user requirements. The use of PC as the control machine simplifies the system structure and reduces costs. In addition, the performance requirements for PC are not high, which is convenient for use in hotels, schools and other places.
Previous article:A Distributed Fire Alarm Control System Based on CAN Bus
Next article:Excellent design of anti-theft alarm - "Walnut-shaped prevention plan"
Recommended ReadingLatest update time:2024-11-16 19:36
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Modern Motor Control Technology (Wang Chengyuan, Xia Jiakuan, Sun Yibiao)
- Mir T527 series core board, high-performance vehicle video surveillance, departmental standard all-in-one solution
- Akamai Expands Control Over Media Platforms with New Video Workflow Capabilities
- Tsinghua Unigroup launches the world's first open architecture security chip E450R, which has obtained the National Security Level 2 Certification
- Pickering exhibits a variety of modular signal switches and simulation solutions at the Defense Electronics Show
- Parker Hannifin Launches Service Master COMPACT Measuring Device for Field Monitoring and Diagnostics
- Connection and distance: A new trend in security cameras - Wi-Fi HaLow brings longer transmission distance and lower power consumption
- Smartway made a strong appearance at the 2023 CPSE Expo with a number of blockbuster products
- Dual-wheel drive, Intellifusion launches 12TOPS edge vision SoC
- Toyota receives Japanese administrative guidance due to information leakage case involving 2.41 million pieces of user data
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- It turns out that she was the one who scolded Lei Jun for an hour as if he were a primary school student
- Answer questions and get gifts | Become a PCB expert with Mentor
- NB-IOT data adding problem in transparent transmission cloud data
- 【TouchGFX Design】Use of Scroll List & Scroll Wheel in Control Container
- Grain in Ear Grain in Ear, busy harvesting
- What is millimeter wave? -- "Millimeter wave basics" (white paper)
- Talking about five dollars: How deep is the water in children's phone watches?
- Samsung Suzhou factory announced major layoffs!
- Gaoyun FPGA reports the error "suitable range is from 400MHz to 1200MHz"
- Simple summary of Android Bluetooth pairing communication, app layer implementation of Bluetooth silent pairing, ClsUtils class