In order to be able to mount a folder in Windows host and log data from RT Target, follow these steps:
- In Windows, create a folder that you wish to mount. For example, C:\Data.
- 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.
- 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.
- Log in to your target using username and password.
- Make sure cifs-utilis is installed in your RT Target, writing: opkg install cifs-utils
- 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
- 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.
- Insert the Windows' password.
- If no error is displayed the mounting is successful.
- 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.