Continuous Measurement and Logging

LabVIEW 2012

The Continuous Measurement and Logging sample project acquires measurements continuously and logs them to disk. It executes five loops in parallel:

This sample project also features a Settings dialog box (Settings.lvlib) you can use to configure the application.

This sample project is based on the Queued Message Handler template. Refer to the Queued Message Handler template and its documentation, available from the Create Project dialog box, for information about how this template works.

Developer Walkthrough

Refer to ni.com for a developer walkthrough of the Queued Message Handler 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 Continuous Measurement and Logging sample project is designed for a continuous measurement application that requires a responsive user interface; that is, users should be able to click buttons even while the application is executing another command.

Running this Sample Project

  1. In the Project Explorer window, open and run Main.vi.
  2. Click Start. The program begins acquiring simulated waveform data.
  3. Click the other front panel buttons to explore the sample project.

Modifying this Sample Project

Adding Data Acquisition Code

You must modify the sample project to acquire data from hardware. Complete the following steps to make these modifications:

  1. Add hardware refnums to Acquisition.lvlib:Hardware Configuration.ctl. For example, you can use the following objects here:
  2. Add hardware initialization code to Acquisition.lvlib:Initialize Hardware References.vi. For example, you can use the following objects here:
  3. Add hardware configuration code to Acquisition.lvlib:Configure Hardware.vi For example, you can use the following VIs here:
  4. Add data acquisition code to Acquisition.lvlib:Acquire.vi. For example, you can use the following VIs here:
  5. Add code that stops data acquisition to Acquisition.lvlib:Stop Acquisition.vi. For example, you can use the following VIs here:

Customizing Data Logging Code

If the default logging behavior does not meet the needs of your application, you can modify this sample project in the following ways:

LabVIEW Features and Concepts Used


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:

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.