> 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.15/vehicle-spy-main-menus/main-menu-measurement/vehiclescape-daq/vehiclescape-daq-standalone-logging-tab/standalone-logging-collections-and-methods/message-capture-method-stop-options/message-capture-method-stop-options-finish-after-collecting-messages-or-when-expression-is-true.md).

# Message Capture Method: Stop Options: Finish After Collecting Messages or When Expression is True

When using the [Message Capture](/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-measurement/vehiclescape-daq/vehiclescape-daq-standalone-logging-tab/standalone-logging-collections-and-methods/collections-and-methods-message-capture-method.md) method for [Standalone Logging](/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-measurement/vehiclescape-daq/vehiclescape-daq-standalone-logging-tab.md) within [VehicleScape DAQ](/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-measurement/vehiclescape-daq.md), selecting **Start immediately** or **Start when expression is true** for the [Start Option](/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-measurement/vehiclescape-daq/vehiclescape-daq-standalone-logging-tab/standalone-logging-collections-and-methods/collections-and-methods-message-capture-method/message-capture-method-start-options.md) causes the [Stop Options](/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-measurement/vehiclescape-daq/vehiclescape-daq-standalone-logging-tab/standalone-logging-collections-and-methods/message-capture-method-stop-options.md) to consist of two choices, as shown in Figure 1:

* **Finish after collecting # messages:** Stop logging when the specified number of messages has been collected after the [Start](/vspy-3-documentation/3.9.15/vehicle-spy-main-menus/main-menu-measurement/vehiclescape-daq/vehiclescape-daq-standalone-logging-tab/standalone-logging-collections-and-methods/collections-and-methods-message-capture-method/message-capture-method-start-options.md) trigger.
* **Finish when expression is true:** Stop logging when the selected expression is true; use the ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/Functionbutton.gif) button to build the expression using the [Expression Editor](/vspy-3-documentation/3.9.15/shared-features-in-vehicle-spy/shared-features-expression-builder.md).

![Figure 1: The Finish after collecting # messages / Finish when expression is true Stop Options.](https://2396693198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlRJv2XDCMeZSU0VbeZlG%2Fuploads%2Fgit-blob-52d129e3e9811817669d4d08eb109553a1ee4359%2Fspyvssalcollectconfigfinishmsgsexpr.gif?alt=media)


---

# 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.15/vehicle-spy-main-menus/main-menu-measurement/vehiclescape-daq/vehiclescape-daq-standalone-logging-tab/standalone-logging-collections-and-methods/message-capture-method-stop-options/message-capture-method-stop-options-finish-after-collecting-messages-or-when-expression-is-true.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.
