This function writes formatted text with arguments to a text file.
An SD card is required to use this function.
In the function menu | On the diagram |
---|---|
![]() |
![]() |
Name | Value Type | Description |
---|---|---|
id |
int32 |
File identifier.The file identifier is used to generate the file name on the SD card. For more on the file naming format, see the SD card documentation |
send |
bool |
Write trigger. The function starts operation on a rising edge and continues until successful completion, error, or receiving False on the send input. |
value0 |
int32 |
Argument 0 |
... | ... | ... |
valueN-1 |
int32 |
Argument (N - 1). *N – number of input lines, configured via the "Number of Inputs" setting |
Name | Value Type | Description |
---|---|---|
status |
int32 |
Current function status: 0 – idle 1 – opening 2 – closing (success) 3 – closing (error) 7 – writing -1 – operation not supported -2 – operation not available -3 – file not accessible -5 – error |
size |
int32 |
Current file size in bytes |
0 -> 1 -> 7 -> 2 -> 0 // final state on success
| | |
| | * -> 3 -> [-1 .. -5] // error during execution
| |
| * -> 3 -> [-1 .. -5] // error after opening
|
* -> [-1 .. -5] // error before opening
Name | Description |
---|---|
Number of Inputs | Configures the number of value input lines. |
Message | A formatted text string to be written to the log. Maximum length is 140 characters. Argument format {index[%format]} :Examples:{0} – value from input 0, no formatting{1%04X} – value from input 1, formatted as a 4-character zero-padded hexadecimal integer |