This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Using Microsoft Visual Studio IDE to Control NI Linux RT in PXI System

Updated Mar 11, 2021

Environment

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)
  • Windows

This article explain and guide how to control PXI Linux RT by using Visual Studio IDE and execute a DAQ example on Linux RT. The system structure would need a windows based computer with Microsoft Visual Studio installed to connect a NI Linux RT PXI system.

Setting up the Software Environment

Suggest Visual Studio 2017 or later.
  1. SSH to Linux RT
  2. Install compiler in Linux RT
    • Command opkg install packagegroup-core-buildessential-dev
  3. Install debug Tool in Linux RT
    • Command opkg install gdb

New Project in Visual Studio

  1. Open Visual Studio.
  2. Create new project.
    • Create a new project > Empty Project click Next, change Project name and Location (recommend in C:\).
  1. Connect to remote system.
    • Click Tools > Options..., select Cross Platform > Connection Manager and Add a new remote system.
  1. Import DAX example. Drag C code and header file into project. 
    1. C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Cont Acq-Int Clk\ContAcq-IntClk.c
    2. C:\Program Files (x86)\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
  1. Right click the project and choose Properties to set file path. 
    1. In Configuration Properties > VC++ Directories, change Include Directories to C:\Program Files (x86)\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include.
  1. Add ;/usr/lib/x86_64-linux-gnu/libnidaqmx.so.1 after Additional Dependencies under Linker > Input.
  1. In Configuration Properties > General.
    1. Change Output Directory to \bin\$(Platform)\$(Configuration)\.
    2. Change Intermediate Directory to \obj\$(Platform)\$(Configuration)\.
  1. Click run button.
  2. If bump up an error window. It means debug tool couldn't navigate .out file in Linux RT. 
​​​​
  1. Try to modify Output Directory and Intermediate Directory like step 5c.
    1. Change Output Directory to bin\$(Platform)\$(Configuration)\.
    2. Change Intermediate Directory to obj\$(Platform)\$(Configuration)\.
Tariff Impact Update Learn more

Was this information helpful?

Yes

No