MotoHawk DateTime OBDFault Custom Field Definition
The DateTime OBDFault Custom Field Definition block defines a data store that is allocated according to the number of faults in the user application.
Block ID
DateTime OBDFault Custom Field Definition
Library
motohawk_datetime_lib/Date/Time Blocks
Description
The DateTime OBDFault Custom Field Definition block defines a data store that is allocated according to the number of faults in the user application. The purpose is to map a particular type of data to a particular fault. The user can update and read the data at run time when it is required. The data can also be used by protocol handlers and other algorithms. In the "Custom Field Name" field, provide a unique name; this is accessible from anywhere in the model. Duplicate names are not allowed. 'Storage Class' identifies the behavior of the data on the target. Volatile data will return to its 'Initial Value' on every startup. NonVolatile data will be saved in EEPROM, and return to the last written value on startup. The 'Initial Value' can be overridden by the DateTime OBDFault Custom Field Defaults block. This block accepts either datetime or timespan structure data types.
Format | Field | Required | Datatype | Description |
---|---|---|---|---|
TimeSpan | days | yes | int32 | Number of days in the TimeSpan. |
hours | no | int8 | Number of hours in the TimeSpan. | |
minutes | no | int8 | Number of minutes in the TimeSpan. | |
seconds | no | int8 | Number of seconds in the TimeSpan. | |
microseconds | no | int32 | Number of microseconds in the TimeSpan. | |
DateTime | years | yes | uint16 | Year of the DateTime |
month | no | uint8 | Month of the DateTime | |
day | no | uint8 | Day of the DateTime | |
hour | no | uint8 | Hour of the DateTime | |
minute | no | uint8 | Minute of the DateTime | |
second | no | uint8 | Second of the DateTime | |
microsecond | no | uint32 | Microsecond of the DateTime |
Block Parameters
Parameter Field | Values | Comments/Description |
---|---|---|
Custom Field Name | Alpha-numeric text, single-quote enclosed. | Provide a globally unique name, accessible from anywhere in the model. Duplicate names are not allowed. No special characters, such as spaces, dashes, commas (underscore allowed). |
Initial Value | Enter value | Enter the initial data field (type is implied, or select type in Data Type). |
Data Type | Select a data type from list, or select "Inherit from 'Table Data'" to set type as inferred from entry in Table Data field. Be sure to select a data type if there is possible ambiguity. | |
Storage Class | Select from list, type of storage for data read, which identifies the behavior of the data on the target. | |
Constant | Data Initial Value remains as a constant. | |
Volatile | Volatile data value returns to the 'Initial Value' on every startup. | |
NonVolatile | NonVolatile data is saved in EEPROM, and value returns to the last written value on startup |