Mounting and Logging to a Windows Host from NI Linux Real-Time Target

Updated Aug 1, 2023



  • cRIO-9047
  • cRIO-9049
  • PXIe-1071

Operating System

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

You have a Windows host with a folder and want to mount it in order to log data to the C:\Data folder from a NI Linux Real-Time (RT) Target. How can you do it?

In order to be able to mount a folder in the Windows host and log data from an RT Target, follow these steps:
  1. In Windows, create a folder that you wish to mount. For example, C:\Data.
  2. Share the folder by right-clicking and selecting Give access to>>Specific people... Here you can decide to share files with Everyone or specific users by selecting Find People... Make sure that a user has Read&Write (RW) permission to the folder.
  3. Connect to Linux RT shell. PuTTY is a good SSH client, you can follow the steps described in this Knowledge Base Accessing the Shell on NI Linux Real-Time Devices.     
  1. Log in to your target using your username and password.
  2. Make sure cifs-utilis is installed in your RT Target, writing: opkg install cifs-utils
  3. Create a data folder to map to the network shared folder, e.g. in /home/lvuser writing in the shell the following command: mkdir /home/lvuser/data
  4. Mount network shared folder in Host to the folder you just created in the RT Target writing in the shell the following command: mount -t cifs -o username=username,uid=lvuser //HostIPAddress/Data /home/lvuser/data, write as username the one displayed in C:\Users\username in the host machine.
  5. Insert the Windows password.
  6. If no error is displayed the mounting is successful.
  7. You should now be able to log data to the /home/lvuser/data folder from LabVIEW and as a result of this mounting process, data will be mirrored in C:\Data .
Even if the data is displayed in home/lvuser/data, files, are not actually occupying memory in RT Target. Moreover, following these steps, the mount will only be temporary. Power-cycling the RT Target will cause losing this configuration and the procedure must be followed again. Also, any operation to delete data in the target folder will be reflected in the host folder too.