Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
switch-options [2017/01/25 18:36]
arthur
switch-options [2019/04/11 23:28] (current)
wolfmanjm
Line 8: Line 8:
 || switch.[[module_name]].output_off_command || resume || This command is called when the switch changes to the OFF state ||  || switch.[[module_name]].output_off_command || resume || This command is called when the switch changes to the OFF state || 
 || switch.[[module_name]].output_pin || <​kbd>​2.6</​kbd>​ || This pin will be set <​kbd>​low</​kbd>​ when the switch is OFF, and <​kbd>​high</​kbd>​ when the switch is ON ||  || switch.[[module_name]].output_pin || <​kbd>​2.6</​kbd>​ || This pin will be set <​kbd>​low</​kbd>​ when the switch is OFF, and <​kbd>​high</​kbd>​ when the switch is ON || 
-|| switch.[[module_name]].output_type || pwm || Sets the type of output for the <​kbd>​output_pin</​kbd>,​ if set to <​kbd>​digital</​kbd>​ the pin can only be <​kbd>​low</​kbd>​ or <​kbd>​high</​kbd>,​ and if set to <​kbd>​pwm</​kbd>​ the pin can be set to any Sigma-Delta PWM value between 0 and 255 using the S parameter, for example : <​kbd>​M106 S127</​kbd>​. If set to <​kbd>​hwpwm</​kbd>​ will use Real PWM, but the selected output pin must be [[PWM capable]]. The S value will be the duty cycle in percent, NOTE the default is none which will disable the output entirely. ||  +|| switch.[[module_name]].output_type || pwm || Sets the type of output for the <​kbd>​output_pin</​kbd>,​ if set to <​kbd>​digital</​kbd>​ the pin can only be <​kbd>​low</​kbd>​ or <​kbd>​high</​kbd>,​ and if set to <​kbd>​pwm</​kbd>​ the pin can be set to any Sigma-Delta PWM value between 0 and 255 using the S parameter, for example : <​kbd>​M106 S127</​kbd>​. If set to <​kbd>​hwpwm</​kbd>​ will use Real PWM, but the selected output pin must be [[PWM capable]]. The S value will be the duty cycle in percent, NOTE the default is none which will disable the output entirely. Can also be set to <​kbd>​swpmw</​kbd>​ for software-emulated ( non-hardware ) pwm, that will be slower, but will not interfere with hardware pwm peripherals like a laser module. ||  
-|| switch.[[module_name]].startup_state || false || Statup ​state of the switch. If set to <​kbd>​false</​kbd>​ the module is initialized OFF, if set to <​kbd>​true</​kbd>​ the module is initualized ​ON ||  +|| switch.[[module_name]].startup_state || false || Startup ​state of the switch. If set to <​kbd>​false</​kbd>​ the module is initialized OFF, if set to <​kbd>​true</​kbd>​ the module is initialized ​ON ||  
-|| switch.[[module_name]].startup_value || 184 || Statup ​value of the switch if the <​kbd>​output_type</​kbd>​ is <kbd>pwm</​kbd>​. || +|| switch.[[module_name]].startup_value || 184 || Startup ​value of the switch if the <​kbd>​output_type</​kbd>​ is any kind of pwm. startup_state must be false for this to take effect. It is also the value the hwpwm or swpwm is set to on HALT. ||  
 +|| switch.[[module_name]].default_on_value || 184 || Default on setting value of the switch if the <kbd>output_type</​kbd> ​is swpwm or hwpwmIt is also the value the hwpwm or swpwm is set to when startup_state is true || 
 || switch.[[module_name]].max_pwm || 210 || Maximum value for the PWM output. (only used for <​kbd>​pwm</​kbd>​ output type, not for <​kbd>​hwpwm</​kbd>​ || || switch.[[module_name]].max_pwm || 210 || Maximum value for the PWM output. (only used for <​kbd>​pwm</​kbd>​ output type, not for <​kbd>​hwpwm</​kbd>​ ||
-|| switch.[[module_name]].pwm_period_ms || 20 || Period used by the H/W PWM, 20ms is 50Hz which is the default if not set || +|| switch.[[module_name]].pwm_period_ms || 20 || Period used by the H/W and S/W PWM, 20ms is 50Hz which is the default if not set || 
-|| switch.[[module_name]].fail_safe_set_to ​|| 0 || 0 or 1 what to set the output pin to in case of a crash or HALT condition || +|| switch.[[module_name]].failsafe_set_to ​|| 0 || 0 or 1 what to set the output pin to in case of a crash or HALT condition || 
-|| switch.[[module_name]].ignore_on_halt|| false || set to true to not set the fail safe value when a HALT condition is triggered ||+|| switch.[[module_name]].ignore_on_halt|| false || set to true to not set the failsafe or startup_value ​value when a HALT condition is triggered ||