|
|
Turn this instance on. This creates a new TemperatureSwitch module instance, which monitors the temperature of a TemperatureControl module and controls a Switch module from the configured threshold and trigger. You can configure several instances at the same time: each one needs its own name (for example hotend, bed, chamber). The module does nothing unless it is enabled and has a valid designator and switch.
|
|
|
Use the first letter of the temperature controller designator, with the same case. If several controllers match, Smoothie uses the highest reading. Old V1 configs named temperatureswitch.hotend default to T if you leave it out (deprecated). Matching is case-sensitive: T and t are different designators. An empty designator makes the temperature switch invalid, and it will not work. The temperature is read at the intervals set by heatup_poll and cooldown_poll.
|
|
|
Use the name of an enabled output switch, such as the one that powers your fan. Set the output pin and type in the Switch module: the switch must exist and be configured with output_pin and output_type before it can be controlled. It typically controls one of the small MOSFETs on the Smoothieboard. The switch is only changed while the temperature switch is armed (always armed if arm_mcode is 0, otherwise armed with an M-code).
|
|
V1 only |
Old V1 configs can use type as a fallback for switch. Use switch in new configs.
|
|
|
The temperature in °C at which the state changes. A reading at this value or above counts as hot. Choose the value for the part you need to cool. In level mode the switch turns on above this temperature and off below it. In rising mode it triggers when the temperature crosses up through the threshold, and in falling mode when it crosses down. For a typical hotend cooling fan, set it 10-20°C below the hotend operating temperature. The threshold is the same whether or not the switch is inverted, since inversion only reverses the final output.
|
|
|
Seconds between readings while the temperature is below the threshold. Start with the default of 15 seconds and shorten it if the output needs to respond sooner. Lower values (for example 5-10 seconds) respond quicker but use more processing time, and higher values (for example 20-30 seconds) use less but may delay the switch. The first check is made immediately, and once the temperature crosses the threshold polling changes to cooldown_poll. Polling happens on the second tick, so the actual timing can vary by about 1 second.
|
|
|
Seconds between readings while the temperature is at or above the threshold. The default is 60 seconds. A longer interval uses less processing while the temperature stays high, and is fine when the switch stays on for long periods. When the temperature falls below the threshold, polling goes back to heatup_poll. The timing can vary by about 1 second.
|
|
|
With level (the default), Smoothie requests on when hot and off when cold, on the first reading and when the state changes. rising requests on when the temperature crosses up through the threshold. falling requests off when it drops below. Use inverted to reverse the requested output. Changes of state only happen when the temperature crosses the threshold, not while it is stable. An invalid trigger value falls back to level. In level mode the switch follows the temperature state continuously, and stays active as long as it is armed. In the edge modes (rising and falling) the switch acts only on the transition, requires arming with the arming M-code (see arm_mcode) for each cycle, and automatically disarms after triggering. Inversion is applied after the trigger logic has decided the switch state.
|
|
|
Reverse the output chosen by the trigger. In level mode, that means off when hot and on when cold (normally it is on at or above the threshold, off below). It is applied last, after the trigger logic, so it works with all trigger modes. It is useful for a device that should turn on during cooling, for example an emergency cooling system that starts when the temperature drops too low. It is also useful for controlling a heating element that should turn off when the target temperature is reached. Normal mode (false): temperature at or above the threshold turns the switch on, below it turns the switch off. Inverted mode (true): temperature at or above the threshold turns the switch off, below it turns the switch on. The threshold comparison itself is unchanged; only the final switch output is inverted (in the firmware this happens in the set_switch() function). The inverted option reverses the on/off logic for a device that should activate during cooling rather than heating.
|
|
|
This is a custom M-code that must be sent to arm the temperature switch before it can trigger. It gives you manual control over when the temperature switch is active, prevents unwanted activation, and acts as a safety mechanism for critical temperature-dependent operations. Leave this at 0 to disable the arming requirement, so that the switch is always armed and operates automatically. If you set an M-code (the switch then starts disarmed), for example 1100, send M1100 S1 to arm it or M1100 S0 to disarm it. With an arming command configured, edge triggers disarm after acting once. Disarmed switches do not control their switch. In level mode the switch keeps working while it is armed, and the edge modes disarm it after it triggers once. When set to 0 the module does not register for G-code events at all. V2 can start armed with start_armed = true for that instance.
|