Axle counterHardwareCurrently a prototype is under test that implements a single axle sensor based on two light barriers for detection of wheel flanges and the direction of travel. The light barrier mechanical implementation is described on the pages of Michael Weinert SoftwareSoftware update over LocoNet is available with the IPL protocol using a BootLoader. The current test version supports software update, configuration over the SV protocol, 1kHz polling of the sensor inputs and display with status LEDs.
The logic for evaluation of the input signals for generation of counter information is currently under review. The following state maschine is a request for comments: State Chart![]() States
The state names are choosen by the following rule: They begin
with a human readable part and are followed by the state of the
sensor inputs that lead to this state. H=blocked, L=free, left
one is sensor 1, right one is sensor 2. Example: TransitionsThe transitions are composed of a name for the edge type (rising = getting blocked = L ⇒ H, falling = becoming free = H ⇒ L), followed by the number of the sensor that it applies to. Paths through the chart
The nominal path for a flange that enters over sensor 1 as shown in
the diagram above is green-grey-green and leads to a counter decrement
(shown by action Timing
In case of a direction change on a barrier or due to a
detection error, the state maschine cound get confused
and interpret wrongly, whether an axle is between the
barriers or not. This error situation can only be caught
by timing analysis. The idea is that the time the axle
stays between the barriers is much shorter than the time
between two axles passing the sensor.
Therefore the time is measured for
a flange staying on the sensor area between the two rising
edges - see actions
When the flange is assumed to leave the sensor and the end time
gets sampled, the state maschine does not directly go to
LocoNet message to report counter stateWe need a LN message that can carry an address for the sensor and a counter value. The current plan is to abuse the message OPC_ANALOGIO for this purpose. Message format
Usage of data fields
|