Skip to main content

Command: Show Generated Code

Function: The command opens the Generated Code dialog where the IEC initialization code of the represented cam is displayed.

Call: Cam menu

Requirement: The cam editor is open and displays a cam.

Dialog: Generated Code

Example 12. Example: IEC initialization code
{attribute 'linkalways'}

VAR_GLOBAL
Cam_A: ARRAY[0..3] OF SMC_CAMXYVA := [
        (dX := 0, dY := 0, dV := 0, dA := 0),
        (dX := 120, dY := 120, dV := 1, dA := 0),
        (dX := 240, dY := 240, dV := 1, dA := 0),
        (dX := 360, dY := 360, dV := 0, dA := 0)];
Cam: MC_CAM_REF := (nElements := 4, byType := 3, xStart := 0, xEnd := 360, nTappets := 0, strCAMName := 'Cam', pce := ADR(Cam_A), xPartofLM := TRUE);
END_VAR