PLCopen Motion Control 4.2.4 MC_DigitalCamSwitch_BkPlcMc (from V3.0) The function block generates software cams depending on the position, direction of travel and velocity of an axis. VAR_INPUT Enable: BOOL; EnableMask: DWORD; END_VAR VAR_OUTPUT InOperation: BOOL; Busy: BOOL; Error: BOOL; ErrorID: UDINT; END_VAR VAR_INOUT Axis: Axis_Ref_BkPlcMc; Switches: CAMSWITCH_REF_BkPlcMc; Outputs: OUTPUT_REF_BkPlcMc; TrackOptions: TRACK_REF_BkPlcMc; END_VAR Enable : This input controls all activities of the function block. EnableMask : A mask with bits that specify the activation of the outputs in Outputs . InOperation : This indicates whether the function block is active. Busy :
This output TRUE while the command is being processed. Error : The occurrence of an error is indicated here. ErrorID : An encoded indication of the cause of the error is provided here. Axis : Here, the address of a variable of type Axis_Ref_BkPlcMc [ } 67] should be transferred. Switches : Here, an array of type CAMSWITCH_REF_BkPlcMc [ } 69] should be transferred. Outputs : Here, the address of a variable of type OUTPUT_REF_BkPlcMc [ } 92] should be transferred. TrackOptions : Here, an array of type TRACK_REF_BkPlcMc [ } 109] should be transferred. Behavior of the function block Cam signals (switches) are switched based on the actual position of an axis.
The available options are position-controlled (with start and end position) and time-controlled (with trigger position and duration). The direction of travel of the axis can be taken into account. The cam signals are assigned to tracks with parameter sable properties. The time response can be specified through a switch-on and switch-off delay. Predictive signalling can be achieved through negative values. A hysteresis enables suppression of undesirable signalling, if the axis is near a switching points and the actual position is not entirely constant. Example CAMSWITCH_REF_BkPlcMc [ } 69] used: PLC Library Hydraulics 48 Version: 1.4