Files can be read and written directly from the PLC asynchronously. The configuration is done per project. All data including all passwords are retained when exporting the project.
As long as data is being written to a storage medium, removing the device can lead to data loss or damage to the file system. It is therefore advisable to visualize the write process while the data carrier is initialized.
Pay attention to the power consumption when using USB storage media. Excessive current can damage the server. This varies for each server.
Data transferred via FTP is not protected against any type of attacks, as it is transmitted in plain text. It is therefore recommended to use FTPS or SSH2.
A new service is automatically created for each storage device. Note that each of these services consumes RAM, even if the storage is not used.
Optionally, delete old data automatically after a certain period of time. Especially with the project storage, filling it up can make the server unusable.
In order for a storage device to be written or read by the PLC, it must first be initialized with the function block FS_INIT.
All USB storage devices are connected to the operating system during initialization. For storage devices with remote file systems, a connection is established for each action and then closed again. This method is slower but conserves the resources of the target server.
When the server restarts, the state of the drive in the PLC is saved and restored after startup.
The storage can be searched directly during configuration. An initialized connection is required to search a USB storage device.
First, the media are created in the context menu under Data External Storage.
Note: The number of storage devices is limited by the
License. You must deactivate a
Gateway, an
external storage or a
Data Exchange Endpoint to release a license point again.
Tip: Storage can also be completely deactivated. If the checkbox
Activate is not checked, the service will also be completely terminated.
In order to access external media, it is necessary to address them in the PLC using File System Function Blocks.
First, the file system must be initialized or mounted in the system. This is done with the function block FS_INIT.
Note: Make sure that the function block FS_INIT is used only once per storage device, as the storage is not released while another program is running.
The following protocols are supported:
| Protocol | Description |
|---|---|
| Own project storage on the server itself. This is exported separately from the project. Only one project storage can be used per project. The data remains after removing the storage. | |
| Access to individual partitions of a USB storage medium. Note the addressing in the chapter USB Ports. | |
| Remote SSH2 server via SFTP. Certificates for authentication are not yet supported. | |
| Remote FTP server or FTP server via TLS connection. Some operations take place in passive mode. | |
| Windows Share Server. This type is only available from Core 2 onwards. |
All common file systems are supported via USB. Partitions on the server are also recognized and displayed accordingly. The following file systems are supported:
Note: The partition must be larger than 1 MB to be recognized.
There are various scenarios that may require file access. Among other things, data can be loaded directly from a USB stick into the PLC or written to the stick. It is also possible to automatically find a file on the stick and read it in. Here are some examples: