SMC_PathCopierFile (FB)¶
FUNCTION_BLOCK SMC_PathCopierFile
The function block SMC_PathCopierFile
reads and decodes a G-code
file (sFileName
) and creates an array of points from the generated path.
The inputs pvl
and piStartPosition
are transferred to the
function blocks SMC_ReadNCFile2
and SMC_NCInterpreter
,
see the input documentation there.
This function block is used to provide an overview over a complete CNC program.
- InOut:
Scope
Name
Type
Initial
Comment
Input
bExecute
BOOL
A rising edge starts the function block
udiNumberOfPointsInArray
UDINT
0
Number of points which are declared in
pBuffer
of the referred array.pBuffer
POINTER TO VisuStruct3DPathPoint
Pointer to the allocated array of points
sFileName
STRING
CNC file name to be read
pvl
POINTER TO SMC_VarList
Pointer to variable list (see
SMC_NCReadNCFile2
)piStartPosition
SMC_PosInfo
start position (see
SMC_NCInterpreter
)aSubProgramDirs
ARRAY [0..4] OF STRING(174)
An array of up to 5 directories where subprograms are searched (see
SMC_ReadNCFile2
)bParenthesesAsComments
BOOL
TRUE
If parenthesis should be considered as comments (See
SMC_ReadNCFile2
)bEnableSyntaxChecks
BOOL
TRUE
bEnableSyntaxChecks (see
SMC_NCInterpreter
)bStepSuppress
BOOL
When this input is
TRUE
, lines of the CNC program starting with ‚/’ will be ignored. Otherwise they will be processed.eOriConv
SMC_ORI_CONVENTION
SMC_ORI_CONVENTION.ADDAXES
Defines the way the orientation in the A/B/C words is interpreted (See
SMC_NCInterpreter
)precision
LREAL
1
Defines the precision of the track, meaning how many points should be computed for an element in the queue. A value of 1 indicates that a point should be calculated every 1 unit of the path. A value of 2 indicates that two points should be calculated for every 1 unit of the path.
Output
bDone
BOOL
TRUE
: FB completedbBusy
BOOL
bError
BOOL
TRUE
: error during operationiErrorID
SMC_ERROR
Error ID
vs3dt
VisuStruct3DTrack
Track output. To be setup as input of the visu element
Path3D
.