Function Block FS_CHGRP

The Function Block FS_CHGRP changes the group of a file or directory on a file system.

The file system must have been initialized beforehand using FS_INIT. All operations are performed asynchronously per configured storage medium.

Input CH

A positive edge attempts to change the group if the protocol supports the method.

Input DEV

Defines the device from which files are accessed. The device is used per project and can be managed in the context menu under Project External Storage.

Input PATH

Specifies the path to the file or directory on the storage medium. The path corresponds to a Unix file path in UTF-8 format, if supported. The path is represented as follows:

Folder/Subfolder/File.txt

Input GROUP

Defines the ID or name of the new group.

Output DONE

The output returns a pulse upon success to perform the next operation. The pulse occurs when the process ends, even if an error has occurred.

Output ERROR

In case of an error, it returns a text with an error message. This is FALSE if no error has occurred. The state is stored for later use.

Possible causes:

  • The storage medium service was not started.
  • The storage was not initialized.
  • The login credentials are invalid.
  • The remote server could not be reached.
  • The storage medium does not exist.
  • The specified path is invalid.
  • Writing to the storage medium is not possible.
  • No more storage space available on the storage or the storage is write-protected.
  • The function is not supported by the file system.