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

---

# Description

![image](media://64f27a98-1126-4b9b-bc0e-936832bf207d)

# Functions

## Close

This function closes the output pin to the ground by the internal transistor.

#### Syntax

```visualbasic
Function Close ()
```

## ClosePulse

This function closes the output pin to the ground for the specified time pulsetime.

#### Syntax

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

## IsClosed

This function returns True, if the input pin is closed to the ground (pin voltage < 2 V). It returns False if the input/output pin is opened (pin voltage > 2 V). The return value is given by real pin voltage regardless it is due to an internal or external reason.

#### Syntax

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

## Open

This function opens the output pin by the internal transistor.

#### Syntax

```visualbasic
Function Open ()
```

## WaitWhileClosed

This function waits while the input pin is closed. Parameter timeout specifies maximum time for the waiting. If the input is opened before timeout, the function returns True. If the time interval exceeds the specified timeout, the function returns False even if the input pin is still in the closed state.

#### Syntax

```visualbasic
Function WaitWhileClosed (Optional timeout As Time := _TIME_INFINITE) As Boolean
```

## WaitWhileOpened

This function waits while the input pin is opened. Parameter timeout specifies maximum time for the waiting. If the input is closed before timeout, the function returns True. If the time interval exceeds the specified timeout, the function returns False even if the input pin is still in the opened state.

#### Syntax

```visualbasic
Function WaitWhileOpened (Optional timeout As Time := _TIME_INFINITE) As Boolean
```

# Events

## OnClose As Process

This event is raised when the input pin switches between the open and the close state. If this driver is used, it is not possible to link process to direct event of the channel (for example Controller1.DIO1.OnClose).

#### Syntax

```visualbasic
Event OnClose As Process ()
```