Serial_Close (function reference)

By May 10, 2017 August 6th, 2018 Online Help, Troi Serial Plug-in
Troi Serial Plug-in for FileMaker Pro


Closes a serial port with the specified name.

SyntaxFunction badge

Serial_Close ( switches ; portname )


switchesnot used, reserved for future use. Leave blank or put "-Unused"
portnamethe name of the port to close

Returned Result

Data type returned

Error code


The returned result is an error code. Returned error codes can be:

0no errorthe port was closed
$$-4210portDoesNotExistErrport is not available on this computer
$$-4211AllPortsNullErrno serial ports are available on this computer
$$-108memFullErrran out of memory

Other errors may be returned.

Originated in

Troi Serial Plug-in 3.0


FileMaker Pro 13 to 17


If the portname parameter is “” all ports are closed.


This will close the COM3 port:

Set Field [ gErrorCode ; Serial_Close ( "-Unused" ; "COM3" ) ]

Example 2

This will close all open ports:

Set Field [ gErrorCode ; Serial_Close ( "-Unused" ; "" ) ]

Related functionFunction badge


Related script stepScript step badge

Close Serial Port

Related topics

Troi Serial Plug-in online help (overview)

Online Help Page for Troi Serial Plug-in for 13 to 17 –> Serial_Close (serip4800) 2018-0806 08:41:09