MotoHawk DateTime Constant
This block declares a constant signal with a DateTime or TimeSpan Data Type.
Block ID
DateTime Constant
Library
motohawk_datetime_lib/Date/Time Blocks
Description
This block declares a constant signal with a DateTime or TimeSpan Data Type.
The "default" field expects a MATLAB structure definition:
A DateTime would look like the following:
struct('year', number, 'month', number, 'day', number, 'hour', number, 'minute',
number, 'second', number, 'microsecond', number)
All fields must be specified with unsigned integer Data Type.
A TimeSpan would look like the following:
struct('days', number, 'hours', number, 'minutes', number, 'seconds', number, 'microseconds',
number)
All fields must be specified with signed integer Data Type.
The 'Data Type' can be determined automatically by the content of the 'Default' field, or selected manually.
These scripts help define these data types:
>> help motohawk_datetime_matlabtime2datestruct
>> help motohawk_datetime_matlabtime2timespanstruct
Block Parameters
Parameter Field | Values | Comments/Description |
---|---|---|
Default | Expression | Expression must be a valid TimeSpan or DateTime structure. |
Data Type | Dropdown | Data Type can be one of the three options : Inherit from 'Default', TimeSpan, or DateTime |