2 / 2 6 / 2 0 0 2 2 : 0 6 P M 2 / 2 6 / 2 0 0 2
1 8 1
N M I L - 7 0 5 6 S E R V O M O T O R D R I V E R
S E C O N D F O R T H S A M P L E C O D E
( Summary of the five PID parameters )
: SHOPAR
CR
." PID PARAMETERS " CR
." KP = " KP @ . CR
." KI = " KI @ . CR
." KD = " KD @ . CR
." IL = " IL @ . CR
." DS = " DS @ . CR
DECIMAL D. HEX CR
CR STATUS@ 04 AND
VARIABLE VELOCITY 100 VELOCITY !
;
: LONG-MOTION
RESET FILTER
DFH
CR ." Starting position = "
RDRP REAL-POS 2@
LTRJ
002B W!
2DUP ." acc= " DECIMAL D. HEX DW!
2DUP ." vel= " DECIMAL D. HEX DW!
2DUP ." pos= " DECIMAL D. HEX DW!
STT
WAIT-FOR-MOVE-END
MOTOR-OFF
RDRP ." Total distance moved = "
REAL-POS 2@ DECIMAL D. HEX CR
;
: STALL-TESTER D- DABS 1 0 D< IF ." STALLED MOTOR " THEN ;
: MOTION-STALL-TEST ( VELH VELL POS ... )
LTRJ
002B W! ( Command to load ACC, VEL, POS )
0000.2000 DW! ( Acceleration )
DW! ( Velocity )
S->D DW! ( Pos )
STT
BEGIN
( Remove the comment on the next line to get screen display )
( RDRP REAL-POS 2@ D. CR )
RDRP
REAL-POS 2@ 2DUP D.
OLD-REAL-POS 2@
STALL-TESTER
REAL-POS 2@ OLD-REAL-POS 2!
UNTIL
MOTOR-OFF
;
VARIABLE CHANGE 0 CHANGE C!
VARIABLE DISTANCE 200 DISTANCE !
VARIABLE ACCELERA 100 ACCELERA !
: DELTA CHANGE C@ IF + ELSE - THEN ;
: ZERO 1 DELTA ;
: ONE 10 DELTA ;
: TWO 100 DELTA ;
: THREE 1000 DELTA ;
: FOUR CHANGE C@ IF 2* ELSE 2/ THEN ;
Содержание NMIY-0031
Страница 1: ...2 2 6 2 0 0 2 2 0 6 P M 1 NMIY 0031 Single Board Computer Covers NMIY 0031 V1 0 4 22 96 ...
Страница 2: ...2 2 6 2 0 0 2 2 0 6 P M 2 ...
Страница 6: ...2 2 6 2 0 0 2 2 0 6 P M 6 ...
Страница 8: ...2 2 6 2 0 0 2 2 0 6 P M 8 ...
Страница 14: ...2 2 6 2 0 0 2 2 0 6 P M 1 4 ...
Страница 30: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 3 0 ...
Страница 32: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 3 2 ...
Страница 50: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 0 ...
Страница 52: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 2 ...
Страница 54: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 4 ...
Страница 56: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 6 ...
Страница 58: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 8 ...
Страница 60: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 0 ...
Страница 62: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 2 ...
Страница 68: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 8 ...
Страница 70: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 0 ...
Страница 72: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 2 ...
Страница 76: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 6 ...
Страница 82: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 2 ...
Страница 84: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 4 ...
Страница 86: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 6 ...
Страница 88: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 8 ...
Страница 90: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 9 0 ...
Страница 102: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 0 2 ...
Страница 108: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 0 8 ...
Страница 110: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 0 ...
Страница 114: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 4 ...
Страница 118: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 8 ...
Страница 126: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 2 6 ...
Страница 128: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 2 8 ...
Страница 134: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 3 4 ...
Страница 148: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 4 8 ...
Страница 150: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 0 ...
Страница 152: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 2 ...
Страница 154: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 4 ...
Страница 156: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 6 ...
Страница 168: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 6 8 ...
Страница 170: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 0 ...
Страница 172: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 2 ...
Страница 174: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 4 ...
Страница 178: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 8 ...