Adds function to determine RPM for a given SPM

This commit is contained in:
Patrick McDonagh
2017-04-19 20:20:48 -05:00
parent fe4e8bf56d
commit 3e6b1e30cd
2 changed files with 3509 additions and 3675 deletions

File diff suppressed because one or more lines are too long

22
determineRPMforSPM.py Normal file
View File

@@ -0,0 +1,22 @@
thread_pitch = 0.5904
stroke_length = 60.0
motor_nameplate_hertz = 120.0
motor_nameplate_rpm = 1200.0
def find_rpm_for_spm(spm_target):
revolutions_per_fullstroke = 2.0 * stroke_length / thread_pitch
seconds_per_stroke = 60.0 / spm_target
revolutions_per_second = revolutions_per_fullstroke / seconds_per_stroke
return revolutions_per_second * 60.0
def find_hz_for_rpm(rpm_target):
return rpm_target * (motor_nameplate_hertz / motor_nameplate_rpm)
if __name__ == '__main__':
for x in [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]:
rpm = round(find_rpm_for_spm(x), 3)
hz = round(find_hz_for_rpm(rpm), 3)
print(x, rpm, hz)