Hm2_Bsy
Hm2_Ca
Hm2_Err
Hm2_ErrID
Hm2_D
Done
Error
CommandAborted
Axis
Busy
ErrorID
Execute
HM2
MC_Home
Axis
MC_Axis001
Pwr1_Status MC_Axis001.Details.Homed
Sv_Cam_Bsy
Sv_Cam_Ca
Sv_Cam_Err
Sv_Cam_ErrID
Sv_Cam_D
Done
Error
CommandAborted
CamTable
Busy
ErrorID
Execute
SV_CAM
MC_SaveCamTable
CamTable
CamProfile0
Sv_Cam_Ex
WriteCamdata _MC_COM.Status.CamTableBusy
1
2
3
4
5
6
7
8
9
FOR Index := UINT#0 TO UINT#360 DO
IF Index<UINT#180 THEN
CamProfile0[INDEX].Distance:=CamProfile0[Index].Distance*REAL#2.0;
ELSE
CamProfile0[INDEX].Distance:=CamProfile0[Index].Distance*REAL#0.5;
END_IF;
END_FOR;
WriteDone:=TRUE;
WriteCamData:=FALSE;
1
2
3
IF (WriteDone=TRUE) AND (SaveCamtable=TRUE) AND (_MC_COM.Status.CamTableBusy=FALSE) THEN
Sv_Cam_Ex := TRUE;
END_IF;
Sv_Cam_Ex
Sv_Cam_Ex Sv_Ca_TimeUp
Sv_Cam_Disable
Sv_Ca_CountUp Sv_Cam_Ca
If Sv_Ca_TimeUp is TRUE, Sv_Cam_Ex is changed to FALSE.
If Sv_Cam_Ex changes to FALSE, Sv_Ca_TimeUp changes to FALSE and Sv_Cam_Ex changes to TRUE.
The MC_SaveCamTable instruction is executed again.
If Sv_Ca_CountUp is FALSE, a Cannot Execute Save Cam Table error occurs and Sv_Cam_Disable is changed to TRUE.
If WriteCamData is TRUE and a cam table file is not being saved, the values in the cam data variable are changed.
The displacements for phases from 0° to 180° are multiplied by 2 and the displacements for phases from 181° to 360°
are multiplied by 0.5. When the changes to the displacements are completed, WriteDone is changed to TRUE.
If the changes to the cam data variable are completed, SaveCamtable is TRUE, and a cam table file save operation
is not in progress, Sv_Cam_Ex is changed to TRUE.
If the Servo is ON for axis 1 and home is not defined, the MC_Home instruction is executed.
If Sv_Cam_Ex changes to TRUE, the MC_SaveCamTable instruction is executed.