Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:sw:01-mervis:automatic-restart-of-1-wire-hidden [2018/12/11 14:36] – mkudlacek | en:sw:01-mervis:automatic-restart-of-1-wire-hidden [2025/11/21 10:49] (current) – added links to comm attrib ofojt | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Automatic restart of the 1-Wire bus ====== | ====== Automatic restart of the 1-Wire bus ====== | ||
| + | <WRAP group> | ||
| + | <WRAP half column 81%> | ||
| The 1-Wire bus is prone to EMI which can result in sensors being " | The 1-Wire bus is prone to EMI which can result in sensors being " | ||
| + | </ | ||
| + | <WRAP half column 15%> | ||
| + | ;;# | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | ;;# | ||
| + | </ | ||
| + | </ | ||
| - | <WRAP center round info 60%> | + | < |
| - | In Mervis, the property controlling the power supply for the 1-Wire bus is called **OW_off_1**. By setting the value to true, the bus will be disconnected from the power supply and by resetting back to false the power supply will be connected back. | + | {{ : |
| + | <WRAP half column 13%> | ||
| + | {{ : | ||
| + | </ | ||
| + | <WRAP half column 83%> | ||
| + | **Note:** \\ | ||
| + | In Mervis, the property controlling the power supply for the 1-Wire bus is called **OW_off_1**. By setting the value to '' | ||
| + | </ | ||
| </ | </ | ||
| - | You can reset the power supply manually, but with the help of **commerror** attributes, you can let Mervis do it automatically. The attributes are available on the particular device or the whole channel and they indicate when the Mervis wasn't able to read the datapoints. | + | You can reset the power supply manually, but with the help of **commerror** |
| We will start the project in the **Full mode**, attaching to the controller, creating a FBD program and setting a task executing this program. Next we create ModbusTCP channel for the IOs of the PLC and 1-Wire channel for the 1-Wire bus. Then deploy the solution and detect the 1-Wire sensors. Your workspace should look like this: | We will start the project in the **Full mode**, attaching to the controller, creating a FBD program and setting a task executing this program. Next we create ModbusTCP channel for the IOs of the PLC and 1-Wire channel for the 1-Wire bus. Then deploy the solution and detect the 1-Wire sensors. Your workspace should look like this: | ||
| Line 17: | Line 34: | ||
| {{ : | {{ : | ||
| - | The most important is the attribute **commerror**, | + | The most important is the attribute **commerror**, |
| The solution for automatic restart needs to check the value of the **commerror** and when it is '' | The solution for automatic restart needs to check the value of the **commerror** and when it is '' | ||
| Line 29: | Line 46: | ||
| {{ : | {{ : | ||
| - | All we need to alter is the length of the pulse and the pause between pulses to some reasonable values such as Ttrue = 1s and Tfalse = 4s, deploy the solution and start debugging. Then you can unplug the 1-Wire sensor and you will see that the measured values are red and the commerror attribute is '' | + | All we need to alter is the length of the pulse and the pause between pulses to some reasonable values such as Ttrue = 1 s and Tfalse = 4 s, deploy the solution and start debugging. Then you can unplug the 1-Wire sensor and you will see that the measured values are red and the **commerror** attribute is '' |
| {{ : | {{ : | ||