How to Mount and Log to a Windows host from RT Target

Updated Mar 31, 2022

Environment

Hardware

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

I have a Windows host with a folder and I want to mount it in order to log data from a RT Target. How can I do it?

In order to be able to mount a folder in Windows host and log data from RT Target, follow these steps:
  1. In Windows, create a folder that you wish to mount. For example, C:\Data.
  2. Share the folder, right-clicking and selecting Give access to>>Specific people.... Here you can decide to share files to Everyone or specific users selecting Find People.... Make sure that a user has RW permission to the folder.
  3. Connect to Linux RT shell. PuTTY is a good SSH client, you can follow steps described in this Knowledge Base Accessing the Shell on NI Linux Real-Time Devices.image.png
  4. Log in to your target using username and password.
  5. Make sure cifs-utilis is installed in your RT Target, writing: opkg install cifs-utils
  6. 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
  7. 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.
  8. Insert the Windows' password.
  9. If no error is displayed the mounting is successful.
  10. You should now be able to log data to the /home/lvuser/data folder from LabVIEW and as 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 RT Target will cause losing this configuration and the procedure must be followed again. Also, operation to delete data in the target folder will be reflected in the host folder too.