|
Notes
|
- This function block can activate up to eight instances at the same time. This means that only eight different files can be opened at the same time.
- The file to be opened must not be write-protected, because files are always opened with read and write access rights.
- The variable in which the file name is entered must be a STRING data type. The length of the file name must not exceed 80 characters including the path. User-defined strings are not allowed.With PLCnext Technology controllers, the default file path is /opt/plcnext. Because this folder is write-protected on all secure-by-default controllers (for example, Virtual PLCnext Control, AXC F 1252 controller), file names without path are not recommended. If a file name without path information is used on a secure-by-default controller, the Error output indicates the error and the ErrorID output provides the error number 5 (see ErrorID output below).As of firmware version 2025.0, both device classes (PLCnext Technology controllers and secure-by-default controllers) contain a folder /opt/plcnext/custom to which the firmware has write access.For a complete list of secure-by-default controllers, refer to the PLCnext Info Center.
- The value of the handle at the function block output is maintained even if the Execute input is no longer active. The file handle of the opened/created file is required for all further file operations.
- The status of the Done, Error and ErrorID outputs are maintained until a falling edge is detected at the Execute input.Do not reset the Execute input until the FB is finished by setting the Done state. Resetting the Execute input will result in resetting the outputs.
In fast task cycle times, the asynchronous operation may not be completed and will result with a combination of unexpected output values.
=> Proceed with following file operations or reset the input only after the Done state has been reached.
- Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
|