Back to FabImage Studio website

You are here: Start » Filter Reference » System » Serial Port » SerialPort_Config

SerialPort_Config


Module: FoundationLite

Configures the serial port.

Name Type Range Description
Input value inPortId Integer 0 - 7 Identifies open port instance when working with multiple serial ports
Input value inPort String Serial port name
Input value inBaudRate Integer 1 - Serial baud rate
Input value inParity SerialPortParity Serial parity
Input value inDataBits Integer 5 - 8 Serial character size
Input value inFlowControl SerialPortFlowControl Serial flow control
Input value inStopBits SerialPortStopBits Serial stop bits

Description

Filter creates serial port connection and set its parameters.

Typically values for inBaudRate: 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200.

By using parameter inPortId up to 8 simultaneous connection can be handled. Trying to configure already created connection identified by inPortId will result in "Access denied" error.

Examples

Description of usage of this filter can be found in examples and tutorial: IO Serial Port Communicator.

Remarks

Using the SerialPort_Config filter is necessary before using other filters for serial communication.

Filter SerialPort_Config creates connection only on first execution all next execution will have no effect.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

Trying to connect to port that is already opened will result in error "Could not initialize serial port. open: Access is denied".

Trying to connect to not existing port will result in error "Could not initialize serial port. open: The system cannot find the file specified".

List of possible exceptions:

Error type Description
DomainError Empty port name in SerialPort_Config.
Empty port name is invalid. Typical port names are COM1, COM2, etc.

Complexity Level

This filter is available on Basic Complexity Level.

Disabled in Lite Edition

This filter is disabled in Lite Edition. It is available only in full, FabImage Studio Professional version.

See Also