# Script Type Function Block Command: Set Value

### Command Description

Use this command to assign a value to a signal, such as a [message signal](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-spy-networks/message-editor/message-signals.md) or an [application signal](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/application-signals.md).

### Value Field Parameters

The assignment takes place using the [Expression Builder](/vspy-3-documentation/shared-features-in-vehicle-spy/shared-features-expression-builder.md). Launch it by double-clicking in the **Value** cell for the **Set Value** command. Then enter the signal you want to assign in the **Value To Set** field, and the expression for the value to assign in the **Expression** field.

If the signal is a [Physical IO property](/vspy-3-documentation/shared-features-in-vehicle-spy/shared-features-expression-builder.md#physical-io-properties) then MISC IO reporting in 3G Explorer must be enabled in the hardware.

### Example

Figure 1 shows a simple script that transmits an Automotive Ethernet message using a sequential counter. The first **Set Value** command increments the **Counter** application signal. The second assigns that signal's current value to the **Sequence Counter** signal within the transmit message **Tx Message Ethernet 1**, and sends the message. The script waits for 10 milliseconds, and then repeats.

![Figure 1: Sample sequence counter script illustrating use of the Set Value command.](/files/AyXiEVVnL0kf9fp2ntx8)

Figure 2 shows how the **Set Value** statement in step 2 is set up in the Expression Builder.

![Figure 2: Setup for second Set Value statement in Figure 1.](/files/svWlloWs5Kfja895IiRs)


---

# 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-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-set-value.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.
