Close Serial Port (script step reference)

Troi Serial Plug-in > Script steps reference > Close Serial Port
Troi Serial Plug-in for FileMaker Pro

Close Serial Port

Closes a serial port with the specified name.

SyntaxScript step badge

Close Serial Port [ Select ; Result (error) ; Port name ]

Options

Select entire contentsreplaces the entire contents of a field with the result. If not checked the result is added to the currently selected portion of the field
Result (error)an error code
Port namethe 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 9.0

Compatibility

FileMaker Pro 16

Considerations

If the “Port name” option is empty or “” all ports are closed.

Example

This will close the COM3 port:

Close Serial Port [ Select ; $ErrorCode ; "COM3" ]

Example 2

This will close all open ports:

Close Serial Port [ Select ; $ErrorCode ; "" ]

Related script stepScript step badge

Open Serial Port

Related functionsFunction badge

Serial_Close
Serial_Open

Online Help Page for Troi Serial Plug-in for 12 to 16 –> Close Serial Port (serip7800) 2017-0525 11:06:07