userpages:hermannk:departdelay-en
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
userpages:hermannk:departdelay-en [2021/02/26 19:49] – [Introduction] hermannk | userpages:hermannk:departdelay-en [2022/11/21 18:22] (current) – removed hermannk | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Depart Delay ====== | ||
- | This XML-script solution was requested by a user who needed an extra amount of time for the build-in " | ||
- | Direct jump to the [[userpages: | ||
- | |||
- | ===== Introduction ===== | ||
- | The properties of a block hold a " | ||
- | \\ | ||
- | For that the " | ||
- | <bk id=" | ||
- | The timing is important! It will be too late at the DEPART-event of the block! At that time the old " | ||
- | So this solution uses \\ | ||
- | - the IN-event to prepare the new " | ||
- | - the DEPART-event to reset the " | ||
- | With that the new " | ||
- | \\ | ||
- | To make it complete the XML-script will only be executed for those locos which belong to the class " | ||
- | <query vr=" | ||
- | <if condition=" | ||
- | \\ | ||
- | | Direct jump to the [[userpages: | ||
- | |||
- | ===== Explaining the script ===== | ||
- | ==== Preparations ==== | ||
- | At first a solution for a block named " | ||
- | The XML-script will be named " | ||
- | The ID of all variables of this script start with the string " | ||
- | \\ | ||
- | The new alternative " | ||
- | <vr id=" | ||
- | Because this script is called at two different events the actual event is saved in " | ||
- | <vr id=" | ||
- | Because this script should only be executes for locos of class " | ||
- | <vr id=" | ||
- | <query vr=" | ||
- | <vr id=" | ||
- | <query vr=" | ||
- | At the end of the preparation the variable for the new value " | ||
- | <vr id=" | ||
- | <trace text=" | ||
- | |||
- | ==== State IN ==== | ||
- | It is assumed now that a loco of class " | ||
- | The original value is saved in " | ||
- | <vr id=" | ||
- | <query vr=" | ||
- | The new value is prepared in "** vr_ddS_newValue**" | ||
- | <vr id=" | ||
- | ==== State DEPART ==== | ||
- | It is assumed now that a loco of class " | ||
- | The original value is prepared at this time in "** vr_ddS_newValue**" | ||
- | <vr id=" | ||
- | ==== Changing the Depart Delay value ==== | ||
- | It is still assumed that a loco of class " | ||
- | The **model** of the calling block (**%callerid%**) needs got be changed by the new value "# | ||
- | <model cmd=" | ||
- | <bk id=" | ||
- | </ | ||
- | As can be seen the value attribute ("#" | ||
- | |||
- | ===== The script (single block) ===== | ||
- | At first this variant of the script will only work for just one block. \\ | ||
- | All comments and all trace lines are removed: \\ | ||
- | < | ||
- | <vr id=" | ||
- | <vr id=" | ||
- | <vr id=" | ||
- | <query vr=" | ||
- | <vr id=" | ||
- | <query vr=" | ||
- | <vr id=" | ||
- | <if condition=" | ||
- | < | ||
- | <if condition=" | ||
- | < | ||
- | <vr id=" | ||
- | <query vr=" | ||
- | <vr id=" | ||
- | </ | ||
- | </if> | ||
- | <if condition=" | ||
- | < | ||
- | <vr id=" | ||
- | </ | ||
- | </if> | ||
- | <model cmd=" | ||
- | <bk id=" | ||
- | </ | ||
- | </ | ||
- | </if> | ||
- | </ | ||
- | |||
- | ===== The script (multiple blocks) ===== | ||
- | This variant of the script will work for more than one block. \\ | ||
- | Therefore each variable has to be defined for each block that should call this script.\\ | ||
- | This is done by adding the calipers ID " | ||
- | The variable " | ||
- | :!: This requires all corresponding blocks to have "well formed" | ||
- | All comments and all trace lines are removed: \\ | ||
- | < | ||
- | <vr id=" | ||
- | <vr id=" | ||
- | <vr id=" | ||
- | <query vr=" | ||
- | <vr id=" | ||
- | <query vr=" | ||
- | <vr id=" | ||
- | | ||
- | <if condition=" | ||
- | < | ||
- | <if condition=" | ||
- | < | ||
- | <vr id=" | ||
- | <query vr=" | ||
- | <vr id=" | ||
- | </ | ||
- | </if> | ||
- | | ||
- | <if condition=" | ||
- | < | ||
- | <vr id=" | ||
- | </ | ||
- | </if> | ||
- | | ||
- | <model cmd=" | ||
- | <bk id=" | ||
- | </ | ||
- | </ | ||
- | </if> | ||
- | </ | ||
- | |||
- | ===== Installation ===== | ||
- | The test plan looks like this. (direct jump to the [[userpages: | ||
- | {{: | ||
- | |||
- | |||
- | ==== The action definition ==== | ||
- | The action is named " | ||
- | {{: | ||
- | ==== The block properties ==== | ||
- | The block should have defined " | ||
- | The depart delay of the block may be of any value - here a value of " | ||
- | {{: | ||
- | The list of actions for this block must hold \\ | ||
- | - action ID " | ||
- | - action ID " | ||
- | The other entries just display the depart delay value of the block in a text field of the plan. They are included in the test workspace. \\ | ||
- | {{: | ||
- | ==== The loco properties ==== | ||
- | The loco should have set "Use depart delay" = YES. \\ | ||
- | The loco should have set " | ||
- | {{: | ||
- | ==== Test sequence ==== | ||
- | Start each loco (do not use " | ||
- | - simulate the appropriate sensors and \\ | ||
- | - watch the delay the loco gets a velocity command larger than zero. \\ | ||
- | Remark: the " | ||
- | Have fun. \\ | ||
- | ==== The workspace ==== | ||
- | The {{ : | ||
userpages/hermannk/departdelay-en.1614365365.txt.gz · Last modified: 2021/02/26 19:49 by hermannk