FUNCTION_BLOCK SMC_WriteQueueToFile
This function block writes a CNC queue to a file. The file can be read by SMC_ReadQueueFromFile. 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 written. If the file exists, it will be overwritten |
|
poqDataIn |
POINTER TO SMC_OUTQUEUE |
The input queue to be written |
|
pbyBufferOutQueue |
POINTER TO ARRAY [0..0] OF SMC_GEOINFO |
Pointer to the buffer used for the out queue |
|
nSizeOutQueue |
UDINT |
The size of the buffer in bytes |
|
Output |
bDone |
BOOL |
The input queue has been written completely |
bBusy |
BOOL |
Writing is in progress |
|
bError |
BOOL |
An error occurred during writing |
|
ErrorID |
SMC_ERROR |
The error ID |
|
poqDataOut |
POINTER TO SMC_OUTQUEUE |
The out queue containing the read elements |