SerialPort.SetCTS
-----------------

Sets CTS mode.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SerialPort](component_SerialPort.md) | [3.4](newinversion34.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |

MBS( "SerialPort.SetCTS"; PortReference; Value ) 

**MBS**( **"SerialPort.SetCTS";** /\* Sets CTS mode. \*/  
**$PortReference**; /\* The reference number of the port. You get this number from [SerialPort.Open](SerialPortOpen.md) when you open the port.e.g. $port \*/   
**$Value**) /\* 0 to turn off, 1 to turn on.e.g. 1 \*/ 

### 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 |
| Value | 0 to turn off, 1 to turn on. | 1 |

### Result

Returns OK or error message.

### Description

Sets CTS mode.  
If enabled, the CTS (clear-to-send) signal is monitored for output flow control.   
Then if CTS is turned off, output is suspended until CTS is sent again.  
### Examples

Turn CTS mode on:

 MBS ( "SerialPort.SetCTS"; $SerialPort ; 1 )  
### See also

- [SerialPort.GetCTS](SerialPortGetCTS.md)
- [SerialPort.GetRTS](SerialPortGetRTS.md)
- [SerialPort.GetXON](SerialPortGetXON.md)
- [SerialPort.Open](SerialPortOpen.md)
- [SerialPort.Resume](SerialPortResume.md)
- [SerialPort.SetDSR](SerialPortSetDSR.md)
- [SerialPort.SetDTR](SerialPortSetDTR.md)
- [SerialPort.SetRTS](SerialPortSetRTS.md)
- [SerialPort.Setup](SerialPortSetup.md)
- [SerialPort.SetXON](SerialPortSetXON.md)

### Release notes

- **Version 12.3**
    - Implemented [SerialPort.GetCTS](https://www.mbsplugins.eu/SerialPortGetCTS.shtml), [SerialPort.GetDSR](https://www.mbsplugins.eu/SerialPortGetDSR.shtml), [SerialPort.GetDTR](https://www.mbsplugins.eu/SerialPortGetDTR.shtml), [SerialPort.GetRTS](https://www.mbsplugins.eu/SerialPortGetRTS.shtml), [SerialPort.SetCTS](https://www.mbsplugins.eu/SerialPortSetCTS.shtml), [SerialPort.SetDSR](https://www.mbsplugins.eu/SerialPortSetDSR.shtml), [SerialPort.SetDTR](https://www.mbsplugins.eu/SerialPortSetDTR.shtml), and [SerialPort.SetRTS](https://www.mbsplugins.eu/SerialPortSetRTS.shtml) for Linux.

### Blog Entries

- [MBS FileMaker Plugin, version 12.3pr1](https://www.mbsplugins.de/archive/2022-06-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 18th August 2014 , last changed 30th May 2022

  
[SerialPort.SetBaudRate](SerialPortSetBaudRate.md) - [SerialPort.SetDSR](SerialPortSetDSR.md)

[HTML Version](SerialPortSetCTS.shtml)