User Tools

Site Tools


userpages:hermannk:departdelaychange-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
userpages:hermannk:departdelaychange-en [2021/02/27 22:53] – [The locomotive properties] hermannkuserpages:hermannk:departdelaychange-en [2023/09/11 15:55] (current) – [The script (multiple blocks)] hermannk
Line 1: Line 1:
 ====== Depart Delay - Change ====== ====== Depart Delay - Change ======
 +[[:userpages#Hermann (hermannk)|Userpages - Hermann (hermannk)]] \\
 + \\
 This XML-script solution was requested by a user who needed an extra amount of time for the build-in "Depart Delay" of a block. \\ This XML-script solution was requested by a user who needed an extra amount of time for the build-in "Depart Delay" of a block. \\
-|  Direct jump to the [[userpages:hermannk:departdelay-en#the_workspace|workspace]].  |+|  Direct jump to the [[userpages:hermannk:departdelaychange-en#the_workspace|workspace]] download (update 11.09.2023).  |
  
 ===== Introduction ===== ===== Introduction =====
-The properties of a block hold a "Depart Delay" value (in seconds). As the locomotive gets the "start" command the velocity command is delayed by the "Depart Delay" value (see [[:block-gen-en#depart_delay|Block - Depart Delay]]). \\+The "Depart Delay" value (in seconds) is part of the properties of a block. As the locomotive gets the "start" command the velocity command is delayed by the "Depart Delay" value (see [[:block-gen-en#depart_delay|Block - Depart Delay]]). \\
 Because of special reasons this value should be increased during runtime for certain locomotives. \\ Because of special reasons this value should be increased during runtime for certain locomotives. \\
  \\  \\
Line 19: Line 21:
   <if condition="@vr_ddS_class = DELAY"> \\   <if condition="@vr_ddS_class = DELAY"> \\
  
-|  Direct jump to the [[userpages:hermannk:departdelay-en#the_workspace|workspace]].  |+|  Direct jump to the [[userpages:hermannk:departdelaychange-en#the_workspace|workspace]] download.  |
  
 ===== Explaining the script ===== ===== Explaining the script =====
Line 57: Line 59:
 ==== Changing the Depart Delay value ==== ==== Changing the Depart Delay value ====
 It is still assumed that a locomotive of class "DELAY" is using this block. \\ It is still assumed that a locomotive of class "DELAY" is using this block. \\
-The **model** of the calling block (**%callerid%**) needs got be changed by the new value "#vr_ddS_newValue": +The data structure of the calling block (**%callerid%**) needs got be changed by the new value "#vr_ddS_newValue": 
-    <model cmd="change"+    <set vr="vr_ddS_newValue" table="bklist" id="%callerid%" set="departdelay" setint="true"/>
-      <bk id="%callerid%" departdelay="#vr_ddS_newValue"/+
-    </model>+
 As can be seen the value attribute ("#") is used with "#vr_ddS_newValue" - not the text attribute ("@"). \\ As can be seen the value attribute ("#") is used with "#vr_ddS_newValue" - not the text attribute ("@"). \\
  
Line 88: Line 88:
     </then>     </then>
     </if>     </if>
-    <model cmd="change"+     <set vr="vr_ddS_newValue" table="bklist" id="%callerid%" set="departdelay" setint="true"/>
-      <bk id="%callerid%" departdelay="#vr_ddS_newValue"/+
-    </model>+
   </then>   </then>
   </if>   </if>
Line 127: Line 125:
     </if>     </if>
      
-    <model cmd="change"+    <set vr="vr_ddS_%callerid%_newValue" table="bklist" id="%callerid%" set="departdelay" setint="true"/>
-      <bk id="%callerid%" departdelay="#vr_ddS_%callerid%_newValue"/+
-    </model>+
   </then>   </then>
   </if>   </if>
Line 135: Line 131:
  
 ===== Installation ===== ===== Installation =====
-The test plan looks like this. (direct jump to the [[userpages:hermannk:departdelay-en#the_workspace|workspace]] download) \\+The test plan looks like this. (direct jump to the [[userpages:hermannk:departdelaychange-en#the_workspace|workspace]] download) \\
 {{:userpages:hermannk:departdelay_plan.png?}} \\ {{:userpages:hermannk:departdelay_plan.png?}} \\
  
Line 156: Line 152:
 ==== The locomotive properties ==== ==== The locomotive properties ====
 The locomotive should have set "Use depart delay" = YES (see [[:loc-details-en#use_depart_delay|Locomotives - Use depart delay]]). \\ The locomotive should have set "Use depart delay" = YES (see [[:loc-details-en#use_depart_delay|Locomotives - Use depart delay]]). \\
-The locomotive should have set "Class" = "DELAY". \\+The locomotive should have set "Class" = "DELAY" (see [[:loc-details-en#class |Locomotives - Class]]). \\
 {{:userpages:hermannk:departdelay_loco_details.png?}} \\ {{:userpages:hermannk:departdelay_loco_details.png?}} \\
  
Line 168: Line 164:
 **Remark:** the "departdelay" value is **not used** by Rocrail in case of using "Virtual start locomotive"! \\ **Remark:** the "departdelay" value is **not used** by Rocrail in case of using "Virtual start locomotive"! \\
 Have fun. \\ Have fun. \\
-==== The workspace ==== +===== The workspace ====
-The {{ :userpages:hermannk:departdelay.zip|workspace}} to test the script. \\+Update: 11.09.2023 \\ 
 +XMLscript "ac_departdelaySet.xml" has been modified: \\ 
 +old: \\ 
 +    <model cmd="change"> 
 +      <bk id="%callerid%" departdelay="#vr_ddS_%callerid%_newValue"/> 
 +    </model> 
 +New: \\ 
 +    <set vr="vr_ddS_%callerid%_newValue" table="bklist" id="%callerid%" set="departdelay" setint="true"/> 
 + \\ 
 +The {{ :userpages:hermannk:departdelay_20230911.zip|workspace}} to test the script. \\
 {{:userpages:hermannk:departdelay_plan.png?}} \\ {{:userpages:hermannk:departdelay_plan.png?}} \\
  
  
userpages/hermannk/departdelaychange-en.1614462816.txt.gz · Last modified: 2021/02/27 22:53 by hermannk