> For the complete documentation index, see [llms.txt](https://docs.intrepidcs.com/vspy-3-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intrepidcs.com/vspy-3-documentation/3.9.14/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-test-dtc.md).

# Script Type Function Block Command: Test DTC

### Command Description

The **Test DTC** command checks the data in a receive message for specified Diagnostic Trouble Codes (DTCs). If DTCs are detected, their data is copied to an [application signal](/vspy-3-documentation/3.9.14/vehicle-spy-main-menus/main-menu-scripting-and-automation/application-signals.md).

This command currently supports only J1939 DTCs.

### Value Field Parameters

A dialog box opens when you double-click in the **Value** field, allowing you to specify the DTCs you want to search for, which message to search, and where to store the results. An example can be seen in Figure 1; a full description of the parameters can be found below.

![Figure 1: Dialog box to set up a Test DTC command.](https://content.gitbook.com/content/9uNvoSkR7R6QY16gR3CY/blobs/bEBS8hcoMp2MrBIMutcd/fb_test_dtc.gif)

### J1939 DTC Parameters

Enter the following values for a DTC you want to search for:

* **SPN:** The **Suspect Parameter Number** (0 to 524,287).
* **FMI:** The **Failure Mode Indicator** (0 to 31). You can check **Don't Care** next to this value if you want to ignore the FMI.
* **OC:** The **Occurrence Count** (0 to 127). Again there is a **Don't Care** option if this parameter is not relevant.

After making your selection, press the **Add** button next to the SPN box to add the specified DTC to the large box labeled **DTCs to look for in Rx Message**.

If you want to enter more DTCs, repeat the process. You can also use the **Remove** button to delete an entry from the list, or press **Clear All** to delete all entries.

### Send Results to Application Signal

Select the application signal to receive DTC data using the drop-down box here.

### Rx Message

Select the receive message to search for the specified DTCs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.intrepidcs.com/vspy-3-documentation/3.9.14/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-test-dtc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
