Пример #1
0
    def get_info(self):

        spindle_settings_info = (
                self.l.get_bold("Spindle cooldown") + \
                "[b]: [/b]" + \
                self.l.get_str("The spindle needs to cool down after a job to prevent it from overheating, and to extend its lifetime.") + \
                " " + \
                self.l.get_str("We recommend the following cooldown settings:") + \
                "\n" + \
                "       " + \
                self.l.get_str("Yeti: 20,000 RPM; 10 seconds") + \
                "\n" + \
                "       " + \
                self.l.get_str("AMB: 10,000 RPM; 30 seconds") + \
                "\n\n" + \
                self.l.get_bold("Spindle brand") + \
                "[b]: [/b]" + \
                self.l.get_str("SmartBench will operate slightly differently depending on the type of spindle you are using.") + \
                " " + \
                self.l.get_str("It is important that you choose the option that matches the voltage and digital/manual specifications of your spindle.") + \
                "\n\n" + \
                self.l.get_bold("CNC Stylus switch") + \
                "[b]: [/b]" + \
                self.l.get_str("When enabled, you will always be asked if you are using CNC Stylus or a Router at the start of every job.")
            )

        popup_info.PopupInfo(self.sm, self.l, 750, spindle_settings_info)
Пример #2
0
    def on_enter(self):
        if not sys.platform == "win32":
            self.m.set_led_colour('GREEN')

        # Tell user to update if update is available
        if self.trigger_update_popup:
            popup_info.PopupInfo(self.sm, self.l, 450, self.update_message)

        # Trigger welcome popup is machine is being used for the first time
        if self.m.trigger_setup: self.help_popup()
Пример #3
0
    def popup_help(self):

        info =  self.l.get_bold("Automatic lifting during a pause (recommended for most tools)") + ":" + "\n" + \
                self.l.get_str("When paused, SmartBench can automatically lift the Z axis and move the tool away from the job.") + "\n\n" + \
                " - " + self.l.get_str("This can be used to inspect the work or clear blockages.") + "\n" + \
                " - " + self.l.get_str("It allows the spindle to decelerate away from the job, avoiding burn marks.") + "\n\n" + \
                self.l.get_str("SmartBench automatically returns the tool to the correct position before resuming.") + "\n\n" + \
                self.l.get_bold("Do not allow this feature if the tool has any inverted horizontal features which would rip through the job if the tool were to be lifted (e.g. a biscuit cutter tool profile).")

        popup_info.PopupInfo(self.sm, self.l, 760, info)
    def proceed_to_go_screen(self):
        
        # NON-OPTIONAL CHECKS (bomb if non-satisfactory)
        
        # GCode must be loaded.
        # Machine state must be idle.
        # Machine must be homed.
        # Job must be within machine bounds.

        if self.jd.job_gcode == []:
            info = (
                self.format_command(self.l.get_str('Before running, a file needs to be loaded.')) + '\n\n' + \
                self.format_command(self.l.get_str('Tap the file chooser in the first tab (top left) to load a file.'))
                )

            popup_info.PopupInfo(self.sm, self.l, 450, info)

        elif not self.m.state().startswith('Idle'):
            self.sm.current = 'mstate'
                
        elif self.is_job_within_bounds() == False and sys.platform != "win32":                   
            self.sm.current = 'boundary'

        elif self.m.is_machine_homed == False and sys.platform != "win32":
            self.m.request_homing_procedure('home','home')

        elif self.sm.get_screen('home').z_datum_reminder_flag and not self.sm.get_screen('home').has_datum_been_reset:

                z_datum_reminder_message = (
                    self.format_command(self.l.get_str('You may need to set a new Z datum before you start a new job!')) + \
                    '\n\n' + \
                    self.format_command(self.l.get_str('Press Ok to clear this reminder.').replace(self.l.get_str('Ok'), self.l.get_bold('Ok')))
                )

                popup_info.PopupWarning(self.sm, self.l, z_datum_reminder_message)
                self.sm.get_screen('home').z_datum_reminder_flag = False

        else:
            # clear to proceed
            self.jd.screen_to_return_to_after_job ='home'
            self.jd.screen_to_cancel_to_after_job = 'home'

            # Check if stylus option is enabled
            if self.m.is_stylus_enabled == True:
                # Display tool selection screen
                self.sm.current = 'tool_selection'

            else:
                self.m.stylus_router_choice = 'router'
                
                # is fw capable of auto Z lift?
                if self.m.fw_can_operate_zUp_on_pause():
                    self.sm.current = 'lift_z_on_pause_or_not'
                else:
                    self.sm.current = 'jobstart_warning'
    def popup_help(self):

        info = (
            self.l.get_bold('Cancel') + \
            "\n" + \
            self.l.get_str("Pressing cancel will cancel the job. If the job is restarted, it will restart from the beginning of the job.") + \
            "\n\n" + \
            self.l.get_bold('Resume') + \
            "\n" + \
            self.l.get_str("Pressing resume will continue the job from the point at which it was paused.")
        )

        popup_info.PopupInfo(self.sm, self.l, 500, info)
    def popup_help(self):

        info =  self.l.get_bold("Manual squaring") + "\n"  + \
                self.l.get_str("Before power up, the user manually pushes the X beam up against the bench legs at the home end.") + " " + \
                self.l.get_str("The power is then switched on.") + " " + \
                self.l.get_str("The motor coils lock the lower beam into position with a high degree of reliability.") + " " + \
                self.l.get_str("Thus, mechanical adjustments to square the beam can be repeated.") + "\n\n" + \
                self.l.get_bold("Auto squaring") + "\n" + \
                self.l.get_str("No special preparation from the user is needed.") + " " + \
                self.l.get_str("When homing, the lower beam automatically drives into the legs to square the X beam against the bench legs.") + " " + \
                self.l.get_str("The stalling procedure can offer a general squareness.") + " " + \
                self.l.get_str("But at the end of the movement, the motor coils can bounce into a different step position.") + " " + \
                self.l.get_str("Thus, mechanical adjustments to square the beam can be repeated less reliably than manual squaring.")

        popup_info.PopupInfo(self.sm, self.l, 760, info)
Пример #7
0
    def get_info(self):

        info = (
                self.l.get_bold("To set, if laser hardware is fitted:") + \
                "\n\n" + \
                self.l.get_str("1. Enable laser crosshair (switch to on).").replace(self.l.get_str("on"), self.l.get_bold("on")) + \
                "\n" + \
                self.l.get_str("2. On a test piece, cut a mark using manual moves.") + \
                "\n" + \
                self.l.get_str("3. Lift Z Head and press the reset button in the bottom left.").replace(self.l.get_str("reset"), self.l.get_bold("reset")) + \
                "\n" + \
                self.l.get_str("4. Move the Z Head so that the cross hair lines up with the mark centre.") + \
                "\n" + \
                self.l.get_str("5. Press save.").replace(self.l.get_str("save"), self.l.get_bold("save"))
                )

        popup_info.PopupInfo(self.sm, self.l, 700, info)
Пример #8
0
    def check_for_duplicates_and_autofill(self):

        try:
            # Get serial numbers
            self.zhead_serial_input.text, \
            self.lb_serial_input.text, \
            self.ub_serial_input.text, \
            self.console_serial_input.text, \
            self.ybench_serial_input.text, \
            self.spindle_serial_input.text, \
            self.squareness_input.text = self.calibration_db.get_all_serials_by_machine_serial(self.machine_serial_number)

            message = "This serial number is already in the database! You cannot overwrite."
            log(message)
            popup_info.PopupInfo(self.systemtools_sm.sm, self.l, 500, message)
            return True

        except:
            return False
    def get_info(self): # Localize me!

        z_misc_settings_info = (

            self.l.get_bold("Touchplate offset") + \
            "\n" + \
            self.l.get_str("Update the offset to make setting the Z datum even more precise.") + \
            "\n" + \
            self.l.get_str("Make sure you press the save button to save your settings.") + \
            "\n\n" + \
            self.l.get_bold("Time since lead screw lubricated") + \
            "\n" + \
            self.l.get_str("If you have just lubricated the Z head lead screw, reset the hours since it was last lubricated.") + \
            "\n" + \
            self.l.get_str("This will reset the time until SmartBench gives you the next reminder.") + \
            "\n" + \
            self.l.get_str("Make sure you press the save button to save your settings.")
            )

        popup_info.PopupInfo(self.sm, self.l, 750, z_misc_settings_info)
Пример #10
0
    def save(self):

        try:
            [brand, digital, voltage
             ] = (self.sm.get_screen('maintenance').spindle_settings_widget.
                  spindle_brand.text).rsplit(' ', 2)

            brand = brand[1:]
            voltage = voltage.strip('V')

            if 'digital' in digital: digital = True
            elif 'manual' in digital: digital = False
            else:
                brand_validation_error = (
                        self.l.get_str("Please select a valid spindle brand from the drop down.") + \
                        "\n\n" + \
                        self.l.get_str("If you can't find what you're looking for, please enter the version with a voltage and digital/manual option that matches what you have.")
                    )

                popup_info.PopupError(self.sm, self.l, brand_validation_error)
                return

        except:
            brand_validation_error = (
                    self.l.get_str("Please select a valid spindle brand from the drop down.") + \
                    "\n\n" + \
                    self.l.get_str("If you can't find what you're looking for, please enter the version with a voltage and digital/manual option that matches what you have.")
                )

            popup_info.PopupError(self.sm, self.l, brand_validation_error)
            return

        try:

            time = int(
                self.sm.get_screen('maintenance').spindle_settings_widget.
                spindle_cooldown_time.text)

            if (time >= 1 and time <= 60):
                pass

            else:
                time_validation_error = (
                        self.l.get_str("The spindle cooldown time should be between 1 and 60 seconds.") + \
                        "\n\n" + \
                        self.l.get_str("Please enter a new value.")
                    )

                popup_info.PopupError(self.sm, self.l, time_validation_error)
                return

        except:

            time_validation_error = (
                    self.l.get_str("The spindle cooldown time should be a number between 1 and 60 seconds.") + \
                    "\n\n" + \
                    self.l.get_str("Please enter a new value.")
                )

            popup_info.PopupError(self.sm, self.l, time_validation_error)
            return

        try:

            speed = int(
                self.sm.get_screen('maintenance').spindle_settings_widget.
                spindle_cooldown_speed.text)

            if (speed >= 10000 and speed <= 20000):
                pass

            else:
                speed_validation_error = (
                        self.l.get_str("The spindle cooldown speed should be between 10,000 and 20,000 RPM.") + \
                        "\n\n" + \
                        self.l.get_str("Please enter a new value.")
                    )

                popup_info.PopupError(self.sm, self.l, speed_validation_error)
                return

        except:
            speed_validation_error = (
                    self.l.get_str("The spindle cooldown speed should be a number between 10,000 and 20,000 RPM.") + \
                    "\n\n" + \
                    self.l.get_str("Please enter a new value.")
                )

            popup_info.PopupError(self.sm, self.l, speed_validation_error)
            return

        if self.m.write_spindle_cooldown_rpm_override_settings(self.sm.current_screen.spindle_settings_widget.rpm_override) and \
            self.m.write_spindle_cooldown_settings(brand, voltage, digital, time, speed) and \
            self.m.write_stylus_settings(self.sm.current_screen.spindle_settings_widget.stylus_switch.active):

            saved_success = self.l.get_str("Settings saved!")
            popup_info.PopupMiniInfo(self.sm, self.l, saved_success)

        else:
            warning_message = (
                    self.l.get_str("There was a problem saving your settings.") + \
                    "\n\n" + \
                    self.l.get_str("Please check your settings and try again, or if the problem persists please contact the YetiTool support team.")
                )

            popup_info.PopupError(self.sm, self.l, warning_message)

        if voltage == '110':  # localize me!
            spindle_voltage_info = (
                    self.l.get_str("When using a 110V spindle as part of your SmartBench, please be aware of the following:") + \
                    "\n\n" + \
                    self.l.get_str("110V spindles have a minimum speed of ~10,000 RPM.") + \
                    "\n\n" + \
                    self.l.get_str("SmartBench electronics are set up to work with a 230V spindle, so our software does a smart conversion to make sure the machine code we send is adjusted to control a 110V spindle.") + \
                    "\n\n" + \
                    self.l.get_str("The 5% spindle speed adjustments in the Job Screen cannot be converted for a 110V spindle, so they will not be able to adjust the speed by exactly 5%.") + \
                    " " + \
                    self.l.get_str("You will still be able to use the real time spindle speed feedback feature to assist your adjustment.")
                )

            popup_info.PopupInfo(self.sm, self.l, 780, spindle_voltage_info)