Example Code

NI VeriStand Model - Automatically segment Embedded Data Logger files based on falling (or rising) edge of digital channel

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW
  • Veristand

Code and Documents

Attachment

Overview
The example demonstrates how to automatically segment a file created using the Embedded Data Logger custom device,
 you can use a model created in LabVIEW.

Description:
The example demonstrates how to automatically segment a file created using the Embedded Data Logger custom device,
 you can use a model created in LabVIEW.

Steps to implement or execute code
To implement this example:

  1. Add the Segment File.lvmodel to your existing system definition.
  2. Set the Segment Time input channel of the model to the desired amount of time (in seconds) for each file.
  3. Map the System Time system channel to the System Time input of the model.
  4. Map the Log Command output of the model to the Log Command input of the Embedded Data Logger.

To execute this example:

Note: This model assumes that the Log Trigger channel is always true (= 1). Modifications will need to be made if the Log Trigger channel varies during deployment.
To adapt this for Rising Edge rather than Falling Edge, you can switch the Not function appropriately in Segment File Falling Edge.vi and then recompile the model.  For more information on creating a model from LabVIEW, please see the white paper on this topic.


Installation

  • Segment File Falling Edge.vi - The VI used to generate the LabVIEW model which is responsible for triggering the 'Log -Command' channel of the Embedded Data Logger
  • Segment File Falling Edge.lvmodel - The generated LabVIEW model from the Segment File.vi


Requirements
Software
LabVIEW 2012 or compatible
NI VeriStand

Hardware
-

fp.JPGbd.JPG

**This document has been updated to meet the current required format for the NI Code Exchange.**

Ryan C.
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.