12/01/2025
How-to | IoT | SMB

Mount SMB network folder, create folder, read content from PLC

Introduction

Mount network server (SMB) from PLC.

This manual describes how you can use the PLC to mount a network server (SMB), create a folder or read the content of a directory.

You will find some example code for download in this How-to.

Requirements

  • ctrlX CORE and active connection to a windows system

  • Windows folder is already created and the corresponding settings has already been made -> See How-to Mount SMB network folder

  • PLC App and PLC programming experience

PLC examples

PLC code for mount network folder.

  • Add MountSMB function block from library manager

    This function block mounts an external network-server (SMB)

PLC example code

PLC code for reading the content of the given path

  • Add IL_DirReadAsync function block from library manager

PLC example code

With each flank at the ReadNext input, the next content of the path is read.

PLC example code

PLC code for create folder in the given path

  • Add IL_DirSetCurrentAsync function block from library manager

PLC example code

PLC example code

mntSMB.zip
2.25KB
Types
Example
Products
PLC
IOT
Markets
Production Machines
Manufacturing
Building Automation

Latest published/updated articles