Measure elapsed time from timer in NXT brick
Measure the elapsed time, in milliseconds, from the time the NXT brick starts running the model.
With External mode disabled, the default setting, the NXT brick starts running the model when you press the right-arrow button on the NXT brick. With External mode enabled, the NXT brick automatically starts running the model when Simulink finishes downloading the model to the NXT brick.
You can see when the NXT brick starts running a model by observing the LCD on the NXT brick. For models that do not use an LCD block, the LCD on the NXT brick displays "I am running ..." followed by the model name. For models that use an LCD block, the model displays whatever output is sent to it.
If you run a simulation of a model that contains this block without the target hardware, this block outputs zeroes. See Block Produces Zeros or Does Nothing in Simulation.
Open the legonxtlib block library and copy the blocks shown to a new model.
Connect the Timer block to the LCD block, as shown.
Prepare and run the model on the NXT brick.
Observe the elapsed time, in milliseconds, on the LCD display.
Detect and Fix Task Overruns on NXT Brick | Install Support for LEGO MINDSTORMS NXT Hardware | LEGO MINDSTORMS NXT Battery | LEGO MINDSTORMS NXT Button | LEGO MINDSTORMS NXT LCD | LEGO MINDSTORMS NXT Speaker | LEGO MINDSTORMS NXT Timer