13.1 Sample Program
13.1.1 Step Out Detection by Comparing Feedback Value with Elapsed Value
This section describes a program example for comparing the count of the output pulses with the
count of the feedback pulses during the E-point control and for making a deceleration stop if the
count is out of the allowable range.
● Using the PG_ReadStatus function block, read the pulse output elapsed value and the pulse
count of the feedback counter.
• Pulse output elapsed value (AbsoluteCounter output parameter)
• Pulse count of the feedback counter (FeedbackCounter output)
● In the following program, a deceleration stop is performed when the following state is
reached.
"Pulse output elapsed value"
-
"Pulse count of the feedback counter" > 1000 (u)
■
Program (ST)
Declaration section
PROGRAM sample
VAR
Process :UDINT := 0;
PG_Power_0: PG_Power;
PG_MoveRelative_0: PG_MoveRelative;
PG_Stop_0: PG_Stop;
PG_ReadStatus_0: PG_ReadStatus;
END_VAR
Implementation section
CASE Process OF
0://Servo On
PG_Power_0(
UnitID:=1,
AxisNo:=1,
Enable:=TRUE,
bRegulatorOn:=TRUE);
IF PG_Power_0.Status = TRUE THEN
Process := 1;
END_IF
1://Execute the PG_MoveRelative
PG_MoveRelative_0(
UnitID:=1,
AxisNo:=1,
Execute:=TRUE,
Distance:= 10000,
Velocity:=10000,
AccDec:=10000);
PG_ReadStatus_0(
UnitID:=1,
AxisNo:=1,
Enable:=TRUE);
IF PG_ReadStatus_0.AbsoluteCounter - PG_ReadStatus_0.FeedbackCounter
13.1 Sample Program
13-2
WUME-GM1PG-01
Содержание AGM1PG04L
Страница 2: ... MEMO 2 WUME GM1PG 01 ...
Страница 11: ...1 Before Using This Product 1 1 Safety Precautions 1 2 1 2 Handling Precautions 1 3 WUME GM1PG 01 1 1 ...
Страница 14: ... MEMO 1 4 WUME GM1PG 01 ...
Страница 22: ... MEMO 2 8 WUME GM1PG 01 ...
Страница 42: ... MEMO 3 20 WUME GM1PG 01 ...
Страница 52: ...4 5 Increment and Absolute 4 10 WUME GM1PG 01 ...
Страница 70: ...AccDec 10000 END_CASE 6 1 Sample Program 6 6 WUME GM1PG 01 ...
Страница 82: ... MEMO 7 10 WUME GM1PG 01 ...
Страница 90: ... MEMO 8 8 WUME GM1PG 01 ...
Страница 94: ...AccDec 10000 END_CASE 9 1 Sample Program 9 4 WUME GM1PG 01 ...
Страница 108: ...Current stops when the home or near home position is detected 10 4 Home and Near Home Input Logic 10 12 WUME GM1PG 01 ...
Страница 116: ... MEMO 10 20 WUME GM1PG 01 ...
Страница 124: ... MEMO 11 8 WUME GM1PG 01 ...
Страница 142: ... MEMO 14 4 WUME GM1PG 01 ...
Страница 158: ...16 3 Dimensions 16 3 1 Pulse Output Unit Unit mm 16 3 Dimensions 16 8 WUME GM1PG 01 ...
Страница 162: ... MEMO App 4 WUME GM1PG 01 ...
Страница 163: ...Record of Changes Date Manual No Record of changes August 2021 WUME GM1PG 01 1st edition WUME GM1PG 01 ...
Страница 164: ... MEMO WUME GM1PG 01 ...
Страница 165: ... MEMO WUME GM1PG 01 ...
Страница 166: ...Panasonic Corporation 2021 August 2021 WUME GM1PG 01 ...