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_Path­CopierCompleteQueue. 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_NCDecoder)

piStartPosition

SMC_PosInfo

start position (see SMC_NCDecoder)

Output

bDone

BOOL

TRUE: FB completed

bError

BOOL

TRUE: error during operation

iErrorID

SMC_ERROR

Error ID

vs3dt

VisuStruct3DTrack

Track output. To be setup as input of the visu element Path3D.