NEWS
Hilfe Blockly 2 Uhrzeiten in objekt ausgeben
-
Hallo ich brauch mal eure hilfe in Blockly, ich habe 2 objekte.
Objekt 1 aktuelle Uhrzeit
Objekt 2 angabe in hh:mm wie lange etwas brauchtWie bekomme ich es jetzt hin das ich beide zusammen ausgebe in ein neues Objekt? Das es mir Quasi die Uhrzeit ausgibt wann es fertig ist.
-
@kammi_ sagte in Hilfe Blockly 2 Uhrzeiten in objekt ausgeben:
beide zusammen ausgebe in ein neues Objekt
wofür?
Reicht es nicht
@kammi_ sagte in Hilfe Blockly 2 Uhrzeiten in objekt ausgeben:
die Uhrzeit ausgibt wann es fertig ist.
?
oder soll beides in einem Datenpunkt ausgegeben wwrden, so wie hier:
-
das ganze geht wegen Klipper und Klipper gibt in der API keine Endzeit an darum will ich mir die aktuelle Uhrzeit + Druckzeit in einen Datenpunkt scheiben.
-
@kammi_ sagte: Uhrzeit ausgibt wann es fertig ist.
Vorschlag mit Gesamtlaufzeit ab Start:
@kammi_ sagte in Hilfe Blockly 2 Uhrzeiten in objekt ausgeben:
Objekt 2 angabe in hh:mm wie lange etwas braucht
Ist das die Gesamtlaufzeit ab Start oder die Restlaufzeit, die sich jede Minute ändert?
-
Objekt 2 ist die zeit die das model braucht zum drucken also ja sie zählt runter
bräuchte es also praktisch so
obj1+obj2=endzeit
13:00+01:25=14:25 uhr
-
-
Moin zusammen also ich hab das jetzt so umgesetzt, leider bekomm ich nich das Erbniss was rauskommen sollte
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="p?m(Q~}+lHKnTkdA.teN">Liste</variable> <variable id="cYsu{X{2u^QK6{/6tgFZ">Dauer1</variable> <variable id="`z(j}#qcJTueW#9U#Qb(">Dauer2</variable> </variables> <block type="on" id="R#%dPl,}X#:)M5[g4(rt" x="-287" y="-637"> <field name="OID">0_userdata.0.Prusa_Mini_Data.qidi.rest</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="variables_set" id="NQR,n=$zBp-57#y[{G*E"> <field name="VAR" id="p?m(Q~}+lHKnTkdA.teN">Liste</field> <value name="VALUE"> <block type="lists_split" id="Hc~dcqus~z$XpY6Do9eZ"> <mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"> <block type="on_source" id="r4XHfwqrFJeZy@sk4N_%"> <field name="ATTR">state.val</field> </block> </value> <value name="DELIM"> <shadow type="text" id=":gnC;z^gb1_c4bPBv8nD"> <field name="TEXT">:</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="cbN@2j?[=e$;,s~0B,}{"> <field name="VAR" id="cYsu{X{2u^QK6{/6tgFZ">Dauer1</field> <value name="VALUE"> <block type="math_arithmetic" id="l[{t_i`,E*XUIN`I8Ql="> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="lQ`|8NP,-a.,ZK!{R`A!"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="~.c4=A*fWVoL/r1a+p,#"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="1qOZ]AbIXqjsbSKJU=AE"> <field name="NUM">60</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="]@kC7saoD2R$3qt:vZW|"> <field name="NUM">1</field> </shadow> <block type="lists_getIndex" id="[|*.bmk_,:j|W_%9RNik"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">FIRST</field> <value name="VALUE"> <block type="variables_get" id="m0.raSw!2z#t5TFNV^AW"> <field name="VAR" id="p?m(Q~}+lHKnTkdA.teN">Liste</field> </block> </value> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="D2/iMsbrg.9k#1uxCu6f"> <field name="NUM">1</field> </shadow> <block type="convert_tonumber" id="7w]y,z.}dmKuD1:g;5fe"> <value name="VALUE"> <block type="lists_getIndex" id="U3BeXkLtFB^AHS4p43(Y"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="GrvIBdf3i{:Kk0rfbBz/"> <field name="VAR" id="p?m(Q~}+lHKnTkdA.teN">Liste</field> </block> </value> <value name="AT"> <block type="math_number" id="A}//rz?@nh;KQ]f[}GNL"> <field name="NUM">2</field> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="@E8I|8)~jUFh]!=afwzz"> <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field> <value name="VALUE"> <block type="convert_from_date" id="i~pxj5?;ZhEM%5jh!n{]"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">hh:mm</field> <value name="VALUE"> <block type="time_calculation" id="^uagMF^!oe6N@wTaJh,7"> <field name="OPERATION">+</field> <field name="UNIT">min</field> <value name="DATE_TIME"> <shadow type="time_get" id=";/?yTk!H|c9r]d1TSK7`"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </shadow> </value> <value name="VALUE"> <shadow type="math_number" id="Ks,5cQduUd-rMudL-^y5"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Ynny|`s6fJjBS`gyNm5R"> <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field> </block> </value> </block> </value> </block> </value> <next> <block type="update" id="!jIJ=a3Jii;i5(+THi9O"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Prusa_Mini_Data.qidi.fertig</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id=":pd%2C(=c$kmKs1BoUf:"> <mutation items="3"></mutation> <value name="ADD0"> <block type="time_get" id="d.OR#y7GE|4~kch`SnLr"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">hh:mm</field> </block> </value> <value name="ADD1"> <block type="text" id="F/6J+oQj%dJb:!Zd*/mk"> <field name="TEXT"> bis </field> </block> </value> <value name="ADD2"> <block type="variables_get" id="sTyd)aYa3.upxw4*2x=f"> <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </xml>
im Objekt steht dann
11:10 bis NaN:NaN
Wo ist der fehler ?
-
-
-
Seit dem letzten Firmeware update ging das script nicht mehr hab es geändert falls es jemand braucht
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="p?m(Q~}+lHKnTkdA.teN">Liste</variable> <variable id="`z(j}#qcJTueW#9U#Qb(">Dauer2</variable> <variable id="cYsu{X{2u^QK6{/6tgFZ">Dauer1</variable> </variables> <block type="on" id="R#%dPl,}X#:)M5[g4(rt" disabled="true" x="-487" y="-762"> <field name="OID">0_userdata.0.3d_drucker.qidi.rest</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="variables_set" id="NQR,n=$zBp-57#y[{G*E"> <field name="VAR" id="p?m(Q~}+lHKnTkdA.teN">Liste</field> <value name="VALUE"> <block type="lists_split" id="Hc~dcqus~z$XpY6Do9eZ"> <mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"> <block type="on_source" id="r4XHfwqrFJeZy@sk4N_%"> <field name="ATTR">state.val</field> </block> </value> <value name="DELIM"> <shadow type="text" id=":gnC;z^gb1_c4bPBv8nD"> <field name="TEXT">:</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="cbN@2j?[=e$;,s~0B,}{"> <field name="VAR" id="cYsu{X{2u^QK6{/6tgFZ">Dauer1</field> <value name="VALUE"> <block type="math_arithmetic" id="l[{t_i`,E*XUIN`I8Ql="> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="lQ`|8NP,-a.,ZK!{R`A!"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="~.c4=A*fWVoL/r1a+p,#"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="1qOZ]AbIXqjsbSKJU=AE"> <field name="NUM">60</field> </shadow> <block type="lists_getIndex" id="[|*.bmk_,:j|W_%9RNik"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">FIRST</field> <value name="VALUE"> <block type="variables_get" id="$4qF,LU9,*Q[peP5CqD,"> <field name="VAR" id="p?m(Q~}+lHKnTkdA.teN">Liste</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="]@kC7saoD2R$3qt:vZW|"> <field name="NUM">60</field> </shadow> </value> </block> </value> <value name="B"> <shadow type="math_number" id="D2/iMsbrg.9k#1uxCu6f"> <field name="NUM">1</field> </shadow> <block type="convert_tonumber" id="7w]y,z.}dmKuD1:g;5fe"> <value name="VALUE"> <block type="lists_getIndex" id="U3BeXkLtFB^AHS4p43(Y"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="GrvIBdf3i{:Kk0rfbBz/"> <field name="VAR" id="p?m(Q~}+lHKnTkdA.teN">Liste</field> </block> </value> <value name="AT"> <block type="math_number" id="A}//rz?@nh;KQ]f[}GNL"> <field name="NUM">2</field> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="@E8I|8)~jUFh]!=afwzz"> <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field> <value name="VALUE"> <block type="convert_from_date" id="i~pxj5?;ZhEM%5jh!n{]"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">hh:mm</field> <value name="VALUE"> <block type="time_calculation" id="^uagMF^!oe6N@wTaJh,7"> <field name="OPERATION">+</field> <field name="UNIT">min</field> <value name="DATE_TIME"> <shadow type="time_get" id=";/?yTk!H|c9r]d1TSK7`"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </shadow> </value> <value name="VALUE"> <shadow type="math_number" id="Ks,5cQduUd-rMudL-^y5"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Ynny|`s6fJjBS`gyNm5R"> <field name="VAR" id="cYsu{X{2u^QK6{/6tgFZ">Dauer1</field> </block> </value> </block> </value> </block> </value> <next> <block type="update" id="!jIJ=a3Jii;i5(+THi9O"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.3d_drucker.qidi.endzeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id=":pd%2C(=c$kmKs1BoUf:"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id=";];}nSs!?=%{RmNBRq]l"> <field name="TEXT">um </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="sTyd)aYa3.upxw4*2x=f"> <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field> </block> </value> <value name="ADD2"> <block type="text" id=".x`/)Go|A_#%yQyoKKW~"> <field name="TEXT"> Uhr</field> </block> </value> </block> </value> <next> <block type="controls_if" id="{aXTW3+XCwl55i1D+T$d"> <value name="IF0"> <block type="logic_compare" id="ykEwP(+#LYww]3o(cY?E"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="ZTN+[E`1G7#Cl3{AUu$~"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.3d_drucker.qidi.printing</field> </block> </value> <value name="B"> <block type="text" id="}Ocm^!l{-L~8[xFhk_N,"> <field name="TEXT">standby</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_wait" id="sA1k1!p^ptPs:K1)S3oR"> <field name="DELAY">60</field> <field name="UNIT">sec</field> <next> <block type="control_script" id="y6UBq]S::qKv@joEH_s3"> <field name="OID">script.js.common.3d-Drucker.QIDI.Endzeit-qidi</field> <field name="ACTION">stopScriptAsync</field> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> <block type="on" id="|r0c`i-KtJ?t:Qs.mijO" x="-137" y="-337"> <field name="OID">0_userdata.0.3d_drucker.qidi.rest</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="variables_set" id="*rl7#vGQ_*O3S]qbShTW"> <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field> <value name="VALUE"> <block type="convert_from_date" id="dqp]j/7+xMGG6gP/%FZn"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">hh:mm</field> <value name="VALUE"> <block type="time_calculation" id="fuX$k~R{_48Y=do?uk4V"> <field name="OPERATION">+</field> <field name="UNIT">min</field> <value name="DATE_TIME"> <shadow type="time_get" id="$/aws/(:5vlMK/al~#hM"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </shadow> </value> <value name="VALUE"> <shadow type="math_number" id="Ks,5cQduUd-rMudL-^y5"> <field name="NUM">1</field> </shadow> <block type="get_value" id="!MvJGa}+h06W?%I1U@fX"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.3d_drucker.qidi.rest</field> </block> </value> </block> </value> </block> </value> <next> <block type="update" id=")E0XFIV%p4Y3Fxh^DkkH"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.3d_drucker.qidi.endzeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="KZdiA!2!yHASTdy4x+7N"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="WOqi{YblQiEQcAyT=]`a"> <field name="TEXT">um </field> </block> </value> <value name="ADD1"> <block type="variables_get" id=".:FK.NN{O`SWYs$ljQY="> <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field> </block> </value> <value name="ADD2"> <block type="text" id="Mh*)X)$!CSLQ|nC]SPTd"> <field name="TEXT"> Uhr</field> </block> </value> </block> </value> <next> <block type="controls_if" id="4bAff/4#/]p}h.mD1b6J"> <value name="IF0"> <block type="logic_compare" id="L|[d?t?8z~7_%%4-W^zw"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="~$7T-7!.bK[l|$9`o/PY"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.3d_drucker.qidi.printing</field> </block> </value> <value name="B"> <block type="text" id="[4ms18HSxSpHo6Des%mq"> <field name="TEXT">standby</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_wait" id="Yt;+42DNrvt+6Pt;oN[^"> <field name="DELAY">60</field> <field name="UNIT">sec</field> <next> <block type="control_script" id="y[(w~.N3)46lVaOdqeV@"> <field name="OID">script.js.common.3d-Drucker.QIDI.Endzeit-qidi</field> <field name="ACTION">stopScriptAsync</field> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </xml>