Difference between revisions of "Component: COM Port (Runtime Tools)"

From Flowcode Help
Jump to navigationJump to search
 
(11 intermediate revisions by the same user not shown)
Line 15: Line 15:
 
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==
+
==Component Source Code==
  
FREE
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_COM_Port.fcfx FC_Comp_Source_COM_Port.fcfx]
 +
 
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_COM_Port.fcfx FC_Comp_Source_COM_Port.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 36: Line 54:
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 60: Line 94:
  
  
==Downloadable macro reference==
 
  
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
==Macro reference==
 +
 +
===ClosePort===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByte'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClosePort'''
 
|-
 
|-
| colspan="2" | Attempts to receive a byte using the COM port No valid return data is provided by the timeout value property. 
+
| colspan="2" | Closes the currently open COM port, ending communications and allowing it to be accessed via another application. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | Timeout
 
|-
 
| colspan="2" | Time to wait for incoming data in milliseconds 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ConfigureConsole===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 98: Line 139:
  
  
 +
===GetConsoleHandle===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle'''
 +
|-
 +
| colspan="2" | Gets the handle to the console allowing data displaying on the panel etc. 
 +
|-
 +
|-
 +
| 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''
 +
|}
 +
 +
 +
===GetProp===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetProp'''
 
|-
 
|-
| colspan="2" | Sends an string of characters to the COM port. 
+
| colspan="2" | Allows the property filter for the COM port list to be copied to a parent component. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Data
+
| width="90%" | PropName
 
|-
 
|-
| colspan="2" | Data byte array to send 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===OpenPort===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveINTArray'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OpenPort'''
 
|-
 
|-
| colspan="2" | Receives an array of 16-bit INT/UINT values and returns the number of values received. 
+
| colspan="2" | Opens the currently selected COM port, allowing data to be sent and received. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | Data
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 
 +
 
 +
===ReceiveBinary16Bit===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
| colspan="2" | Array to store the incoming data 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary16Bit'''
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| colspan="2" | Receives a binary 16-bit value split across two bytes. 
| width="90%" | NumValues
 
 
|-
 
|-
| colspan="2" | Maximum number of values to try and receive 
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
Line 144: Line 205:
 
| 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:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ReceiveBinary32Bit===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveNumber'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary32Bit'''
 +
|-
 +
| colspan="2" | Receives a binary 32-bit value split across four bytes. 
 +
|-
 
|-
 
|-
| colspan="2" | Attempts to receive a number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | MSBfirst
 
|-
 
|-
 +
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Timeout
 
| width="90%" | Timeout
 
|-
 
|-
| colspan="2" | Max time in ms to wait in 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:Fc9-u32-icon.png]] - ULONG
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 
 +
 
 +
===ReceiveBinaryFloat===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinaryFloat'''
 +
|-
 +
| colspan="2" | Receives a binary 32-bit floating point value split across four bytes. 
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | IgnoreData
+
| width="90%" | MSBfirst
 +
|-
 +
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Timeout
 
|-
 
|-
| colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data 
+
| colspan="2" | Max amount of time in ms to wait between bytes 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s32-icon.png]] - LONG
+
| 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''
 
|}
 
|}
  
  
 +
===ReceiveByte===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary16Bit'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByte'''
 
|-
 
|-
| colspan="2" | Sends out a 16-bit binary value split across two bytes. 
+
| colspan="2" | Attempts to receive a byte using the COM port No valid return data is provided by the timeout value property. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Value
+
| width="90%" | Timeout
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Time to wait for incoming data in milliseconds 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | MSBfirst
 
|-
 
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ReceiveByteArray===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendINTArray'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByteArray'''
 
|-
 
|-
| colspan="2" | Transmits an array of 16-bit INT/UINT values via the UART peripheral 
+
| colspan="2" | Attempts to receive an array of bytes using the COM port Returns the number of bytes received.  
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Data
 
| width="90%" | Data
 
|-
 
|-
| colspan="2" | Data to transmit 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | NumValues
+
| width="90%" | MaxLength
 
|-
 
|-
| colspan="2" | Number of 16-bit values to send from the array 
+
| colspan="2" | Max number of bytes to try and read 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | MSBfirst
+
| width="90%" | Timeout
 
|-
 
|-
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
+
| colspan="2" | Time to wait for incoming data in milliseconds 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ReceiveFloat===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendNumber'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveFloat'''
 +
|-
 +
| colspan="2" | Attempts to receive a floating point number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
 +
|-
 
|-
 
|-
| colspan="2" | Sends out a number as an ASCII String from the UART interface. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Timeout
 
|-
 
|-
 +
| colspan="2" | Max time in ms to wait in between bytes 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Number
+
| width="90%" | IgnoreData
 
|-
 
|-
| colspan="2" |  
+
| 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:Fc9-void-icon.png]] - VOID
+
| 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''
 
|}
 
|}
  
  
 +
===ReceiveHexNumber===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary32Bit'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveHexNumber'''
 +
|-
 +
| colspan="2" | Attempts to receive a hex number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none hexadecimal char is received, the none numeric char will be lost. 
 +
|-
 
|-
 
|-
| colspan="2" | Receives a binary 32-bit value split across four bytes. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Timeout
 
|-
 
|-
 +
| colspan="2" | Max time in ms to wait in between bytes 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | MSBfirst
+
| width="90%" | IgnoreData
 
|-
 
|-
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
+
| colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Timeout
+
| width="90%" | Prefix
 
|-
 
|-
| colspan="2" | Max amount of time in ms to wait between bytes 
+
| colspan="2" | Look for prefix before receiving, 1=0xFF, 0=FF 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
Line 264: Line 359:
  
  
 +
===ReceiveINTArray===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClosePort'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveINTArray'''
 
|-
 
|-
| colspan="2" | Closes the currently open COM port, ending communications and allowing it to be accessed via another application. 
+
| colspan="2" | Receives an array of 16-bit INT/UINT values and returns the number of values received. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Data
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Array to store the incoming data 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinaryFloat'''
 
 
|-
 
|-
| colspan="2" | Receives a binary 32-bit floating point value split across four bytes. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | NumValues
 
|-
 
|-
 +
| colspan="2" | Maximum number of values to try and receive 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
Line 295: Line 388:
 
| 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:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ReceiveNumber===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByte'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveNumber'''
 
|-
 
|-
| colspan="2" | Sends a single byte to be sent out via the COM port. 
+
| colspan="2" | Attempts to receive a number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
+
| width="90%" | Timeout
 +
|-
 +
| colspan="2" | Max time in ms to wait in between bytes 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | IgnoreData
 
|-
 
|-
| colspan="2" |  
+
| 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:Fc9-void-icon.png]] - VOID
+
| 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''
 
|}
 
|}
  
  
 +
===ReceiveString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDTRState'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString'''
 +
|-
 +
| colspan="2" | Attempts to receive an string using the COM port Returns the number of bytes received.  
 +
|-
 
|-
 
|-
| colspan="2" | Allows the DTR signal to be enabled or disabled. 
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Timeout
 
|-
 
|-
 +
| colspan="2" | Time to wait for incoming data in milliseconds 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | State
+
| width="90%" | MaxLength
 
|-
 
|-
| colspan="2" | A value of 0 disables the DTR, 1 or above willl enable the DTR. 
+
| colspan="2" | Max number of bytes to try and read 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ScanForDeviceID===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 354: Line 460:
  
  
 +
===SendBinary16Bit===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary16Bit'''
 +
|-
 +
| colspan="2" | Sends out a 16-bit binary value split across two bytes. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Value
 +
|-
 +
| colspan="2" |  
 
|-
 
|-
| colspan="2" | Gets the handle to the console allowing data displaying on the panel etc. 
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | MSBfirst
 
|-
 
|-
 +
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SendBinary32Bit===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByteArray'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary32Bit'''
 
|-
 
|-
| colspan="2" | Sends an array of bytes to the COM port. 
+
| colspan="2" | Sends out a 32-bit binary value split across four bytes. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Data
+
| width="90%" | Value
 
|-
 
|-
| colspan="2" | Data byte array to send 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Length
+
| width="90%" | MSBfirst
 
|-
 
|-
| colspan="2" | Number of bytes to send 
+
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 390: Line 508:
  
  
 +
===SendBinaryFloat===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveBinary16Bit'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinaryFloat'''
 +
|-
 +
| colspan="2" | Sends out a 32-bit binary floating point value split across four bytes. 
 +
|-
 
|-
 
|-
| colspan="2" | Receives a binary 16-bit value split across two bytes. 
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Value
 
|-
 
|-
 +
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
Line 402: Line 526:
 
|-
 
|-
 
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
===SendByte===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByte'''
 +
|-
 +
| colspan="2" | Sends a single byte to be sent out via the COM port. 
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Timeout
+
| width="90%" | Data
 
|-
 
|-
| colspan="2" | Max amount of time in ms to wait between bytes 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SendByteArray===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveFloat'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByteArray'''
 
|-
 
|-
| colspan="2" | Attempts to receive a floating point number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
+
| colspan="2" | Sends an array of bytes to the COM port. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Timeout
+
| width="90%" | Data
 
|-
 
|-
| colspan="2" | Max time in ms to wait in between bytes 
+
| colspan="2" | Data byte array to send 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | IgnoreData
+
| width="90%" | Length
 
|-
 
|-
| colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data 
+
| colspan="2" | Number of bytes to send 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SendFloat===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 454: Line 594:
  
  
 +
===SendHexNumber===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 482: Line 623:
  
  
 +
===SendINTArray===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFlowControl'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendINTArray'''
 
|-
 
|-
| colspan="2" | Allows the Flowcontrol signals to be enabled or disabled. 
+
| colspan="2" | Transmits an array of 16-bit INT/UINT values via the UART peripheral 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | State
+
| width="90%" | Data
 
|-
 
|-
| colspan="2" | A value of 0 disables flow control, 1 or above willl enable flow control. 
+
| colspan="2" | Data to transmit 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | NumValues
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Number of 16-bit values to send from the array 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OpenPort'''
 
 
|-
 
|-
| colspan="2" | Opens the currently selected COM port, allowing data to be sent and received. 
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | MSBfirst
 
|-
 
|-
 +
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 513: Line 652:
  
  
 +
===SendNumber===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveHexNumber'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendNumber'''
 
|-
 
|-
| colspan="2" | Attempts to receive a hex number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none hexadecimal char is received, the none numeric char will be lost. 
+
| colspan="2" | Sends out a number as an ASCII String from the UART interface. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| width="90%" | Timeout
+
| width="90%" | Number
 
|-
 
|-
| colspan="2" | Max time in ms to wait in between bytes 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | IgnoreData
 
|-
 
| colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data 
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="90%" | Prefix
 
|-
 
| colspan="2" | Look for prefix before receiving, 1=0xFF, 0=FF 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SendString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetProp'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString'''
 
|-
 
|-
| colspan="2" | Allows the COM port property to be set from a parent component. 
+
| colspan="2" | Sends an string of characters to the COM port. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | PropName
+
| width="90%" | Data
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Data byte array to send 
|-
 
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
 
| width="90%" | PropVal
 
|-
 
| colspan="2" |  
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 564: Line 690:
  
  
 +
===SetDTRState===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinary32Bit'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDTRState'''
 
|-
 
|-
| colspan="2" | Sends out a 32-bit binary value split across four bytes. 
+
| colspan="2" | Allows the DTR signal to be enabled or disabled. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
+
| width="90%" | State
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | A value of 0 disables the DTR, 1 or above willl enable the DTR. 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="90%" | MSBfirst
 
|-
 
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 587: Line 709:
  
  
 +
===SetFlowControl===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendBinaryFloat'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetFlowControl'''
 
|-
 
|-
| colspan="2" | Sends out a 32-bit binary floating point value split across four bytes. 
+
| colspan="2" | Allows the Flowcontrol signals to be enabled or disabled. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
+
| width="90%" | State
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | A value of 0 disables flow control, 1 or above willl enable flow control. 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="90%" | MSBfirst
 
|-
 
| colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 610: Line 728:
  
  
 +
===SetProp===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetProp'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetProp'''
 
|-
 
|-
| colspan="2" | Allows the property filter for the COM port list to be copied to a parent component. 
+
| colspan="2" | Allows the COM port property to be set from a parent component. 
 
|-
 
|-
 
|-
 
|-
Line 623: Line 742:
 
| colspan="2" |  
 
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | PropVal
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByteArray'''
 
|-
 
| colspan="2" | Attempts to receive an array of bytes using the COM port Returns the number of bytes received.  
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Data
 
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | MaxLength
 
|-
 
| colspan="2" | Max number of bytes to try and read 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Timeout
 
|-
 
| colspan="2" | Time to wait for incoming data in milliseconds 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString'''
 
|-
 
| colspan="2" | Attempts to receive an string using the COM port Returns the number of bytes received.  
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Timeout
 
|-
 
| colspan="2" | Time to wait for incoming data in milliseconds 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | MaxLength
 
|-
 
| colspan="2" | Max number of bytes to try and read 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  
Line 719: Line 790:
 
| colspan="2" | Auto close the port on Sim stop event 
 
| colspan="2" | Auto close the port on Sim stop event 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
+
| width="90%" | New Line Format
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
 
|-
 
|-
 +
| colspan="2" |  
 
|}
 
|}

Latest revision as of 13:09, 7 February 2023

Author Matrix Ltd
Version 3.0
Category Runtime Tools


COM Port component

Serial based simulation component for use with systems such as RS232, Bluetooth and USB Serial.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_COM_Port.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_COM_Port.fcfx

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.

FC6 Icon.png Auto Detect Example







Macro reference

ClosePort

Fc9-comp-macro.png ClosePort
Closes the currently open COM port, ending communications and allowing it to be accessed via another application. 
Fc9-void-icon.png - VOID Return


ConfigureConsole

Fc9-comp-macro.png ConfigureConsole
 
Fc9-u8-icon.png - BYTE Status
 
Fc9-void-icon.png - VOID Return


GetConsoleHandle

Fc9-comp-macro.png GetConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc. 
Fc9-h32-icon.png - HANDLE Return


GetProp

Fc9-comp-macro.png GetProp
Allows the property filter for the COM port list to be copied to a parent component. 
Fc9-string-icon.png - STRING PropName
 
Fc9-string-icon.png - STRING Return


OpenPort

Fc9-comp-macro.png OpenPort
Opens the currently selected COM port, allowing data to be sent and received. 
Fc9-void-icon.png - VOID Return


ReceiveBinary16Bit

Fc9-comp-macro.png ReceiveBinary16Bit
Receives a binary 16-bit value split across two bytes. 
Fc9-bool-icon.png - BOOL MSBfirst
0=Least significant byte first, 1=Most significant byte first 
Fc9-u8-icon.png - BYTE Timeout
Max amount of time in ms to wait between bytes 
Fc9-u16-icon.png - UINT Return


ReceiveBinary32Bit

Fc9-comp-macro.png ReceiveBinary32Bit
Receives a binary 32-bit value split across four bytes. 
Fc9-bool-icon.png - BOOL MSBfirst
0=Least significant byte first, 1=Most significant byte first 
Fc9-u8-icon.png - BYTE Timeout
Max amount of time in ms to wait between bytes 
Fc9-u32-icon.png - ULONG Return


ReceiveBinaryFloat

Fc9-comp-macro.png ReceiveBinaryFloat
Receives a binary 32-bit floating point value split across four bytes. 
Fc9-bool-icon.png - BOOL MSBfirst
0=Least significant byte first, 1=Most significant byte first 
Fc9-u8-icon.png - BYTE Timeout
Max amount of time in ms to wait between bytes 
Fc9-f32-icon.png - FLOAT Return


ReceiveByte

Fc9-comp-macro.png ReceiveByte
Attempts to receive a byte using the COM port No valid return data is provided by the timeout value property. 
Fc9-u16-icon.png - UINT Timeout
Time to wait for incoming data in milliseconds 
Fc9-u16-icon.png - UINT Return


ReceiveByteArray

Fc9-comp-macro.png ReceiveByteArray
Attempts to receive an array of bytes using the COM port Returns the number of bytes received.  
Fc9-u8-icon.png - BYTE Data
 
Fc9-u16-icon.png - UINT MaxLength
Max number of bytes to try and read 
Fc9-u16-icon.png - UINT Timeout
Time to wait for incoming data in milliseconds 
Fc9-u16-icon.png - UINT Return


ReceiveFloat

Fc9-comp-macro.png ReceiveFloat
Attempts to receive a floating point number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
Fc9-u8-icon.png - BYTE Timeout
Max time in ms to wait in between bytes 
Fc9-bool-icon.png - BOOL IgnoreData
0=Dont ignore any data, 1=Ignore any initial none numeric data 
Fc9-f32-icon.png - FLOAT Return


ReceiveHexNumber

Fc9-comp-macro.png ReceiveHexNumber
Attempts to receive a hex number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none hexadecimal char is received, the none numeric char will be lost. 
Fc9-u8-icon.png - BYTE Timeout
Max time in ms to wait in between bytes 
Fc9-bool-icon.png - BOOL IgnoreData
0=Dont ignore any data, 1=Ignore any initial none numeric data 
Fc9-bool-icon.png - BOOL Prefix
Look for prefix before receiving, 1=0xFF, 0=FF 
Fc9-u32-icon.png - ULONG Return


ReceiveINTArray

Fc9-comp-macro.png ReceiveINTArray
Receives an array of 16-bit INT/UINT values and returns the number of values received. 
Fc9-u16-icon.png - UINT Data
Array to store the incoming data 
Fc9-u8-icon.png - BYTE NumValues
Maximum number of values to try and receive 
Fc9-bool-icon.png - BOOL MSBfirst
0=Least significant byte first, 1=Most significant byte first 
Fc9-u8-icon.png - BYTE Timeout
Max amount of time in ms to wait between bytes 
Fc9-u8-icon.png - BYTE Return


ReceiveNumber

Fc9-comp-macro.png ReceiveNumber
Attempts to receive a number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
Fc9-u8-icon.png - BYTE Timeout
Max time in ms to wait in between bytes 
Fc9-bool-icon.png - BOOL IgnoreData
0=Dont ignore any data, 1=Ignore any initial none numeric data 
Fc9-s32-icon.png - LONG Return


ReceiveString

Fc9-comp-macro.png ReceiveString
Attempts to receive an string using the COM port Returns the number of bytes received.  
Fc9-u16-icon.png - UINT Timeout
Time to wait for incoming data in milliseconds 
Fc9-u16-icon.png - UINT MaxLength
Max number of bytes to try and read 
Fc9-string-icon.png - STRING Return


ScanForDeviceID

Fc9-comp-macro.png ScanForDeviceID
Checks to see if a device VID/PID string is present and returns the COM port number. Returns 0 if device not found. 
Fc9-string-icon.png - STRING HWID
Example: "VID_12BF&PID_0101" 
Fc9-u8-icon.png - BYTE Return


SendBinary16Bit

Fc9-comp-macro.png SendBinary16Bit
Sends out a 16-bit binary value split across two bytes. 
Fc9-u16-icon.png - UINT Value
 
Fc9-bool-icon.png - BOOL MSBfirst
0=Least significant byte first, 1=Most significant byte first 
Fc9-void-icon.png - VOID Return


SendBinary32Bit

Fc9-comp-macro.png SendBinary32Bit
Sends out a 32-bit binary value split across four bytes. 
Fc9-u32-icon.png - ULONG Value
 
Fc9-bool-icon.png - BOOL MSBfirst
0=Least significant byte first, 1=Most significant byte first 
Fc9-void-icon.png - VOID Return


SendBinaryFloat

Fc9-comp-macro.png SendBinaryFloat
Sends out a 32-bit binary floating point value split across four bytes. 
Fc9-f32-icon.png - FLOAT Value
 
Fc9-bool-icon.png - BOOL MSBfirst
0=Least significant byte first, 1=Most significant byte first 
Fc9-void-icon.png - VOID Return


SendByte

Fc9-comp-macro.png SendByte
Sends a single byte to be sent out via the COM port. 
Fc9-u8-icon.png - BYTE Data
 
Fc9-void-icon.png - VOID Return


SendByteArray

Fc9-comp-macro.png SendByteArray
Sends an array of bytes to the COM port. 
Fc9-u8-icon.png - BYTE Data
Data byte array to send 
Fc9-u16-icon.png - UINT Length
Number of bytes to send 
Fc9-void-icon.png - VOID Return


SendFloat

Fc9-comp-macro.png SendFloat
Sends out a floating point number as an ASCII String from the UART interface. 
Fc9-f32-icon.png - FLOAT Number
 
Fc9-void-icon.png - VOID Return


SendHexNumber

Fc9-comp-macro.png SendHexNumber
Sends out a number as an ASCII hexadecimal String from the UART interface. 
Fc9-u32-icon.png - ULONG Number
 
Fc9-u8-icon.png - BYTE NumChars
Number of characters in the string data, 0 for auto, 2 for 0x00, 4 for 0x0000 
Fc9-bool-icon.png - BOOL Prefix
Generate hexadecimal prefix 0x e.g. 1= 0xFF, 0= FF 
Fc9-void-icon.png - VOID Return


SendINTArray

Fc9-comp-macro.png SendINTArray
Transmits an array of 16-bit INT/UINT values via the UART peripheral 
Fc9-u16-icon.png - UINT Data
Data to transmit 
Fc9-u8-icon.png - BYTE NumValues
Number of 16-bit values to send from the array 
Fc9-bool-icon.png - BOOL MSBfirst
0=Least significant byte first, 1=Most significant byte first 
Fc9-void-icon.png - VOID Return


SendNumber

Fc9-comp-macro.png SendNumber
Sends out a number as an ASCII String from the UART interface. 
Fc9-s32-icon.png - LONG Number
 
Fc9-void-icon.png - VOID Return


SendString

Fc9-comp-macro.png SendString
Sends an string of characters to the COM port. 
Fc9-string-icon.png - STRING Data
Data byte array to send 
Fc9-void-icon.png - VOID Return


SetDTRState

Fc9-comp-macro.png SetDTRState
Allows the DTR signal to be enabled or disabled. 
Fc9-u8-icon.png - BYTE State
A value of 0 disables the DTR, 1 or above willl enable the DTR. 
Fc9-void-icon.png - VOID Return


SetFlowControl

Fc9-comp-macro.png SetFlowControl
Allows the Flowcontrol signals to be enabled or disabled. 
Fc9-u8-icon.png - BYTE State
A value of 0 disables flow control, 1 or above willl enable flow control. 
Fc9-void-icon.png - VOID Return


SetProp

Fc9-comp-macro.png SetProp
Allows the COM port property to be set from a parent component. 
Fc9-string-icon.png - STRING PropName
 
Fc9-u32-icon.png - ULONG PropVal
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png COM Port
Selects which port to communicate with, only lists ports which are currently available.  
Fc9-type-7-icon.png Refresh COM Ports
When set to yes the COM port list is rescanned for newly connected or available ports. Note that refreshing the ports list may take a few seconds depending on the number of connected ports. 
Fc9-type-14-icon.png Baud
Baud rate passed to the COM port to control the rate of data. 
Fc9-type-14-icon.png Timeout Value
Value to specify what is returned when no incoming receive data is present. 
Fc9-type-7-icon.png Console Data
 
Fc9-type-7-icon.png Auto Close
Auto close the port on Sim stop event 
Fc9-type-16-icon.png New Line Format