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

---

# Description

This driver serves as generic driver for inputCUE and inputCUE-W inputs.

![image](media://698c8061-e0ac-4522-adb0-d2b2883b1a28)

# Functions

## 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 internal or external reason.

#### Syntax

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

## 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
```

# Events

## OnClose

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 ()
```