> 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.13/vehicle-spy-tutorials/tutorial-basics-of-capture-function-block-and-graphical-panels/part-2-setup-the-capture-function-blocks.md).

# Part 2 - Setup the Capture Function Blocks

A capture Function Block allows the recording of data that is coming across the bus. In this case, data that is captured will be coming from a simulation file. Capture Function Blocks can capture traffic in a variety of ways. To learn more about how to use Capture Function Blocks, see Capture Function Blocks.

### 1. Open the Function Blocks Tab:

Select **Scripting and Automation > Function Blocks** from the main menu.

### 2. Add New Capture Function Block:

Press the **+ button** (Figure 1:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smOne.gif)) at the top of Function Blocks view. A dropdown list of available function block types will appear. Select **Capture** and the new function block will be added to the list in the upper portion of the view. Label this Capture **HS CAN Capture** by double clicking the description field and entering in the text (Figure 1:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smTwo.gif)).

![Figure 1: Creating a new Function Block](https://content.gitbook.com/content/jb1RvXgxzxcqgZdVpbGb/blobs/v2HxvZIRM6QPnhL2KsKl/spyfbexample1.2.1.gif)

### 3. Add Filters:

Filters choose what is to be captured. Under the Filter tab click the **Filters...** button (Figure 1: ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smThree.gif)). The Setup Filter dialog will appear (Figure 2). To create a filter for only HS CAN, select **Networks** (Figure 2:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smOne.gif)) > **HS CAN** (Figure 2:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smTwo.gif)), and click **Add To Included List** (Figure 2:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smThree.gif)). **OK** will close the dialog.

![Figure 2: Filter Setup](https://content.gitbook.com/content/jb1RvXgxzxcqgZdVpbGb/blobs/4zEAAe2BoLMWbgocRd90/spyfbexample1.2.2.gif)

### 4. Setup Capture Function Block:

Click the **Start** tab (Figure 3:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smOne.gif)) and make sure that the Function Block is set to **Start Immediately**. Next, click on the **Stop and Trigger** tab. Select **Collect in a circular buffer** from the dropdown (Figure 3:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smTwo.gif)).Enter **500** for the buffer size (Figure 3:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smThree.gif)). This is approximately the number of HS CAN messages in the simulation file.

![Figure 3: Configuring the capture block](https://content.gitbook.com/content/jb1RvXgxzxcqgZdVpbGb/blobs/Ih4HyTYNxjpGanAlw28v/spyfbexample1.2.3.gif)

### 5. Setup Storage Options:

Click on the **Storage** tab and select **Manual save** from the first dropdown (Figure 5: ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smOne.gif)). This will allow saving in a number of different ways. Give the storage file a name by changing the text from Capture File Function Block 1 to **HS CAN Capture** (Figure 5: ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smTwo.gif)). Make sure that **Append Time and Date to file name** is disabled by un-checking the checkbox next to this field (Figure 5: ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smThree.gif)).

![Figure 4: Setting storage options](https://content.gitbook.com/content/jb1RvXgxzxcqgZdVpbGb/blobs/i9Qcd8pl6FL2IiBYaJKd/spyfbexample1.2.4.gif)

### 6. Setup a second Capture Function Block:

Create a second Capture Function Block named **MS CAN Capture**. This will be set up the same as the previous Function Block except that for it will be for **MS CAN**and the **buffer size will be 370**.


---

# 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.13/vehicle-spy-tutorials/tutorial-basics-of-capture-function-block-and-graphical-panels/part-2-setup-the-capture-function-blocks.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.
