L_MC4P_PathRefMonitor

This FB enables any number of decoded G-code lines to be output in an applicative ring buffer. Additional information decoded from the line is also made available.

The FB is connected directly to the FB L_MC4P_PathRefFromFile via its PathRef input.

The FB writes the NC lines to ascData in ascending order, starting with the smallest index of the ascData array. The last element written is in ascData uiNewestElement, the element before it in ascDatauiNewestElement-1, etc.

If the ascData array is completely filled and the PathRef contains further entries, the oldest element in ascData is overwritten. (ring buffer)

The ascData structure array is not initialized for computing time reasons when this FB is assigned. Therefore, only the valid entries (see uiNewestElement, uiElementCount) should be evaluated in the application.

Pure comment lines and lines that only perform a configuration (e.g. switching between absolute or relative positioning using G90/G91) cannot be output with this FB. The configuration is taken into account in the output of the following movement records, e.g. in the entries ascData[x].xRelative and ascData[x].eCoordSystem.

The FB only accesses the PathRef processed in parallel using MC_MovePath in read-only mode.

 

 

 

L_MC4P_PathRefMonitor

 

 

 

BOOL

-

xExecute

xDone

-

BOOL

BOOL

-

xAbort

xBusy

-

BOOL

MC_PATH_REF

-

itfPathRef

xCommandAborted

-

BOOL

L_MC4P_SkipGCode

-

scSkip

xError

-

BOOL

ARRAY [*] OF L_MC4P_PathRefMonitorData

-

ascData

eErrorID

-

L_IE1P_Error

 

-

 

uiNewestElement

-

UINT

 

-

 

uiElementCount

-

UINT

 

 

 

 

 

 

 

 

Inputs

Name

Data type

Information/possible settings

xExecute

BOOL

FALSE ä TRUE

Activate FB.

xAbort

BOOL

FALSE ä TRUE

Cancel processing.

itfPathRef

MC_PATH_REF

The path file can for instance be decoded from the L_MC4P_PathRefFromFile … function block.

scSkip

L_MC4P_SkipGCode

Structure with Boolean variables to hide certain G-code entries.

ascData

ARRAY [*] OF L_MC4P_PathRefMonitorData

Array of variable length of the type L_MC4P_PathRefMonitorData.

0- or 1-based declarations of the array are supported.

Outputs

Name

Data type

Value/meaning

xDone

BOOL

TRUE

The PathRef file has been read in completely and the last N lines are available in ascData.

xBusy

BOOL

TRUE

Processing in progress.

This output is important if the path file is run by MC_MovePath.

xCommandAborted

BOOL

TRUE

Processing was canceled.

xError

BOOL

TRUE

An error has occurred. For details, see eErrorID.

eErrorID

ID of the error message if xError = TRUE.

uiNewestElement

UINT

Array index of the last record entered in ascData.

uiElementCount

UINT

Number of valid entries in ascData.