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)

ip

Server

remotePath

Share: the share’s name, the first part of remotePath. A folder below it goes at the end of rootPath (step 3).

username, password

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

  1. Right-click the folder and select Properties.

  2. On the Sharing tab, click Share.

  3. Select the user who will access the folder.

Step 2: Mount the Folder on ctrlX OS

  1. Log in to the ctrlX OS website and select Settings > Storage.

  2. Click Add network folder, then select Mount network share and SMB.

  3. 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.

  4. Click Mount. The network folder is now listed under Storage.

  5. 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

  1. Call Connect Camera, Capture and Save.

  2. Open the shared folder on the Windows PC: the image is in the module’s folder below rootPath, or in rootPath itself with unifiedStorage.

If there is no image, the log names the cause. See also Troubleshooting.