Difference between revisions of "Component: UART SCADA (CAL) (Misc)"
From Flowcode Help
Jump to navigationJump to searchLine 73: | Line 73: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 79: | Line 81: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===SendString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 97: | Line 100: | ||
+ | ===Receive=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 115: | Line 119: | ||
+ | ===ScanForDeviceID=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 133: | Line 138: | ||
+ | ===Send=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 151: | Line 157: | ||
+ | ===GetConsoleHandle=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 164: | Line 171: | ||
+ | ===SendByteArray=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 187: | Line 195: | ||
+ | ===Init=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 200: | Line 209: | ||
+ | ===Uninit=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 213: | Line 223: | ||
+ | ===ReceiveByteArray=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 241: | Line 252: | ||
+ | ===ReceiveString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:52, 3 February 2023
Author | Matrix TSL |
Version | 2.1 |
Category | Misc |
Contents
UART SCADA component
CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. A low level implementation giving direct access to the UART peripheral. Includes simulation functionality to commmunicate via a COM port or an Injector component. Also includes timestamped logging via the console and Data Recorder trace monitoring support.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_UART_SCADA.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_UART_SCADA.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
SendString
SendString | |
Transmits a string of bytes via the UART peripheral | |
- STRING | Data |
Data String to transmit | |
- VOID | Return |
Receive
Receive | |
Receive a Character | |
- UINT | Timeout |
Period to wait for the character to be received | |
- INT | Return |
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. | |
- STRING | HWID |
Example: "VID_12BF&PID_0101" | |
- BYTE | Return |
Send
Send | |
Send the Character | |
- UINT | Char |
The Character to send | |
- VOID | Return |
GetConsoleHandle
GetConsoleHandle | |
- HANDLE | Return |
SendByteArray
SendByteArray | |
Transmits an array of bytes via the UART peripheral | |
- BYTE | Data |
Data to transmit | |
- UINT | NumBytes |
Number of bytes to send from the array | |
- VOID | Return |
Init
Init | |
Initialize the component with the specified properties | |
- VOID | Return |
Uninit
Uninit | |
Un-initialize the UART and release the resources | |
- VOID | Return |
ReceiveByteArray
ReceiveString