2.4 Working with Origin Analysis Template

Origin Template is very useful to perform automatic analysis just like a macro. In this tutorial, you will learn how to work with an Origin Analysis Template for interpolation in Labview.

1. Open Origin, import <exe>\Samples\Import and Export\ASCII Simple.dat into Sheet1 of Book1.

2. Add one new column and fill some data in it, and select Analysis: Mathematics: Interpolate/Extrapolate Y From X to do Cubic-Spline interpolating. Please set Recalculate to Auto.

3. Clear the data in Column C and save the worksheet as interpolate.ogw under the folder where you want to place this VI.

4. Start Labview, and new a blank VI. Active the Block Diagram window.

5. From the Functions palette, choose All Functions, then User Libraries, then paletteMenu.

6. Choose OA_ConnectToOrigin VI OA ConnectToOrigin App.jpg and place it in the window.

7. Place OA_Load OA Load.png, OA_FindWorksheet OA FindWorksheet.jpg, OA_GetColumn OA GetColumn.jpg, and OA_Col-SetData OA Col-SetData.jpg as the previous step.

8. Wire the corresponding Reference connectors and Error In/Out connectors.

9. Add a path constant and set it as interpolate.ogw, and wire it to Path connector of OA_Load.

10. Add a numeric constant and set it to 2, and wire it to the Column Name/Index connector of OA_GetColumn VI.

11. Add an array constant and set it as you want, and wire it to the data connector of OA_Col-SetData.

12. When the wiring is complete, your Block Diagram window should look like this:

Tutorial 3.png

13. Click the Run button to send the data to Origin. You will see the interpolating results appear in Column D automatically.