> 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.16/application-notes/application-note-coremini-partition-logging/logging-part-2-function-block-setup.md).

# Logging - Part 2: Function Block Setup

### 1. Control Function Block:

The control [function block](/vspy-3-documentation/3.9.16/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block.md) is a script that will tell the capture function block to change partitions when the trigger condition is met.  There are a number of ways to do this script.  The basic functionality would be to:<br>

1. Set your index
2. Wait for condition to change partition
3. Change partition
4. Make sure you are accessing a valid partition

The script in the example is shown below.&#x20;

![](https://content.gitbook.com/content/l4AHCa3zNeJQNFBrgCqy/blobs/blhASSIv2SuhVn6jweUC/appnotCMPartControl.gif)


---

# 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.16/application-notes/application-note-coremini-partition-logging/logging-part-2-function-block-setup.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.
