Component: SerialPort ( Comms): Difference between revisions
Appearance
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 33: | Line 33: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Close''' | ||
|- | |- | ||
| colspan="2" | Closes the serial port | | colspan="2" | Closes the serial port | ||
| Line 47: | Line 47: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetProductId''' | ||
|- | |- | ||
| colspan="2" | Returns the productId of the selected USB COM port | | colspan="2" | Returns the productId of the selected USB COM port | ||
| Line 61: | Line 61: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetVendorId''' | ||
|- | |- | ||
| colspan="2" | Returns the vendortId of the selected USB COM port | | colspan="2" | Returns the vendortId of the selected USB COM port | ||
| Line 75: | Line 75: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Open''' | ||
|- | |- | ||
| colspan="2" | Attempts to open a serial port that has already been selected using RequestPort Returns true if port is successfully opened | | colspan="2" | Attempts to open a serial port that has already been selected using RequestPort Returns true if port is successfully opened | ||
| Line 89: | Line 89: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReceiveString''' | ||
|- | |- | ||
| colspan="2" | Receives a string from the serial port | | colspan="2" | Receives a string from the serial port | ||
| Line 113: | Line 113: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RequestPort''' | ||
|- | |- | ||
| colspan="2" | Asks the user which serial port to use. Returns the selected COM port as a hex string in the form 0xVVVVPPPP where VVVV and PPPP are the vendorID and productID of the USB device. | | colspan="2" | Asks the user which serial port to use. Returns the selected COM port as a hex string in the form 0xVVVVPPPP where VVVV and PPPP are the vendorID and productID of the USB device. | ||
| Line 127: | Line 127: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SendString''' | ||
|- | |- | ||
| colspan="2" | Sends a text string through an open serial port | | colspan="2" | Sends a text string through an open serial port | ||
| Line 147: | Line 147: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Comms Settings | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | MatrixTSL |
| Version | 0.1 |
| Category | Comms |
SerialPort component
Allows connection to a serial port e.g. a standard serial COM port from the browser.
Detailed description
No detailed description exists yet for this component
Examples
Simple Data
Example program showing how to use communicate to a standard serial COM port.
Macro reference
Close
| Close | |
| Closes the serial port | |
| Return | |
GetProductId
| GetProductId | |
| Returns the productId of the selected USB COM port | |
| Return | |
GetVendorId
| GetVendorId | |
| Returns the vendortId of the selected USB COM port | |
| Return | |
Open
| Open | |
| Attempts to open a serial port that has already been selected using RequestPort Returns true if port is successfully opened | |
| Return | |
ReceiveString
| ReceiveString | |
| Receives a string from the serial port | |
| Timeout | |
| Time (in ms) to wait for data | |
| NumChars | |
| Number of characters to try to receive | |
| Return | |
RequestPort
SendString
| SendString | |
| Sends a text string through an open serial port | |
| sText | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_WEBEXP_SerialPort.fcsx
Please click here to view the component source code (Beta): FC_Comp_Source_WEBEXP_SerialPort.fcsx