Input Description

MCX_CamShift_dc provides the possibility to start a cam switch related to a “supervisor” cam in relation with a binary input. The CamShift observes a binary input during the length of the cam. Depending on the result, the associated cam is started. It is then “shifted” by a certain distance or time. The following characteristics apply to the CamShift:

  • Used to create a trigger to some kind of “ShiftedCam”
  • Is edge or level triggered
  • “ShiftedCam” might be
  • Common, comfort, timed, multi, multi-timed
  • Time-timed (just valid with shift)

The values for Mode_Edge_Stable, Mode_Off_On, Mode_Fixed, FirstOnPosition, FirstOffPosition, OnCompensation and OffCompensation are individually changeable online.

../_images/6c8b9feee38a4dc80a33139000eba54e1

The example shows how a Cam and a CamSwitchTimed would work together:

  • Mode_Edge_stable=FALSE, therefore a edge is evaluated
  • Mode_Off_On=TRUE, therefore a positive signal is evaluated
  • Two examples are shown, with Mode_Fixed=FALSE first: The CamswitchTimed is triggered in relation to the received edge.

With Mode_Fixed=TRUE, it is related to the end of Cam1.

  • After the positive edge on a binary input was received, the connected CamSwitchTimed would be triggered. The output “level” will be increased by 1. It is not necessary to receive an edge during the length of the cam, a high signal right from the beginning would do the same.
  • When the encoder moved a distance of 1000 (FirstOnPosition), the output of the cam will be switched on. It will stay on for 100 ms. The output “level” of the CamShift will be decreased by 1.
  • When additional positive edges are received outside the length of Cam1, these are ignored. When Cam1 will be switched on before the distance of 1000 was moved, the respective actions are queued. This is possible for up to 15 actions.
../_images/59fa52cae38a4e450a33139000eba54e1

The 2nd example shows the result when Mode_Edge_Stable=TRUE is used (Mode_Fixed in this case is “don’t care”). The binary input has to be high during the length of Cam1, otherwise the ShiftedCam will not be started.

The actual state of the cam can also be monitored with the output “state”. It will show the Cam, not the binary input.

Enable

Data_Type Default_Value Range Unit
BOOL - - -

The Function Block is activated with Enable TRUE. With Enable=FALSE, the respective cam will be switched off immediately.

Clear

Data_Type Default_Value Range Unit
BOOL - - -

Input Clear deletes the already triggered, but not yet executed cam switches.

Mode_Edge_Stable   BOOL \   (Mode \ edge stable)

Mode_Edge_Stable Selects if a edge or a stable signal is to be used as trigger (FALSE= edge).

If mode_edge_stable=TRUE, the binary signal must be stable during the range of the trigger-cam, otherwise the shifted cam will not be released.

Mode_Off_On

Data_Type Default_Value Range Unit
BOOL - - -

Mode_off_on selects if a positive or negative edge will be used as trigger.

Mode_Fixed

Data_Type Default_Value Range Unit
BOOL - - -

Mode_Fixed selects if an action is triggered in relation to the binary signal or to the end of the cam.

When Mode_Fixed=TRUE, the end of the cam is the reference point. When Mode_Fixed=FALSE, the binary signal is the reference point The shifted cam is started with its own FirstOnPosition as a distance from the reference point. Mode_Fixed=FALSE is only valid with Mode_Edge_Stable=FALSE.

Mode_Edge_Stable Mode_Fixed Reference Point
FALSE FALSE Binary signal
FALSE TRUE Cam
TRUE Don’t care Cam

ShiftedCamNumber

Data_Type Default_Value Range Unit
WORD - - -

Input ShiftedCamNumber selects the number of the cam which has to be triggered, runs from 1..32.

FirstOnPosition

Data_Type Default_Value Range Unit
WORD - - -

The value of FirstOnPosition is automatically truncated to the resolution of the circle without notice. For example, all FirstOnPosition greater than 36000 will be limited to 36000 (given if the default resolution of CI51x-ETHCAT cam is used).

FirstOnPosition can be changed at any time. It will be immediately valid after sending to the CI51x-ETHCAT via the POU.

FirstOffPosition

Data_Type Default_Value Range Unit
WORD - - -

The value of FirstOffPosition is automatically truncated to the resolution of the circle without notice. For example, all FirstOffPosition greater than 36000 will be limited to 36000 (given if the default resolution of CI51x-ETHCAT cam is used).

FirstOffPosition can be changed at any time. It will be immediately valid after sending to the CI51x-ETHCAT via the POU.

Note

  • If FirstOnPosition is smaller than FirstOffPosition, the cam is switched on between the values of FirstOnPosition and FirstOffPosition of the same turn. c12efbf1e38a55a40a33139000473a6a_6815a9d6e38a53630a33139000eba54e
  • If FirstOnPosition is greater than FirstOffPosition, the cam is switched on between the values of FirstOnPosition of the actual turn and FirstOffPosition of the next turn. c12efbf1e38a55a40a33139000473a6a_04d2c890e38a53b10a33139000eba54e
  • If FirstOnPosition is equal to FirstOffPosition, the cam is switched on for one device cycle.

OnCompensation

Data_Type Default_Value Range Unit
DINT - - µs

The switch action is rescheduled with Compensation:

  • If Compensation is positive, the switch action will be delayed by the value of Compensation.
  • If Compensation is negative, the switch action will be brought forward by the value of Compensation.

OffCompensation

Data_Type Default_Value Range Unit
DINT - - µs

The switch action is rescheduled with OffCompensation:

  • If OffCompensation is positive, the switch action will be delayed by the value of OffCompensation.
  • If OffCompensation is negative, the switch action will be brought forward by the value of OffCompensation.

CamNumber

Data_Type Default_Value Range Unit
WORD - 1…32 -

Number of the cam: this number runs from 1..32. The parameter cam_To_Track[0..31] must be used to map the cam to the available digital outputs. A configuration tool must be used for setting the cam_To_Track.

csdc

Data type: CSDCX_REF_TYPE

The 2 elements in_csdc and out_csdc of csdc must be initialized with the beginning address of the input data area and the output data area to facilitate proper function of the cam.