Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1    Statistic  


Opens a serial port.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
SerialPort 3.0 Yes Yes Yes No No

MBS( "SerialPort.Open"; PortName { ; Index } )


Parameter Description Example value
PortName The name of the serial port to open. "COM1"
Index Optional
In case you have several ports with same name, you can specify an index here. Zero for first port with given name, 1 for the second port with given name.


Returns the port reference value which you pass to other SerialPort functions.


Opens a serial port.
You get the names from SerialPort.List function.
The port is opened with default settings.
Serial Port reference numbers are starting at 28000 and counting up for each new port.

Even if port is not showing in list, it may still open here, e.g. virtual COM ports on Windows.
You can open several ports with different connections, e.g. by calling SerialPort.Open once for each connection.


Open port and close it:

$port = MBS( "SerialPort.Open"; "COM1" )
$r = MBS( "SerialPort.Write"; $port; "Hello")
$r = MBS( "SerialPort.Close"; $port )

See also

Example Databases

SerialPort.List   -   SerialPort.Read

Feedback: Report problem or ask question.

MBS Xojo Plugins