Woodward Custom ISO15765 Instance Definition

This block defines an instance of the ISO15765 protocol. UDS and J1979/ISO15031-5 are covered by this protocol.

Please read the ISO15765 topic for more information on using this protocol in a MotoHawk application.

Block ID

ISO15765 Instance Definition

Library

Woodward Custom ISO15765

Description

The instance block defines the communication interface, sessions, and the services handled by the application.

This block can support the ISO15765 protocol on more than one CAN channel, but not simultaneously. To specify operation on more than one CAN channel, set the mask parameter CAN Channel Name to a cell array of strings like {'CAN_1' 'CAN_2'}. The first CAN channel to start receiving ISO15765 messages will get access to the protocol handler, while the other channel will be locked out. After a power off / power on of the module, or after a non-default session times out, a different CAN bus can gain access to the protocol handler.

The flow control block size is the maximum number of consecutive frames that the server will indicate it can recieve before needing to send another flow control message.

The default session timeout is the length of time the protocol instance remains locked on a particular CAN bus which has received ISO15765 messages. Upon receiving a message, the ISO15765 instance can only receive messages on that CAN bus until the default session times out, or a non default session times out. After the default session timeout, a connection is possible on any CAN bus the ISO15765 instance is configured to communicate over.

The minimum receive and transmit buffer sizes are specified by the user. This size can be increased if Service 0x19 is specified in the handler based on the number of faults in the application. There are run time metrics for the maximum size used under System|Debug|ISO15765.

In order for the Woodward Custom ISO15765 library to be used, the user's Motohawk security token will need to have the proper license added to it. For instructions on how to accomplish this, please see the instructions for adding the MotoHawk ISO15765 library license.

A user can check whether their Motohawk security token has the needed product license at the Matlab command line by executing the woodward_custom_iso15765_check_license command. A returned value of 1 means the Motohawk ISO15765 library is licensed, while a returned value of 0 means it is not.

The five DTC format selections currently supported by the ISO15765 block set for constructing DTC values for Service 0x19 are ISO15031-6, ISO15031-6(combined), SAEJ1939-73, SAE_J2012-DA_DTCFormat_04, and ISO_14229-1_DTCFormat. ISO15031-6 requires one field which is the DTC Custom Field. The other two fields (Failure Category and Failure Subtype) are optional and can be disabled by setting the name to {} or ''. If those fields are disabled, then '0' is used for that field in the DTC. ISO15031-6(combined) requires one field which is the DTC Custom Field. The other field (Failure Category and Failure Subtype) is optional and can be disabled by setting the name to {} or ''. If this field is disabled, then '0' is used for that field in the DTC. SAEJ1939-73 requires two fields. The SPN field and the FMI field. These references to OBD custom fields will define the SPN and FMI data fields in server responses to service 0x19 requests. SAE_J2012-DA_DTCFormat_04 requires one field which is the DTC Custom Field. The other field (Failure Type Byte) is optional and can be disabled by setting the name to {} or ''. If this field is disabled, then '0' is used for that field in the DTC. ISO_14229-1_DTCFormat requires one field which is the DTC Custom Field which must be defined as an integer data type of 32 bits. The DTC format supports calibration. The DTC format drop down selector functions in this case as the default DTC format. When calibrating the DTC format, none of the related custom fields are required. Any required field for a particular DTC format that is left blank will result in an inability of the application to support that DTC format for service 0x19. Supporting a subset of the DTC formats can be achieved in this manner, but note that it is the application developers responsibility to avoid selecting a DTC format and not providing all the required custom field values. If the calibration for DTC format is changed to a value that is not supported (e.g. ISO11992-4) or one that is supported, but does not have all required custom fields (e.g. changing DTC format to SAEJ1939-73, but not defining an SPN custom field at build time), then requesting service 0x19 subfunctions will result in a general rejection NRC (0x10).

In order to support world wide harmonized OBD's usage of DTC status mask, a user can have bit 3 of the DTC status mask byte set if an OBD fault is confirmed or previously active via the similarly named check box. Three optional fields for WWH OBD functional group ID, DTC class, and DTC severity can be defined when using the SAEJ1939-73 DTC format to support world harmonized OBD functionality. ISO15031-6 and ISO_14229-1_DTCFormat are not listed as a usable DTC format in the WWH OBD specification so the functional group ID, DTC class, and DTC severity fields are not visible when using one of the two ISO15031-6 or ISO_14229-1 DTC format selections.

When using the functional group ID custom field, be aware that OBD faults can be part of more than one functional group. Because of this the following bit mapping shall be employed by MotoHawk to represent inclusion into a functional group:

0x33 (Emissions-system group) will be bit 0 of the functional group ID OBD custom field

0xD0 (Safety-system group) will be bit 1 of the functional group ID OBD custom field

0xFE (VOBD system) will be bit 2 of the functional group ID OBD custom field

So for example, if your OBD fault needed to be part of the emissions system group, set the functional group ID OBD custom field value for that OBD fault to 0x01. If it needed to be in emissions and safety system groups set the functional group ID OBD custom field value for that OBD fault to 0x03.

The CAN identifiers are adjustable at runtime when "Allow attributes marked with a * to be calibrated." is checked. The adjustment of the CAN receive identifiers must adhere to the MotoHawk CAN Slot qualities of having a design time fixed portion of the CAN identifier and a runtime adjustable portion of the CAN identifier. The runtime adjustable portion of the CAN receive identifier is specified by a zero in that portion of the CAN receive mask. A one in a portion of the CAN receive mask specifies that the design time constant value of the receive identifier is always used at runtime. The runtime portion of the CAN receive identifier is taken from the 32 bit unsigned integer data store which is specified by "Receive ID Data Store Reference." The entirety of the transmit identifier is adjustable at runtime. Note that the runtime values of the data store references are only applied at the application startup time. Also be aware that CAN receive masks which are permissive of more mask bits can cause lower CPU performance on a busy CAN bus, as compared to more restrictive CAN receive masks.

If UDS over J1939 is enabled, the user can define a calibration for the transmit ID. Only the bits of the calibration value that correspond to the transmit message ID's priority field will be used by the UDS over J1939 transmit ID. For example, a calibration with a value of 0x1CEF02F9 would only use the 0x1C portion of the calibration for the transmit ID priority. The rest of the transmit ID is taken from the message ID of received message. If not using UDS over J1939, then the priority value of the transmit ID is set to the same as the priority of the received message. When using UDS over J1939, the receive ID and functional receive ID can not be calibrated.

ODX Support

The Woodward Custom ISO15765 has the ability to export a description of the configured ISO15765 protocol in ASAM ODX format. See the ODX Export topic for more information.

Block Parameters

Parameter Field Values Comments/Description
Instance Name String Unique name for this instance of the protocol.
Definition Structure Expression Message structure that determines which sessions and services are supported
CAN Channel Name
(more than 1 allowed)
string or
cell array of strings
List of CAN resource names that will receive requests and transmit responses.
Flow Control Block Size String Number of consecutive frames the server will request before needing to send another flow control message.
Default Session Timeout (seconds) Numeric (1 - 4294 seconds) Number of seconds a default session will stay locked to the CAN bus it received messages over after those messages cease.
Utilize UDS over J1939 Protocol checkbox Specifies if UDS over J1939 Protocol shall be supported. Enabling this requires a referencing J1939 instance and at least one J1939 receive block in the same application. Using this will remove the option to set transmit and receive ID's because those ID's will be taken from the J1939 claimed source address and transmitting source address.
Rx ID Type Numeric (1 or 0) If 1, the Rx ID is treated as an extended ID (29 bit). If 0, then it is standard (11 bit).
Rx ID Numeric This is the ID that the CAN dispatcher will receive messages.
Tx ID Type Numeric (1 or 0) If 1, the Tx ID is treated as an extended ID (29 bit). If 0, then it is standard (11 bit).
Tx ID Numeric Responses will use this address for their ID.
Support Functional Address checkbox Specifies whether a CAN Slot will be created for the Function Rx ID.
Functional Rx ID Numeric Specifies the Receive ID used for functional queries.
Minimum Receive Buffer [7-4095 bytes] Numeric Specified the minimum receive buffer size. The minimum size is 7 bytes and the maximum size is 4095 bytes.
Minimum Transmit Buffer [7-4095 bytes] Numeric Specified the minimum transmit buffer size. The minimum size is 7 bytes and the maximum size is 4095 bytes.
Enforce Exact Request Lengths checkbox Choose whether to enforce exact lengths for incoming requests and respond with a negative response or to ignore extra data. Leaving this box unchecked allows for more flexibility. Minimum lengths are always enforced regardless of this setting.
Generate WWH OBD Supported DIDs for PIDs/MIDs/ITIDs checkbox Choose whether to generate world wide harmonized supported DIDs, required for world wide harmonized OBD test equipment.
Data Store Reference when true suppresses Service 0x01, PID 0x00 request (Optional) Alpha-numeric text Specifies an existing boolean scalar data store name. The application can set this datastore to true in order to have the protocol handler not send a response for MODE01 PID00. This is the defined way to support world wide harmonized OBD (ISO27145).
Enforce SID19 Rec0 and Freeze Frame 0 Copy checkbox Choose whether to enforce the rule of copying a defined and stored Freeze Frame into record 0 of service 19 messages. Whichever Freeze Frame Format definition DTC and PID values are stored in freeze frame 0 will be copied to record 0 of service 19 when this box is checked.
OBD Fault Manger Custom Field Name for the DTC of OBD services defined in ISO15765-4 string This field specifies the Custom Field (OBD Fault Manager) that will specify how to lookup the DTC value when transmitting responses to all OBD Services defined in ISO15765-4 (0x01-0x0A). If this is not specified (i.e. left blank), then those services will not transmit any DTC information. This field is required when copying freeze frame 0 to service 0x19 record 0 is enabled.
DTC Format for Service 0x19 Pull-down menu This field specifies the format for constructing DTC values for Service 0x19 (ISO 15031-6, ISO 15031-6(combined), SAEJ1939-73, SAEJ2012-DA format 4, and ISO 14229-1 are supported)
Custom Field Name for ISO15031-6 DTC (Required when ISO15031-6 DTC format is used and not calibrating the DTC format) string This field specifies the Custom Field (OBD Fault Manager) that will specify each OBD fault's DTC value when transmitting responses to Services 0x19. This field is only used when the DTC format in use is ISO15031-6.
SPN OBD Custom Field (Required when J1939-73 DTC format is used and not calibrating the DTC format) string This field specifies the Custom Field (OBD Fault Manager) that will specify how to fill in the "SPN" portion of the DTC value when transmitting responses to Services 0x19. This field is only used when the DTC format in use is SAEJ1939-73.
FMI OBD Custom Field (Required when J1939-73 DTC format is used and not calibrating the DTC format) string This field specifies the Custom Field (OBD Fault Manager) that will specify how to fill in the "FMI" portion of the DTC value when transmitting responses to Services 0x19. This field is only used when the DTC format in use is SAEJ1939-73.
Custom Field Name for SAE_J2012-DA DTC (Required when SAEJ2012-DA DTC format is used and not calibrating the DTC format) string This field specifies the Custom Field (OBD Fault Manager) that will specify each OBD fault's DTC value when transmitting responses to Services 0x19. This field is only used when the DTC format is SAE_J2012-DA_DTCFormat4.
Custom Field Name for ISO14229-1 DTC (Required when ISO14229-1 DTC format is used and not calibrating the DTC format) string This field specifies the Custom Field (OBD Fault Manager) that will specify each OBD fault's DTC value when transmitting responses to Services 0x19. This field is only used when the DTC format is ISO_14229-1_DTCFormat.
Custom Field Name for Failure Category (Optional) string This field specifies the Custom Field (OBD Fault Manager) that will specify how to fill in the "Failure Category" portion of the DTC value when transmitting responses to Services 0x19. This field is optional and the value "0" is used when left blank. This is only applicable when the ISO15031-6 DTC Format is chosen.
Custom Field Name for Failure Subtype (Optional) string This field specifies the Custom Field (OBD Fault Manager) that will specify how to fill in the "Failure Subtype" portion of the DTC value when transmitting responses to Services 0x19. This field is optional and the value "0" is used when left blank. This is only applicable when the ISO15031-6 DTC Format is chosen.
Custom Field Name for Combined Fail Category and Failure Sub Type (Optional) string This field specifies the Custom Field (OBD Fault Manager) that will specify how to fill in the "Failure Category and Subtype" portion of the DTC value when transmitting responses to Services 0x19. This field is optional and the value "0" is used when left blank. This is only applicable when the ISO15031-6(combined) DTC Format is chosen.
Custom Field Name for Failure Type Byte (Optional) string This field specifies the Custom Field (OBD Fault Manager) that will specify how to fill in the "Failure Type Byte" portion of the DTC value when transmitting responses to Services 0x19. This field is optional and the value "0" is used when left blank. This is only applicable when the SAE_J2012-DA_DTCFormat_04 DTC Format is chosen.
Custom Field Name for WWH-OBD Functional Group ID (Optional) string This field specifies the Custom Field (OBD Fault Manager) that will specify how to lookup the functional group ID when transmitting responses to Services 0x19. This is only applicable when the J1939-73 DTC Format is chosen.
Custom Field Name for WWH-OBD DTC Class (Optional) string This field specifies the Custom Field (OBD Fault Manager) that will specify how to lookup the DTC class when transmitting responses to Services 0x19. This is only applicable when the J1939-73 DTC Format is chosen.
Custom Field Name for WWH-OBD DTC Severity (Optional) string This field specifies the Custom Field (OBD Fault Manager) that will specify how to lookup the DTC severity when transmitting responses to Services 0x19. This is only applicable when the J1939-73 DTC Format is chosen.
DTC status mask bit 3 set if OBD fault is confirmed OR previously active. checkbox WWH-OBD DTC status field sets bit 3 if an OBD fault is confirmed or previously active. Checking this box will enforce that mapping of DTC status. Leaving the box unchecked will mean that bit 3 of the DTC status will be set if an OBD fault is confirmed only.
Allow attributes marked with a * to be calibrated. Calibration applied at KeyOn Check box (enable) When checked, enables runtime adjustable CAN identifiers.
Receive ID Mask Number, 29 or 11 bits A CAN identifier mask, usually hex2dec('7FF') or hex2dec('1FFFFFFF')
Receive ID Data Store Reference Alpha-numeric text Specifies an existing uint32 scalar data store name.
Functional Receive ID Mask Number, 29 or 11 bits A CAN identifier mask, usually hex2dec('7FF') or hex2dec('1FFFFFFF')
Functional Receive ID Data Store Reference Alpha-numeric text Specifies an existing uint32 scalar data store name.
Transmit ID Data Store Reference Alpha-numeric text Specifies an existing uint32 scalar data store name.
Default Session Timeout Data Store Reference Alpha-numeric text Specifies an existing uint32 scalar data store name that defines the number of microseconds before a default session timeout occurs.
DTC Format Data Store Reference Alpha-numeric text Specifies an existing scalar data store name that defines the calibration used for the DTC format for service 0x19 requests.