Serial_Close (function reference)

By May 10, 2017 August 6th, 2018 Online 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

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

Result

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

Compatibility

FileMaker Pro 13 to 17

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

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 13 to 17 –> Serial_Close (serip4800) 2018-0806 08:41:09