PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Programm für Unipolare-Schrittmotoren..wie meiner einer hat



hoer173
03.04.2004, 23:51
'Testprogramm
'Baugruppe:
'Schrittmotor-Interface für die C-Control

'-----Unipolare-Ansteuerung------


'------Für AEG SO26/48------------
'--48 Schritte = 1 Umdrehung--
'Treiber IC: L298N
' an jedem Output 1 Diode (Bo580)

'Phasenbelegung am IC:

'Out1 -->-Phase 3
'Out2 -->-Phase 4
'Out3 -->-Phase 1
'Out4 -->-Phase 2




'M1 Rechts / M2 Links

Define MotorPort BytePort[1] 'Digitalausgänge für die Motoren A
Define MotA1 Port[13] 'Motor A - Phase 1
Define MotA2 Port[11] 'Motor A - Phase 2
Define MotA3 Port[14] 'Motor A - Phase 3
Define MotA4 Port[12] 'Motor A - Phase 4

Define MotB1 Port[10] 'Motor A - Phase 1
Define MotB2 Port[16] 'Motor A - Phase 2
Define MotB3 Port[9] 'Motor A - Phase 3
Define MotB4 Port[15] 'Motor A - Phase 4

'M1 und M2 VOR
'zum aktivieren alle Oberpunkte entfernen und bei der anderen Definition eingeben.


'Define MotorPort BytePort[1] 'Digitalausgänge für die Motoren A
'Define MotA1 Port[13] 'Motor A - Phase 1
'efine MotA2 Port[11] 'Motor A - Phase 2
'Define MotA3 Port[14] 'Motor A - Phase 3
'Define MotA4 Port[12] 'Motor A - Phase 4

'Define MotB1 Port[15] 'Motor A - Phase 1
'Define MotB2 Port[9] 'Motor A - Phase 2
'Define MotB3 Port[16] 'Motor A - Phase 3
'Define MotB4 Port[10] 'Motor A - Phase 4







'Schleife zum test---------jeweils 1 halbe Umdrehung wechselnd an 2 Motoren :

#Schleife
MotA1 = OFF
MotA2 = ON
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = ON
MotA2 = OFF
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = OFF
MotA4 = ON
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = ON
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = ON
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = ON
MotA2 = OFF
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = OFF
MotA4 = ON
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = ON
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = ON
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = ON
MotA2 = OFF
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = OFF
MotA4 = ON
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = ON
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = ON
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = ON
MotA2 = OFF
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = OFF
MotA4 = ON
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = ON
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = ON
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = ON
MotA2 = OFF
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = OFF
MotA4 = ON
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = ON
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = ON
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = ON
MotA2 = OFF
MotA3 = OFF
MotA4 = OFF
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = OFF
MotA4 = ON
Pause 6
MotA1 = OFF
MotA2 = OFF
MotA3 = ON
MotA4 = OFF
Pause 1
MotB1 = OFF
MotB2 = ON
MotB3 = OFF
MotB4 = OFF
Pause 6
MotB1 = ON
MotB2 = OFF
MotB3 = OFF
MotB4 = OFF
Pause 6
MotB1 = OFF
MotB2 = OFF
MotB3 = OFF
MotB4 = ON
Pause 6
MotB1 = OFF
MotB2 = OFF
MotB3 = ON
MotB4 = OFF
Pause 6
MotB1 = OFF
MotB2 = ON
MotB3 = OFF
MotB4 = OFF
Pause 6
MotB1 = ON
MotB2 = OFF
MotB3 = OFF
MotB4 = OFF
Pause 6
MotB1 = OFF
MotB2 = OFF
MotB3 = OFF
MotB4 = ON
Pause 6
MotB1 = OFF
MotB2 = OFF
MotB3 = ON
MotB4 = OFF
Pause 6
MotB1 = OFF
MotB2 = ON
MotB3 = OFF
MotB4 = OFF
Pause 6
MotB1 = ON
MotB2 = OFF
MotB3 = OFF
MotB4 = OFF
Pause 6
MotB1 = OFF
MotB2 = OFF
MotB3 = OFF
MotB4 = ON
Pause 6
MotB1 = OFF
MotB2 = OFF
MotB3 = ON
MotB4 = OFF
Pause 6
MotB1 = OFF
MotB2 = ON
MotB3 = OFF
MotB4 = OFF
Pause 6
MotB1 = ON
MotB2 = OFF
MotB3 = OFF
MotB4 = OFF
Pause 6
MotB1 = OFF
MotB2 = OFF
MotB3 = OFF
MotB4 = ON
Pause 6
MotB1 = OFF
MotB2 = OFF
MotB3 = ON
MotB4 = OFF
Pause 6

GoTo Schleife

'F**K YOU!


vieleicht hilft es ja irgendwann mal jemanden...