Component: COM Port (Runtime Tools): Difference between revisions
Appearance
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
||
| Line 36: | Line 36: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClosePort''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClosePort''' | ||
|- | |- | ||
| Line 50: | Line 50: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConfigureConsole''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConfigureConsole''' | ||
|- | |- | ||
| Line 69: | Line 69: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle''' | ||
|- | |- | ||
| Line 83: | Line 83: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetProp''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetProp''' | ||
|- | |- | ||
| Line 102: | Line 102: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OpenPort''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OpenPort''' | ||
|- | |- | ||
| Line 116: | Line 116: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary16Bit''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary16Bit''' | ||
|- | |- | ||
| Line 140: | Line 140: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary32Bit''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary32Bit''' | ||
|- | |- | ||
| Line 164: | Line 164: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinaryFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinaryFloat''' | ||
|- | |- | ||
| Line 188: | Line 188: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByte''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByte''' | ||
|- | |- | ||
| Line 207: | Line 207: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByteArray''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByteArray''' | ||
|- | |- | ||
| Line 236: | Line 236: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveFloat''' | ||
|- | |- | ||
| Line 260: | Line 260: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveHexNumber''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveHexNumber''' | ||
|- | |- | ||
| Line 289: | Line 289: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveINTArray''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveINTArray''' | ||
|- | |- | ||
| Line 323: | Line 323: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveNumber''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveNumber''' | ||
|- | |- | ||
| Line 347: | Line 347: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString''' | ||
|- | |- | ||
| Line 371: | Line 371: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveStringWithTermination''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveStringWithTermination''' | ||
|- | |- | ||
| Line 405: | Line 405: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScanForDeviceID''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScanForDeviceID''' | ||
|- | |- | ||
| Line 424: | Line 424: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScanForDeviceIDEx''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScanForDeviceIDEx''' | ||
|- | |- | ||
| Line 453: | Line 453: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary16Bit''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary16Bit''' | ||
|- | |- | ||
| Line 477: | Line 477: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary32Bit''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary32Bit''' | ||
|- | |- | ||
| Line 501: | Line 501: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinaryFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinaryFloat''' | ||
|- | |- | ||
| Line 525: | Line 525: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByte''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByte''' | ||
|- | |- | ||
| Line 544: | Line 544: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByteArray''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByteArray''' | ||
|- | |- | ||
| Line 568: | Line 568: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendFloat''' | ||
|- | |- | ||
| Line 587: | Line 587: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendHexNumber''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendHexNumber''' | ||
|- | |- | ||
| Line 616: | Line 616: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendINTArray''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendINTArray''' | ||
|- | |- | ||
| Line 645: | Line 645: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendNumber''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendNumber''' | ||
|- | |- | ||
| Line 664: | Line 664: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString''' | ||
|- | |- | ||
| Line 683: | Line 683: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDTRState''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDTRState''' | ||
|- | |- | ||
| Line 702: | Line 702: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFlowControl''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFlowControl''' | ||
|- | |- | ||
| Line 721: | Line 721: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetProp''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetProp''' | ||
|- | |- | ||
Revision as of 14:17, 13 July 2026
| Author | Matrix Ltd |
| Version | 103.11 |
| Category | Runtime Tools |
COM Port component
Serial based simulation component for use with systems such as RS232, Bluetooth and USB Serial.
Version information
Library Version, Component Version, Date, Author, Info 10, 103.10, 07-04-25, MW, Modified ReceiveArray NumValues from Byte to UInt 11, 103.11, 01-05-25, BR, Changed SendString macro to make it more efficient
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ClosePort
| ClosePort | |
| Closes the currently open COM port, ending communications and allowing it to be accessed via another application. | |
| Return | |
ConfigureConsole
| ConfigureConsole | |
| Status | |
| Return | |
GetConsoleHandle
| GetConsoleHandle | |
| Gets the handle to the console allowing data displaying on the panel etc. | |
| Return | |
GetProp
| GetProp | |
| Allows the property filter for the COM port list to be copied to a parent component. | |
| PropName | |
| Return | |
OpenPort
| OpenPort | |
| Opens the currently selected COM port, allowing data to be sent and received. | |
| Return | |
ReceiveBinary16Bit
ReceiveBinary32Bit
ReceiveBinaryFloat
ReceiveByte
| ReceiveByte | |
| Attempts to receive a byte using the COM port No valid return data is provided by the timeout value property. | |
| Timeout | |
| Time to wait for incoming data in milliseconds | |
| Return | |
ReceiveByteArray
ReceiveFloat
ReceiveHexNumber
ReceiveINTArray
ReceiveNumber
ReceiveString
ReceiveStringWithTermination
ScanForDeviceID
| ScanForDeviceID | |
| Checks to see if a device VID/PID string is present and returns the COM port number. Returns 0 if device not found. | |
| HWID | |
| Example: "VID_12BF&PID_0101" | |
| Return | |
ScanForDeviceIDEx
SendBinary16Bit
| SendBinary16Bit | |
| Sends out a 16-bit binary value split across two bytes. | |
| Value | |
| MSBfirst | |
| 0=Least significant byte first, 1=Most significant byte first | |
| Return | |
SendBinary32Bit
| SendBinary32Bit | |
| Sends out a 32-bit binary value split across four bytes. | |
| Value | |
| MSBfirst | |
| 0=Least significant byte first, 1=Most significant byte first | |
| Return | |
SendBinaryFloat
| SendBinaryFloat | |
| Sends out a 32-bit binary floating point value split across four bytes. | |
| Value | |
| MSBfirst | |
| 0=Least significant byte first, 1=Most significant byte first | |
| Return | |
SendByte
| SendByte | |
| Sends a single byte to be sent out via the COM port. | |
| Data | |
| Return | |
SendByteArray
| SendByteArray | |
| Sends an array of bytes to the COM port. | |
| Data | |
| Data byte array to send | |
| Length | |
| Number of bytes to send | |
| Return | |
SendFloat
| SendFloat | |
| Sends out a floating point number as an ASCII String from the UART interface. | |
| Number | |
| Return | |
SendHexNumber
SendINTArray
SendNumber
| SendNumber | |
| Sends out a number as an ASCII String from the UART interface. | |
| Number | |
| Return | |
SendString
| SendString | |
| Sends an string of characters to the COM port. | |
| Data | |
| Data byte array to send | |
| Return | |
SetDTRState
| SetDTRState | |
| Allows the DTR signal to be enabled or disabled. | |
| State | |
| A value of 0 disables the DTR, 1 or above willl enable the DTR. | |
| Return | |
SetFlowControl
| SetFlowControl | |
| Allows the Flowcontrol signals to be enabled or disabled. | |
| State | |
| A value of 0 disables flow control, 1 or above willl enable flow control. | |
| Return | |
SetProp
| SetProp | |
| Allows the COM port property to be set from a parent component. | |
| PropName | |
| PropVal | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_COM_Port_1.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_COM_Port_1.fcfx