
The Function Block FS_EXEC executes one or more remote commands without a shell.
Warning: System commands can endanger or damage the remote system. In addition, existing files may be overwritten without warning.
The file system must have been initialized beforehand using FS_INIT. All operations are performed asynchronously per configured storage medium.
A positive edge will execute the specified command.
Defines the device from which files should be accessed. The device is used per project and can be managed in the context menu under Project External Storage.
Specifies the path to the directory on the storage medium. The path corresponds to a Unix file path in UTF-8 format, if this is supported. The path is represented as follows:
Folder/Subfolder
Using a path is optional. If it has been set, changing to this directory must be successful; otherwise, the command to be executed will not be carried out.
Defines the command to be executed.
Defines the type of console (Pseudo-Terminal). For some devices, this parameter is mandatory. Examples: "vt100", "vt102", "ansi", "xterm" etc.
Note: If a PTY is used, each command must be terminated with a line end, e.g.: "ls\n". Also note that the console formats the output. Therefore, control characters or binary data may also be included.
Defines the active environment variables. To specify multiple variables, one can be defined per line. Example:
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
Defines the size of the terminal. By default, this is specified in characters but can also be defined in pixels. For example: "80x25" or "640x480px". If no value has been defined, "80x25" is used.
The output returns a pulse on success to perform the next operation. The pulse occurs when the process ends, even if an error has occurred.
Returns the command's return value upon successful execution. The value is stored for later use.
Returns the command's return value in case of erroneous execution. Also known as STDERR when using SSH. The value is stored for later use.
In case of an error, returns a text with an error message. This is FALSE if no error has occurred. The state is stored for later use.
Possible causes: