In [3]:
import math
"""
Calculation for max speed on DigiRound
"""
inch2mm = 25.4 # mm/inch
bpp = 4.0 # bit/px
def speedCalc(cups_speed, printing_speed, substrate_size, turn_time, printhead_dpi):
"""
speedCalc, calculated the theoretical speed of a machine with the given settings
:param cups_speed: mechanical max of [cups/min]
:param printing_speed: max printing speed of Calmar system [mm/s]
:param substrate_size: 2-dim array [w,h] of the subrate size in [mm]
:param turn_time: time for loading new cup (in digiround turn mechanism) in [seconds], rotate and new indexing
:param printhead_dpi: dpi of a printhead [dpi]
"""
inch2mm = 25.4 # mm/inch
bpp = 4.0 # bit/px
# cup speed
cup_speed_sec = cups_speed / 60 # cup/sec
cup_cycle = 1/cup_speed_sec # sec
# print speed
print_time = substrate_size[0] / printing_speed # sec
print_cycle = turn_time + print_time # sec
# image size
pixel_pitch = inch2mm / printhead_dpi # mm
image_size_px = [int(math.ceil(substrate_size[0]/pixel_pitch)), int(math.ceil(substrate_size[1]/pixel_pitch))]
# image data size per image
image_size_bytes = (image_size_px[0]*image_size_px[1])*bpp/8 # bytes
# Print all results
print("cup_speed_sec = {:.3f} cup/sec".format(cup_speed_sec))
print("cup_cycle = {:.3f} ms (Mechanic Maximum)".format(cup_cycle*1000))
print("print_time = {:.3f} ms".format(print_time*1000))
print("print_cycle = {:.3f} ms".format(print_cycle*1000))
print("image_size_px (x : y) = ( {}px : {}px )".format(image_size_px[0], image_size_px[1]))
print("image_size_bytes = {:.3f} MB".format(image_size_bytes/1024/1024))
In [4]:
cups_speed = 217.0 # cups/min
printing_speed = 850.0 # mm/s
substrate_size = [280.0, 140.0] # mm [w, h]
turn_time = 0.1 # sec
printhead_dpi = 360.0 # dpi
speedCalc(cups_speed, printing_speed, substrate_size, turn_time, printhead_dpi)