With the introduction of computers in industrial control systems, the software and protocols used in automatic industrial control have become increasingly complex. However, any complex technology will eventually move towards a unified standard, so major industrial control manufacturers around the world have jointly launched the OPC standard, which is specifically used for automated industrial control. Along with it came various configuration software that supports OPC technology. National Instruments of the United States, NI, was not far behind and launched the latest LabVIEW 8.0 DSC module in 2006 to support OPC technology. Since LabVIEW, as a development software, has programming flexibility that ordinary configuration software cannot match, LabVIEW 8.0 and its DSC module make up for the fatal flaws of ordinary configuration software in the field of industrial testing and automation.
1 Introduction to OPC Technology
OPC (OLE for Process Control) is an industrial standard that is the result of cooperation between many of the world's leading automation and software and hardware companies and Microsoft. This standard defines how to exchange real-time automation data between PC-based clients using Microsoft operating systems. Traditionally, hardware and software communication is implemented by writing custom interfaces and drivers directly in the software, but this is not only expensive but also not very versatile. With OPC technology as a communication "mediator", everything becomes very simple. Software no longer needs to write drivers for each type of hardware, all it needs to do is communicate with an OPC Server that meets industrial standards. Hardware providers no longer have to worry about whether many software can support their hardware, they only need to provide a standard OPC Server that supports the hardware. Therefore, OPC technology avoids duplication of development, greatly reduces costs, speeds up software development and improves efficiency. Today, OPC specifications have been used in thousands of projects by hundreds of companies. The organization that manages the standard is the OPC Foundation. The foundation was established by five companies in 1996, and now there are 360 members around the world promoting and applying this technology.
Specific advantages of OPC:
1) Adopting the standard Windows system interface, no matter what form the field equipment exists in, customers can access it in a unified way, thus realizing the openness of the system and facilitating the interface with other systems.
2) The OPC specification is based on OLE/DCOM, which supports network protocols such as TCP/IP. Therefore, each subsystem can be physically separated and distributed on different nodes of the network.
3) Adopting OPC specifications facilitates system configuration and greatly simplifies system complexity, which can greatly shorten the software development cycle, improve the reliability and stability of software operation, and facilitate system upgrades and maintenance.
2 LabVIEW 8.0 DSC Module Introduction
LabVIEW is an industry-leading industrial standard software tool for developing test, measurement and control systems. It is an intuitive graphical programming language designed for engineers and scientists. It integrates development software with various measuring instrument hardware and computers to build virtual instrument systems to form user-defined solutions. After 20 years of evolution and improvement, LabVIEW has established its dominant position in the field of PC-based measurement automation and has become the industry's de facto standard. The latest LabVIEW 8 contains hundreds of new features, and the update intensity exceeds any previous version. Its additional DSC (Datalogging and Supervisory Control) data logging and monitoring module is designed for SCADA systems. It can easily communicate with OPC Servers and can also generate its own OPC Servers. In addition, there are many common SCADA functions, such as configuration-based alarms and events, user-level security mechanisms for applications, graphical development of distributed monitoring and control, real-time and historical data tracking, built-in networking to facilitate data sharing and integration with third-party devices, and networked databases for distributed data recording. Since the DSC module can be seamlessly integrated with the LabVIEW development environment, the SCADA system developed based on LabVIEW 8.0 and its DSC module can fully utilize the powerful data processing and analysis functions of LabVIEW, and has incomparable advantages over traditional SCADA configuration software.
Figure 1 Schematic diagram of the SCADA system structure based on OPC Server and LabVIEW 8.0 DSC module
3 Accessing OPC Server via LabVIEW 8.0 DSC Module
There are three ways to communicate with OPC Server through LabVIEW: 1) Access OPC Server through ActiveX Automation Interface; 2) Communicate with OPC Server through NI DataSocket technology; 3) Communicate with OPC Server using its DSC module. The first two methods are only suitable for connecting with a small number of OPC tags. Because it is necessary to write multiple repetitive codes or read and write through For loops, the reading and writing speed will decrease when the number of points increases, making the system difficult to maintain. Through the built-in communication mechanism with OPC Server in the DSC module, programming becomes quite easy, and its programming scale and reading and writing speed are not limited by the number of points. Therefore, only the third method is introduced in detail here. If readers are also interested in the first two methods, please refer to the LabVIEW 8.0 User Manual.
3.1 Installation and Configuration of OPC Server
Most hardware equipment manufacturers that require computer acquisition and control provide OPC Servers for their equipment. At present, many OPC Server suppliers have even developed OPC Servers that connect to ODBC data sources, through which users can access the database by accessing the OPC Server. At present, most OPC Servers run under Windows, and a few OPC Servers can run under Linux. Just install it according to the manual provided by the provider. Due to the use of DCOM technology, other computers on the network can usually access your OPC Server. But if your operating system is WinXP SP2, you must make some corresponding settings. Please refer to relevant documents for details.
Most OPC Servers use XML configuration files for related configuration, such as hardware address, related parameters, etc. After configuration, restart the computer, and the OPC Server will automatically start as a Windows service when the computer starts. You can use any OPC client to access the OPC Server and browse the OPC tag information. For example, NI provides Server Explorer for free (you can download it for free on the NI website).
3.2 Establishing a connection with OPC tags
The way to connect to OPC tags through LabVIEW 8.0 DSC module is completely different from previous versions. LabVIEW 8.0 introduces the concept of shared variables. Shared variables can be bound to OPC tags on any computer locally or on the network. Once bound, users only need to operate shared variables as ordinary variables without having to know which computer's OPC tag the shared variable is communicating with.
Binding to OPC tags is very simple.
1) Create a new LabVIEW Library.
2) Create a new I/O Server in the library. During the creation process, you can browse which OPC Servers can be connected on the local computer or on the network, and then bind the I/O Server to the OPC Server you need to connect to.
3) Create a new shared variable in the Library and bind it to the OPC tag listed in the I/O Server. At the same time, you can also set some other properties of the shared variable, such as: whether to store, alarm upper and lower limits, variable description, user access permissions, etc.
Figure 2 Using the shared variable event feature to read OPC tag data
However, this event can only be triggered when the value of the OPC tag changes. Many OPC tags also use Quality to indicate whether their current value is correct. For example, when the OPC Server is disconnected from the hardware, the Quality of its tag will be displayed as "bad". Therefore, when the value of the OPC tag changes from "good" to "bad", the above program cannot detect it. To solve this problem, we can only use DataSocket to read the status of its Quality in real time. As shown in Figure 3.
4. Use LabVIEW to build your own OPC Server
When users develop their own hardware devices or some hardware manufacturers do not provide OPC Servers, it is very important to write OPC Servers for the hardware devices. However, dedicated OPC Server development tools are generally expensive and difficult to use. It is very simple to generate your own OPC Server through LabVIEW. We can first communicate directly with the driver of the hardware device through LabVIEW. Then put the read data in the OPC Server as individual OPC tags and publish them. [page]
Figure 4 Simulated water tank interface
Then create a new I/O Server in the Library and connect it to the simulated water tank VI. During the creation process, LabVIEW automatically obtains the control controls and display controls in the simulated water tank program as alternative OPC tags, and the user can select several of the controls as OPC tags. For example: Tank Volume, Input Flowrate, Tank Valve can be used as readable and writable OPC tags, and Tank Level, Tank Output Flowrate can be used as read-only OPC tags. After the I/O Server is created, it can run as a real OPC Server, and these tags can be browsed in any OPC client tool. From now on, you don't have to worry about providing hardware drivers for each user. You only need to provide a standard OPC Server.
5. Conclusion
In summary, it can be seen that through the LabVIEW 8.0 DSC module, it is very easy to access the OPC Server, and it is also convenient to generate your own OPC Server. Since the DSC module can be seamlessly integrated with LabVIEW, the SCADA system implemented by using the powerful programming features and rich hardware interfaces of LabVIEW 8.0 can realize some functions that cannot be realized or are difficult to realize with general configuration software, such as complex logic processing, data analysis, etc. The slow control system in the second phase of the Beijing Electron-Positron Collider, a national key project in which the author participated, has adopted a large number of technologies combining OPC and LabVIEW, which not only reduces costs, but also improves development speed and reduces maintenance difficulty. With the promotion of LabVIEW 8.0 and its DSC module, it is believed that it will play an increasingly important role in the field of computer distributed monitoring.
Previous article:Frequently asked questions for Labview beginners
Next article:Difference between LabVIEW and LabWindows
Recommended ReadingLatest update time:2024-11-16 20:57
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Arduino Nano collects temperature and humidity data through LabVIEW and DHT11
- Modern Testing Technology and System Integration (Liu Junhua)
- Computer Control System Analysis, Design and Implementation Technology (Edited by Li Dongsheng, Zhu Wenxing, Gao Rui)
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- 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
- Summary of 2019——Looking forward to 2020
- Share some attenuator technology in communication systems
- TouchGFX Design Works Summary (Activity extended to April 26)
- What Wi-Fi thermal challenges are RF front-end designers facing?
- [Transfer] OTA case sharing of STM32+WIFI based on Espressif ESP8266
- [GD32E231 DIY Contest]——05. Hardware Schematic and PCB Design
- Made a simple stm32 bootloader that reads files from the SD card to start
- Let’s learn about the problems often encountered in high-frequency PCB circuit design!
- Review summary: Sipeed LicheeRV 86 development board
- FPGA Power Supply Analysis