SerialPort.GetDataBits
----------------------

Queries the data bit size.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SerialPort](component_SerialPort.md) | [3.1](newinversion31.md) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |

MBS( "SerialPort.GetDataBits"; PortReference ) 

**MBS**( **"SerialPort.GetDataBits";** /\* Queries the data bit size. \*/  
**$PortReference**) /\* The reference number of the port. You get this number from [SerialPort.Open](SerialPortOpen.md) when you open the port.e.g. $port \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PortReference | The reference number of the port. You get this number from [SerialPort.Open](SerialPortOpen.md) when you open the port. | $port |

### Result

Returns data size as number or error message.

### Description

Queries the data bit size.  
Value is 5, 6, 7 or 8.  
### See also

- [SerialPort.GetBaudRate](SerialPortGetBaudRate.md)
- [SerialPort.GetParity](SerialPortGetParity.md)
- [SerialPort.GetStopBits](SerialPortGetStopBits.md)
- [SerialPort.Open](SerialPortOpen.md)
- [SerialPort.SetDataBits](SerialPortSetDataBits.md)
- [SerialPort.SetStopBits](SerialPortSetStopBits.md)

### Blog Entries

- [MBS Filemaker Plugin, version 3.1pr1](https://www.mbsplugins.de/archive/2012-12-14/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 18th August 2014 , last changed 18th August 2014

  
[SerialPort.GetDTR](SerialPortGetDTR.md) - [SerialPort.GetParity](SerialPortGetParity.md)

[HTML Version](SerialPortGetDataBits.shtml)