Remote panel technology is an extension of remote testing technology in the process of virtual instrument design. Using remote panel technology, users can directly operate the measurement and control software on the main control computer through the network, observe the measurement and control data in real time, and complete the measurement and control task. This paper discusses the hardware and software design scheme of remote speed regulation of DC motor based on remote panel technology. Remote panel technology simplifies the system design and meets the design requirements of correct transmission, real-time communication and network security. Since LabVIEW 6. 1, LabVIEW has integrated remote panel technology. Users can directly open and operate the front panel of VI on the local (client) computer in a very simple way, and even embed the front panel window of LabVIEW VIs into a webpage for direct operation. The picture shows the release of the remote control panel.
Before configuring the LabVIEW Web server to use the remote panel on the client, you must first run LabVIEW on the server computer and configure the Web server. Web servers require the following three configurations:
I. file path and network settings
Select Web server: configuration from the drop-down list box in the options dialog box, switch to the file path and network settings configuration page, and select Enable web server to start LabVIEW Web server. The default HTTP port of LabVIEW Web server is 80. Generally, port number 49 152 ~ 65535 is the recommended network port for user-defined TCP/IP applications.
Two. Client access permission settings
Select Web Server: Browser Access from the drop-down list in the options dialog box, and switch to the client access permission setting page, where you can set the clients who are allowed or forbidden to ask questions and their access permissions to improve network security.
Three. VIS access permission setting
Select Web Server: Visible VIs from the drop-down list box in the options dialog box, switch to the VIs permission setting page, and set the VIs that customers are allowed to access.
Setting and using remote panel in 5. 1. 1 LabVIEW
Setting up and using the remote panel in LabVIEW only takes two steps:
Step 1: Open the LabVIEW Web server service on the computer on the LabVIEW Web server side.
Step 2: Connect and run the remote panel on the client computer. At present, there are two ways to operate the remote panel on the client computer: directly operating the remote panel in LabVIEW environment or directly operating the remote panel in a web page with a web browser.
5.2 Based on the remote panel technology, the DC motor speed control system is established.
The hardware framework of the system is as shown in the figure, and the virtual instrument is used at the bottom of the test, giving full play to the powerful program control ability of the virtual instrument module, and testing the DC motor equipment at the bottom. The test server and data server connect virtual instruments and end users through the network to form an extensible networked test system.
System hardware framework
software design
Program design of 1. speed measurement
In order to realize the automatic adjustment of motor speed, a speed measuring program should be designed to determine the relationship between speed and control voltage. The photoelectric sensor can be used as an input signal source to measure the motor speed. When photoelectric sensors are used, reflective aluminum foil with a certain width is usually pasted on the shaft, and a pulse signal is output every rotation of the rotor. After signal conditioning, the pulse signal is collected by PCI-622 1 acquisition card of NI company, and finally the motor speed is obtained by counting the number of pulses.
2. Design of speed regulation program
Because different rotational speeds correspond to different motor control voltages, two sets of data can be obtained through measurement, one is the rotational speed value of the motor, and the other is the motor control voltage value corresponding to the rotational speed value one by one. The approximate functional relationship between speed and control voltage can be obtained by general polynomial fitting vi (curve fitting node). The relationship obtained in this system is: y = 0.000206x+1.101549, where y represents the control voltage value and x represents the motor speed value. Then the rotational speed value is converted into the corresponding control voltage value through the formula node, which is output from the analog output port of the acquisition card by aoupdatechannel.vi. Finally, the output voltage is connected to the input end of the motor rotation control device, which can drive the motor to rotate at a given speed. PCI device number, DAQ sampling number and sampling frequency, and then through communication with hardware encoder, the number of pulses in a certain time is calculated by formula, and the M/T algorithm of photoelectric encoder is adopted. The calculated speed value is transmitted to the speed value and then displayed on the speed dial.
3. Closed-loop control of speed regulation
Due to the influence of the surrounding environment, the actual speed of the motor may not match the specified speed. In order to overcome these unfavorable factors, this paper introduces feedback in the design process. Firstly, a speed is given to make the motor rotate, then the speed signal is fed back to the computer after A/D conversion, and then the actual speed is measured by the speed measuring program. After comparing the actual speed with the given speed, the speed control signal is given to control the speed of the motor until the error is within the allowable range, so that the actual speed approaches the specified speed within a certain precision range.
5.3 Using remote panel to realize real-time panel measurement and control of motor.
Design the speed regulation program on the test server, and then configure the LabVIEW Web server according to the above method. Finally, start LabVIEW on the client, select Operation → Connect Remote Panel in the menu bar of LabVIEW, and the dialog box of Connect Remote Panel pops up. In the "Connect to Remote Panel" dialog box, enter the IP address, domain name or computer name of the server computer, such as 192. 168.4.23, laoli, and enter the name of the remote VI to be controlled in the VI name column, such as motor speed regulation.vi, and enter the http port set in the Web server configuration in the port column (. If you want to control the remote panel immediately, please check the request control option (you can also right-click the remote panel to get control). At this point, the server-side motor speed control panel program is presented to the user, as shown in the figure. Users can operate it just like the program panel on this machine.
Control keys placed on the panel include: input box with given speed and precision, dial and digital display of actual speed, speed control knob for start/stop, switch for manual speed control and automatic speed control, waveform display box and program closing button. Click the Run button on the Run toolbar to run the program. At this time, the switch between manual speed regulation and automatic speed regulation is in the state of manual speed regulation. Slowly adjust the pointer on the start/stop knob to start the motor smoothly. When the motor is running normally, you can switch the switch to the state of automatic speed regulation, and then input the given speed and accuracy. At this time, the actual speed value will be displayed in the dial and the speed display box. If you want to stop running, you must switch the switch to manual speed regulation, slowly adjust the pointer to zero scale, and click the close button to end the program running.
Remote control panel
The sixth chapter summarizes the full text.
The development of virtual instrument is a hot spot in the field of automatic measurement and control. Virtual instrument is mainly used to build computer test and analysis system and automatic control system. It replaces traditional electronic instruments with software, and gives full play to the potential of the new generation of computers with large capacity and high speed. It is an important means of data collection and analysis. With the development of network technology, the slogan "network is instrument" puts forward a new development direction for the development of virtual instrument, that is, remote virtual instrument. The research of remote virtual instrument system has a broad application prospect in industry, teaching and medicine.
Virtual instrument system integration and bus technology, one is to design instruments and meters as I/O cards of PC and insert them directly into I/O expansion slots of computers, so that different instruments and meters can be integrated into one system, which greatly reduces the cost. A typical system is PC-based. Memory, logic analyzer, arbitrary function generator, digital multimeter, frequency meter, various types of special devices and instruments. According to the need, the integrated instrument card is directly inserted into the I/O expansion slot of the PC to form a multifunctional integrated instrument. All these instrument cards run under the support of software that conforms to unified standards. * * * Enjoy computer resources. The second is to make the motherboard of the test instrument into a bus structure. By inserting functional plug-ins such as analog input/output, digital input/output, frequency or pulse input/output into the slot of bus backplane, test systems with different scales and functions can be formed. The measurement and control cabinet is connected with the computer through the interconnection bus, and the test equipment is connected with the computer network through the field bus, thus forming an automatic measurement and control system. Bus technology is widely used in virtual instruments.
The hardware and software structures of virtual instrument and remote virtual instrument system are deeply studied. Through the research and comparison of various remote virtual instrument development technologies, the development scheme of remote instrument system is put forward and its development process is described in detail. The physical connection hardware of remote virtual instrument system is studied, including the application of data acquisition card based on PCI bus and the realization of physical monitoring based on serial bus. Among them, in the data acquisition card system based on PCI bus, the system structure, data acquisition and speed control examples of DC motor are studied, and in the control system based on serial bus, its structure and communication process are studied, and specific communication examples are developed. The virtual simulation and physical control experiments of measurement and control specialty are designed, and various control algorithms, including classical control algorithm, modern control algorithm and intelligent control algorithm, and their applications are studied, which provides a theoretical basis for the control of remote virtual instrument system. Using these algorithms, the experiments of automatic control principle and other courses are developed for inverted pendulum. This paper introduces the application of remote virtual instrument system in experimental teaching-the development and implementation of network measurement and control virtual laboratory. The network measurement and control virtual laboratory system is a very complex and huge system. It is necessary not only to plan the preparation of virtual experiment reasonably and realize networking, but also to improve the management functions of the laboratory, including the design of client and server.
In addition, the storage and management of experimental information, user information and experimental data are also functions that the laboratory needs to realize. In the specific design, this paper analyzes the overall objectives and functions of the system, defines the structure and functions of each component, and then designs and implements them respectively. So far, the technology of network measurement and control virtual system is mature and can run on LAN. The system provides a fully functional laboratory measurement and control website. After entering the website, students can freely choose to carry out various experiments by registering and logging in. At the same time, the system can realize the control of experimental users' access rights and the management of remote access. The system has strong openness and flexibility, and new functions can be added continuously according to actual needs in future use.
This topic involves measurement and control sensors, data acquisition, signal processing, automatic control and the construction and management of computer websites. It needs to master many aspects of knowledge. Due to the limitation of software and hardware and time, there are still some shortcomings.