1 Bemerkung:

Diese fünf Phasen sind jedoch nicht identisch mit den fünf Phasen aus Absch. 7.8.1.2, die die Anwendersicht darstellen. Diese Betrachtung der 5-Phasen-Steuerung spiegelt die programminterne Strukturierung und Algorithmik wieder, daher werden sie bewusst als ,,Steuerungsphasen'' im Gegensatz den den vom Anwender wahrgenommenen ,,Positionierphasen'' bezeichnet.

Beispielsweise finden sich die beiden Positionierphasen ,,Initialisierung und Startphase'' und ,,Geschwindigkeits-Anstiegsphase'' in der Programmlogik in einem einzelnen Programmteil, nämlich die kontinuierliche Steigerung der Sollwertvorgabe von einem Minimum bis zum Maximum, wieder. Andererseits benötigen der Übergang von der Minimalgeschwindigkeits- in die Stopp-Phase programmtechnisch eigene steuerungstechnische Maßnahme (z. B. Speichern des letzten Winkelwertes im EEPROM), wohingegen vom Anwender die ,,Nichtbewegung'' nicht als eigene Positionierphase wahrgenommen wird.

Die unterschiedliche Nummerierungsart soll auch diesem Umstand Rechnung zu tragen.

	; ==================================================================
	; MAIN rotation movement and control end position using 4 steps
	; ---------------------------------
	; I.   phase_speed_goup - rotation_mode=ModeSpeedGoUp
	; II.  phase_speed_high - rotation_mode=ModeSpeedHigh
	; III. phase_speed_down - rotation_mode=ModeSpeedDown
	; IV.  phase_speed_slow - rotation_mode=ModeSpeedSlow
	; V.   phase_speed_none - rotation_mode=ModeSpeedNone
	;
	; the rot_angle_godown position is controlled by OCIE1B which
	; has been programmed in rotation_startup subroutine
	;
	; the rot_angle_preset position is controlled by OCIE1B which
	; will be programmed in rotation_high, rotation_down or
	; rotation_slow
	;
	; ---------------------------------
	; goto position main function
	; move facility to a specific angle position
	; ----------------------------------
	; input:  REG_A - requested rotation end position
	; output: none
	; affected: flags
	; ----------------------------------
	select_position_enter:
	  push  temp1
	  push  ltmp1
	  PUSHW REG_Z
	  PUSHW REG_A
	  rcall auto_funcmode             ; display angle information
	; ....................................................................
	; set rotation direction - currently always positive direction!!!
	  ldi   temp1, ValueDirIncr       ; direction flag (-1,0,+1)
	  rcall set_direction
	; precompute rotation values      ; noof steps returned in REG_B
	; ....................................................................
	; Preparation phase: data preprocessing...
	  rcall rotation_preproc          ; rot_angle_godown and rot_angle_preset
	                                  ; values stored
	  LDSWR REG_A, rot_angle_godown   ; store req. position (with overflow)
	  rcall setup_counter_value       ; write slow_down value to OCR1B
	                                  ; and start steps counting process
	; ....................................................................
	; PHASE I: rotation speed goup
	  rcall phase_speed_goup          ; input: REG_B - no of steps to endpos
	  lds   temp1, rotation_fail_flag ; check the failure flag...
	  tst   temp1
	  brne  failure_occurred          ; if failure occurred ...
	  AFTER_POSITION skip_speed_high  ; uses ltmp1
	; continue on hisped?             ; ... we skip hispeed phase ... 

gerhard.reithofer@tech-edv.co.at