![background image](http://html1.mh-extra.com/html/omron/nj501-1300/nj501-1300_user-manual_742205335.webp)
10-81
10 Sample Programming
NJ-series CPU Unit Motion Control User’s Manual (W507)
10-2 Basic Pr
o
g
ram
m
in
g
Samples
10
10-2-16 C
hanging a Cam D
ata V
a
riab
le and Sa
ving the Ca
m T
ab
le
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#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;
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.
Содержание 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...