SMC_ReadQueueFromFile (FB)

 

FUNCTION_BLOCK SMC_ReadQueueFromFile

This function block reads a CNC queue saved by SMC_WriteQueueTo­File. It should be called in a low priority background task, because it does file access.

InOut:

Scope

Name

Type

Comment

Input

bExecute

BOOL

Starts on each rising edge

sFileName

STRING(255)

The file path of the file to be read

pbyBufferOutQueue

POINTER TO BYTE

Pointer to the buffer used for the out queue

nSizeOutQueue

UDINT

The size of the buffer in bytes

Output

bDone

BOOL

The input file has been read completely

bBusy

BOOL

Reading is in progress

bError

BOOL

An error occurred during reading

ErrorID

SMC_ERROR

The error ID

poqDataOut

POINTER TO SMC_OUTQUEUE

The out queue containing the read elements

iObjectsRead

UDINT

Number of objects read