Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. PWM Steuerung mit Fade

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    PWM Steuerung mit Fade

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @Aphofis last edited by

      @Aphofis
      Was bedeutet Pulse_Wave_Stop (30 s) ? Dauer für 30 % oder für 100 % ?

      Aphofis 1 Reply Last reply Reply Quote 0
      • Aphofis
        Aphofis @paul53 last edited by

        @paul53
        Also:

        Sequenzial Wellenverlauf
        von 30% Wave_Up rauf in 1,9 sek und runter mit Wave_Down in 2 sek dann von vorne

        Intervall Wellenverlauf
        von 100% mit Wave_Down runter auf 30% dort mit Wave_Hold gehalten für 1 sek dann wieder von vorne sofort 100%.

        Pule Wellenverlauf
        von 30% mit Wave_Up in 2,5 sek hoch auf 100% dann mit Wave_Stop sofort runter auf 30% dann wieder von vorne.

        Wellengang Wellenverlauf
        von 30% mit Wave_Up hoch auf 100% in 0,53 sek dann sofort mit Wave_Stop halten bei 30% für 0,6 sek dann wieder hoch

        paul53 2 Replies Last reply Reply Quote 0
        • paul53
          paul53 @Aphofis last edited by

          @Aphofis sagte:

          Pule Wellenverlauf
          von 30% mit Wave_Up in 2,5 sek hoch auf 100% dann mit Wave_Stop sofort runter auf 30% dann wieder von vorne.

          Du hast bei Pulse_Wave_Stop eine Zeit (30 s) eingegeben. Bedeutet das: 30 s lang auf 30 %, bevor es wieder von vorne los geht ?

          Aphofis 1 Reply Last reply Reply Quote 0
          • Aphofis
            Aphofis @paul53 last edited by

            @paul53 sagte in PWM Steuerung mit Fade:

            @Aphofis sagte:

            Pule Wellenverlauf
            von 30% mit Wave_Up in 2,5 sek hoch auf 100% dann mit Wave_Stop sofort runter auf 30% dann wieder von vorne.

            Du hast bei Pulse_Wave_Stop eine Zeit (30 s) eingegeben. Bedeutet das: 30 s lang auf 30 %, bevor es wieder von vorne los geht ?

            Nein 2,5 Sek hoch auf 100% dann sofort runter auf 30% dort gehts dann sofort wieder hoch auf 100% eigntl kann dem entsprechend Wave_Stop raus

            paul53 1 Reply Last reply Reply Quote 0
            • paul53
              paul53 @Aphofis last edited by

              @Aphofis sagte:

              Nein 2,5 Sek hoch auf 100% dann sofort runter auf 30% dort gehts dann sofort wieder hoch

              Also ein Sägezahn-Verlauf.

              @Aphofis sagte in PWM Steuerung mit Fade:

              eigntl kann dem entsprechend Wave_Stop raus

              Ja, das hatte mich irritiert.

              Aphofis 1 Reply Last reply Reply Quote 0
              • Aphofis
                Aphofis @paul53 last edited by Aphofis

                @paul53
                Ja so zu sagen! Hatte doch mal die Bilder von meiner aufstellung geschickt!
                Da sieht man den verlauf der Wellengänge
                Wellenverlauf

                paul53 1 Reply Last reply Reply Quote 0
                • paul53
                  paul53 @Aphofis last edited by

                  @Aphofis sagte:

                  Da sieht man den verlauf der Wellengänge

                  Genau wegen dieser Diskrepanz zu einer Zeit Pulse_Wave_Stop habe ich gefragt.

                  Aphofis 1 Reply Last reply Reply Quote 0
                  • Aphofis
                    Aphofis @paul53 last edited by

                    @paul53
                    Ja ist nur so erstellt gewesen! Also weg löschen im Kopf

                    1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @Aphofis last edited by

                      @Aphofis
                      Habe mal alle 4 Wellenarten in ein Skript gepackt.

                      Blockly_4Wellen.JPG

                      Viel Spass beim Testen.

                      <xml xmlns="http://www.w3.org/1999/xhtml">
                       <variables>
                         <variable type="" id="][ZiuGElR#yc?}Wyt}9m">delta</variable>
                         <variable type="" id=";~1sW7;[j*{Xk^A_=:b5">inc</variable>
                         <variable type="undefined" id="Intervall">Intervall</variable>
                         <variable type="" id="lPtkU(x5T1q1_Xwph3wu">dec</variable>
                         <variable type="" id="V^4o*E};163HAjpmb.{)">wellen</variable>
                         <variable type="" id="s!/@w0,eAV8-iu9z{h2N">spannung</variable>
                         <variable type="" id="m+a/u{^NHrs[8^gCL.W+">hold</variable>
                         <variable type="" id=")8{9+=N-`x`1$k0u;Q(m">holdcnt</variable>
                       </variables>
                       <block type="comment" id="]{zyTm3OID|IGW7fjhYq" x="-237" y="-388">
                         <field name="COMMENT">Tunze Wellen Auswahl</field>
                         <next>
                           <block type="on_ext" id="Ia^|-#BC5~i!MG2,ry~r">
                             <mutation items="1"></mutation>
                             <field name="CONDITION">ne</field>
                             <field name="ACK_CONDITION"></field>
                             <value name="OID0">
                               <shadow type="field_oid" id=".cxil.Q9Pw92~0;N,*tb">
                                 <field name="oid">default</field>
                               </shadow>
                             </value>
                             <statement name="STATEMENT">
                               <block type="controls_if" id="~@UzHctrJXqy-I/(J,5=">
                                 <mutation elseif="2" else="1"></mutation>
                                 <value name="IF0">
                                   <block type="logic_compare" id="==p}$-SZEd0x{b:n5Y81">
                                     <field name="OP">EQ</field>
                                     <value name="A">
                                       <block type="on_source" id="{q#dCk^=n]IAAAa1mgc^">
                                         <field name="ATTR">state.val</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="math_number" id=".Ge^PT:j20XB=V`|_|Hn">
                                         <field name="NUM">1</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <statement name="DO0">
                                   <block type="variables_set" id="sBh,0XhMS(=qA!PR0ytE">
                                     <field name="VAR" id=";~1sW7;[j*{Xk^A_=:b5" variabletype="">inc</field>
                                     <value name="VALUE">
                                       <block type="math_arithmetic" id="4u@UKZ0]WDESkPq9[CY)">
                                         <field name="OP">DIVIDE</field>
                                         <value name="A">
                                           <shadow type="math_number" id="hS@HX^3{/0=!,%T*ouO0">
                                             <field name="NUM">1.75</field>
                                           </shadow>
                                         </value>
                                         <value name="B">
                                           <shadow type="math_number" id="Gqe%627YV,^vV6]GK9.`">
                                             <field name="NUM">1</field>
                                           </shadow>
                                           <block type="get_value" id="ZOKRURsm4,iMv6oOrY}2">
                                             <field name="ATTR">val</field>
                                             <field name="OID">ID auswählen</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="}S$us)I9h|5nyW}KEGyd">
                                         <field name="VAR" id="lPtkU(x5T1q1_Xwph3wu" variabletype="">dec</field>
                                         <value name="VALUE">
                                           <block type="math_arithmetic" id="Ma;kRMSDe}=X..urdZNr">
                                             <field name="OP">DIVIDE</field>
                                             <value name="A">
                                               <shadow type="math_number" id="!$bZ,ka7:P{)HyX#SQrj">
                                                 <field name="NUM">-1.75</field>
                                               </shadow>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id="HcP}m1-!#)!T%L5@.ta]">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="get_value" id="t#yBn9[`Hp;e`|F`yYS%">
                                                 <field name="ATTR">val</field>
                                                 <field name="OID">ID auswählen</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="variables_set" id="aH(Bn_IOU{Va2kec7P7X">
                                             <field name="VAR" id="m+a/u{^NHrs[8^gCL.W+" variabletype="">hold</field>
                                             <value name="VALUE">
                                               <block type="math_number" id="Nj[RODc:dn~R:1Lt[,.w">
                                                 <field name="NUM">0</field>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                                 <value name="IF1">
                                   <block type="logic_compare" id="`K37m!N8S#L+[ECjp$0Z">
                                     <field name="OP">EQ</field>
                                     <value name="A">
                                       <block type="on_source" id="LhrXbm,k#v@-uHcv85m0">
                                         <field name="ATTR">state.val</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="math_number" id="/9VJmXyHAJdYNm`2A4YM">
                                         <field name="NUM">2</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <statement name="DO1">
                                   <block type="variables_set" id="J.vH|R^kgowuDzoC,W;k">
                                     <field name="VAR" id=";~1sW7;[j*{Xk^A_=:b5" variabletype="">inc</field>
                                     <value name="VALUE">
                                       <block type="math_number" id="o.AXmHJz:7HhsZ((Sq_X">
                                         <field name="NUM">70</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="wyjefZ8Vi,y_7k1:+k3e">
                                         <field name="VAR" id="lPtkU(x5T1q1_Xwph3wu" variabletype="">dec</field>
                                         <value name="VALUE">
                                           <block type="math_arithmetic" id="N2`Yd.ovG9cd3@+G]hA$">
                                             <field name="OP">DIVIDE</field>
                                             <value name="A">
                                               <shadow type="math_number" id="4pwb9gW9wJLb~`UN]^8.">
                                                 <field name="NUM">-1.75</field>
                                               </shadow>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id="Gqe%627YV,^vV6]GK9.`">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="get_value" id=":$P{G~UW{i[VAH5,v!Z{">
                                                 <field name="ATTR">val</field>
                                                 <field name="OID">ID auswählen</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="variables_set" id="Nqe#/BVZK,[}Su)3%inV">
                                             <field name="VAR" id="m+a/u{^NHrs[8^gCL.W+" variabletype="">hold</field>
                                             <value name="VALUE">
                                               <block type="math_arithmetic" id="#Y89g|!D4@)/x(,!FLXp">
                                                 <field name="OP">MULTIPLY</field>
                                                 <value name="A">
                                                   <shadow type="math_number" id="rhV:xHN5UCOUz2p.0Z%C">
                                                     <field name="NUM">40</field>
                                                   </shadow>
                                                 </value>
                                                 <value name="B">
                                                   <shadow type="math_number" id="Gqe%627YV,^vV6]GK9.`">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="get_value" id="38[,i)PcQ_f6F,TN}=!F">
                                                     <field name="ATTR">val</field>
                                                     <field name="OID">ID auswählen</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                                 <value name="IF2">
                                   <block type="logic_compare" id=",#{:ICZ-H#Ti#8k+:rxu">
                                     <field name="OP">EQ</field>
                                     <value name="A">
                                       <block type="on_source" id="PrkTFL).egd#CjyT+NcN">
                                         <field name="ATTR">state.val</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="math_number" id="%BHW^Sm)ZlyDL@q!rjC3">
                                         <field name="NUM">3</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <statement name="DO2">
                                   <block type="variables_set" id="/hQIJ$A#yZ|C-,m_6BpC">
                                     <field name="VAR" id=";~1sW7;[j*{Xk^A_=:b5" variabletype="">inc</field>
                                     <value name="VALUE">
                                       <block type="math_arithmetic" id="w31V%A7WY71{vc?i;_r@">
                                         <field name="OP">DIVIDE</field>
                                         <value name="A">
                                           <shadow type="math_number" id="Av58UdDslr3[JpIqP7:,">
                                             <field name="NUM">1.75</field>
                                           </shadow>
                                         </value>
                                         <value name="B">
                                           <shadow type="math_number" id="Gqe%627YV,^vV6]GK9.`">
                                             <field name="NUM">1</field>
                                           </shadow>
                                           <block type="get_value" id="r3-I)=:q9)JgtBh592qk">
                                             <field name="ATTR">val</field>
                                             <field name="OID">ID auswählen</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="OehXg#U)=*j5H1Eu_D~)">
                                         <field name="VAR" id="lPtkU(x5T1q1_Xwph3wu" variabletype="">dec</field>
                                         <value name="VALUE">
                                           <block type="math_number" id="-WbST~rEK)wkUPJ|ztNK">
                                             <field name="NUM">-70</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="variables_set" id="e$Yb4Gsxi$I{8%w:tM2{">
                                             <field name="VAR" id="m+a/u{^NHrs[8^gCL.W+" variabletype="">hold</field>
                                             <value name="VALUE">
                                               <block type="math_number" id="F,ohP79kB9/y{,xXcY.?">
                                                 <field name="NUM">0</field>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                                 <statement name="ELSE">
                                   <block type="variables_set" id="~T0hzIkA1P5{]g}03N!X">
                                     <field name="VAR" id=";~1sW7;[j*{Xk^A_=:b5" variabletype="">inc</field>
                                     <value name="VALUE">
                                       <block type="math_arithmetic" id="rB.:=6ZV~dr8-|xUraur">
                                         <field name="OP">DIVIDE</field>
                                         <value name="A">
                                           <shadow type="math_number" id="{Xh6aO_:,=|kg;m}|/TN">
                                             <field name="NUM">1.75</field>
                                           </shadow>
                                         </value>
                                         <value name="B">
                                           <shadow type="math_number" id="Gqe%627YV,^vV6]GK9.`">
                                             <field name="NUM">1</field>
                                           </shadow>
                                           <block type="get_value" id="Wf-.YD6BWBDMJd}[jm!5">
                                             <field name="ATTR">val</field>
                                             <field name="OID">ID auswählen</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id=",i=N4E*MRzo3=6D(EW^:">
                                         <field name="VAR" id="lPtkU(x5T1q1_Xwph3wu" variabletype="">dec</field>
                                         <value name="VALUE">
                                           <block type="math_number" id="9y;w3y/P,G?O~)t@Z(ER">
                                             <field name="NUM">-70</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="variables_set" id=":uYS^Vf*Oz;^ji6[+Xd/">
                                             <field name="VAR" id="m+a/u{^NHrs[8^gCL.W+" variabletype="">hold</field>
                                             <value name="VALUE">
                                               <block type="math_arithmetic" id="9,3?Sg3?({T53#R09EHD">
                                                 <field name="OP">MULTIPLY</field>
                                                 <value name="A">
                                                   <shadow type="math_number" id="RK0BC]#_w$uynMPw]hW$">
                                                     <field name="NUM">40</field>
                                                   </shadow>
                                                 </value>
                                                 <value name="B">
                                                   <shadow type="math_number" id="Gqe%627YV,^vV6]GK9.`">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="get_value" id="Gg0[(np{~zNJK}PoA[rp">
                                                     <field name="ATTR">val</field>
                                                     <field name="OID">ID auswählen</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                                 <next>
                                   <block type="controls_if" id="#e9q*5iqR3[i5gXikX5F">
                                     <mutation else="1"></mutation>
                                     <value name="IF0">
                                       <block type="logic_compare" id="8+%D64_RHc_B)2{j?X89">
                                         <field name="OP">GT</field>
                                         <value name="A">
                                           <block type="on_source" id="%Qh9VYKLd%Y,9JY4F1?3">
                                             <field name="ATTR">state.val</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="dP#)e@cRf1@H3BIwP=f3">
                                             <field name="NUM">0</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="variables_set" id="vjQW^i*%Lg3N$BAI=;46">
                                         <field name="VAR" id="V^4o*E};163HAjpmb.{)" variabletype="">wellen</field>
                                         <value name="VALUE">
                                           <block type="logic_boolean" id="Y:e;W5fPOF3ymat3V,nK">
                                             <field name="BOOL">TRUE</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="variables_set" id="BcPpPZ48I(7]R%IUbl_U">
                                             <field name="VAR" id="s!/@w0,eAV8-iu9z{h2N" variabletype="">spannung</field>
                                             <value name="VALUE">
                                               <block type="math_number" id="}q$V!?:hp(Vs2Ajk7XI=">
                                                 <field name="NUM">30</field>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="control" id="oBy(+}L(X4r7_OiLVtK,">
                                                 <mutation delay_input="false"></mutation>
                                                 <field name="OID">Object ID</field>
                                                 <field name="WITH_DELAY">FALSE</field>
                                                 <value name="VALUE">
                                                   <block type="variables_get" id="N37q5:*c.7*NCrlTDS*n">
                                                     <field name="VAR" id="s!/@w0,eAV8-iu9z{h2N" variabletype="">spannung</field>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="procedures_callnoreturn" id="|abjLX}(,U]kxO*yRHpX">
                                                     <mutation name="Welle"></mutation>
                                                   </block>
                                                 </next>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </statement>
                                     <statement name="ELSE">
                                       <block type="variables_set" id="J)Ij{Vbi_sx~|U-IKAiX">
                                         <field name="VAR" id="V^4o*E};163HAjpmb.{)" variabletype="">wellen</field>
                                         <value name="VALUE">
                                           <block type="logic_boolean" id="}6J*6)aJ[b:I~+l;t;+}">
                                             <field name="BOOL">FALSE</field>
                                           </block>
                                         </value>
                                       </block>
                                     </statement>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                           </block>
                         </next>
                       </block>
                       <block type="procedures_defnoreturn" id="-suAUzzINK%vfBh]7cI~" x="412" y="-363">
                         <field name="NAME">Welle</field>
                         <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                         <statement name="STACK">
                           <block type="variables_set" id=",h+ZC5zpDs$Q9ih2E!{,">
                             <field name="VAR" id="][ZiuGElR#yc?}Wyt}9m" variabletype="">delta</field>
                             <value name="VALUE">
                               <block type="variables_get" id="fHvxeRmp;[qfhibobbSa">
                                 <field name="VAR" id=";~1sW7;[j*{Xk^A_=:b5" variabletype="">inc</field>
                               </block>
                             </value>
                             <next>
                               <block type="timeouts_setinterval" id=",:w-9+HlSGeofh[.H}(N">
                                 <field name="NAME">Intervall</field>
                                 <field name="INTERVAL">25</field>
                                 <field name="UNIT">ms</field>
                                 <statement name="STATEMENT">
                                   <block type="controls_if" id="/?o^{g:TXKWvuI=$5RBM">
                                     <mutation elseif="1" else="1"></mutation>
                                     <value name="IF0">
                                       <block type="logic_compare" id="HVWr5;X`dzkfLvNUUox4">
                                         <field name="OP">LT</field>
                                         <value name="A">
                                           <block type="math_single" id="oEn#((a/*5PtS=lGpd1+">
                                             <field name="OP">ABS</field>
                                             <value name="NUM">
                                               <shadow type="math_number" id="11j3~Y8B8+x*1F``yfor">
                                                 <field name="NUM">9</field>
                                               </shadow>
                                               <block type="variables_get" id="iU-v5(k[w4ecOgX8@.o%">
                                                 <field name="VAR" id="][ZiuGElR#yc?}Wyt}9m" variabletype="">delta</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="*mU5uZbYC8{FrDZ[hdEG">
                                             <field name="NUM">70</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="math_change" id="P{f$8/JVOpSMr(1i,;8b">
                                         <field name="VAR" id="s!/@w0,eAV8-iu9z{h2N" variabletype="">spannung</field>
                                         <value name="DELTA">
                                           <shadow type="math_number" id="js(1$l;.QW%ZvcK-Y|;!">
                                             <field name="NUM">1</field>
                                           </shadow>
                                           <block type="variables_get" id="juLQrJuL,GLX)2rt:qwF">
                                             <field name="VAR" id="][ZiuGElR#yc?}Wyt}9m" variabletype="">delta</field>
                                           </block>
                                         </value>
                                       </block>
                                     </statement>
                                     <value name="IF1">
                                       <block type="logic_compare" id="^v0xqJr[A)M_bP5/=]4]">
                                         <field name="OP">GTE</field>
                                         <value name="A">
                                           <block type="variables_get" id="LB-PF=F`^v_}SrbG1V0E">
                                             <field name="VAR" id="s!/@w0,eAV8-iu9z{h2N" variabletype="">spannung</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="pg3cTpn(/Q%2npY3Ol0%">
                                             <field name="NUM">100</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO1">
                                       <block type="variables_set" id="YapX[bUNh6z0h+[[Q]4Q">
                                         <field name="VAR" id="s!/@w0,eAV8-iu9z{h2N" variabletype="">spannung</field>
                                         <value name="VALUE">
                                           <block type="math_number" id=":1wWE[*2)h-HG9-1wiQ;">
                                             <field name="NUM">30</field>
                                           </block>
                                         </value>
                                       </block>
                                     </statement>
                                     <statement name="ELSE">
                                       <block type="variables_set" id="6LS=qD;960LhxdzZftb(">
                                         <field name="VAR" id="s!/@w0,eAV8-iu9z{h2N" variabletype="">spannung</field>
                                         <value name="VALUE">
                                           <block type="math_number" id="t7_0[R81yB6*xObYn.o)">
                                             <field name="NUM">100</field>
                                           </block>
                                         </value>
                                       </block>
                                     </statement>
                                     <next>
                                       <block type="control" id="VC3Z4$E16N9#2m~/%5Mc">
                                         <mutation delay_input="false"></mutation>
                                         <field name="OID">Object ID</field>
                                         <field name="WITH_DELAY">FALSE</field>
                                         <value name="VALUE">
                                           <block type="variables_get" id="NVov:hsUl0[1j~{[j$A:">
                                             <field name="VAR" id="s!/@w0,eAV8-iu9z{h2N" variabletype="">spannung</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="controls_if" id="xCjMaV3_T/GP6~n9HIRC">
                                             <value name="IF0">
                                               <block type="logic_compare" id="7R2(vK_aDV;l2hYgcfnm">
                                                 <field name="OP">GTE</field>
                                                 <value name="A">
                                                   <block type="variables_get" id="bn~QlwW5BryWqn*^=S*Z">
                                                     <field name="VAR" id="s!/@w0,eAV8-iu9z{h2N" variabletype="">spannung</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <block type="math_number" id="DwkZ*q6kRD%o:5;/-s86">
                                                     <field name="NUM">100</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <statement name="DO0">
                                               <block type="variables_set" id=";Jy35{mrDhynx+HLoZYD">
                                                 <field name="VAR" id="][ZiuGElR#yc?}Wyt}9m" variabletype="">delta</field>
                                                 <value name="VALUE">
                                                   <block type="variables_get" id="^#wctDq2)3wHC3oiQsbM">
                                                     <field name="VAR" id="lPtkU(x5T1q1_Xwph3wu" variabletype="">dec</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </statement>
                                             <next>
                                               <block type="controls_if" id="4=OsNj.2UO$[q4m*hHal">
                                                 <value name="IF0">
                                                   <block type="logic_compare" id="lo|AQPC6qMFR2{mqN%T^">
                                                     <field name="OP">LTE</field>
                                                     <value name="A">
                                                       <block type="variables_get" id="(~JkT}N3,Rn[JO$JD1PY">
                                                         <field name="VAR" id="s!/@w0,eAV8-iu9z{h2N" variabletype="">spannung</field>
                                                       </block>
                                                     </value>
                                                     <value name="B">
                                                       <block type="math_number" id="u){fIa1^V,%*SYd^^7cm">
                                                         <field name="NUM">30</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <statement name="DO0">
                                                   <block type="controls_if" id="#[V6r(L4/AglJ,loFWO@">
                                                     <mutation else="1"></mutation>
                                                     <value name="IF0">
                                                       <block type="variables_get" id="b[@_!oW+s,X,uBUrPxjx">
                                                         <field name="VAR" id="m+a/u{^NHrs[8^gCL.W+" variabletype="">hold</field>
                                                       </block>
                                                     </value>
                                                     <statement name="DO0">
                                                       <block type="controls_if" id="1E*I60rqrhElGHQ,{:2I">
                                                         <mutation else="1"></mutation>
                                                         <value name="IF0">
                                                           <block type="logic_compare" id="_Uq[@7X]u]o~7yCW{||`">
                                                             <field name="OP">LTE</field>
                                                             <value name="A">
                                                               <block type="variables_get" id="s%[*3x-v-hLy|}nP,Pj3">
                                                                 <field name="VAR" id=")8{9+=N-`x`1$k0u;Q(m" variabletype="">holdcnt</field>
                                                               </block>
                                                             </value>
                                                             <value name="B">
                                                               <block type="math_number" id="gTNyP2OxTJf[/AqTAZ/I">
                                                                 <field name="NUM">0</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <statement name="DO0">
                                                           <block type="variables_set" id="W`v),gHKMenV:*Bp|#P5">
                                                             <field name="VAR" id=")8{9+=N-`x`1$k0u;Q(m" variabletype="">holdcnt</field>
                                                             <value name="VALUE">
                                                               <block type="variables_get" id="%.~8A?(hzhBs2RNb_6@d">
                                                                 <field name="VAR" id="m+a/u{^NHrs[8^gCL.W+" variabletype="">hold</field>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="variables_set" id="=TSHs9`shJ=CYCw-|yOo">
                                                                 <field name="VAR" id="][ZiuGElR#yc?}Wyt}9m" variabletype="">delta</field>
                                                                 <value name="VALUE">
                                                                   <block type="math_number" id="5`UWa,0da-[9u.N2ftP}">
                                                                     <field name="NUM">0</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </statement>
                                                         <statement name="ELSE">
                                                           <block type="math_change" id="!iZu-%XPGo+TkpdTy5N7">
                                                             <field name="VAR" id=")8{9+=N-`x`1$k0u;Q(m" variabletype="">holdcnt</field>
                                                             <value name="DELTA">
                                                               <shadow type="math_number" id="uL)ac@3Cg^gyGNB:d7Es">
                                                                 <field name="NUM">-1</field>
                                                               </shadow>
                                                             </value>
                                                           </block>
                                                         </statement>
                                                       </block>
                                                     </statement>
                                                     <statement name="ELSE">
                                                       <block type="variables_set" id="EU:+NJPJfYM]:o$UbF.0">
                                                         <field name="VAR" id=")8{9+=N-`x`1$k0u;Q(m" variabletype="">holdcnt</field>
                                                         <value name="VALUE">
                                                           <block type="math_number" id="kM8F_/q)P=+ah^OB[~Mh">
                                                             <field name="NUM">0</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </statement>
                                                     <next>
                                                       <block type="controls_if" id="[0biG5^_OZ|BiBmbXdvF">
                                                         <value name="IF0">
                                                           <block type="logic_compare" id="hA(8CzT/a,k|ukJ4u:4d">
                                                             <field name="OP">LTE</field>
                                                             <value name="A">
                                                               <block type="variables_get" id="9!H;L9(KEVgua`hn*$OL">
                                                                 <field name="VAR" id=")8{9+=N-`x`1$k0u;Q(m" variabletype="">holdcnt</field>
                                                               </block>
                                                             </value>
                                                             <value name="B">
                                                               <block type="math_number" id="p}VBF)K45d[dsI}M0V?/">
                                                                 <field name="NUM">0</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <statement name="DO0">
                                                           <block type="timeouts_clearinterval" id="33a8l~piC|A!u4]Fsy*T">
                                                             <field name="NAME">Intervall</field>
                                                             <next>
                                                               <block type="controls_if" id="Sl/PBB$RiaK8@V067dp7">
                                                                 <value name="IF0">
                                                                   <block type="variables_get" id="dacY!.^@@jVV97-TX|jt">
                                                                     <field name="VAR" id="V^4o*E};163HAjpmb.{)" variabletype="">wellen</field>
                                                                   </block>
                                                                 </value>
                                                                 <statement name="DO0">
                                                                   <block type="procedures_callnoreturn" id="vZpy0_Pbj`=)OV9k%ytp">
                                                                     <mutation name="Welle"></mutation>
                                                                   </block>
                                                                 </statement>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </statement>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                               </block>
                             </next>
                           </block>
                         </statement>
                       </block>
                       <block type="comment" id="O@hH0s^-j(},B%(o!lY_" x="188" y="-288">
                         <field name="COMMENT">alle Zeiten in s</field>
                       </block>
                      </xml>
                      

                      Aphofis 1 Reply Last reply Reply Quote 0
                      • Aphofis
                        Aphofis @paul53 last edited by Aphofis

                        @paul53
                        Du bist ja wahnsinnig
                        Das mal Geil!
                        Ich hoffe das alles so klappt
                        Woran erkenne ich welche welche Steuerung ist?

                        paul53 1 Reply Last reply Reply Quote 0
                        • paul53
                          paul53 @Aphofis last edited by paul53

                          @Aphofis sagte:

                          Woran erkenne ich welche welche Steuerung ist?

                          Am Datenpunkt "Tunze Wellen Auswahl", mit dem die entsprechende Wellenform aktiviert wird.

                              "states": "0:Aus;1:Sequenzial;2:Intervall;3:Pulse;4:Wellengang",
                          

                          Vergleichskriterium ist die Zahl, die der Wellenform zugeordnet ist.

                          Aphofis 1 Reply Last reply Reply Quote 0
                          • Aphofis
                            Aphofis @paul53 last edited by

                            @paul53
                            Ne das meine ich nicht ich meine in der steuerung welcher bereich für welchen wellengang zuständig ist!
                            Sequenzial kann ich ja noch finden aber die anderen

                            paul53 1 Reply Last reply Reply Quote 0
                            • paul53
                              paul53 @Aphofis last edited by

                              @Aphofis
                              Das sieht man an der Zahl mit der verglichen wird:
                              1 - Sequenzial
                              2 - Intervall
                              3 - Pulse
                              4 (sonst) - Wellengang

                              Aphofis 1 Reply Last reply Reply Quote 0
                              • Aphofis
                                Aphofis @paul53 last edited by Aphofis

                                @paul53
                                so recht will die steuerung noch nicht laufen und irgendwie muss wenn nichts gemacht werden soll der Datenpunkt auf 0 gestellt werden da ich die steuerung nihct per datenpunkt anwählen kann wenn das programm erstmal läuft.
                                Es kommt noch eine schwierigkeit dazu
                                wellengang müssen Pumpe 1 und 2 gegenläufig zu pumpe 3 und 4 sein! Sonst entsteht kein Wellengang.
                                Ich hoffe es stimmt alles!
                                Ich weiß nicht wi du sowas erdenken kannst! Das nicht menschlich !!! 😀

                                var delta, inc, Intervall, dec, wellen, hold, spannung, holdcnt;
                                
                                /**
                                 * Beschreibe diese Funktion …
                                 */
                                function Welle() {
                                  delta = inc;
                                  Intervall = setInterval(function () {
                                    if (Math.abs(delta) < 70) {
                                      spannung = (typeof spannung == 'number' ? spannung : 0) + delta;
                                    } else if (spannung >= 100) {
                                      spannung = 30;
                                    } else {
                                      spannung = 100;
                                    }
                                    setState("sonoff.0.Aqua_Wave.Channel1"/*Aqua_Wave_Pump_1*/, spannung);
                                    setState("sonoff.0.Aqua_Wave.Channel2"/*Aqua_Wave_Pump_2*/, spannung);
                                    setState("sonoff.0.Aqua_Wave.Channel3"/*Aqua_Wave_Pump_3*/, spannung);
                                    setState("sonoff.0.Aqua_Wave.Channel4"/*Aqua_Wave_Pump_4*/, spannung);
                                    if (spannung >= 100) {
                                      delta = dec;
                                    }
                                    if (spannung <= 30) {
                                      if (hold) {
                                        if (holdcnt <= 0) {
                                          holdcnt = hold;
                                          delta = 0;
                                        } else {
                                          holdcnt = (typeof holdcnt == 'number' ? holdcnt : 0) + -1;
                                        }
                                      } else {
                                        holdcnt = 0;
                                      }
                                      if (holdcnt <= 0) {
                                        (function () {if (Intervall) {clearInterval(Intervall); Intervall = null;}})();
                                        if (wellen) {
                                          Welle();
                                        }
                                      }
                                    }
                                  }, 25);
                                }
                                
                                
                                on({id: 'Aqua_Control.0.Tunze_Steuerung.Tunze_Wellen_Auswahl', change: "ne"}, function (obj) {
                                  var value = obj.state.val;
                                  var oldValue = obj.oldState.val;
                                  if ((obj.state ? obj.state.val : "") == 1) {
                                    // Sequenzial
                                    inc = 1.75 / getState("Aqua_Control.0.Tunze_Steuerung.Sequenzial_Wave_Up").val;
                                    dec = -1.75 / getState("Aqua_Control.0.Tunze_Steuerung.Sequenzial_Wave_Down").val;
                                    hold = 0;
                                  } else if ((obj.state ? obj.state.val : "") == 2) {
                                    // Intervall
                                    inc = 70;
                                    dec = -1.75 / getState("Aqua_Control.0.Tunze_Steuerung.Intervall_Wave_Down").val;
                                    hold = 40 * getState("Aqua_Control.0.Tunze_Steuerung.Intervall_Wave_Hold").val;
                                  } else if ((obj.state ? obj.state.val : "") == 3) {
                                    // Pulse
                                    inc = 1.75 / getState("Aqua_Control.0.Tunze_Steuerung.Pulse_Wave_Up").val;
                                    dec = -70;
                                    hold = 0;
                                  } else {
                                    inc = 1.75 / getState("Aqua_Control.0.Tunze_Steuerung.Pulse_Wave_Up").val;
                                    dec = -70;
                                    hold = 40 * getState("Aqua_Control.0.Tunze_Steuerung.Pulse_Wave_Stop").val;
                                  }
                                  if ((obj.state ? obj.state.val : "") > 0) {
                                    wellen = true;
                                    spannung = 30;
                                    setState("sonoff.0.Aqua_Wave.Channel1"/*Aqua_Wave_Pump_1*/, spannung);
                                    setState("sonoff.0.Aqua_Wave.Channel2"/*Aqua_Wave_Pump_2*/, spannung);
                                    setState("sonoff.0.Aqua_Wave.Channel3"/*Aqua_Wave_Pump_3*/, spannung);
                                    setState("sonoff.0.Aqua_Wave.Channel4"/*Aqua_Wave_Pump_4*/, spannung);
                                    Welle();
                                  } else {
                                    wellen = false;
                                  }
                                });
                                schedule("51 23 * * *", function () {
                                  setState("Aqua_Control.0.Tunze_Steuerung.Tunze_Wellen_Auswahl"/*Tunze Wellen Auswahl*/, 1);
                                });
                                schedule("52 23 * * *", function () {
                                  setState("Aqua_Control.0.Tunze_Steuerung.Tunze_Wellen_Auswahl"/*Tunze Wellen Auswahl*/, 2);
                                });
                                schedule("53 23 * * *", function () {
                                  setState("Aqua_Control.0.Tunze_Steuerung.Tunze_Wellen_Auswahl"/*Tunze Wellen Auswahl*/, 3);
                                });
                                schedule("54 23 * * *", function () {
                                  setState("Aqua_Control.0.Tunze_Steuerung.Tunze_Wellen_Auswahl"/*Tunze Wellen Auswahl*/, 4);
                                });
                                
                                paul53 2 Replies Last reply Reply Quote 0
                                • Aphofis
                                  Aphofis last edited by

                                  Zeit Steuerung war nur zum testen.
                                  Toll wäre natürlich wenn man mehrere Datenpunkte hätte wo man die Zeiten eintragen könnte aber das sprengt glaube ich den Rahmen.

                                  1 Reply Last reply Reply Quote 0
                                  • paul53
                                    paul53 @Aphofis last edited by

                                    @Aphofis sagte:

                                    muss wenn nichts gemacht werden soll der Datenpunkt auf 0 gestellt werden

                                    Richtig, wie ich weiter oben schon geschrieben habe, ist eine Pause (Zustand "Aus" = 0) von mind. 5 s erforderlich, weil erst mit "Aus" der Zyklus (Ende von "hold") sauber beendet wird.

                                    Aphofis 1 Reply Last reply Reply Quote 0
                                    • Aphofis
                                      Aphofis @paul53 last edited by

                                      @paul53
                                      Ok das ist mir nicht aufgefallen.
                                      Nur denke ich die Steuerung bleibt irgendwo hängen bzw ist der Pi ausgelastet.
                                      Ich denke schon drüber nach einen Pi 4 zu kaufen da muss ich aber erstmal sehen ob die iobroker integration einfach geht oder ob das der selbe mist ist wie mit dem Tinker Board

                                      paul53 1 Reply Last reply Reply Quote 0
                                      • paul53
                                        paul53 @Aphofis last edited by paul53

                                        @Aphofis sagte:

                                        Nur denke ich die Steuerung bleibt irgendwo hängen bzw ist der Pi ausgelastet.

                                        Ohne die Pause (Aus) laufen mehrere Intervalle parallel, was den RasPi überfordert. Damit das nicht passiert, füge vor dem Aufruf von Welle (links unten) ein stop zyklische Ausführung Intervall ein (s. Bild).

                                        @Aphofis sagte in PWM Steuerung mit Fade:

                                        einen Pi 4 zu kaufen

                                        Bevor Du soweit gehst, verdopple die Zyklusdauer auf 50 ms. Dann müssen allerdings auch die Faktoren für inc und dec von 1.75 auf 3.5 verdoppelt und die Faktoren für hold von 40 auf 20 halbiert werden.

                                        Blockly_4Wellen.JPG

                                        1 Reply Last reply Reply Quote 0
                                        • paul53
                                          paul53 @Aphofis last edited by

                                          @Aphofis sagte:

                                          wellengang müssen Pumpe 1 und 2 gegenläufig zu pumpe 3 und 4 sein!

                                          Meinst Du so ?

                                          Blockly_temp.JPG

                                          Aphofis 1 Reply Last reply Reply Quote 0
                                          • Aphofis
                                            Aphofis @paul53 last edited by

                                            @paul53 sagte in PWM Steuerung mit Fade:

                                            @Aphofis sagte:

                                            wellengang müssen Pumpe 1 und 2 gegenläufig zu pumpe 3 und 4 sein!

                                            Meinst Du so ?

                                            Blockly_temp.JPG

                                            Das sieht gut aus, wenn 2 und 2 pumpen im Wellengang gegeneinander arbeiten dann ja
                                            Sprich wenn Pumpe 1 und 2 die 0,56 sek welle starten müssen pumpe 2 und 3 die welle 1,16 sek später starten mit 0,56 sek

                                            paul53 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            636
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            2
                                            97
                                            5516
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo