MCA_DigitalCamSwitch (FB)
FUNCTION_BLOCK MCA_DigitalCamSwitch
This function block implements Tappet functionality. The output pin is Switched on and Off based on TrackID, Axis Position and Configuration in the MCA_CamTappet array.
This Fb needs to be called in Motion task to get Correct results.
Users can either create MCA_CamTappet array manually or by using the CamEditor to configure tappets.
When using the CamEditor, MCA_CamTappet array is generated automatically based on the configuration and the array name follows the Cam object name with “_T”.
For example, Cam object’s name is “RotaryShear”, MCA_CamTappet array is generated as “RotaryShear_T. This can be directly passed to input pin name “Tappets” of function block MCA_DigitalCamSwitch
Note
User can utilize CAM editor in Automation builder to generate Tappet Table (MCA_CamTappet) automatically. AxisPosition in MCA_CamTappet should be always in ascending order.
- InOut:
Scope
Name
Type
Comment
Input
EnableBOOLEnables the function block to evaluate tappet track. A rising edge is not required, the block will be activated if Enable = TRUE
TrackIDINTTrack ID for which Output is needed. Range: >=1
Output
InOperationBOOLTrue indicates that Function Block is in Operation
OutputBOOLActual tappet value as per tappet table
ErrorBOOLSignals that error has occurred within function block
ErrorIDError identification. For error details refer to Enumeration ERROR_ID
Input
TappetsPOINTER TO MCA_CamTappet
Reference to CAM_T description, points to an array of MCA_CamTappet, Must be an Array not a pointer
Inout
AxisRefAxis Ref: Reference to Tappet Axis.