# Part 2 - Logging Data

### 1. Capture Function block:

The next thing to setup is a capture function block. This example will use a very simple setup.\
\
To start, open up Function Blocks from "Scripting and Automation" then " Function Blocks". Use the + to create a new function block and select Capture. A capture function block has a few options that need to be configured to tell it how to capture. Below are the settings needed for a simple CoreMini capture.\
\
**Buffer**\
In this section, you can select the messages you want to capture. The default is to capture all messages. For this example, leave the default settings.

![](/files/I70eIIcXnT7ssNoFf1xx)

**Start**\
This section sets when to start the capture. For this example, select "Start Immediately". When the hardware is powered, it will start collecting messages. Also, check the "Automatically restart when complete". With this option enabled, the hardware will create a new buffer once the current one is full. This will let the hardware capture continuously until power is disconnected.

![](/files/h0Ej5du8eX4tmxuYwWAa)

**Stop and Trigger**\
This tab holds the settings for how to capture. For a simple CoreMini capture, select "Collect in a one-shot buffer" and enter in 5000 messages for the buffer size. With these settings, the device will capture all incoming messages and split them into buffers of 5000 messages each.

![](/files/R9Blul7ohGfEZ9M0XIVA)

**Storage**\
The settings in this tab tell how to save the data. For this example, leave the defaults.

![](/files/GKz4JpJNYu2oMXrHR9Zz)

**Data**\
This tab shows the data that is being collected as the function block is running. This does not apply to CoreMini Logging. If this script was ran in Vehicle Spy, the captured messages could be viewed here.\
\
That's all that is needed to set up the capture.


---

# Agent Instructions: 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:

```
GET https://docs.intrepidcs.com/vspy-3-documentation/vehicle-spy-tutorials/tutorial-configuring-and-using-coremini/part-2-logging-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
