File_Seek - Phoenix Contact ILC 330 User Manual

Inline controllers
Table of Contents

Advertisement

Table 3-8
FILE_SEEK function block inputs and outputs
Name
Data
Type
Execute
BOOL
Handle
UINT
Position
DINT
Mode
UINT
Done
BOOL
Error
BOOL
ErrorID
UINT
6959_en_05
3.5.7

FILE_SEEK

The FILE_SEEK block is used to move the current file pointer to a new position.
Figure 3-8
FILE_SEEK block
Assign the valid handle of the file to be processed to the "Handle" input. Write the relative
offset to be used to move the file pointer to the "Position" input. Enter the reference to be
used to move the pointer at the "Mode" input (see table).
Activate the block on a rising edge at the "Execute" input.
Execution of the function block is complete when the "Done" output is set to 1.
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", "Error", and "ErrorID" outputs is maintained until a falling edge is
detected at the "Execute" input.
Data Direction
Description
Input
Rising edge: Block sets the new position of the file pointer.
Input
File handle of file in which the position is to be set.
Input
New position in file.
Input
Positioning mode
0:
1:
2:
Output
FALSE:
TRUE:
Output
FALSE:
TRUE:
Output
Error number of the error that occurred when setting the position:
0:
1:
13:
24:
Positioning relative to start of file.
Positioning relative to current position.
Positioning relative to end of file.
The function block was not executed.
The function block was executed.
No errors occurred when setting the position.
An error occurred when setting the position.
No error information available.
Invalid file handle.
Invalid positioning mode.
The position could not be set.
The Inline Controller Under PC WorX
PHOENIX CONTACT
3-13

Advertisement

Table of Contents
loading

Table of Contents