**Figure 42.**

*Configure write to measurement file.*

this purpose [6]. Origin provides subVIs to make work in LabVIEW environment. These subVIs allow to data transfer from LabVIEW to Origin and the data to be analyzed and presented in the Origin environment. This subVIs can be accessed from the folder where OriginPro is installed (Samples\COM Server and Client \LabVIEW). Also, in order to quickly access these subVIs in the LabVIEW environment, the subVIs can be copied from the installed folder and then pasted into a folder named OriginPro in vi.lip\addons folder where LabVIEW is located [7]. OriginPro library can be accessed from the menu opened by right-clicking on addons in the Block Diagram window in LabVIEW as shown in **Figure 50**.

After adding the subVIs provided by OriginPro to LabVIEW, you can see subVIs as shown in **Figure 51**. There are four sections under Origin function palette. These are

Besides the add-ons developed by NI engineers, add-ons have been developed for some other applications such as Origin. Origin or OriginPro is a powerful data analysis and graphics software preferred by scientists and engineers in industry, academia and research laboratories around the world [4]. Once the data collected by LabVIEW, the end-user will need to analyze the data and generate reports for presentation. Origin provides powerful analysis and graphing tools to reanalyze and present data. The ability to communicate easily between LabVIEW and Origin is a good platform that can greatly increase its efficiency in terms of data analysis and presentation [5]. There are studies in the literature using Origin and LabVIEW for

*Write and read data by using write delimited spreadsheet.Vi and Read delimited spreadsheet.Vi.*

**Figure 39.**

**Figure 40.**

**30**

*Write delimited spreadsheet.Vi and resulted txt file.*

*LabVIEW - A Flexible Environment for Modeling and Daily Laboratory Use*

**Figure 43.** *Write to measurement file with time information.*

• OriginApp: Basic VIs that handles the Origin OPJ files, worksheet and columns,

• OriginAppClassics: Older VIs existed before Origin 8 (deprecated),

• OriginWave: VIs that handles Origin matrix objects,

**Figure 45.**

**Figure 46.** *Waveform file I/O.*

**33**

*Write to binary file and read from binary file.*

*Analyzing and Presenting Data with LabVIEW DOI: http://dx.doi.org/10.5772/intechopen.96130*

• OriginMatrix: VIs that handles LabVIEW Waveform data.

**Figure 44.** *Write to text file and resulted txt file.*

*Analyzing and Presenting Data with LabVIEW DOI: http://dx.doi.org/10.5772/intechopen.96130*

#### **Figure 45.**

**Figure 43.**

**Figure 44.**

**32**

*Write to text file and resulted txt file.*

*Write to measurement file with time information.*

*LabVIEW - A Flexible Environment for Modeling and Daily Laboratory Use*

*Write to binary file and read from binary file.*

#### **Figure 46.** *Waveform file I/O.*


**Figure 47.** *Write-read waveforms.*

In the following example, the measured temperature values are transferred and plotted in OriginPro. In this example, first, add **OA\_ConnectToOrigin.vi** to the Block diagram so that LabVIEW can connect to OriginPro. Once the link between LabVIEW and OriginPro is established, add **OA\_NewWorksheet.vi** to the Block diagram to open a new worksheet in OriginPro. This also creates the name and details of the worksheet to use the entries of VI. After that, you use **OA\_GetColumn.vi** to select a column. Then, you send the information of this column via **OA\_Col-Setting.vi**. You will have to pay attention to two important points while filling in the entries of this VI. The first is the Data Format. This is the part where you need to write the format of the data. The second is the column type. Here we can determine the axis of the column to use in the chart. You can specify an axis such as X, Y, or Z, as in the example shown in **Figure 52**. After this process is completed, you will be able to transfer your data to the worksheet by using **OA\_Col-SetData.vi**. You can use the **Read Delimited Spreadsheet.vi** in the File I/O menu to send the data to worksheet created in the Origin environment as in the example shown in **Figure 52**. You should pay attention for the correct format of the data. In addition, if you are working with data consisting of a single data created in

**Figure 49.** *DIAdem.*

*Analyzing and Presenting Data with LabVIEW DOI: http://dx.doi.org/10.5772/intechopen.96130*

**Figure 50.**

**35**

*LabVIEW library of OriginPro.*

**Figure 48.** *TDM streaming.*


**Table 1.** *Advantages of TDMS file format.*

## *Analyzing and Presenting Data with LabVIEW DOI: http://dx.doi.org/10.5772/intechopen.96130*

**Figure 49.** *DIAdem.*

**Figure 47.**

**Figure 48.** *TDM streaming.*

**Table 1.**

**34**

*Advantages of TDMS file format.*

**ASCII Binary XML Database TDMS**

Exchangeable √√ √ Small Disk Footprint √ √ Searchable √ √ Inherent Attributes √ √ High-Speed Streaming √ √ NI Platform Supported √ √ √√ √

*LabVIEW - A Flexible Environment for Modeling and Daily Laboratory Use*

*Write-read waveforms.*

#### **Figure 50.**

*LabVIEW library of OriginPro.*

In the following example, the measured temperature values are transferred and plotted in OriginPro. In this example, first, add **OA\_ConnectToOrigin.vi** to the Block diagram so that LabVIEW can connect to OriginPro. Once the link between LabVIEW and OriginPro is established, add **OA\_NewWorksheet.vi** to the Block diagram to open a new worksheet in OriginPro. This also creates the name and details of the worksheet to use the entries of VI. After that, you use **OA\_GetColumn.vi** to select a column. Then, you send the information of this column via **OA\_Col-Setting.vi**. You will have to pay attention to two important points while filling in the entries of this VI. The first is the Data Format. This is the part where you need to write the format of the data. The second is the column type. Here we can determine the axis of the column to use in the chart. You can specify an axis such as X, Y, or Z, as in the example shown in **Figure 52**. After this process is completed, you will be able to transfer your data to the worksheet by using **OA\_Col-SetData.vi**. You can use the **Read Delimited Spreadsheet.vi** in the File I/O menu to send the data to worksheet created in the Origin environment as in the example shown in **Figure 52**. You should pay attention for the correct format of the data. In addition, if you are working with data consisting of a single data created in

## **Figure 51.**

*Palette section.*

#### **Figure 52.** *Sending data from LabVIEW to OriginPro.*

Similarly, another example is to use the template you created in the OriginPro. For this, you must first create a template in the OriginPro. Save this template in Documents\OriginLab\2015\User Files folder in your computer. In this case, it will be easy for you to access this template from LabVIEW. For an example application, a template has been prepared in OriginPro as in **Figure 54**. Now add **OA\_ConnectToOrigin.vi** to

the Block Diagram for the connection between Labview and OriginPro.

the LabVIEW environment is opened again and drawn in OriginPro [8].

**4. Conclusion**

**37**

**Figure 54.** *Origin template.*

**Figure 55.**

*Utilization of origin templates in LabVIEW.*

*Analyzing and Presenting Data with LabVIEW DOI: http://dx.doi.org/10.5772/intechopen.96130*

**OA\_AddOriginPath.vi** creates the file path. Then, use **OA\_Load.vi** to upload file. **OA\_FindWorksheet.vi** is to select worksheet. After this step is completed, since you defined Voltage for the X axis and Current for the Y axis in the template, you need to send your data to OriginPro accordingly. For this, you can use **OA\_GetColumn.vi** to select column. You can send your data to these columns with the help of **OA\_Col-SetData.vi**. These steps are given in **Figure 55**. Here, the data you previously saved in

The scientist and engineers frequently need to measure physical changes, analyze them, and present data from the measurement. LabVIEW includes hundreds of

#### **Figure 53.** *The output of the OriginPro.*

certain periods of time such as the data used in this example, and if you are going to plot these data versus time, you will need to use **OA\_Col-SetEvenSampling.vi**. Finally, VI in **Figure 52** plots the temperature data at 0.5 ms intervals as shown in **Figure 53** by using **OA\_NEWEmptGraf.vi** and **OA\_PlotWksCols.vi**.

*Analyzing and Presenting Data with LabVIEW DOI: http://dx.doi.org/10.5772/intechopen.96130*

**Figure 54.** *Origin template.*

**Figure 55.** *Utilization of origin templates in LabVIEW.*

Similarly, another example is to use the template you created in the OriginPro. For this, you must first create a template in the OriginPro. Save this template in Documents\OriginLab\2015\User Files folder in your computer. In this case, it will be easy for you to access this template from LabVIEW. For an example application, a template has been prepared in OriginPro as in **Figure 54**. Now add **OA\_ConnectToOrigin.vi** to the Block Diagram for the connection between Labview and OriginPro.

**OA\_AddOriginPath.vi** creates the file path. Then, use **OA\_Load.vi** to upload file. **OA\_FindWorksheet.vi** is to select worksheet. After this step is completed, since you defined Voltage for the X axis and Current for the Y axis in the template, you need to send your data to OriginPro accordingly. For this, you can use **OA\_GetColumn.vi** to select column. You can send your data to these columns with the help of **OA\_Col-SetData.vi**. These steps are given in **Figure 55**. Here, the data you previously saved in the LabVIEW environment is opened again and drawn in OriginPro [8].
