L_MC4P_MFunctionFromPathRef
This function block (FB) reads an active M function from a path file and makes the "MC_PATH_REF" data available to the application. It is possible to react directly to a specific M function from the path file.
The FB is an interface of type MC_PATH_REF and can be decoded e.g. from the FB L_MC4P_PathRefFromFile . In addition, the FB must be connected directly to the FB L_MC4P_PathRefFromFile via its input PathRef
Application example:
The input wMFunktion is connected with the value "123".
The response of the FB : When the processing of the program reaches the line in which the M function "123" was programmed, FB output xActive is set to = TRUE. Since this is an M function which requires acknowledgement (see M functions ), output xWaitingForMAcknowledge = TRUE is also set.
|
Note!
If no more than one M function is used per set in a program, output MFunction of FB MC_MovePath can also be used to evaluate when the M function is reached. |
|
|
|
|
L_MC4P_MFunctionPathRef |
|
|
|
|
|---|---|---|---|---|---|---|---|
|
MC_PATH_REF |
- |
|
PathRef |
xBusy |
|
- |
BOOL |
|
BOOL |
- |
|
xEnable |
xActive |
|
- |
BOOL |
|
WORD |
- |
|
wMFunction |
xError |
|
- |
BOOL |
|
|
|
|
|
eErrorID |
|
- |
L_IE1P_Error |
|
|
|
|
|
scParams |
|
- |
L_MC4P_MParams |
|
|
|
|
|
|
|
|
|
Inputs
|
Name Data type |
Information/possible settings |
|
|---|---|---|
|
PathRef STRING |
Path file; it can be decoded from FB L_MC4P_PathRefFromFile , for example. |
|
|
xEnable BOOL |
TRUE |
The FB is processed |
|
wMFunction BOOL |
M function; selection of the M function can be changed during operation. The status of the selected M function is displayed via outputs xActive and xWaitingForMAcknowledge . |
|
Outputs
|
Name Data type |
Value/meaning |
|
|---|---|---|
|
xBusy BOOL |
TRUE |
Processing is running; this output is important when the path file of MC_MovePath is executed |
|
xActive BOOL |
TRUE |
The M function at input wMFunktion is active. |
|
xError BOOL |
TRUE |
An error has occurred. For details see ErrorID . |
|
eErrorID |
If Error = TRUE: Error number for the error that has occurred.
|
|
|
scParams L_MC4P_MParams |
Structure with parameter values lrPA ... lrPZ for M functions with parameters |
|