---
title: "AnalogOut"
canonical: "https://docs.cuesystem.com/space/CVCDD/439877653/AnalogOut"
format: markdown
---
> Macro (toc)

---

# Functions

## SetLevel

This function sets a newlevel in percentage on an analog channel within ramptime. Newlevel = 100 sets analog output to 10 V, newlevel = 0 sets analog output to 0 V. Ramptime is a time within the change take place. If it is :0 (by default) the voltage is set immediately.

#### Syntax

```visualbasic
Function SetLevel (newlevel As Double, Optional ramptime As Time := :0.0)
```

## ChangeLevel

This function increases (newleveldifference is positive) or decreases (newleveldifference is negative) level in percentage on an analog channel within ramptime. The new_level := old_level + newleveldifference.

Ramptime is a time within the change take place. If it is :0 (by default) the voltage is changed immediately.

```visualbasic
Function ChangeLevel (newleveldifference As Double, Optional ramptime As Time := :0.0)
```

## GetLevel

#### Syntax

```visualbasic
Function GetLevel () As Double
```

This function returns the current percentage level on an analog channel. Level 100 means 10 V, and level 0 means 0 V.

## SetVoltage

This function sets the voltage on an analog channel to a value in volts within ramptime. Ramptime is a time within the change take place. If it is :0 (by default) the voltage is set immediately.

#### Syntax

```visualbasic
Function SetVoltage (volts As Double, Optional ramptime As Time := :0.0)
```

## ChangeVoltage

This function increases (voltsdifference is positive) or decreases (voltsdifference is negative) voltage on an analog channel within ramptime. The new_voltage := old_voltage + voltsdifference. Ramptime is a time within the change take place. If it is :0 (by default) the voltage is changed immediately.

#### Syntax

```visualbasic
Function ChangeVoltage (voltsdifference As Double, Optional ramptime As Time := :0.0)
```

## GetVoltage

This function returns current voltage on an analog channel.

#### Syntax

```visualbasic
Function GetVoltage () As Double
```