SMC_ReadNCQueue (FB)¶
FUNCTION_BLOCK SMC_ReadNCQueue
This FB is used for files created with Codesys V2.3; To write the queue to a file or to read the queue from a file: the FBs SMC_WriteQueueToFile and SMC_ReadQueueFromFile from SM3_Debug library can be used. This function block will read an SMC_OUTQUEUE file, which has been created by the CNC editor, from the PLC file system and provide an OutQueue structure, which typically is processed by the decoder.
- InOut:
Scope
Name
Type
Initial
Comment
Input
bExecute
BOOL
FALSE
Rising edge: Starts execution. While
TRUE
, the function block stays activesFileName
STRING(255)
‘’
File path
pBuffer
POINTER TO BYTE
Pointer on a sufficiently large, free data area (buffer) that is allocated in the IEC application.
dwBufferSize
DWORD
0
Size of the buffer in byte
Output
bDone
BOOL
FALSE
TRUE
, if execution finished sucessfully.bBusy
BOOL
FALSE
TRUE
, while execution of function block is not finishedbError
BOOL
FALSE
Signals, that an error has occurred within the function block
ErrorID
SMC_ERROR
0
Error identification
poqDataOut
POINTER TO SMC_OUTQUEUE
Pointer on queue that has been read in.
iObjectsRead
UDINT
0
Number of SMC_GEOINFO objects, which have been read and written to the queue up to now.
Structure: