Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:sw:01-mervis:description-of-direct-switch-hidden [2025/04/16 09:50] – ↷ Links adapted because of a move operation ofojten:sw:01-mervis:description-of-direct-switch-hidden [2025/04/22 10:08] (current) – typo ofojt
Line 1: Line 1:
 +====== Direct Switch ======
 <WRAP group center round box 95%> <WRAP group center round box 95%>
 {{ :files:img_warning-line_b.png?nolink |}} {{ :files:img_warning-line_b.png?nolink |}}
Line 18: Line 19:
  
 This function allows logical connection of digital input to digital output or relay output to automatically perform one of the available operation. DirectSwitch is independent on the control software running on unit and is suitable for control of lighting or any other time-critical applications (typically, the output response time matches the input response).  This function allows logical connection of digital input to digital output or relay output to automatically perform one of the available operation. DirectSwitch is independent on the control software running on unit and is suitable for control of lighting or any other time-critical applications (typically, the output response time matches the input response). 
 +
 +===== How it works =====
  
 <WRAP group center round box 95%> <WRAP group center round box 95%>
Line 29: Line 32:
 </WRAP> </WRAP>
 </WRAP> </WRAP>
- 
----- 
  
 The software detection of changes is far from being instantaneous. And there are applications, where even 20 ms delay can cause problems, or represent some discomfort at least. A typical example is a switch controlling a light. What we expect from the behaviour is the instant change of the lighting upon pressing the switch. That, as demonstrated above, is not possible to achieve in the software by simple wiring the DI to DO. The software detection of changes is far from being instantaneous. And there are applications, where even 20 ms delay can cause problems, or represent some discomfort at least. A typical example is a switch controlling a light. What we expect from the behaviour is the instant change of the lighting upon pressing the switch. That, as demonstrated above, is not possible to achieve in the software by simple wiring the DI to DO.
  
-The direct switch is the configuration of digital input in a way it will directly control digital or relay output of the same name. The wiring of the input and output is fixed and cannot be changed, only turned on or off. On Group 1, the DIs are wired to DOs. On other Groups, the DIs are wired to ROs.+The direct switch is the configuration of digital input in a way it will directly control digital or relay output of the same name. The wiring of the input and output is fixed and cannot be changed, only turned on or off. On Group 1, the DIs are wired to DOs. On other Groups and Unipi extensions, the DIs are wired to ROs.
  
 DirectSwitch function can be configured only for the corresponding input and output, ie. only for **DIy.x** input and **DOy.x** (**ROy.x**) output, where **x** and **y** (if the **y** is given) numbers must match. It is not possible to use DirectSwitch simultaneously for input and output with mismatched labels, eg. **DIx.y** and **DOv.z.** It is also not possible to use the function for a single input and multiple outputs at the same time.  DirectSwitch function can be configured only for the corresponding input and output, ie. only for **DIy.x** input and **DOy.x** (**ROy.x**) output, where **x** and **y** (if the **y** is given) numbers must match. It is not possible to use DirectSwitch simultaneously for input and output with mismatched labels, eg. **DIx.y** and **DOv.z.** It is also not possible to use the function for a single input and multiple outputs at the same time. 
Line 45: Line 46:
 <WRAP half column 83%> <WRAP half column 83%>
 **Please note:** \\ **Please note:** \\
-The **Direct switch** depends on the [[en:hw:debounce]] settings. To have an instant change, you need to set the **Debounce** to value which doesn't deny the purpose of the **Direct switch** and yet to value, which doesn't deny the purpose of the **Debouncing**. 5-10 ms should be OK.+The **Direct switch** depends on the [[.:description-of-debounce-hidden|debounce]] settings. To have an instant change, you need to set the **Debounce** to value which doesn't deny the purpose of the **Direct switch** and yet to value, which doesn't deny the purpose of the **Debouncing**. 5-10 ms should be OK.
 </WRAP> </WRAP>
 </WRAP> </WRAP>
Line 53: Line 54:
 In the **left panel**, right-click on the name of your Unipi controller under the Modbus TCP channel and select Open editor. In the **left panel**, right-click on the name of your Unipi controller under the Modbus TCP channel and select Open editor.
  
-{{ en:hw:direct-switch:direct-switch_00-open-controler-definition.png?direct |}}+{{ .:direct-switch:direct-switch_00-open-controler-definition.png?direct |}}
  
 Write ''DI_'' in the search bar and select the ''DI_1.01'', click on it and in the **Properties** panel find the **Direct Switch** field. Write ''DI_'' in the search bar and select the ''DI_1.01'', click on it and in the **Properties** panel find the **Direct Switch** field.
 By selecting more than one digital inputs you can change the direct switch settings on multiple inputs at once. By selecting more than one digital inputs you can change the direct switch settings on multiple inputs at once.
  
-{{ en:hw:direct-switch:direct-switch_01-direct-switch-modes.png?direct |}}+{{ .:direct-switch:direct-switch_01-direct-switch-modes.png?direct |}}
  
 As you can see, the option has a dropdown menu with different modes. As you can see, the option has a dropdown menu with different modes.
  
   * **Disabled**: the direct switch is disabled. This option is selected by default.   * **Disabled**: the direct switch is disabled. This option is selected by default.
-  * **Copy**: The status of the DI is copied to the DO/RO. So when the DI is ''TRUE'', the DO is ''TRUE'' and when the DI is ''FALSE'' the DO is also ''FALSE'' +  * **Copy**: The status of the DI is copied to the DO/RO. So when the DI is ''TRUE'', the DO/RO is ''TRUE'' and when the DI is ''FALSE'' the DO/RO is also ''FALSE'' 
-  * **Copy (Invert)**: Same as above but inverted. When the DI is ''TRUE'' the DO is ''FALSE'' and vice versa. +  * **Copy (Invert)**: Same as above but inverted. When the DI is ''TRUE'' the DO/RO is ''FALSE'' and vice versa. 
-  * **Toggle**: This mode toggles the DO on the rising edge of the DI. Handy for controlling light with a momentary switch for example+  * **Toggle**: This mode toggles the DO/RO on the rising edge of the DI. Handy for controlling light with a momentary switch for example
 Demonstration on how the LED will look while **Direct Switch** is enabled on Patron units is [[en:hw:007-patron:led-indication#directswitch_function|here]]. Demonstration on how the LED will look while **Direct Switch** is enabled on Patron units is [[en:hw:007-patron:led-indication#directswitch_function|here]].
  
Line 77: Line 78:
 <WRAP half column 83%> <WRAP half column 83%>
 **Important:** \\ **Important:** \\
-We just changed the configuration of the PLC modules, which is not applicable by simply uploading the solution. To save the configuration, follow the [[en:sw:01-mervis:unipi-configure-module-hidden|UniPi - Configure Module]] tutorial.+We just changed the configuration of the PLC modules, which is not applicable by simply uploading the solution. To save the configuration, follow the [[en:sw:01-mervis:unipi-configure-module-hidden|Unipi - Configure Module]] tutorial.
 </WRAP> </WRAP>
 </WRAP> </WRAP>
  
 Now, that the ''DI_1.01'' input is linked to ''DO_1.01'' you can try to changing states of ''DI_1.01'' with wired switch or button. You should see the output ''DO_1.01'' changing to same state as input you are changing. Now, that the ''DI_1.01'' input is linked to ''DO_1.01'' you can try to changing states of ''DI_1.01'' with wired switch or button. You should see the output ''DO_1.01'' changing to same state as input you are changing.