;Original Code by Dustin Neumann, Modified by Dane Ocampo for 2GBP G21 (mm) G90 (Absolute distance mode) G55 (Machine Plane Coordinates) G64 (Turn off exact stop check) o call ;#######################################[ P A R A M E T E R S ]######################################## ; Movement speed #<_speed> = 1100 #<_mss> = 1.25 (1.28) (Margin Speed Scalar: the return speed on the margin) #<_ext_rate> = 0.003 ;extrude #<_purge_ext_rate> = 0.05 ;purge extrusion rate #<_reverse> = 0.005 (extruder back up, used before inter-layer pauses) #<_corners> = 0 (1 extrude on corners, 0 no extrude on corners) #<_margin> = 8 #<_lo> = 2 ; loop offset, used to prevent errors from turn-arounds at row ends #<_pause> = .0001 (wait time, used at corners) ;originally .0001 ;work dimensions #<_l> = 36 (mm length) #<_width> = 36 (mm width) #<_delta> = .75 (mm inter-row&column spacing) #<_layerH> = .08 (mm half-layer height) ;#######################################[ I N I T I A L I Z E ]######################################## ;coordinates #<_z0> = 3 (Initial Height of Needle Tip) #<_zz> = #<_z0> #<_x0> = 0 (initial x) #<_xx> = #<_x0> (x) #<_y0> = 0 (initial y) #<_yy> = #<_y0> (y) ;counters #<_zstep> = 0 #<_step> = 0 #<_done> = 0 ;counter maximums #<_layers> = 23 #<_ystepf> = FIX[#<_l>/#<_delta>] (FIX operator rounds the argument down to integer) #<_xstepf> = FIX[#<_width>/#<_delta>] ;============================[ E L E C T R O S P U N L A Y E R ]================================ o111 if [#<_zstep> MOD 3 EQ 0] ;electrospin 1 layer for every 3 printed layers G1 Z[#<_zz> + 165.1] F2000 ;165.1 mm = 6.5 in o call [1.5] [1] ;extrude at 1.5mL/hr with hv on G4 P10 ;electrospin for 10s (10 min) o call ;stop extruding and hv off G1 Z[#<_zz>] F2000 ;quick move back to where it was (G0 causes error) o111 endif ;================================================================================================ o call ;################################[ F I N I S H I N G S E Q U E N C E ]################################### ;move out of the way G0 X-25 Y150 Z80 ;;back up extruder to relieve excess pressure and prevent drips ;M4 S0.05 ;o101 while [#<_done> LE 0] ('timer') ; G1 X[#<_xx>] F#<_speed> ; #<_done>=[#<_done> + 1] ;o101 endwhile ; retract by 1uL to relieve pressure and prevent drips ;o call [-3.6] [0] ;G4 P1 ;o call M2 ;End Program