Model Railroad System
2.2.1
|
Block occupation detection using Circuits4Tracks Quad Occupancy Detectors and Azatrax SR4s. More...
Public Member Functions | |
C4TSMINI_Block (name,...) | |
Constructor: initialize the block object. More... | |
occupiedp () | |
The occupiedp method returns yes or no (true or false) indicating block occupation. More... | |
propagate (aspect, from,...) | |
Method used to propagate distant signal states back down the line. More... | |
Static Public Member Functions | |
static | validate (object) |
Type validating code Raises an error if object is not either the empty string or a C4TSMINI_Block type. More... | |
Private Member Functions | |
_entering () | |
Method for entering a block. More... | |
_exiting () | |
Method for exiting a block. More... | |
Private Attributes | |
node | |
SMINI node object. More... | |
forwardsignal | |
Signal object (typically a three color, one head block signal. More... | |
reversesignal | |
Signal object (typically a three color, one head block signal. More... | |
isoccupied | |
Saved occupation state. More... | |
Block occupation detection using Circuits4Tracks Quad Occupancy Detectors and Azatrax SR4s.
Above is a simple diagram for using Circuits4Tracks Quad Occupancy Detectors for block occupation detection. A Circuits4Tracks Quad Occupancy board has four current sensors. One wires one side of the track power (either DCC or DC) to a common rail and the other side through the Circuits4Tracks Quad Occupancy Detector to rails isolated with gaps (possibly with insulating rail joiners). This code uses a Chubb SMINI board to connect a Circuits4Tracks Quad Occupancy Detectors to the computer via a serial interface.
Typical usage:
Four blocks in a loop:
A Schematic of the layout would look like this:
For the track work elements use "blockN occupiedp" for the track work elements' occupied command: eg Block1 would have 'block1 occupiedp' as its occupied command, that is its edit window would look like:
The other three blocks would be similar.
Then in the Main Loop, you would have:
Definition at line 62 of file C4TSMINI_Block.tcl.
C4TSMINI_Block::C4TSMINI_Block | ( | name | , |
... | |||
) |
Constructor: initialize the block object.
Create a lowlevel node object and install it as a component. Install the blocks signal (created elsewhere).
name | Name of the block object |
... | Options:
|
|
private |
Method for entering a block.
|
private |
Method for exiting a block.
C4TSMINI_Block::occupiedp | ( | ) |
The occupiedp method returns yes or no (true or false) indicating block occupation.
C4TSMINI_Block::propagate | ( | aspect | , |
from | , | ||
... | |||
) |
Method used to propagate distant signal states back down the line.
aspect | The signal aspect that is being propagated. |
from | The propagating block (not used). |
... | Options:
|
|
static |
Type validating code Raises an error if object is not either the empty string or a C4TSMINI_Block type.
|
private |
Signal object (typically a three color, one head block signal.
Definition at line 85 of file C4TSMINI_Block.tcl.
|
private |
Saved occupation state.
Definition at line 93 of file C4TSMINI_Block.tcl.
|
private |
SMINI node object.
Definition at line 81 of file C4TSMINI_Block.tcl.
|
private |
Signal object (typically a three color, one head block signal.
Definition at line 89 of file C4TSMINI_Block.tcl.