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.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

SerialPort.Open

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 } )

Parameters

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.
0

Result

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

Description

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.

Examples

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.




Links
MBS Xojo Chart Plugins