SMC_FileStream (FB)

FUNCTION_BLOCK SMC_FileStream IMPLEMENTS SMC_ITextStream

Opens a file and presents the file contents as a stream of characters

InOut:

Scope

Name

Type

Comment

Input

bExecute

BOOL

Rising Edge: Starts operation

sFileName

STRING(255)

Absolute or relative file path to the input file. Leave empty if the file name is to be set later by method ChangeDataSource.

Output

bDone

BOOL

bBusy

BOOL

bError

BOOL

ErrorID

SMC_ERROR

dwFileSize

DWORD

Size of the file in bytes.

dwPos

DWORD

Current Position of the cursor in the file.

stream

SMC_ITextStream