L_MC2P: Changing CAM profile of CAM function at runtime

Question:
For an existing cam (CamRef), which has been created with the CAM Editor in the PLC Designer at runtime, some points are to be changed via the PLC application.

Answer:
We only recommend to change cam points for segment-based and not for grid point-based graphs.
The cam data is read into an automatically generated data array of the L_MC2P_CamDataObject type. The data array always has the name of the corresponding CamRef with the extension '_Data'.
Each element of the array corresponds to a cam/segment point.
 
The individual parameters of a segment can be accessed as follows:
  • <CamRef Name>_Data [<DataPoint>].uCamObject.CamParameter

The following cam parameters are available:

  • eLawOfMotion - law of motion of L_MC2P_LawOfMotion type
  • lrX - master position
  • lrY - slave position
  • lrYs - gradient of cam (dY/dX )
  • lrYss - curvature of cam (dY/dX² )
  • lrLambda - scaled positon of turning point (required for sinusoidal laws of motion)

 

Changed data will be immediately accepted even if the cam is being processed.
To ensure continuous setpoint generation, cam points should not be manipulated during cam processing.

 


URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/201500833/1/
Formulario de contacto