Lab 1 Data logging and experimental condition control through LabView Demonstration
实验1通过LabView演示进行数据记录和实验条件控制
2024
Introduction
介绍
In modern experimentation and industrial control, computerised data logging and process control becomes indispensable owing to the advantages including high accuracy, high monitoring and adjustment frequency, low human judgement error, and saving of costs. National Instruments’ DAQ automation platform software LabView is one of the dominating solutions in labs and industrial practices. In this lab you will have chance to building up a LabView VI program to communicate with a NI USB2008 or USB2009 DAQ module. Please refer to lecture notes and library books on basic LabVIEW programing skills.
在现代实验和工业控制中,计算机化的数据采集和过程控制由于具有精度高、监测和调整频率高、人为判断误差小、节约成本等优点而成为不可缺少的手段。National Instruments的DAQ自动化平台软件LabView是实验室和工业实践中的主要解决方案之一。在本实验中,您将有机会构建一个LabView VI程序来与NI USB2008或USB2009 DAQ模块进行通信。请参考课堂讲稿和图书馆书籍中的基本LabVIEW编程技巧。
Activities
Part 1 (students try the simulation on their own computer): Set LabView program for measuring temperature and voltages from two thermocouples
第1部分(学生在自己的计算机上尝试模拟):设置LabView程序,用于测量两个热电偶的温度和电压
Install Labview 2024 Q1 from www.NI.com. Choose the complete options, instead of basic options when installing.
从www.NI.com安装Labview 2024 Q1。安装时选择完整选项,而不是基本选项。
Create the simulated USB6009 DAQ in the NI Max app
在NI Max应用程序中创建模拟USB6009 DAQ
Build up a continuously running VI program to collect the voltage data of thermocouple #1 through the simulated USA6009 DAQ AI0 channel using the DAQ assistant block and display the voltage data on the front panel. Set your sampling mode as 1 sample mode in the DAQ assistant dialog box.
建立一个连续运行的VI程序,使用DAQ辅助模块通过模拟的USA6009 DAQ AI0通道收集热电偶#1的电压数据,并在前面板上显示电压数据。在DAQ助手对话框中将采样模式设置为1采样模式。
Modify your VI program to add a second thermocouple #2 in DAQ AI1 channel to collect directly the temperature value from the option provided by the DAQ assistant block. Choose K type thermal couple in the dialog window.
修改VI程序,在DAQ AI1通道中添加第二个热电偶#2,以直接从DAQ辅助模块提供的选项中收集温度值。在对话框中选择K型热电偶。
Modify your VI program to save the temperature data in a data file every 1 seconds. You will need to insert a metronome from block diagram programing-timing palettes. Specify the file path as on desktop.
修改VI程序,使其每隔1秒将温度数据保存在数据文件中。您需要从框图编程计时调色板中插入节拍器。指定桌面上的文件路径。
Try improving the accuracy of the temperature and voltage data by sampling 900 data per package with 1 kHz frequency and take the average of the 1 k data for display and data save. You will need to use the array functions in block diagram palettes: use the sum function in numerical palette in the block diagram and divide the sum by the Size of the 1k data array.
尝试以1 kHz频率对每个封装采样900个数据,并取1 k数据的平均值进行显示和数据保存,以提高温度和电压数据的准确性。你需要在框图调色板中使用数组函数:在框图中的数字调色板中使用sum函数,并将总和除以1k数据数组的大小。
Part 2 (demonstration using a real DAQ USB6009). Compare the voltages measured at the cold ends of the thermocouple #1 with different cold end temperature.
第2部分(使用真实的DAQ USB 6009进行演示)。比较热电偶#1冷端温度不同时测得的电压。
Bundle the two thermocouple heads together with a single layer aluminium capsule (to keep the hot end temperature the same between the two thermocouples).
将两个热电偶头与单层铝膜盒捆绑在一起(以保持两个热电偶之间的热端温度相同)。
Place the bundled two thermocouples in a small tube furnace.
将捆绑的两个热电偶放入小型管式炉中。
Leave the cold end of thermocouple #1 in room temperature.
将热电偶#1的冷端置于室温下。
Run the VI program built in part 1 (but with a real USB6009) to collect temperature and voltage data.
运行第1部分中内置的VI程序(但使用真实的USB 6009)以收集温度和电压数据。
Turn on the tube furnace heating and turn off heating when temperature reach 400 °C
打开管式炉加热,温度达到400 °C时关闭加热
After the tube furnace is cooled below 200°C, insert the cold end of the thermocouple #1 into ice-water mixture (0 °C).
管式炉冷却至200°C以下后,将热电偶#1的冷端插入冰水混合物(0 °C)中。
Run step 5 again to collect temperature and voltage data with cold end of thermocouple #1 at 0°C.
再次运行第5步,收集热电偶#1冷端温度为0°C时的温度和电压数据。
Part 3 (demonstration): Control the tube furnace temperature by solid state relay.
第三部分(演示):用固态继电器控制管式炉温度。
Modify the VI program obtained in part 1 to insert a simulated AO0 DAQ assistant block.
修改第1部分中获得的VI程序,插入模拟AO 0 DAQ辅助块。
In the block diagram compare the measured temperature with the set temperature. If set temperature not reached, give 5 V to AO0 and if the set temperature is not reached, give 0 V to AO0.
在框图中,将测量温度与设定温度进行比较。如果未达到设定温度,则给予5 V至AO 0,如果未达到设定温度,则给予0 V至AO 0。
Connect the ground and AO0 terminals to the – and + control terminals on the 40A SSR.
将接地和AO 0端子连接到40 A SSR的-和+控制端子。
Connect the Line terminal from 240 VAC power supply to the SSR and the out terminal of the SSR is connected to the resistive heating element. Connect the other end of the resistive heating element to the neutral terminal of the power supply.
将240 VAC电源的线路端子连接到SSR,SSR的输出端子连接到电阻加热元件。将电阻加热元件的另一端连接到电源的中性端子。
Engage the240 VAC main power supply.
接通240 VAC主电源。
Run the VI program and observe the temperature control accuracy. (the temperature fluctuation was observed and the range was within +/- 5 °C of the set value)
运行VI程序,观察温度控制精度。(the观察到温度波动,范围在设定值的+/- 5 °C范围内)
Lab report requirement:
实验室报告要求:
The lab report should follow the headings:
实验室报告应遵循以下标题:
Title, brief introduction, experimental method (describe part 2 experiment in your own words using past tense), results and discussion (plot voltage vs temperature data of the two tests in one figure, discuss the voltage difference at the same temperature), conclusion.
标题、简介、实验方法(使用过去式用自己的语言描述第2部分实验)、结果和讨论(将两个测试的电压与温度数据绘制在一张图中,讨论相同温度下的电压差)、结论。
No requirement of references. No length requirement. The report should be concise. The report should be written in English.
不需要参考资料。无长度要求。报告应简明扼要。报告应该用英文写。