Difference between revisions of "Component: COM Port (Runtime Tools)"
From Flowcode Help
Jump to navigationJump to search (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd |- | width="20%" style="color:gray;" | Version | 3.0 |- | width="20%" style="color:gray...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
==COM Port component== | ==COM Port component== | ||
Serial based simulation component for use with systems such as RS232, Bluetooth and USB Serial. | Serial based simulation component for use with systems such as RS232, Bluetooth and USB Serial. | ||
+ | |||
+ | ==Component Pack== | ||
+ | |||
+ | FREE | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
''No detailed description exists yet for this component'' | ''No detailed description exists yet for this component'' | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 106: | Line 138: | ||
| colspan="2" | Maximum number of values to try and receive | | colspan="2" | Maximum number of values to try and receive | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | MSBfirst | | width="90%" | MSBfirst | ||
|- | |- | ||
Line 134: | Line 166: | ||
| colspan="2" | Max time in ms to wait in between bytes | | colspan="2" | Max time in ms to wait in between bytes | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | IgnoreData | | width="90%" | IgnoreData | ||
|- | |- | ||
| colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data | | colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s32-icon.png]] - LONG |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 157: | Line 189: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | MSBfirst | | width="90%" | MSBfirst | ||
|- | |- | ||
Line 185: | Line 217: | ||
| colspan="2" | Number of 16-bit values to send from the array | | colspan="2" | Number of 16-bit values to send from the array | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | MSBfirst | | width="90%" | MSBfirst | ||
|- | |- | ||
Line 203: | Line 235: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG |
| width="90%" | Number | | width="90%" | Number | ||
|- | |- | ||
Line 221: | Line 253: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | MSBfirst | | width="90%" | MSBfirst | ||
|- | |- | ||
Line 257: | Line 289: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | MSBfirst | | width="90%" | MSBfirst | ||
|- | |- | ||
Line 267: | Line 299: | ||
| colspan="2" | Max amount of time in ms to wait between bytes | | colspan="2" | Max amount of time in ms to wait between bytes | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 334: | Line 366: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 370: | Line 402: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | MSBfirst | | width="90%" | MSBfirst | ||
|- | |- | ||
Line 398: | Line 430: | ||
| colspan="2" | Max time in ms to wait in between bytes | | colspan="2" | Max time in ms to wait in between bytes | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | IgnoreData | | width="90%" | IgnoreData | ||
|- | |- | ||
| colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data | | colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 416: | Line 448: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT |
| width="90%" | Number | | width="90%" | Number | ||
|- | |- | ||
Line 444: | Line 476: | ||
| colspan="2" | Number of characters in the string data, 0 for auto, 2 for 0x00, 4 for 0x0000 | | colspan="2" | Number of characters in the string data, 0 for auto, 2 for 0x00, 4 for 0x0000 | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | Prefix | | width="90%" | Prefix | ||
|- | |- | ||
Line 498: | Line 530: | ||
| colspan="2" | Max time in ms to wait in between bytes | | colspan="2" | Max time in ms to wait in between bytes | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | IgnoreData | | width="90%" | IgnoreData | ||
|- | |- | ||
| colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data | | colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | Prefix | | width="90%" | Prefix | ||
|- | |- | ||
Line 549: | Line 581: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | MSBfirst | | width="90%" | MSBfirst | ||
|- | |- | ||
Line 567: | Line 599: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT |
| width="90%" | Value | | width="90%" | Value | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" | MSBfirst | | width="90%" | MSBfirst | ||
|- | |- | ||
Line 691: | Line 723: | ||
| colspan="2" | Auto close the port on Sim stop event | | colspan="2" | Auto close the port on Sim stop event | ||
|- | |- | ||
− | | width="10%" align="center | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
− | + | | width="90%" | New Line Format | |
− | |||
− | |||
− | |||
− | | width="90% | ||
|- | |- | ||
+ | | colspan="2" | | ||
|} | |} |
Latest revision as of 17:23, 9 November 2022
Author | Matrix Ltd |
Version | 3.0 |
Category | Runtime Tools |
Contents
COM Port component
Serial based simulation component for use with systems such as RS232, Bluetooth and USB Serial.
Component Pack
FREE
Detailed description
No detailed description exists yet for this component
Examples
Auto Detect Port Number
This example auto detects and opens a COM Port based on preassigned USB Identifiers VID/PID.
For a known device the VID and PID can be found via Windows device manager.
Downloadable macro reference
![]() |
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 |
![]() |
ConfigureConsole |
![]() |
Status |
![]() |
Return |
![]() |
SendString |
Sends an string of characters to the COM port. | |
![]() |
Data |
Data byte array to send | |
![]() |
Return |
![]() |
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 |
![]() |
SendNumber |
Sends out a number as an ASCII String from the UART interface. | |
![]() |
Number |
![]() |
Return |
![]() |
ClosePort |
Closes the currently open COM port, ending communications and allowing it to be accessed via another application. | |
![]() |
Return |
![]() |
SendByte |
Sends a single byte to be sent out via the COM port. | |
![]() |
Data |
![]() |
Return |
![]() |
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 |
![]() |
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 |
![]() |
GetConsoleHandle |
Gets the handle to the console allowing data displaying on the panel etc. | |
![]() |
Return |
![]() |
SendByteArray |
Sends an array of bytes to the COM port. | |
![]() |
Data |
Data byte array to send | |
![]() |
Length |
Number of bytes to send | |
![]() |
Return |
![]() |
SendFloat |
Sends out a floating point number as an ASCII String from the UART interface. | |
![]() |
Number |
![]() |
Return |
![]() |
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 |
![]() |
OpenPort |
Opens the currently selected COM port, allowing data to be sent and received. | |
![]() |
Return |
![]() |
SetProp |
Allows the COM port property to be set from a parent component. | |
![]() |
PropName |
![]() |
PropVal |
![]() |
Return |
![]() |
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 |
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 |
![]() |
GetProp |
Allows the property filter for the COM port list to be copied to a parent component. | |
![]() |
PropName |
![]() |
Return |