Skip to content

Enable PID ON / PID OFF Alarm Actions for Arduino/TC4 #205

Description

@James-NZ

Expected Behavior

Alarm actions PID ON and PID OFF should enable / disable hardware PID on Arduino/TC4 platform. RampSoak ON / OFF may also be affected.

Actual Behavior

PID state on Aruidno/TC4 does not change when alarm activates.

Steps to Reproduce the Problem

Alarm handlers only work if aw.qmc.Controlbuttonflag is set (SW only?). aw.qmc.Controlbuttonflag case is handled in pidOn() / pidOff() functions so this condition may be able to be removed from the alarm handlers to keep them generalized for all PID types.

main.py : 2802-2827

            elif self.alarmaction[alarmnumber] == 17:
                # RampSoak ON
                if aw.qmc.device == 0 and aw.fujipid: # FUJI PID
                    aw.fujipid.setrampsoak(1)
                elif (aw.pidcontrol and aw.qmc.Controlbuttonflag): # internal or external MODBUS PID control
                    aw.pidcontrol.svMode = 1
                    aw.pidcontrol.pidOn()
            elif self.alarmaction[alarmnumber] == 18:
                # RampSoak OFF
                if aw.qmc.device == 0 and aw.fujipid: # FUJI PID
                    aw.fujipid.setrampsoak(0)
                elif (aw.pidcontrol and aw.qmc.Controlbuttonflag):  # internal or external MODBUS PID control
                    aw.pidcontrol.svMode = 0
                    aw.pidcontrol.pidOff()
            elif self.alarmaction[alarmnumber] == 19:
                # PID ON
                if aw.qmc.device == 0 and aw.fujipid: # FUJI PID
                    aw.fujipid.setONOFFstandby(0)
                elif (aw.pidcontrol and aw.qmc.Controlbuttonflag): # internal or external MODBUS PID control
                    aw.pidcontrol.pidOn()
            elif self.alarmaction[alarmnumber] == 20:
                # PID OFF
                if aw.qmc.device == 0 and aw.fujipid: # FUJI PID
                    aw.fujipid.setONOFFstandby(1)
                elif (aw.pidcontrol and aw.qmc.Controlbuttonflag): # internal or external MODBUS PID control
                    aw.pidcontrol.pidOff()

Might be worth checking if this pattern occurs elsewhere in the code (e.g. key press handlers: ln14861, ln14874, ln14881?).

Specifications

  • Artisan Version: 1.3.0
  • Artisan Build (number in brackets shown in the about box): ca3c5f1
  • Platform (Mac/Windows/Linux + OS version): Win64
  • Connected devices or roasting machine: Arduino with TC4 PID firmware

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions