2 smc_readncfile, Smc_readncfile – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual

Page 251

Advertising
background image

DMS 5.2 EN 03/2011 TD17

L

251

L-force | PLC Designer - SoftMotion

The SM_FileFBs.lib library

CNC function blocks

Outputs (VAR_OUT)
bDone : BOOL
Set once the queue has been read in completely
bError : BOOL
TRUE: Error has occurred
ErrorID: SMC_ERROR
Error number
poqDataOut: POINTER TO SMC_OUTQUEUE
Pointer to the queue that has been read in
iObjectsRead: UDINT
Number of SMC_GeoInfo objects that have so far been read in and written to the queue

11.1.2

SMC_ReadNCFile

This program organisation unit reads in an NC ASCII file from the control file system so that

it can be made available to the SMC_NCDecoder program organisation unit. In this way, a

CNC program can be read in and implemented during runtime.
If no default velocity/acceleration/deceleration is defined in the CNC program (G-code file

without Exx/Exx/E-xx information), you must select them via the three inputs fDefaultVel,

fDefaultAccel ad fDefaultDecel. Otherwise an error will be indicated.

Inputs (VAR_IN)
bExecute: BOOL
The program organisation unit starts to read the program in on a rising edge.
sFileName: STRING(80)
File path and name
pvl: POINTER TO SMC_VARLIST
Pointer to an SMC_VARLIST object (

SMC_VARLIST structure

). If no variables are to be used

in the CNC program, this input will not be assigned.
pBuffer: POINTER TO BYTE
Pointer to a sufficiently large, available data area reserved in the IEC application
dwBufferSize: DWORD

Advertising