Under construction!
current status: just ideas!
DCC Decoder Tool
-
This software allows for the evaluation and optimisation of decoder parameter, like Kp, Ki and Kd
of BEMK-Decoders. The rotational speed of the motor is measured (in short intervals). This measurement
is triggered by the corresponding DCC command,
thus the step response of the regulator could be determined.
Command List Decodertool (Speed-o-meter) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Command | Explanation | Example | ||||||||
C<num> | change configuration, see packet analyzer | |||||||||
TM<num> | Set trigger mode. This setting defines how a measurement is started.
|
|||||||||
A | Adjust measurement level no parameter supplied: do an auto adjust. This requires that the whole system under test (locomotive, IR sensor and reflector) must be prepared and revoluting. The software will now search for a sense level which allows for the measurement of the rotational speed. parameter: set compare level to this value. This command will return the measured level. |
|||||||||
F<num> | Format 0: standard, readable format 1: logview compatible format |
|||||||||
I<num> | Set Measurement Interval, unit 1ms If more than one measurement is performed (speed vs. time plot), this value sets the sample rate. If a measurement isn't terminated inside one interval, it will get a value of 0 |
|||||||||
S<num> | Measurement vector length, default = 1 This value sets the number of measurements performed after a trigger, a vector of comma separated values with the length S will be returned. Default is 1 (only one measurement), maximum is 128 |
|||||||||
L<num> | Select locomotive for triggering | |||||||||
T | Trigger a measurement. The answer is an array of numbers. | 100;121;143; |
Background information on speed measurements
-
The measurement uses the internal 16 bit counter in capture mode. The counter runs with internal clock, there are
dividers for 8, 64 256 and 1024. Giving a crystal frequency of 16MHz, the resolution of the timer is 500ns, 2.5µs,
16µs or 64µs.
64µs resolution is used here. The counter will overflow after 4.19s, therefore the minimum detectable speed is 14rpm. On the other end, the resolution is fine enough to measure 10000rpm with an accuracy of 1%.
Links
- http://www.logview.info/cms/d_formatbeschreibung.phtml