Table of Contents
Elapsed Time
Starts tracking time elapsed when an enable signal is received.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library/Advanced/Timing')Description
The Elapsed Time block calculates the time elapsed since the timer starts. It also allows the user to reset the timer at any time during the simulation.
Limitations
If used in normal simulation, this block requires System Timebase
block so that it runs in real-time.
Input Ports
start
Starts the timer when the input is high, resets the timer when the input is low. This port only appears when Enable external start signal. box is checked.
Output Ports
time
Time elapsed since timer starts.
Parameters and Dialog Box
Enable external start signal.
When this parameter is checked, a start port will appear as an input, which allows user to start and reset the timer. Otherwise, the timer starts as soon as model starts.
Sample time
The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.
A sample time of -1 indicates that the block inherits its sample time from the input. The sample time must be inherited when the block is placed in a conditionally executed subsystem like the Triggered Subsystem block.
To set the sample time to the fundamental sampling time of the model, use the qc_get_step_size function, which is a QUARC function that returns the fundamental sampling time of the model. The fundamental sampling time of the model is the sampling time entered in the Fixed step size field of the Solver pane of the Configuration parameters.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
Last fully supported in QUARC 2018. |
|
Rapid Simulation (RSIM) Target |
Yes |
Yes |
|
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.