From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

FlexLogger Trial Example Project - Temperature Application with Simulated Device

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.

    Hardware

  • cDAQ-9171
  • cDAQ-9174
  • NI-9210
  • NI-9213

    Software

  • FlexLogger

    Driver

  • NI-DAQmx

    Other

  • NI Measurement and Automation Explorer (MAX)
  • Python

Code and Documents

Attachment

Description

Description-Separate-1

This trial example project contains an NI FlexLogger project, configuration file for simulated hardware, examples to control NI FlexLogger via Python, and getting started documentation.

 

The Temperature Project (Temperature Project.flxproject) is a FlexLogger project that provides a reference for taking temperature measurements through NI FlexLogger contains the following predefined FlexLogger documents and files:

  • Channel Specification (.flxio)
  • Logging Specification (.flxcfg)
  • Screen (.flxscr)
  • Test Specification (.flxtest) — A default FlexLogger file that is unchanged for this project.

Note: The Temperature Project has been configured to acquire data from specific K-Type thermocouples. If different sensors are present, the configuration will need to be modified to reflect the correct sensor configuration.

 

 

Description-Separate-2

How to Use

How-Separate-1
  1. Download FlexLogger.
    1. After your download is complete, launch the executable. This step installs or, if needed, updates Package Manager.
    2. After Package Manager is installed, follow the prompts to complete the installation of FlexLogger and the NI-DAQmx Driver.
    3. This will also download NI MAX, which is used to simulate devices.
  2. Download the example and corresponding files.
  3. Unzip the folder.
  4. To simulate hardware, double click the Simulated Device Configuration.nce file. If you already have hardware connected, go to step 5.
  5. Navigate through the Configuration Import Wizard in NI MAX until the simulated device is imported correctly.
  6. Double click on the Temperature Project.flxproject file.
  7. Run the Project by clicking the Run button on the middle top portion of the window.

photo.jpgphoto.jpg

Project Execution Buttons

 

Note: For additional information on the components, configuration, and how to customize the template, open the Getting Started file located inside the Temperature Template.zip file.

 

photo.jpg

FlexLogger Channel Specification

 

photo.jpg

FlexLogger Screen

 

The attached zip file also includes examples to control NI FlexLogger via Python. Refer to the included PDF or Read the Docs link below for more information.

 

How-Separate-2

Additional Information

Additional-Separate-1

If you're looking for other example projects that are closer to your application, please visit the following community example projects:

 

 

 

Additional-Separate-2

Related Links

Related-Separate-1

 

 

 

 

Related-Separate-2

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