---
title: "Relay (_Relay class)"
canonical: "https://docs.cuesystem.com/space/CVCHELP/522223617/Relay%20(_Relay%20class)"
format: markdown
---
> Macro (toc)

---

# Close

This function switches the relay ON. 

#### Syntax 

```visualbasic
Function Close()
```

#### Example 

```visualbasic
RE2.Close()
```

This command switches RE2 ON. 

# ClosePulse

This function switches the relay ON and after **pulsetime** switches it OFF. 

#### Syntax 

```visualbasic
Function ClosePulse(pulsetime As Time)
```

#### Parameters 

pulsetime 

[<u>Time</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Time) It is a time of the pulse. 

#### Example 

```visualbasic
RE2.ClosePulse(:1.0)
```

This command switches RE2 ON and after one second switches it OFF. 

# IsClosed

The function returns if a channel is closed or opened. 

#### Syntax 

```visualbasic
Function IsClosed() As Boolean
```

#### Return value 

[<u>Boolean</u>](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean) It is True if the channel is closed, False otherwise. 

#### Example 

```visualbasic
If RE1.IsClosed() Then  
  DebugPrint("RE1 is closed now") 
Else 
  DebugPrint("RE1 is open now") 
End If
```

# Open

This function switches the relay OFF. 

#### Syntax 

```visualbasic
Function Open()
```

#### Example 

```visualbasic
RE1.Open()
```

This command switches RE1 OFF.