Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

Následující verze
Předchozí verze
cs:sw:01-mervis:automatic-restart-of-1-wire-hidden [2020/01/17 07:27] – created avsetulacs:sw:01-mervis:automatic-restart-of-1-wire-hidden [2025/11/21 10:48] (aktuální) – přidány odkazy na komunikační atributy ofojt
Řádek 1: Řádek 1:
-FIXME - překlad +====== Automatický restart sběrnice 1-Wire ====== 
-====== Automatic restart of the 1-Wire bus ====== +<WRAP group> 
-The 1-Wire bus is prone to EMI which can result in sensors being "stuckand disabling the whole bus communicationWith our PLCs you are able to turn the power off for the whole 1-Wire bus and forcing the sensors to reset+<WRAP half column 81%> 
- +Sběrnice 1-Wire je náchylná k EMI, což může vést k "zaseknutísenzorů a deaktivaci celé komunikace na sběrniciS našimi PLC můžete vypnout napájení pro celou 1-Wire sběrnici a donutit senzory k resetování
-<WRAP center round info 60%> +</WRAP> 
-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 15%> 
 +;;# 
 +<html><span class="dev-tag dev-patron">Patron</span></html> \\ 
 +<html><span class="dev-tag dev-neuron">Neuron</span></html> \\ 
 +<html><span class="dev-tag dev-axon">Axon</span></html> 
 +;;# 
 +</WRAP> 
 +</WRAP>
  
 +<WRAP group center round box 95%>
 +{{ :files:img_warning-line_b.png?nolink |}}
 +<WRAP half column 13%>
 +{{ :en:hw:08_safety-instructions_pseudo-ISO-7010-info.png?nolink |(!)}}
 +</WRAP>
 +<WRAP half column 83%>
 +**Poznámka:** \\
 +V Mervis se vlastnost ovládající napájení zdroje pro 1-Wire bus nazívá **OW_off_1**. Nastavením hodnoty na ''TRUE'' bude sběrnice odpojena od napájení a nastavením zpět na ''FALSE'' bude napájení znovu obnoveno.
 +</WRAP>
 </WRAP> </WRAP>
  
-You can reset the power supply manuallybut with the help of **commerror** attributes, you can let Mervis do it automaticallyThe attributes are available on the particular device or the whole channel and they indicate when the Mervis wasn't able to read the datapoints for given device/channel.+Můžete resetovat napájení i ručněale pomocí [[.:comm-attributes-hidden|komunikačního atributu]] **commerror** můžete nechat Mervis, aby to dělal automaticky[[.:comm-attributes-hidden|Komunikační atributy]] jsou k dispozici na konkrétním zařízení nebo na celém kanálu a ukazují, kdy Mervis nedokázal přečíst datové body pro dané zařízení či celý kanál.
  
-We will start the project in the **Full mode**, attaching to the controllercreating a FBD program and setting task executing this program. Next we create ModbusTCP channel for the IOs of the PLC and 1-Wire channel for the 1-Wire busThen deploy the solution and detect the 1-Wire sensorsYour workspace should look like this:+Zahájíme projekt v **Plném módu**, připojíme se ke kontroléruvytvoříme program FBD nastavíme úlohu provádějící tento program. Dále vytvoříme 1-Wire kanál pro 1-Wire sběrnici**Nahrajte sestavu** a detekujte senzory 1-Wire. Váš pracovní prostor by měl vypadat následovně:
  
 {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-01-workspace.png?direct |}} {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-01-workspace.png?direct |}}
  
-As you can seewe have one 1-Wire thermometer, which we renamed to "office"Now double click on the **1-Wire** channel in the **Left panel**. You will be presented by all the available datapoints:+Jak můžete vidětmáme jeden 1-Wire teploměr a ten jsme přejmenovali na "Kancelar"Nyní dvakrát klikněte na kanál **1-Wire** na **levém panelu**. Zobrazí se vám všechny dostupné datové body:
  
 {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-02-attributes.png?direct |}} {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-02-attributes.png?direct |}}
  
-The most important is the attribute **commerror**, which indicates if there is a communication error with **any** of the connected sensorsThe attribute's type is bool and when the value is ''TRUE'', it means there is communication error and once the error disappearsthe attribute is ''FALSE''As you can seeattribute of the same name is in the **office** section as wellThis attribute indicates communication error **only** for the sensor called **office**.+Nejdůležitější je atribut **commerror**, který označuje, zda došlo k chybě komunikace s některými připojenými senzoryTyp atributu je bool a pokud je hodnota ''TRUE'', znamená to, že došlo k chybě komunikace jakmile chyba zmizíje hodnota ''FALSE''Jak vidíteatribut se stejným názvem je také v sekci **Kancelar**. Tento atribut označuje chybu komunikace pouze pro senzor zvaný **Kancelar**.
  
-The solution for automatic restart needs to check the value of the **commerror** and when it is ''TRUE'' we need to briefly set the **OW_off_1** to ''TRUE'' and then set it back to ''FALSE''Better yetif the **commerror** stays in ''TRUE'' we will try resetting the bus periodically. For this functionwe can use block **Pulse Generator (BD2)**:+Program sestavy pro automatický restart kontroluje hodnotu **commerror** a když je ''TRUE'', musíme krátce nastavit **OW_off_1** na hodnotu ''TRUE'' a poté ji nastavit zpět na ''FALSE''Ještě lepším řešením ježe když **commerror** zůstane v ''TRUE'', zkoušíme periodicky resetovat sběrnici. Pro tuto funkci můžeme použít blok **Pulse Generator (BD2)**:
  
 {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-03-pulse-generator.png?direct |}} {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-03-pulse-generator.png?direct |}}
  
-By default the block has visible input **Enable**. If the input is ''TRUE'', the block will generate square signal on the **Out** outputYou can set the length of the pulse and the pause via the hidden inputs **Tfalse** and **Ttrue**.+Ve výchozím nastavení má blok viditelný vstup **Enable**. Pokud je vstupem ''TRUE'', bude generovat čtvercový signál na výstupu **Out**. Délka impulsu a pauzy můžete nastavit pomocí skrytých vstupů **Tfalse** **Ttrue**.
  
-As you probably guessedwe will use the **commerror** attribute as input and we can directly wire the **Out** output to the **OW_off_1** variable:+Jak jste pravděpodobně uhodlijako vstup použijeme atribut **commerror** a můžeme přímo propojit výstup **Out** s proměnnou **OW_off_1**:
  
 {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-04-complete-project.png?direct |}} {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-04-complete-project.png?direct |}}
  
-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 debuggingThen you can unplug the 1-Wire sensor and you will see that the measured values are red and the **commerror** attribute is ''TRUE'' and the **Pulse Generator** is sending reset pulses to the bus:+Potřebujeme pouze změnit délku impulsu a pauzu mezi impulzy na rozumné hodnoty, např: Ttrue = 1 s a Tfalse = 4 s. **Nahrajte sestavu** a klikněte na **Start ladění**Poté můžete odpojit snímač 1-Wire a uvidíte, že naměřené hodnoty jsou červené, atribut **commerror** je ''TRUE'' **Pulse Generator** odesílá resetovací impulzy pro napájení sběrnice 1-Wire:
  
 {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-05-debugging.png?direct |}} {{ :en:sw:01-mervis:automatic-restart-of-the-1-wire-05-debugging.png?direct |}}