Phidget.Close
-------------

Closes a Phidget channel that has been opened.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Phidget](component_Phidget.md) | [13.4](newinversion134.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |

MBS( "Phidget.Close"; PhidgetRef ) 

**MBS**( **"Phidget.Close";** /\* Closes a Phidget channel that has been opened. \*/  
**$PhidgetRef**) /\* The reference number for the phidget.e.g. $phidget \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PhidgetRef | The reference number for the phidget. | $phidget |

### Result

Returns OK or error.

### Description

Closes a Phidget channel that has been opened.  
This function will release the channel on the Phidget device, and should be called prior to [Phidget.Release](PhidgetRelease.md).  
### Examples

Closes the device and free memory:

 If \[ Length ( $$phidget ) &gt; 0 \]   
 Set Variable \[ $r ; Value: MBS ("Phidget.Close"; $$phidget ) \]   
 Set Variable \[ $r ; Value: MBS ("[Phidget.Release](PhidgetRelease.md)"; $$phidget ) \]   
 Set Variable \[ $$phidget ; Value: "" \]   
End If  
### See also

- [Phidget.Clear](PhidgetClear.md)
- [Phidget.Flush](PhidgetFlush.md)
- [Phidget.Release](PhidgetRelease.md)

### Release notes

- **Version 15.5**
    - Changed [Phidget.Release](https://www.mbsplugins.eu/PhidgetRelease.shtml) to automatically call [Phidget.Close](https://www.mbsplugins.eu/PhidgetClose.shtml) internally if needed.

### Example Databases

- [Phidgets/Phidget Barometer](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Phidgets/Phidget%20Barometer.shtml#3ScriptAnchor_)
- [Phidgets/Phidget Digital Outputs](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Phidgets/Phidget%20Digital%20Outputs.shtml#3ScriptAnchor_)
- [Phidgets/Phidget Distance Sensor](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Phidgets/Phidget%20Distance%20Sensor.shtml#3ScriptAnchor_)
- [Phidgets/Phidget IR Receiver](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Phidgets/Phidget%20IR%20Receiver.shtml#3ScriptAnchor_)
- [Phidgets/Phidget LCD](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Phidgets/Phidget%20LCD.shtml#3ScriptAnchor_)
- [Phidgets/Phidget Light Sensor](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Phidgets/Phidget%20Light%20Sensor.shtml#3ScriptAnchor_)
- [Phidgets/Phidget Temperator Sensor](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Phidgets/Phidget%20Temperator%20Sensor.shtml#3ScriptAnchor_)
- [Phidgets/Phidget Voltage Input](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Phidgets/Phidget%20Voltage%20Input.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 15.5pr5](https://www.mbsplugins.de/archive/2025-10-27/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin Advent calendar: 10 - Phidgets](https://www.mbsplugins.de/archive/2023-12-10/MBS_Plugin_Advent_calendar_10_/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 16th August 2023 , last changed 17th August 2023

  
[Phidget.ClearScriptTrigger](PhidgetClearScriptTrigger.md) - [Phidget.Create](PhidgetCreate.md)

[HTML Version](PhidgetClose.shtml)