Serial_Close (function reference)

By September 1, 2019 September 4th, 2019 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 14 to 18

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 14 to 18 –> Serial_Close (serip4800) 2019-0904 11:28:35