# MCV_GrpPathPrepare

## Release Note

This function block is available as of CNC Build V3.1.3103.1.

The function block is used to transfer job data, program parameters and program modes to a data structure of the MC_PATH_DATA_REF type. This structure is output at the PathData output and must be transferred to the corresponding input of an MC_MovePath instance.

The function block inputs can be written by the user. Alternatively, the function block can be linked to the outputs of an MCV_GrpGetJobRequest instance to forward jobs generated by an HMI or another NC channel, for example.

## Notice

The structure MC_PATH_DATA_REF may only be described by instances of the type MCV_GrpPathPrepare. This ensures that future changes to the library have no impacts on existing PLC programs.

## Notice

What remains permitted is the direct entry of a name or path for an NC program on MC_PATH_DATA_REF. Existing PLC applications can then be used unchanged without job management or parameterisation. In this case, it is not permitted to use MCV_GrpPathPrepare.

Block diagram

FB parameters

VAR_INPUT
Variable name | Data type | Description
Execute | BOOL | The function block is executed on a rising edge at the input.
FileName | STRING(MCV_PROG_NAME_STRLEN) | Program name of a job.
JobID | MCV_GRP_JOB_ID | Job information
PathParameter | MCV_PATH_PARAM | Program parameters of a job. Parameters can be accessed in the called NC program (FileName). PL[0] corresponds to the variable @PL1 and PL[19] corresponds to the variable @PL20. Unused parameters are prefixed by “0”.
PathMode | MCV_PATH_MODE | Program mode parameters of a job. The following are available: - InitializeOnActualPosition, - SetDefaultConfig, - ReportSceneSample, - ReportRunTimeMeasure,
- ReportAxesPositionSample where

0 = HLI_MC_START_MODE_NOT_USED

1 = HLI_MC_START_MODE_OFF

2 = HLI_MC_START_MODE_ON

3 = HLI_MC_START_MODE_USE_ACTUAL

BufferModeIn | MC_BUFFERMODE | BufferMode of a job. The following values (similar to the BufferMode interface in the MC_MovePath function block) are possible: mcAborting= 0 mcBuffered= 1 mcBlendingPrev= 3
JobStack | HLI_MC_JOB_STACK | Information on the job source Only needed if the job was read in by an instance of the MCV_GrpGetJobRequest. Otherwise, the input must remain unassigned.
JobAttribute | UDINT | Identification number which is freely assignable by the user.
VAR_OUTPUT
Variable name | Data type | Description
Done | BOOL | TRUE indicates that the data structure MC_PATH_DATA_REF was correctly filled out and can be transferred together with the value of the "BufferModeOut” output to an instance of the MC_MovePath function block.
Error | BOOL | TRUE indicates that an error occurred.
ErrorID | WORD | Error code
PathData | MC_PATH_DATA_REF | Structure for use at the “PathData” input of an instgance of the MC_MovePath.
BufferModeOut | MC_BUFFERMODE | BufferMode for use at the “BufferMode” input of an instance of the MC_MovePath function block.