![background image](http://html1.mh-extra.com/html/omron/nj501-1300/nj501-1300_user-manual_742205338.webp)
10 Sample Programming
10-84
NJ-series CPU Unit Motion Control User’s Manual (W507)
Hm1_Ex:=TRUE;
END_IF;
// If the Servo is ON for axis 1 and home is not defined, the MC_Home instruction is executed for axis 1.
IF (Pwr2_Status=TRUE)
AND (MC_Axis001.Details.Homed=FALSE) THEN
Hm2_Ex:=TRUE;
END_IF;
// 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 of 0
°
to 180
°
are multiplied by 2 and the displacements for phases of 181
°
to 360
°
are multiplied by 0.5.
// When the changes are completed,
WriteDone
is changed to TRUE.
IF (WriteCamdata=TRUE)
AND (_MC_COM.Status.CamTableBusy=FALSE) THEN
FOR Index := UINT#10#0 TO UINT#10#360 DO
IF Index<UINT#10#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;
END_IF;
// If homing is completed for axis 0, velocity control is executed.
IF Hm1_D=TRUE THEN
Vel_Ex:=TRUE;
END_IF;
// If the changes to the cam data variable are completed,
SaveCamtable
is TRUE, and a cam table file save opera-
tion is not in progress,
//
Sv_Cam_Ex
is changed to TRUE.
// If
Sv_Cam_Ex
is TRUE, the MC_SaveCamTable instruction is executed.
IF (WriteDone=TRUE)
AND (SaveCamtable=TRUE)
AND (_MC_COM.Status.CamTableBusy=FALSE) THEN
Sv_Cam_Ex := TRUE;
END_IF;
// If
Sv_Ca_TimeUp
is TRUE,
Sv_Cam_Ex
is changed to FALSE.
// If
Sv_Cam_Ex
is FALSE,
Sv_Ca_TimeUp
changes to FALSE and
Sv_Cam_Ex
changes to TRUE.
// The MC_SaveCamTable instruction is executed again.
IF (Sv_Cam_Ex=TRUE)
AND (Sv_Ca_TimeUp=FALSE) THEN
Sv_Cam_Ex := TRUE;
ELSE
Sv_Cam_Ex := FALSE;
END_IF;
// If Sv_Ca_CountUp is FALSE and a Cannot Execute Save Cam Table error occurs,
//
Sv_Cam_Disable
is changed to TRUE.
IF (Sv_Ca_CountUP=FALSE)
AND (Sv_Cam_Ca=TRUE) THEN
Sv_Cam_Disable := TRUE;
ELSE
Sv_Cam_Disable := FALSE;
END_IF;
Содержание NJ501-1300
Страница 12: ...Sections in this Manual 10 NJ series CPU Unit Motion Control User s Manual W507...
Страница 18: ...16 NJ series CPU Unit Motion Control User s Manual W507 CONTENTS...
Страница 22: ...Read and Understand this Manual 20 NJ series CPU Unit Motion Control User s Manual W507...
Страница 34: ...Revision History 32 NJ series CPU Unit Motion Control User s Manual W507...
Страница 44: ...1 Introduction to the Motion Control Function Module 1 10 NJ series CPU Unit Motion Control User s Manual W507...
Страница 58: ...2 Motion Control Configuration and Principles 2 14 NJ series CPU Unit Motion Control User s Manual W507...
Страница 86: ...3 Configuring Axes and Axes Groups 3 28 NJ series CPU Unit Motion Control User s Manual W507...
Страница 98: ...4 Checking Wiring from the Sysmac Studio 4 12 NJ series CPU Unit Motion Control User s Manual W507...
Страница 122: ...5 Motion Control Parameters 5 24 NJ series CPU Unit Motion Control User s Manual W507...
Страница 158: ...6 Motion Control Programming 6 36 NJ series CPU Unit Motion Control User s Manual W507...
Страница 166: ...7 Manual Operation 7 8 NJ series CPU Unit Motion Control User s Manual W507...
Страница 182: ...8 Homing 8 16 NJ series CPU Unit Motion Control User s Manual W507...
Страница 346: ...10 Sample Programming 10 92 NJ series CPU Unit Motion Control User s Manual W507...
Страница 422: ...Appendices A 18 NJ series CPU Unit Motion Control User s Manual W507...
Страница 423: ...Index 1 NJ series CPU Unit Motion Control User s Manual W507 I Index...
Страница 430: ...Index 8 NJ series CPU Unit Motion Control User s Manual W507 Index...