userpages:hermannk:departdelaychange-en
Differences
This shows you the differences between two versions of the page.
| — | userpages:hermannk:departdelaychange-en [2023/09/11 15:55] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Depart Delay - Change ====== | ||
| + | [[: | ||
| + | \\ | ||
| + | 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 " | ||
| + | Because of special reasons this value should be increased during runtime for certain locomotives. \\ | ||
| + | \\ | ||
| + | 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 locomotives which belong to the class " | ||
| + | <query vr=" | ||
| + | <if condition=" | ||
| + | |||
| + | | Direct jump to the [[userpages: | ||
| + | |||
| + | ===== Explaining the script ===== | ||
| + | - Preparations \\ | ||
| + | - State IN \\ | ||
| + | - State DEPART \\ | ||
| + | - Changing the Depart Delay value \\ | ||
| + | ==== 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 locomotives 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 locomotive 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 locomotive 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 locomotive of class " | ||
| + | The data structure of the calling block (**%callerid%**) needs got be changed by the new value "# | ||
| + | <set vr=" | ||
| + | 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> | ||
| + | < | ||
| + | </ | ||
| + | </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> | ||
| + | | ||
| + | <set vr=" | ||
| + | </ | ||
| + | </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. They are not required for the functionality of the depart delay script. \\ | ||
| + | {{: | ||
| + | What has been shown for block " | ||
| + | |||
| + | |||
| + | ==== The locomotive properties ==== | ||
| + | The locomotive should have set "Use depart delay" = YES (see [[: | ||
| + | The locomotive should have set " | ||
| + | {{: | ||
| + | |||
| + | |||
| + | ==== Test sequence ==== | ||
| + | - start the Automatic Mode, \\ | ||
| + | - start each locomotive (do not use " | ||
| + | - simulate the appropriate sensors and \\ | ||
| + | - watch the delay the locomotive gets a velocity command larger than zero. \\ | ||
| + | \\ | ||
| + | **Remark:** the " | ||
| + | Have fun. \\ | ||
| + | ===== The workspace ===== | ||
| + | Update: 11.09.2023 \\ | ||
| + | XMLscript " | ||
| + | old: \\ | ||
| + | <model cmd=" | ||
| + | <bk id=" | ||
| + | </ | ||
| + | New: \\ | ||
| + | <set vr=" | ||
| + | \\ | ||
| + | The {{ : | ||
| + | {{: | ||
| + | |||