MC_CamTableSelect_BkPlcMc (from V3.0)
The function block initializes a variable of type MC_CAM_ID_BkPlcMc, thereby preparing a cam plate for the coupling of two axes.
Inputs
VAR_INPUT
Execute: BOOL;
Periodic: BOOL;
MasterAbsolute: BOOL;
SlaveAbsolute: BOOL;
ND_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | A rising edge at this input starts the command. |
Periodic | BOOL | Not supported: FALSE is currently to be passed here. |
MasterAbsolute | BOOL | Not supported: TRUE is currently to be passed here. |
SlaveAbsolute | BOOL | Not supported: TRUE is currently to be passed here. |
Inputs/outputs
VAR_INOUT
Master: Axis_Ref_BkPlcMc;
Slave: Axis_Ref_BkPlcMc;
CamTable: MC_CAM_REF_BkPlcMc;
END_VAR
Name | Type | Description |
---|---|---|
Master | Axis_Ref_BkPlcMc | Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred. |
Slave | Axis_Ref_BkPlcMc | Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred. |
CamTable | MC_CAM_REF_BkPlcMc | A variable of type MC_CAM_REF_BkPlcMc should be transferred here. |
Outputs
VAR_OUTPUT
Busy: BOOL;
Done: BOOL;
Error: BOOL;
ErrorID: UDINT;
CamTableId: MC_CAM_ID_BkPlcMc;
END_VAR
Name | Type | Description |
---|---|---|
Busy | BOOL | Indicates that a command is being processed. |
Done | BOOL | This indicates successful initialization of CamTableId. |
Error | BOOL | The occurrence of an error is indicated here. |
ErrorID | UDINT | An encoded indication of the cause of the error is provided here. |
CamTableId | MC_CAM_ID_BkPlcMc | Returns a variable of type MC_CAM_ID_BkPlcMc, which can be passed on to a function block of type MC_CamIn_BkPlcMc. |
Behavior of the function block
On a rising edge at Execute the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:
- If CamTable.pTable is not initialized the system responds with Error and ErrorID:=dwTcHydErrCdPtrPlcMc.
- If CamTable.nLastIdx is not greater than CamTable.nFirstIdx the system responds with Error and ErrorID:=dwTcHydErrCdTblEntryCount.
- If CamTable.nFirstIdx and CamTable.nLastIdx define a table with more than 100 rows the system responds with Error and ErrorID:=dwTcHydErrCdTblLineCount.
- If MasterAbsolute or SlaveAbsolute are not set or Periodic is set, the system responds with Error and ErrorID:=dwTcHydErrCdNotSupport.
If these checks could be performed without problem, CamTableId is initialized. The data from CamTable and the input data of function block are used for this purpose. CamTableId is marked as valid and modified. Done is used to report execution of the command.
A falling edge at Execute clears all the pending output signals.
This function block requires no time for executing its tasks. The output Busy will never assume the value TRUE and only exists for compatibility reasons. |