How To: Save Images to a Network Folder on ctrlX CORE (SMB)
This guide applies to ctrlX OS only: ctrlX OS mounts the network folder, and the Cam Driver on the ctrlX CORE saves into it.
Up to v2.2, the Cam Driver connected to a shared Windows folder itself, with the storage type Samba.
From v2.3.0, ctrlX OS mounts the folder, and the Cam Driver saves into it like into any other folder: an
Internal storage whose rootPath lies in the mounted folder.
The Cam Driver uses every external storage this way, a USB storage device or an SD card as well: mount it
on ctrlX OS first, then let rootPath start with the path ctrlX OS shows for it. For a USB storage device
or an SD card, see
Saving Image Files.
Coming from the Samba Storage (Before v2.3.0)
When the Cam Driver v2.3.0 starts with a settings file that still has "type": "Samba", it changes the
storage to an Internal one in the folder images and removes the share’s settings. Until you follow the
steps below, the images are therefore saved on the ctrlX CORE, not in the shared folder.
Before it changes the file, the Cam Driver copies it beside it as <name>-<YYYYMMDD_HHMMSS>.json. The
copy still has the share’s settings, which go into the mount dialog in step 2:
| Samba storage (before v2.3.0) | Mount dialog (step 2) |
|---|---|
|
Server |
|
Share: the share’s name, the first part of |
|
Username, Password |
What You Need
-
A ctrlX CORE with a network connection to the Windows PC that has the folder.
-
A Windows user who may access the folder, and the user’s password.
Step 1: Share the Folder on Windows
-
Right-click the folder and select Properties.
-
On the Sharing tab, click Share.
-
Select the user who will access the folder.
Step 2: Mount the Folder on ctrlX OS
-
Log in to the ctrlX OS website and select Settings > Storage.
-
Click Add network folder, then select Mount network share and SMB.
-
Enter:
-
Server: the IP address of the Windows PC.
-
Share: the name of the shared folder.
-
Username and Password: the Windows user from step 1.
-
-
Click Mount. The network folder is now listed under Storage.
-
Note down the path ctrlX OS shows for the mounted folder. The Data Layer lists it too, under
system/resources/storage.
Bosch Rexroth describes these steps with screenshots in Mount SMB network folder.
Step 3: Point the Cam Driver at the Folder
In the system section of lumiscan-cam-driver.json, set the storage to an Internal one whose
rootPath starts with the path from step 2:
"storage": {
"type": "Internal",
"parameters": {
"rootPath": "<path of the mounted folder>/images"
}
}
Replace <path of the mounted folder> with the path you noted down. The Cam Driver creates the folders
below it that do not exist yet. Then restart the Cam Driver.
Each camera module saves into a folder of its own below rootPath, named after the module’s id. To
save the images of all cameras into rootPath itself, set unifiedStorage to true in the system
section, see
One Folder for All Cameras.
Step 4: Check It
-
Call Connect Camera, Capture and Save.
-
Open the shared folder on the Windows PC: the image is in the module’s folder below
rootPath, or inrootPathitself withunifiedStorage.
If there is no image, the log names the cause. See also Troubleshooting.