Permalink
Browse files

configured and defined basic variables in configuration-module

started to introduce primitive samity-checks and configuration evaluation to printengime
untill further notice onyl Beaglebone black with Lightcrafter 4500 on HDMI will be supported.
  • Loading branch information...
1 parent 61dce30 commit 4d30ff776ceb2cdc5ef73f95b158a03021c096a5 @rkoeppl rkoeppl committed Apr 18, 2016
Showing with 69 additions and 3 deletions.
  1. +43 −1 modules/printengine.cfg
  2. +26 −2 modules/printengine.pl
View
@@ -1,7 +1,49 @@
+#!/usr/bin/perl
#Configuration file for printengine.pl to be called by SLAcer.js and other printer services
#Copyright 2016 Robert Koeppl, Fablab Leoben robert.koeppl@fablab-leoben.at
#http://www.fablab-leoben.at
#http://www.github.com/fablab-leoben
#released under the MIT License
#this piece of software is provided with absolutely no warranty
-#use at your own risk
+#use at your own risk
+my $log_file = "../log/printengine.log";
+my $logging_enabled="TRUE";
+my $controllerboard="BBB";
+my $steps_per_mm=100; #steps needed to move the Z-Axis 1mm
+my $projector_type="Lightcrafter4500"; #default Light engine
+my $projector_usb_device="";
+my $endstop_Z_max=TRUE;
+my $endstop_Z_max_type="NC";#NO="Normally Open", NC="Normally Closed". NC is preferred
+my $endstop_Z_min=TRUE;
+my $endstop_Z_min_type="NC";#NO="Normally Open", NC="Normally Closed". NC is preferred
+my $wiper="FALSE";
+my $door_contact="true"; Defines if there is a door contact to determine if the enclosure is closed
+my $X_pixels="1192";
+my $Y_pixels="948";
+my $Z_Autocal="True"; #Automatically determine Z-travel by triggering both endstops and dividing the Distance
+my $testrun_capable="true"; Capability to run testruns with wavelengthe that do not trigger polymerisation
+my $testrun_color="RED"; #Color channel used for test run
+my $prodrun_color="BLUE"; #Color Channel used for production run
+my $vat_heatable="false";
+my $check_vat_presence="false";
+#board specific configuration for Beaglebone Black
+if ($controllerboard eq "BBB") then {
+my $virtual_terminal=1;
+my $display_software="fbi";
+my $display_device="/dev/fb0";
+#PIN asignment
+my $pin_zmin="";
+my $pin_zmax="";
+my $pin_door="";
+my $pin_step_Z="";
+my $pin_enable_Z="";
+my $pin_direction_Z="";
+my $pin_trigger_pre="";
+my $pin_trigger_post="";
+my $pin_enable_wiper="";
+my $pin_dir_wiper="";
+my $pin_step_wiper="";
+my $pin_vat_heater="";
+my $pin_vat_temperature="";
+my $pin_vat_presence="";
+}
View
@@ -1,9 +1,33 @@
#!/usr/bin/perl
-#print engine to be called by SLAcer.js and other printer services
+#print engine to be called by SLAcer.js and other printer services orstandalone from command line
#Copyright 2016 Robert Koeppl, Fablab Leoben robert.koeppl@fablab-leoben.at
#http://www.fablab-leoben.at
#http://www.github.com/fablab-leoben
#released under the MIT License
#this piece of software is provided with absolutely no warranty
#use at your own risk
-#configuration is stored in printengine.cfg, do not use hardcoded configuration in ths per script, that is bad practice.
+#configuration is stored in printengine.cfg, do not use hardcoded configuration in ths per script, that is bad practice.
+use warning;
+use strict;
+use Getopt::Std;
+use Getopt::Long;
+use feature qw(say);
+
+#include configuration and settings from printengine.cfg
+use printengine.cfg
+#checked for used controller board type according to configuration.
+#activate logging to logfile
+if $logging_enabled eq "TRUE" then
+{
+open my $log_fh, ">", $log_file;
+}
+
+if $controllerboard eq "BBB" then
+{
+
+}
+else {
+say "unknows printer type $controllerboard , please review your configuration, get in touch with developers or fork the code on Github and contribute the code to use the new printer"
+;
+die "unknown board in configuration!\n";
+}

0 comments on commit 4d30ff7

Please sign in to comment.