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:46] – [Introduction] 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|xxxxx]]) \\ +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]]). \\ 
-https://wiki.rocrail.net/doku.php?id=block-gen-en \\ +Because of special reasons this value should be increased during runtime for certain locomotives. \\
- +
- +
-Because of special reasons this value should be increased for certain locomotives. \\+
  \\  \\
 For that the "departdelay" value of a block has to be modified. \\ For that the "departdelay" value of a block has to be modified. \\
Line 22: 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 60: 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 91: 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 130: 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 138: 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 147: Line 140:
 ==== The block properties ==== ==== The block properties ====
 The block should have defined "wait" = YES. \\ The block should have defined "wait" = YES. \\
-The depart delay of the block may be of any value - here a value of "4" seconds is used. \\+The depart delay of the block may be of any value - here a value of "4" seconds is used (see [[:block-gen-en#depart_delay|Block - Depart Delay]]). \\
 {{:userpages:hermannk:departdelay_block_general.png?}} \\ {{:userpages:hermannk:departdelay_block_general.png?}} \\
 The list of actions for this block must hold \\ The list of actions for this block must hold \\
Line 158: Line 151:
  
 ==== The locomotive properties ==== ==== The locomotive properties ====
-The locomotive should have set "Use depart delay" = YES. \\ +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?}} \\
 +
 +
 ==== Test sequence ==== ==== Test sequence ====
 - start the Automatic Mode, \\ - start the Automatic Mode, \\
Line 169: 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.1614462361.txt.gz · Last modified: 2021/02/27 22:46 by hermannk