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.
If the number of path elements is smaller than the number of array points, then they are handled the same way as with SMC_PathCopierCompleteQueue.
If not, the points are evenly distributed on the path.
The inputs pvl
and piStartPosition
are transferred to the function blocks SMC_ReadNCFile
and SMC_NCDecoder
, so the documentation there is also valid for the inputs here.
This function block is used to provide an overview over a complete CNC program. It uses all points of the track buffer, but in case of very large G-code programs or a huge zoom factor it may be not precise.
- 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
)Output
bDone
BOOL
TRUE
: FB completedbError
BOOL
TRUE
: error during operationiErrorID
SMC_ERROR
Error ID
vs3dt
VisuStruct3DTrack
Track output. To be setup as input of the visu element
Path3D
.