User Tools

Site Tools


xmlscripting-en

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
Next revisionBoth sides next revision
xmlscripting-en [2019/04/20 16:18] rjversluisxmlscripting-en [2019/05/24 18:48] – [XML Scripting] rainerk
Line 10: Line 10:
  \\  \\
 {{:xmlscripting.png}}\\ {{:xmlscripting.png}}\\
 + \\ 
 +| Start with //Rev. 15.429// the XML editor is codesensitiv with colored representation of nodes, statements, parameters, values, comments etc.| \\ 
 + 
  \\  \\
  
Line 391: Line 393:
 </code> </code>
 Instead of the subidx the subid can also be used if the sub node has an ID.\\ Instead of the subidx the subid can also be used if the sub node has an ID.\\
-  
  \\  \\
 +====clock====
 +| 15401+ |
 +With the clock get command:
 +<code xml>
 +  <clock cmd="get"/> 
 +</code>
 +three variables will be updated.
 +^ Variable name ^ Value ^ Text ^
 +| modeltime | hour * 3600 + minute * 60 + seconds | hh:mm.ss |
 +| realtime | hour * 3600 + minute * 60 + seconds | hh:mm.ss |
 +| systemtick | count of 10ms since Rocrail server start | - |
 +The systemtick will overflow at 4294967295(119.3 hours) on 32bit and 18446744073709551615 on 64bit systems.\\
  
 + \\
 =====Condition format===== =====Condition format=====
 | value | comparator | value |\\ | value | comparator | value |\\
Line 529: Line 543:
  \\  \\
  
 +=====Variable Format=====
 +With the format attribute it is possible to format variable content in the same way as printf.\\
 +====Example====
 +<code xml>
 +<xmlscript>
 +  <vr id="var1" value="3" text="Hello"/>
 +  <vr id="var2" value="5" text="RocrailFans"/>
 +  <vr id="var3" format="%s%02d:%04d%s" text="@var1 #var1 #var2 @var2"/>
 +  <trace text="@var3"/>
 +</xmlscript>
 +</code>
 +Output __with__ the format attribute looks like:
 +<code>
 +Hello03:0005RocrailFans
 +</code>
 +Output __without__ the format attribute looks like:
 +<code>
 +Hello 3 5 RocrailFans
 +</code>
 +
 +
 +
 + \\
 =====Tips===== =====Tips=====
 ====XML Well Formed==== ====XML Well Formed====
xmlscripting-en.txt · Last modified: 2024/02/15 10:43 by rjversluis