motor test

This commit is contained in:
2021-03-05 15:26:18 +01:00
parent 090f2ed5d5
commit 0906d34cb6
3 changed files with 10 additions and 7 deletions

View File

@@ -1,16 +1,16 @@
freq = 800
freq_halten = 30000
cyc_halten = 20
cyc_halten = 40
pins_out = {
'kamera' : {'nr' : 2, 'name' : 'Relais, Kamera', 'state' : True},
'encoder' : {'nr' : 3, 'name' : 'Relais, Encoder', 'state' : True}
'kamera' : {'nr' : 2, 'name' : 'Relais, Kamera', 'state' : 1},
'encoder' : {'nr' : 3, 'name' : 'Relais, Encoder', 'state' : 1}
}
pins_in = {
'endschalter1' : {'nr' : 23, 'name' : 'Endschalter, Motor 1', 'state' : True},
'endschalter2' : {'nr' : 26, 'name' : 'Endschalter, Motor 2', 'state' : True},
'endschalter3' : {'nr' : 25, 'name' : 'Endschalter, Motor 3', 'state' : True}
'endschalter1' : {'nr' : 23, 'name' : 'Endschalter, Motor 1', 'state' : 1},
'endschalter2' : {'nr' : 26, 'name' : 'Endschalter, Motor 2', 'state' : 1},
'endschalter3' : {'nr' : 25, 'name' : 'Endschalter, Motor 3', 'state' : 1}
}
m1_a1 = 17

View File

@@ -175,7 +175,7 @@ class motor():
print(str(temp_schritte))
if temp_schritte > 0:
self.vorwaerts(temp_schritte, 1)
self.vorwaerts(temp_schritte)
else:
self.rueckwaerts(abs(temp_schritte))