Skip to main content

Serial_Close (function reference)

By July 1, 2023July 17th, 2023Online Help, Troi Serial Plug-in
Troi Serial Plug-in for FileMaker Pro

Serial_Close

Closes a serial port with the specified name.

SyntaxFunction badge

Serial_Close ( switches ; portname )

Parameters

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

Returned Result

Data type returned

Error code

Result

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

0 no error the port was closed
$$-4210 portDoesNotExistErr port is not available on this computer
$$-4211 AllPortsNullErr no serial ports are available on this computer
$$-108 memFullErr ran out of memory

Other errors may be returned.

Originated in

Troi Serial Plug-in 3.0

Compatibility

FileMaker Pro 16 to FileMaker Pro 2023

Considerations

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

Example

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" ; "" ) ]

Used in example files

SimpleSerial.fmp12
Terminal.fmp12

Related functionFunction badge

Serial_Open

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 16 to 2023 –> Serial_Close (serip4800) 2023-0717 12:45:45

troi.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping us to understand which sections of the website you find most interesting and useful.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.