
The Inline controller under PC Worx
6959_en_07
PHOENIX CONTACT
51
3.5.4
FILE_WRITE
The FILE_WRITE block is used to write data to a file that was opened previously.
Figure 3-5
FILE_WRITE block
•
Assign the valid handle for the file to which data is to be written to the “Handle” input.
•
Create a data buffer of sufficient size which contains the data to be written for the
“Buffer” input.
The data buffer for the data can be declared in a number of ways. The type of data buffer
can be defined by the user, e.g., a byte array. Strings cannot be used directly as data
buffers. If a string is to be saved in a file, the string must first be saved in an array using the
STRING_TO_BUF function block.
•
Assign the number of bytes to be written to the “Length” input.
•
Activate the block on a rising edge at the “Execute” input.
The execution of the function block is complete when the “Done” output is set to 1.
If the function could not be executed successfully, the number of bytes written will be
indicated at the “LengthWritten” output. This is the same as the number of characters to be
written.
If an error occurred during execution, the value at the “Error” output = 1.
“ErrorID” indicates the number of the cause of the error.
The status of the “Done”, “LengthWritten”, “Error”, and “ErrorID” outputs is maintained until
a falling edge is detected at the “Execute” input.
7018C029
FILE_WRITE
Execute
Handle
Length
LengthWritten
Buffer
Done
Buffer
Error
ErrorID
Содержание ILC 330 Series
Страница 1: ...User manual Installing and operating the ILC 330 and ILC 350 Inline controllers...
Страница 8: ...ILC 330 350 8 PHOENIX CONTACT 6959_en_07...
Страница 10: ...ILC 330 350 10 PHOENIX CONTACT 6959_en_07...
Страница 42: ...ILC 330 350 42 PHOENIX CONTACT 6959_en_07...
Страница 68: ...ILC 330 350 68 PHOENIX CONTACT 6959_en_07...
Страница 80: ...ILC 330 350 80 PHOENIX CONTACT 6959_en_07...
Страница 96: ...ILC 330 350 96 PHOENIX CONTACT 6959_en_07 T Terminal box 27 U Update 9 43 Updating the firmware 89...