Table of Contents
- Developer Walkthrough
- System Requirements
- Use Cases
- Running this Sample Project
- Customizing this Sample Project
- Important Information
The Finite Measurement sample project acquires a finite measurement and provides options for exporting the measurement to disk. This sample project is designed as a state machine that can perform the following actions:
- Initializing hardware and the user interface (Initialize state)
- Handling user interactions (Wait for Event state)
- Updating the user interface (Update UI state)
- Configuring the application (Configure state)
- Acquiring data from hardware (Acquire state)
- Loading data from a .lvm file (Load Data state)
- Saving data to a .lvm file (Save Data state)
- Exporting data to a tab-delimited text file (Export Data state)
- Clearing data from the graph (Clear Data state)
- Applying custom analysis to the data (Analyze state)
- Copying an image of the graph to the clipboard (Copy Graph state)
- Stopping the application and saving your settings to disk (Stop state)
This sample project is based on the Simple State Machine template. Refer to the Simple State Machine template and its documentation, available from the Create Project dialog box, for information about how this template works.
Developer Walkthrough
See a developer walkthrough of the Finite Measurement template.
System Requirements
LabVIEW Base, Full, or Professional Development System. This sample project is designed for use with NI-DAQmx, an instrument driver, or other driver software.
Use Cases
The Finite Measurement sample project is designed for an instantaneous measurement application; that is, an application that provides separate options for the user to acquire data, log it, export it, and otherwise execute one action at a time.
Running this Sample Project
- In the Project Explorer window, open and run Main.vi.
- Click Acquire. The program simulates an instantaneous acquisition of data.
- Click the other front panel buttons to explore the sample project.
Customizing this Sample Project
- To add data acquisition code, complete the following steps:
- Add hardware refnums to HW Configuration.ctl. For example, you could add DAQ task references here.
- Modify Acquire Data from Hardware.vi to initialize the hardware device and acquire data using the refnum you added. For example, you could use the DAQ Assistant or Instrument I/O Assistant.
- To modify how this application saves and loads data, modify Save Data.vi and Load Data.vi. For example, you could modify these VIs to save and load from a binary file instead of a .lvm file.
- To modify how this application analyzes acquired data, modify Statistical Analysis.vi.
- To modify how this application exports data, modify Export Data.vi. For example, you could export the data to a CSV or XML file instead of a tab-delimited file.
- To modify how this application copies the graph to the clipboard, modify Copy Graph to Clipboard.vi. For example, you could copy the image as an EPS file or save the image directly to disk instead of copying a BMP file to the clipboard.
Important Information
Copyright
© 2012 National Instruments. All rights reserved.
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.
National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.
End-User License Agreements and Third-Party Legal Notices
You can find end-user license agreements (EULAs) and third-party legal notices in the following locations:
- Notices are located in the <National Instruments>\_Legal Information and <National Instruments> directories.
- EULAs are located in the <National Instruments>\Shared\MDF\Legal\license directory.
- Review <National Instruments>\_Legal Information.txt for information on including legal information in installers built with NI products.
Trademarks
LabVIEW, National Instruments, NI, ni.com, the National Instruments corporate logo, and the Eagle logo are trademarks of National Instruments Corporation. Refer to the Trademark Information at ni.com/trademarks for other National Instruments trademarks.
Other product and company names mentioned herein are trademarks or trade names of their respective companies.
Patents
For patents covering the National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents.
'via Blog this'
No comments:
Post a Comment