10-9
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-3 Error Monitor
in
g
and Error Re
setting f
o
r Si
ngle-a
x
is Oper
at
ion an
d Synchron
iz
ed Oper
ation
// When
StartPg
is TRUE, the status of process data communications is checked to see if communications are
active and normal.
// The Servo is turned ON for axis 0 if process data communications for axis 0 are active and normal.
// If process data communications are not active, the Servo for axis 0 is turned OFF.
IF (StartPg=TRUE)
AND (_EC_PDSlavTbl[MC_Axis000.Cfg.NodeAddress]=TRUE)
AND (_EC_CommErrTbl[MC_Axis000.Cfg.NodeAddress]=FALSE) THEN
Pwr_En:=TRUE;
ELSE
Pwr_En:=FALSE;
END_IF;
// If a minor fault level error occurs for axis 0, the error handler for the device (FaultHandler) is executed.
// Program the FaultHandler according to the device.
IF MC_Axis000.MFaultLvl.Active=TRUE THEN
FaultHandler();
END_IF;
// If
ResetON
is TRUE (i.e., when the external button is ON) and the command current velocity is zero, the error is
reset.
IF (ResetOn=TRUE)
AND (MC_Axis000.Status.ErrorStop=TRUE)
AND (MC_Axis000.Details.Idle=TRUE) THEN
Reset_Ex := TRUE;
// Minor fault is reset.
END_IF;
// MC_Power
PWR(
Axis
:= MC_Axis000,
Enable := Pwr_En,
Status
=> Pwr_Status,
Busy
=> Pwr_Bsy,
Error
=> Pwr_Err,
ErrorID => Pwr_ErrID
);
// MC_Reset
RESET(
Axis
:= MC_Axis000,
Execute := Reset_Ex,
Done
=> Reset_D,
Busy
=> Reset_Bsy,
Failure
=> Reset_Fai,
Error
=> Reset_Err,
ErrorID => Reset_ErrID
);
ST Programming
Reset_Bsy
Reset_Fail
Reset_Err
Reset_ErrID
Reset_D
Done
Error
Failure
Axis
Busy
ErrorID
Execute
RESET
MC_Reset
Axis
MC_Axis000
MC_Axis000.Status.ErrorStop
MC_Axis000.Details.Idle
ResetON
If
ResetON
is TRUE (i.e., when the external button is ON) and the command current velocity is zero, the error is reset.
Содержание 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...