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

data.Script.bidib-script-herz8.nodescript Maven / Gradle / Ivy

There is a newer version: 2.0.26
Show newest version
// this is a test script for Herz8
define herz1A "Herzrelais 1A"
define herz1B "Herzrelais 1B"
define weiche1Gerade "Weiche 1 gerade"
define weiche1Abzweig "Weiche 1 abzweig"
define weiche1 "Weiche 1"

// change the label
set macro 0 name=%weiche1Gerade%
set macro 1 name=%weiche1Abzweig%
set servo 0 name=%weiche1%
set switch 10 name=%herz1A%
set switch 11 name=%herz1B%
set accessory 0 name=%weiche1%

// set the CVs
set CV 437 2    // GPIO 0
set CV 440 2    // GPIO 1

// restart the node
reset
wait 5000   // wait 5 sec
reselect    // select the node again (internal wait for 5000ms to get data from node)

// prepare the macro
select macro 0
add step ptype=macro action=stop name=%weiche1Abzweig%
//add step ptype=macro action=stop number=1
//add step ptype=switch action=off name=%herz1A% 
add step ptype=switch action=off number=10
add step ptype=switch action=off name=%herz1B% 
add step delay=200 ptype=servo action=start name=%weiche1% target=30
add step ptype=switch action=on name=%herz1B% 

// alternative mit macro number
// add step ptype=macro action=stop number=1
// alternative mit port number
// add step ptype=switch action=off number=10
// prepare the accessory
select accessory 0
add aspect 0 macroname=%weiche1Gerade%
add aspect 1 macronumber=1




© 2015 - 2024 Weber Informatics LLC | Privacy Policy