---
title: "DMX Slave Device Drivers"
canonical: "https://docs.cuesystem.com/space/CVCHELP/522682413/DMX%20Slave%20Device%20Drivers"
format: markdown
---
> Macro (toc)

---

# Description

DMX (DMX512 - Digital MultipleX) slave device drivers are dedicated to controlling one slave device with a given address. DMX channel is dedicated to connecting this DMX Slave Device drivers. DMX channel is implemented as an internal channel of controller controlCUE-dmx-d. 

# Properties

All DMX slave devices drivers have the following properties: 

**Address **of the slave device. It is the address of the output slave device in range 1 – 512. 

If the address is not valid, an error message will appear in the CVC Debug Window. For example: “ERROR: Property DMX Address must be in range 1 - 512, your current value is 0”. To display these error messages, the project should be run in the debug mode (simulation or hardware) with checked Display Debug Messages. 

# GetAddress

This function returns the address of the DMX slave device driver. This address is set by the given property of the driver. 

#### Syntax 

```visualbasic
Function GetDPT() As Long
```

# **DMX Basic Slave Device Driver**

# Description

DMX basic slave device driver represents the basic function of DMX slave devices. The driver also sets the DMX channel to which it is connected to the output mode. 

# GetLevel

This function gets the actual output percent level in the range of 0.0 - 100.0. It returns 0 if the slave device driver address is out of range 1 – 512. 

#### Syntax 

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

#### Return value 

[<u>Double</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Double) It is slave device percent level in range 0.0 - 100.0 

# ChangeLevel

This function increases (percentlevelchange is positive) or decreases (percentlevelchange is negative) slave device percent level within ramptime. The new_percentlevel := old_percentlevel + percentlevelchange. 

#### Syntax 

```visualbasic
Function ChangeLevel(
  percentlevelchange As Double, 
  Optional ramptime As Time := :0) 
As Boolean
```

#### Parameters 

percentlevelchange 

[<u>Double</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Double) It is slave device percent level change in range 0.0 - 100.0 

ramptime 

[<u>Time</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Time) Optional, defaults to :0. It is the time of the ramp. If it is :0 by default, the level is set immediately. 

#### Return value 

[<u>Boolean</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean) This function returns True on success or False if an error occurs. A function [<u>GetLastError</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#GetLastError) returns the error number that occurred while executing the command. The errors that can happen: [<u>216</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#216). 

# SetLevel

This function sets slave device percent level 0.0 - 100.0 within ramptime. 

#### Syntax 

```visualbasic
Function SetLevel (
  percentlevel As Double, 
  Optional ramptime As Time := :0) 
As Boolean
```

#### Parameters 

percentlevel 

[<u>Double</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Double) It is slave device percent level in range 0.0 - 100.0 

ramptime 

[<u>Time</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Time) Optional, defaults to :0. It is the time of the ramp. If it is :0 by default, the level is set immediately. 

#### Return value 

[<u>Boolean</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean) This function returns True on success or False if an error occurs. A function [<u>GetLastError</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#GetLastError) returns the error number that occurred while executing the command. The errors that can happen: [<u>216</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#216). 

# StopAtCurrentLevel

This function stops slave device level change on the current level and returns this percent level. 

#### Syntax 

```visualbasic
Function StopAtCurrentLevel() As Double
```

#### Return value 

[<u>Double</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Double) It is slave device percent level in range 0.0 - 100.0