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
bExecuteBOOLA rising edge starts the function block
udiNumberOfPointsInArrayUDINT0
Number of points which are declared in
pBufferof the referred array.pBufferPOINTER TO VisuStruct3DPathPoint
Pointer to the allocated array of points
sFileNameSTRINGCNC file name to be read
pvlPOINTER TO SMC_VarList
Pointer to variable list (see
SMC_NCReadNCFile2)piStartPositionSMC_PosInfostart position (see
SMC_NCInterpreter)aSubProgramDirsARRAY [0..4] OF STRING(174)
An array of up to 5 directories where subprograms are searched (see
SMC_ReadNCFile2)bParenthesesAsCommentsBOOLTRUE
If parenthesis should be considered as comments (See
SMC_ReadNCFile2)bEnableSyntaxChecksBOOLTRUE
bEnableSyntaxChecks (see
SMC_NCInterpreter)bStepSuppressBOOLWhen this input is
TRUE, lines of the CNC program starting with ‚/’ will be ignored. Otherwise they will be processed.eOriConvSMC_ORI_CONVENTIONSMC_ORI_CONVENTION.ADDAXES
Defines the way the orientation in the A/B/C words is interpreted (See
SMC_NCInterpreter)Output
bDoneBOOLTRUE: FB completedbErrorBOOLTRUE: error during operationiErrorIDSMC_ERRORError ID
vs3dtVisuStruct3DTrackTrack output. To be setup as input of the visu element
Path3D.