MotoHawk DateTime DataStore Definition

This block declares a DataStore with a DateTime or TimeSpan Data Type.

Block ID

DateTime DataStore Definition

Library

motohawk_datetime_lib/Date/Time Blocks

Description

This block declares a date DataStore with a date Data Type.

The "default" field expects a MATLAB structure definition:

A date 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 'Date 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
Name Expression Name must be a C-compatible string
Default Expression Default must be a valid TimeSpan or DateTime structure
Storage Dropdown Storage can be one of the three options : Constant, Volatile, or NonVolatile
Data Type Dropdown Data Type can be one of the three options : Inherit from 'Default', TimeSpan, or DateTime