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

---

# Description

This driver allows install bi-directional serial drivers to IR/Serial Output channel. It supports only RS-232 serial mode and flow control types which are compatible with used IR/Serial Output channel. These flow control types depend on a type of the unit. For more details see CVC Help.

![image](media://abef0f72-4d8d-47fb-a41d-560928f1a2dc)

# Functions

## ClearReceiveBuffer

This function does nothing.

#### Syntax

```visualbasic
Function ClearReceiveBuffer ()
```

## Receive

This function only sets receiveddata to empty and returns True immediately.

#### Syntax

```visualbasic
Function Receive (ByRef receiveddata As ByteString, Optional timeout As Time := :10.0, Optional maxbytestoreceive As Long := 0) As Boolean
```

## ReceiveAppend

This function only sets receivebuffer to empty and returns True immediately.

#### Syntax

```visualbasic
Function ReceiveAppend (ByRef receivebuffer As ByteString, Optional timeout As Time : = :10.0) As Boolean
```

## ReceiveFPacket

This function only sets receivedbody to empty and returns True immediately.

#### Syntax

```visualbasic
Function ReceiveFPacket (ByRef receivedbody As ByteString, footer As ByteString, Optional timeout As Time : = :10.0) As Boolean
```

## ReceiveHFPacket

This function only sets receivedbody to empty and returns True immediately.

#### Syntax

```visualbasic
Function ReceiveHFPacket (ByRef receivedbody As ByteString, header As ByteString, footer As ByteString, Optional timeout As Time : = :10.0) As Boolean
```

## ReceiveHLPacket

This function only sets receivedbody to empty and returns True immediately.

#### Syntax

```visualbasic
Function ReceiveHLPacket (ByRef receivedbody As ByteString, header As ByteString, bodylength As Long, Optional timeout As Time : = :10.0) As Boolean
```

## ReceiveSyncFrame

This function does nothing and returns True immediately.

#### Syntax

```visualbasic
Function ReceiveSyncFrame ( syncframe As ByteString, Optional timeout As Time : = :10.0) As Boolean
```

## Send

This function sends a datatosend to the channel. It returns True on success or False if a datatosend is not accessible.

#### Syntax

```visualbasic
Function Send (datatosend As ByteString) As Boolean
```

## SetSerialParameters

This function sets communication parameters of the serial channel. It returns True on success or False if some error occurs. Parameters are as follows.

#### Syntax

```visualbasic
Function SetSerialParameters (mode As Byte, bitspersecond As Long, databits As Byte, parity As Byte, stopbits As Byte, flowcontrol As Byte, ParamArray) As Boolean
```

#### Parameters

mode

It is the mode of the channel. Predefined constants for parameter mode are as follows:

|  |  |  |
| --- | --- | --- |
| Name | Value | Description |
| _SERIAL_MODE_RS232 | 0 | Channel is in RS232 mode. |

bitspersecond

It is the baud rate from 75 to 115200. 

databits

It is the number of data bits from 5 to 8.

parity

It is the type of the parity. Predefined constants for parameter parity are as follows:

|  |  |  |
| --- | --- | --- |
| Name | Value | Description |
| _SERIAL_PARITY_NO | 0 | No parity. |
| _SERIAL_PARITY_ODD | 1 | Odd parity. |
| _SERIAL_PARITY_EVEN | 2 | Even parity. |

 stopbits

It is the number of stop bits. Predefined constants for parameter stopbits are as follows:

|  |  |  |
| --- | --- | --- |
| Name | Value | Description |
| _SERIAL_STOPBITS_ONE | 0 | One stop bit. |
| _SERIAL_STOPBITS_ONEANDHALF | 1 | One and one half stop bits. |
| _SERIAL_STOPBITS_TWO | 2 | Two stop bits. |

flowcontrol

It is the type of the control. Predefined constants for parameter flowcontrol are as follows:

|  |  |  |
| --- | --- | --- |
| Name | Value | Description |
| _SERIAL_FLOWCONTROL_NONE | 0 | No handshake. |
| _SERIAL_FLOWCONTROL_DELAY | 4 | Specifies the delay time between bytes. It must be specified in the next parameter ParamArray. |

ParamArray

They are parameters of the flow. This parameter is used together with flowcontrol _SERIAL_FLOWCONTROL_DELAY. Then parameter is 

timedelay As Time

It is the delay time between bytes.

## WaitForData

This function does nothing and returns True immediately.

#### Syntax

```visualbasic
Function WaitForData (Optional timeout As Time : = :10.0) As Boolean
```

# Events

This driver has no events.