0% found this document useful (0 votes)
137 views

SOP 10. LabView Data Acquisition Program

The document summarizes a LabView data acquisition program used to automate air quality measurements for an animal confinement study. The program controls data sampling from various sensors, saves the data to files, and controls solenoid valves. It runs continuously, saving averaged data periodically and raw data if alarms activate. The program consists of configuration files and LabView code saved in designated folders and runs on a DAQ system including FieldPoint modules and PCI cards.

Uploaded by

Maqsood Ahmed
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views

SOP 10. LabView Data Acquisition Program

The document summarizes a LabView data acquisition program used to automate air quality measurements for an animal confinement study. The program controls data sampling from various sensors, saves the data to files, and controls solenoid valves. It runs continuously, saving averaged data periodically and raw data if alarms activate. The program consists of configuration files and LabView code saved in designated folders and runs on a DAQ system including FieldPoint modules and PCI cards.

Uploaded by

Maqsood Ahmed
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

SOP 10.

LabView Data Acquisition Program


Drafted by PAAQL, Purdue University for IFAFS-APECAB Project (7/1/02)
Program Overview This LabView Virtual Instrument (VI) program is to be used to automate air quality measurements in the Six-State Emission Measurement Project [Air Sampling & Measurement Methodology for Confined Animal Housing Systems (APECAB)] at the University of Minnesota, Purdue University, North Carolina State University, Iowa State University, Texas A&M University, and University of Illinois. The structure of the program is schematically illustrated in Figure 4.
Data sampling time, saving time Waveform; sensor parameters Name: IDyymmdd?.txt 65+ variables every sec. Solenoids control Real-time, history, alarm Settings Initialize Read files Create data file Data sampling D/O (solenoids) Display Data average Every y sec. Yes Save data Alarms Stop No Midnight Data email Yes Yes Yes Data Alarm email Stop Data

Figure 4. Flow chart of the DAQ program.

91

Files and Folders The data acquisition program (DAQP) will consist of four files: 1. 2. 3. 4. waveform.txt (controls the solenoid operation sequence) records.txt (stores calibration and setting data) IFAFS.iak (configuration file of FieldPoint) IFAFS mmddyy.llb (data acquisition program, of which part of the file name mmddyy records the month/date/year related version information)

These five files should be saved in the following two folders: C:\IFAFS\DAQfiles\waveform.txt, records.txt C:\IFAFS\Program\IFAFS mmddyy.llb, IFAFS.iak A third folder will be created for data files: C:\IFAFS\Data\ The waveform.txt File The waveform.txt file contains a table with 13 rows and 13 columns (Table 1). The first row of the file is a note and will not be used by the DAQP. Rows 2-13, column 1 (Loc#) will be recorded in the data file to indicate sampling locations at specific measurement times. Rows 213, columns 2-13 (S1-S12) defines the operation of 12 solenoids, with 1 and 0 indicating opened and closed solenoids, respectively. This file should be saved using Tab-Delimited text format. The records.txt File The records.txt file will be saved automatically after each sensor calibration or setting (alarm levels, temperature controls, etc.) adjustment. The contents of the file can also be modified directly with a text editor or spreadsheet software (e.g. MS Excel). This file should also be saved using Tab-Delimited text format. Data Files The C:\IFAFS\Data\ folder will be used to store data files created by the LabView program. To facilitate the change of data files, a university ID (one letter) is placed as the first letter of the data files. Set the letter for data file ID at Settings in Frame 0 in the left sequence block. "A": ISU; "I": UIUC; "M": UM; "N": NCSU; "P": Purdue; "T": TAMU. Each time when the program is started or when a new day begins at midnight, one or two data files (IDyyyymmdd?.txt and IDsyyyymmdd?.txt, where ? is a letter from "a" to "z") will be created and saved in the "data" folder. During DAQP testing, if the program is started for 26
92

times during the same day, the ? will be "z" and cannot go up further. If this happens, the "*z.txt" file in the "data" folder will need to be cleaned up in order to re-run the program. The data files will have Tab-Delimited text format. The first row will contain day and date. The second row will be data headings. Measurement data will start from the third row (Table 2). Data columns and their corresponding sensor connections will be arranged as shown in Table 3. Measurement signals from the sensors/analyzers will be sampled every second. Sampled signals will be averaged every 60 sec and saved in data file 1 (IDyyyymmdd?.txt). Data file 2 (IDsyyyymmdd?.txt) will have shorter averaging times (e.g. every 5, 10, 15, 20 or 30 sec) and is optional. Data Acquisition Hardware The hardware used with the DAQP consists of seven FieldPoint DAQ modules (two FP-TC-120 modules for temperature measurement, four FP-AI-110 modules for analog inputs, and one FPDO-401 module for digital output) and one counter/DIO data acquisition card (PCI-6601, National Instruments Corporation). The FieldPoint modules are connected in the following sequence as it is configured in the file IFAFS.iak: FP-1600; FP-TC-120; FP-TC-120; FP-AI-110; FP-AI-110; FP-AI-110; FP-AI-110; FP-DO-401 Running the DAQP At initial operation 1. Run the IFAFS.iak file from FieldPoint Explorer; 2. Check each DAQ module to ensure that they are correctly configured and are ready to acquire data; 3. If modifications are made and need to be kept, save the IFAFS.iak file; 4. Run Measurement and Instruments to test the status of the PCI-6601 card; 5. Open the IFAFS yymmdd.llb from LabView 6.1. In the File Dialog window that appears, select IFAFS.vi and click OK. The panel of IFAFS.vi appears; 6. Select menu Windows- Show Diagram. In the Diagram window, select frame 0 in the left sequence block. Check settings and make necessary changes. If the changes should be permanent, go to File and Save to save the changes. 7. To run the program, click the run button (a white arrow) in the upper-left corner of the window; 8. To stop the program, hold and release the button "Stop" at the upper-right corner of the window. In the dialog window that appears, select OK.

93

Subsequent Operations 1. Open IFAFS yymmdd.llb from LabView 6.1 or from Windows Explorer. In the File Dialog window that appears, select IFAFS.vi and click OK. The panel of IFAFS.vi appears; 2. To run the program, click the run button (a white arrow) in the upper-left corner of the window; 3. To stop the program, hold and release the "Stop" button. At the dialog window that appears, select OK. Bugs and Suggestions Bugs found in the DAQP and suggestions of DAQP improvement should be reported by email ([email protected]) or phone call (765-494-1195) to Jiqin Ni, Purdue University. Upgraded DAQP files will be sent from Purdue University to other universities as an email attachment.

94

Table 1. Contents of waveform.txt file. "Note: S1-S6 are normally open to gas analyzers; S7-S12 are normally closed to M2, but open to bypass." Loc# S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 1 0 1 1 1 1 1 0 0 0 0 0 0 2 1 0 1 1 1 1 0 0 0 0 0 0 3 1 1 0 1 1 1 0 0 0 0 0 0 4 1 1 1 0 1 1 0 0 0 0 0 0 5 1 1 1 1 0 1 0 0 0 0 0 0 6 1 1 1 1 1 0 0 0 0 0 0 0 7 1 1 1 1 1 1 1 0 0 0 0 0 8 1 1 1 1 1 1 0 1 0 0 0 0 9 1 1 1 1 1 1 0 0 1 0 0 0 10 1 1 1 1 1 1 0 0 0 1 0 0 11 1 1 1 1 1 1 0 0 0 0 1 0 12 1 1 1 1 1 1 0 0 0 0 0 1 Table 2. First rows of data files
Monday, July 01, 2002 Date & Time Loc 07/01/2002 17:32:02 1 NH3, ppm 23 NO, ppm 0.1 H2S, ppb 250 SO2, ppb 2 CO2, ppm 1250

95

Table 3. Data file and sensor arrangement.


Data Col # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 Heading Date & Time Smpl loc# NH3, ppm NO, ppm H2S, ppb CO2a, ppm CO2b, ppm Reserved Smpl P, Pa Smpl Q, L/m RH1, % T(RH)1, C RH2, % T(RH)2, C RH3, % T(RH)3, C Reserved Reserved Mass, g/m Filter, % Atm P, Pa Mass2, g/m Filter2, % Atm P2, Pa Reserved Reserved Wind V, m/s Wind D, Radiation, W/m dP1, Pa dP2, Pa dP3, Pa dP4, Pa Reserved Reserved T1, C T2, C T3, C T4, C T5, C T6, C T7, C T8, C T9, C T10, C T11, C Sensor/solenoid ----NH3 analyzer NH3 analyzer H2S analyzer CO2 2K CO2 10K Setra P sensor Mass flow HMW61Y #1 HMW61Y #1 HMW61Y #2 HMW61Y #2 HMW61Y #3 HMW61Y #3 TEOM #1 TEOM #1 TEOM #1 TEOM #2 TEOM #2 TEOM #2 Met sensor Met sensor Met sensor Setra P sensor Setra P sensor Setra P sensor Setra P sensor Thermocouple Thermocouple Thermocouple Thermocouple Thermocouple Thermocouple Thermocouple Thermocouple Thermocouple Thermocouple Thermocouple DAQ hardware ----FP-AI-110-1 FP-AI-110-1 FP-AI-110-1 FP-AI-110-1 FP-AI-110-1 FP-AI-110-1 FP-AI-110-1 FP-AI-110-1 FP-AI-110-2 FP-AI-110-2 FP-AI-110-2 FP-AI-110-2 FP-AI-110-2 FP-AI-110-2 FP-AI-110-2 FP-AI-110-2 FP-AI-110-3 FP-AI-110-3 FP-AI-110-3 FP-AI-110-3 FP-AI-110-3 FP-AI-110-3 FP-AI-110-3 FP-AI-110-3 NI-6601 FP-AI-110-4 FP-AI-110-4 FP-AI-110-4 FP-AI-110-4 FP-AI-110-4 FP-AI-110-4 FP-AI-110-4 FP-AI-110-4 FP-TC-120-1 FP-TC-120-1 FP-TC-120-1 FP-TC-120-1 FP-TC-120-1 FP-TC-120-1 FP-TC-120-1 FP-TC-120-1 FP-TC-120-2 FP-TC-120-2 FP-TC-120-2 Ch# ----0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 Ctr 0 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 Line ----1, 18 3, 20 5, 22 8, 24 10, 26 13, 30 15, 32 2, 18 4, 20 6, 22 8, 24 10, 26 12, 28 1, 18 3, 20 5, 22 7, 24 9, 26 11, 28 2, 1 1, 18 5, 22 7, 24 9, 26 11, 28 1, 2 3, 4 5, 6 7, 8 9, 10 11, 12 13, 14 15, 16 1, 2 3, 4 5, 6 Signal PC clock Waveform 0-10 VDC 0-10 VDC 0-10 VDC 4-20 mA 4-20 mA 0-10 VDC 0-10 VDC 4-20 mA 4-20 mA 4-20 mA 4-20 mA 4-20 mA 4-20 mA 0-10 VDC 0-10 VDC 0-10 VDC 0-10 VDC 0-10 VDC 0-10 VDC 0/5 VDC 0-10 VDC ? 0-10 VDC 0-10 VDC 0-10 VDC 0-10 VDC

Continued on next page

96

Table 3. Continued
Data Col # 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 --------------------------------Heading T12, C T13, C T14, C T15, C T16, C Fans1, % time Fans2, % time Fans3, % time Fans4, % time Fans5, % time Fans6, % time Fans7, % time Fans8, % time Fans9, % time Fans10, % time Fans11, % time Fans12, % time Fans13, % time Fans14, % time Fans15, % time Fans16, % time B1 airflow, m/s B2 airflow, m/s --------------------------------Sensor/solenoid Thermocouple Thermocouple Thermocouple Thermocouple Thermocouple Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch Sail Switch ----Solenoid 1 Solenoid 2 Solenoid 3 Solenoid 4 Solenoid 5 Solenoid 6 Solenoid 7 Solenoid 8 Solenoid 9 Solenoid 10 Solenoid 11 Solenoid 12 Reserved Reserved Reserved Reserved DAQ hardware FP-TC-120-2 FP-TC-120-2 FP-TC-120-2 FP-TC-120-2 FP-TC-120-2 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 NI-PCI-6601 ----FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 FP-DO-401 Ch# 3 4 5 6 7 DIO_0 DIO_1 DIO_2 DIO_3 DIO_4 DIO_5 DIO_6 DIO_7 DIO_8 DIO_9 DIO_10 DIO_11 DIO_12 DIO_13 DIO_14 DIO_15 ----0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Line 7, 8 9, 10 11, 12 13, 14 15, 16 10, 1 44, 1 45, 1 12, 1 12, 1 47, 1 48, 1 15, 1 16, 1 17, 1 51, 1 52, 1 53, 1 54, 1 21, 1 22, 1 ----Signal

0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC 0/5 VDC LabView LabView 24 VDC 24 VDC 24 VDC 24 VDC 24 VDC 24 VDC 24 VDC 24 VDC 24 VDC 24 VDC 24 VDC 24 VDC

Note: 1. 2. 3. 4.

Refer to page 4-2 of the "DAQ 6601/6602 User Manual" for counter and DIO channel connections. The physical connectors are located in CB-68LP, the accessory of DAQ 6601. +5VDC can be obtained from line #1 or another source. Sail Switches can also be connected to AI using variable analog signals for multisensors. There are 32 DIO channels available at the DAQ 6601. This table only includes 16 (data columns 52-67).

97

You might also like