All Downloads are FREE. Search and download functionalities are using the official Maven repository.

data.nodescript.signals.SBB_Vorsignal_System_L.nodescript Maven / Gradle / Ivy

### Dieses Script definiert ein Asseccory, 
### um die vier (fünf) LED eines SBB Vorsignals System L
### anzusteuern.
###
### Hardware: 4(5) Lightports (Port 0 = ge links, 1 = ge rechts, 2 = gn links, 3 = gn rechts, 4 = ge unten rechts)
### Software: 1 accessory
###           4 - 6 Makros, 0 = Warnung, 
###                         1 = FB1* Ankündigung freie Fahrt
###                         2 = FB2* Ankündigung Fahrt 40 km/h
###                         3 = FB3* Ankündigung Fahrt 60 km/h
###                         4 = FB5* Ankündigung Fahrt 90 km/h (optional)
###                         5 = Kein (optional)
###
###
### history: 2017-12-04 A.Tillner, inital Version
###          2018-02-18 A.Tillner, 
###          2018-02-25 Markus von Allmen, Option Stellwerkstyp
###          2018-03-04 A.Tillner, Macronamen in FBn* und Fahrt umbenannt
###
### how to use:
### A) configure
###    In section 1, define your ports and the desired accessory number
###    In section 2, define your settings (like brightness and speed)
### B) load and run this script
###    what will happen?
###    1. the ports will be configured with the given parameters
###    2. three new macros for the aspects will be defined
###    3. these macros will be assigned to the accessory
### C) have fun
###
### -------------- 1. Select Target
##application(text:de="SBB Vorsignal System L, 4 - 6 Fahrbegriffe", text:en="SBB Distant signal System L, 4 - 6 Aspects")
##instruction(text:de="SBB Vorsignal System L, 4 - 6 Fahrbegriffe
Lightports = ge_lo, ge_ro, gn_l, gn_r, (ge_ru)
Macros = Warnung, FB1* Ankündigung freie Fahrt, FB2* Ankündigung Fahrt 40 km/h, FB3* Ankündigung Fahrt 60 km/h, (FB5* Ankündigung Fahrt 90 km/h, Kein)
Auswahl Stellwerkstyp", link="https://forum.opendcc.de/wiki/doku.php?id=konfigvorlagen:sbb_system_l" ) ##instruction(text:en="SBB Distant signal System L, 4 - 6 Aspects
Lightports = ge_left, ge_right, gn_left, gn_right, ge_right_bottom
Macros = Warnung, FB1* Announcing free ride, FB2* Announcing ride 40 km/h, FB3* Announcing ride 60 km/h
Optional FB5* Announcing ride 90 km/h, Dark
Railway Control Type Selection", link="https://forum.opendcc.de/wiki/doku.php?id=konfigvorlagen:sbb_system_l" ) ### ##input($AccessoryName:string, text:de="Name des Vorsignal-Accessories: ", text:en="Name of the signal Accessory: ", default="SBB Vorsignal System L") ##input($my_accessory:accessory, text:de="Nummer des zu erzeugenden Accessory: ", text:en="Number of the Accessory: ", default=0) ##input($my_macro:macro, text:de="Nummer des ersten Macros (Warning): ", text:en="Number of the first macro (warning): ", default=0) ##input($start_led:light, text:de="Nummer des ersten Lightport (ge_links): ", text:en="Number of the first Lightport (ge_left): ", default=0) ##input($Vorsignal_9:boolean, text:de="Optional: FB5* Ankündigung Fahrt 90 km/h : ", text:en="Optional: FB5* Announcing ride 90 km/h : ", default=0) ##input($Vorsignal_d:boolean, text:de="Optional: Kein Fahrbegriff (dunkel) : ", text:en="Optional: Dark : ", default=0) ##input($STW:int, text:de="Stellwerkstyp:
0: Sichtbarer Lampentest wie z.B. SpDrS (default);
1: langsames Überblenden wie z.B. ELEKTRA;
2: spezielles Überblenden wie Domino 67:
(Bei anderen Eingaben wird SpDrS verwendet)", text:en="Railway control center type:
0: Visible bulb test as e.g. SpDrs (default);
1: slow cross-fading as e.g. ELEKTRA;
2: spezial cross-fading as Domino 67:
(If another number is entered, 0 is used)", default=0) ### Flag wird nur benötigt, wenn ein Vorsignal am Mast ausgewählt wurde ##input($prevent_replace_labels:boolean, text:de="Keine Namen fuer Accessory, Makros, Ports ersetzen", text:en="Prevent replace labels for accessory, macro and ports", default=false) #set($led_gap = 1) ### die anderen vier LED sind an den folgenden vier Lightports angeschlossen ### ### -------------- 2. set Parameters for Ports #set($WertbeiOff = 0) #set($WertbeiOn = 200) #set(${domino67} = false) #set(${ELEKTRA} = false) #if (${STW} == 1) #set(${ELEKTRA} = true) #set($Ueberblenden = 25) #set($BulbTestDelayW = 5) #set($BulbTestDelay = 0) #elseif (${STW} == 2) #set(${domino67} = true) #set($Ueberblenden = 5) #set($BulbTestDelay = 0) #set($domino_delay = 7) ### Delay on Domino 67 #set($domino_flash = 5) ### flashtime on Domino 67 #else #set(${STW} = 0) #set($Ueberblenden = 5) #set($BulbTestDelay = 5) #end #set($OnTime = 0) #if (${dimm_range} == 8) ### Es handelt sich um einen Knoten mit 8 Bit Dimming #set($DimmzeitOff = 10) #set($DimmzeitWOn = 7) ### Einschaltdimmen für die beiden gelben "Warnung" Lampen kürzer, als für die Lampen der Fahrbegriffe. Grund: Diese brennen häufiger und darum ist der Glühfaden warm, während die Glühfäden der seltener eingeschalteter Lampen der Fahrbegriffe kälter sind und langsamer warm werden (Widerstand abbauen). #set($DimmzeitFBOn = 5) #set($DimmzeitOffParam = "DimmOff=${DimmzeitOff}") #set($DimmzeitWOnParam = "DimmOn=${DimmzeitWOn}") #set($DimmzeitFBOnParam = "DimmOn=${DimmzeitFBOn}") #else ### Es handelt sich um einen Knoten mit 16 Bit Dimming #set($DimmzeitOff = 2500) #set($DimmzeitWOn = 2000) #set($DimmzeitFBOn = 1250) #set($DimmzeitOffParam = "DimmOff88=${DimmzeitOff}") #set($DimmzeitWOnParam = "DimmOn88=${DimmzeitWOn}") #set($DimmzeitFBOnParam = "DimmOn88=${DimmzeitFBOn}") #end ### -------------- 3. execute part of the script #set($mCount = 0) #set($macro_w = $my_macro + $mCount)### Warnung #set($mCount = $mCount + 1) #set($macro_f = $my_macro + $mCount) ### FB1* Ankündigung freie Fahrt #set($mCount = $mCount + 1) #set($macro_4 = $my_macro + $mCount) ### FB2* Ankündigung Fahrt 40 km/h #set($mCount = $mCount + 1) #set($macro_6 = $my_macro + $mCount) ### FB3* Ankündigung Fahrt 60 km/h #set($mCount = $mCount + 1) #if (${Vorsignal_9}) #set($macro_9 = $my_macro + $mCount) ### FB5* Ankündigung Fahrt 90 km/h #set($mCount = $mCount + 1) #end #if (${Vorsignal_d}) #set($macro_d = $my_macro + $mCount) ### Kein #set($mCount = $mCount + 1) #end ############################################################### #set($led_ge_lo = $start_led) ### LED ge_links an erstem lightport, der eingegeben wurde #set($led_ge_ro = $start_led + 1) ### LED ge_rechts an nächstem lightport #set($led_gn_l = $start_led + 2) ### LED gn_links an nächstem lightport #set($led_gn_r = $start_led + 3) ### LED gn_rechts an nächstem lightport #if(${Vorsignal_9}) #set($led_gn_ru = $start_led + 4) ### LED ge_rechts_unten an nächstem lightport #end ######################################## ### Setzt label, wenn ${prevent_replace_labels} NICHT true #if (!${prevent_replace_labels}) ### ### Set label of Ports set light ${led_ge_lo} name="${AccessoryName}_${my_accessory}_${led_ge_lo}_ge_lo" set light ${led_ge_ro} name="${AccessoryName}_${my_accessory}_${led_ge_ro}_ge_ro" set light ${led_gn_l} name="${AccessoryName}_${my_accessory}_${led_gn_l}_gn_l" set light ${led_gn_r} name="${AccessoryName}_${my_accessory}_${led_gn_r}_gn_r" #if(${Vorsignal_9}) set light ${led_gn_ru} name="${AccessoryName}_${my_accessory}_${led_gn_ru}_ge_ru" #end ### Set label of Macro set macro ${macro_w} name="${AccessoryName}_${my_accessory}_Warnung" set macro ${macro_f} name="${AccessoryName}_${my_accessory}_FB1*" set macro ${macro_4} name="${AccessoryName}_${my_accessory}_FB2*" set macro ${macro_6} name="${AccessoryName}_${my_accessory}_FB3*" #if (${Vorsignal_9}) set macro ${macro_9} name="${AccessoryName}_${my_accessory}_FB5*" #end #if (${Vorsignal_d}) set macro ${macro_d} name="${AccessoryName}_${my_accessory}_Kein" #end ### Set label of Accessories set accessory ${my_accessory} name="${AccessoryName}_${my_accessory}" #end ######################################## ### ### Ports: (set Parameters) config port ptype=light ValueOff=${WertbeiOff} ValueOn=${WertbeiOn} ${DimmzeitOffParam} ${DimmzeitWOnParam} number=${led_ge_lo} config port ptype=light ValueOff=${WertbeiOff} ValueOn=${WertbeiOn} ${DimmzeitOffParam} ${DimmzeitWOnParam} number=${led_ge_ro} config port ptype=light ValueOff=${WertbeiOff} ValueOn=${WertbeiOn} ${DimmzeitOffParam} ${DimmzeitFBOnParam} number=${led_gn_l} config port ptype=light ValueOff=${WertbeiOff} ValueOn=${WertbeiOn} ${DimmzeitOffParam} ${DimmzeitFBOnParam} number=${led_gn_r} #if(${Vorsignal_9}) config port ptype=light ValueOff=${WertbeiOff} ValueOn=${WertbeiOn} ${DimmzeitOffParam} ${DimmzeitFBOnParam} number=${led_gn_ru} #end ################################################/ ### Macro Vorsignal Warnung ### select macro ${macro_w} config macro repeat=1 slowdown=1 ### nicht benoetigte LED's ausschalten add step ptype=light action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} add step ptype=light action=down number=${led_gn_l} add step ptype=light action=down number=${led_gn_r} #if(${Vorsignal_9}) add step ptype=light action=down number=${led_gn_ru} #end ### Warnung setzten, nach $Ueberblenden Ticks #if (${ELEKTRA}) add step ptype=light action=up delay=${BulbTestDelayW} number=${led_ge_lo} add step ptype=light action=up delay=${BulbTestDelayW} number=${led_ge_ro} #else add step ptype=light action=up delay=${Ueberblenden} number=${led_ge_lo} add step ptype=light action=up number=${led_ge_ro} #end ### ### Ende Macro Vorsignal Warnung ### ################################################/ ################################################/ ### Macro FB1* Ankündigung freie Fahrt ### select macro ${macro_f} config macro repeat=1 slowdown=1 ### nicht benoetigte LED's ausschalten add step ptype=light action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} add step ptype=light action=down number=${led_gn_l} add step ptype=light action=down number=${led_gn_r} #if(${Vorsignal_9}) add step ptype=light action=down number=${led_gn_ru} #end #if (${domino67}) add step ptype=light delay=${domino_delay} action=up number=${led_ge_lo} add step ptype=light action=up number=${led_ge_ro} add step ptype=light delay=${domino_flash} action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} #end ### FB1* Ankündigung freie Fahrt, nach $Ueberblenden Ticks add step ptype=light action=up delay=${Ueberblenden} number=${led_gn_r} add step ptype=light action=up delay=${BulbTestDelay} number=${led_gn_l} ### Ende Macro FB1* Ankündigung freie Fahrt ### ################################################/ ################################################/ ### Macro FB2* Ankündigung Fahrt 40 km/h ### select macro ${macro_4} config macro repeat=1 slowdown=1 ### nicht benoetigte LED's ausschalten add step ptype=light action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} add step ptype=light action=down number=${led_gn_l} add step ptype=light action=down number=${led_gn_r} #if(${Vorsignal_9}) add step ptype=light action=down number=${led_gn_ru} #end #if (${domino67}) add step ptype=light delay=${domino_delay} action=up number=${led_ge_lo} add step ptype=light action=up number=${led_ge_ro} add step ptype=light delay=${domino_flash} action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} #end ### FB2* Ankündigung Fahrt 40 km/h, nach $Ueberblenden Ticks add step ptype=light action=up delay=${Ueberblenden} number=${led_ge_lo} add step ptype=light action=up delay=${BulbTestDelay} number=${led_gn_r} ### ### Ende Macro FB2* Ankündigung Fahrt 40 km/h ### ################################################/ ################################################/ ### Macro FB3* Ankündigung Fahrt 60 km/h ### select macro ${macro_6} config macro repeat=1 slowdown=1 ### nicht benoetigte LED's ausschalten add step ptype=light action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} add step ptype=light action=down number=${led_gn_l} add step ptype=light action=down number=${led_gn_r} #if(${Vorsignal_9}) add step ptype=light action=down number=${led_gn_ru} #end #if (${domino67}) add step ptype=light delay=${domino_delay} action=up number=${led_ge_lo} add step ptype=light action=up number=${led_ge_ro} add step ptype=light delay=${domino_flash} action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} #end ### FB3* Ankündigung Fahrt 60 km/h, nach $Ueberblenden Ticks add step ptype=light action=up delay=${Ueberblenden} number=${led_ge_lo} add step ptype=light action=up delay=${BulbTestDelay} number=${led_gn_r} add step ptype=light action=up delay=${BulbTestDelay} number=${led_gn_l} ### ### Ende Macro FB3* Ankündigung Fahrt 60 km/h ### ################################################/ #if (${Vorsignal_9}) ################################################/ ### Macro FB5* Ankündigung Fahrt 90 km/h ### select macro ${macro_9} config macro repeat=1 slowdown=1 ### nicht benoetigte LED's ausschalten add step ptype=light action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} add step ptype=light action=down number=${led_gn_l} add step ptype=light action=down number=${led_gn_r} #if(${Vorsignal_9}) add step ptype=light action=down number=${led_gn_ru} #end #if (${domino67}) add step ptype=light delay=${domino_delay} action=up number=${led_ge_lo} add step ptype=light action=up number=${led_ge_ro} add step ptype=light delay=${domino_flash} action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} #end ### FB3* Ankündigung Fahrt 60 km/h, nach $Ueberblenden Ticks add step ptype=light action=up delay=${Ueberblenden} number=${led_gn_ru} add step ptype=light action=up delay=${BulbTestDelay} number=${led_gn_r} add step ptype=light action=up delay=${BulbTestDelay} number=${led_gn_l} ### ### Ende Macro FB5* Ankündigung Fahrt 90 km/h ### ################################################/ #end #if ( ${Vorsignal_d} ) ################################################/ ### Macro Vorsignal Kein ### select macro ${macro_d} config macro repeat=1 slowdown=1 ### nicht benoetigte LED's ausschalten add step ptype=light action=down number=${led_ge_lo} add step ptype=light action=down number=${led_ge_ro} add step ptype=light action=down number=${led_gn_l} add step ptype=light action=down number=${led_gn_r} #if(${Vorsignal_9}) add step ptype=light action=down number=${led_gn_ru} #end ### ### Ende Macro Vorsignal Kein ### ################################################/ #end ### Define Accessory #set($aCount = 0) select accessory ${my_accessory} add aspect ${aCount} macronumber=${macro_f} #set($aCount = $aCount + 1) add aspect ${aCount} macronumber=${macro_w} #set($aCount = $aCount + 1) add aspect ${aCount} macronumber=${macro_4} #set($aCount = $aCount + 1) add aspect ${aCount} macronumber=${macro_6} #set ($aCount = $aCount + 1) #if (${Vorsignal_9}) add aspect ${aCount} macronumber=${macro_9} #set ($aCount = $aCount + 1) #end #if (${Vorsignal_d}) add aspect ${aCount} macronumber=${macro_d} #end




© 2015 - 2024 Weber Informatics LLC | Privacy Policy