Difference between revisions of "Component: UART SCADA (CAL) (Misc)"

From Flowcode Help
Jump to navigationJump to search
(Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 2.1 |- | width="20%" style="color:gray...")
 
Line 15: Line 15:
 
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.  
 
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 Pack==
+
==Component Source Code==
  
FREE
+
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_UART_SCADA.fcfx FC_Comp_Source_UART_SCADA.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 32: Line 34:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 251: Line 255:
 
|-
 
|-
 
| colspan="2" | A global flag to enable or disable the UART component from producing code. Useful for generating components with multiple communications options. 
 
| colspan="2" | A global flag to enable or disable the UART component from producing code. Useful for generating components with multiple communications options. 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Runtime
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
Line 286: Line 294:
 
|-
 
|-
 
| colspan="2" | COM port data rate in bits per second 
 
| colspan="2" | COM port data rate in bits per second 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
|-
 
 
|}
 
|}

Revision as of 17:52, 9 November 2022

Author Matrix TSL
Version 2.1
Category Misc


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 for the component source code: FC_Comp_Source_UART_SCADA.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png SendString
Transmits a string of bytes via the UART peripheral 
Fc9-string-icon.png - STRING Data
Data String to transmit 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Receive
Receive a Character 
Fc9-u16-icon.png - UINT Timeout
Period to wait for the character to be received 
Fc9-s16-icon.png - INT Return


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


Fc9-comp-macro.png Send
Send the Character  
Fc9-u16-icon.png - UINT Char
The Character to send 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetConsoleHandle
 
Fc9-h32-icon.png - HANDLE Return


Fc9-comp-macro.png SendByteArray
Transmits an array of bytes via the UART peripheral 
Fc9-u8-icon.png - BYTE Data
Data to transmit 
Fc9-u16-icon.png - UINT NumBytes
Number of bytes to send from the array 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Init
Initialize the component with the specified properties 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Uninit
Un-initialize the UART and release the resources 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveByteArray
Receives an array of bytes and returns the number of bytes received. 
Fc9-u8-icon.png - BYTE Data
A byte array variable to hold the received data 
Fc9-u16-icon.png - UINT NumBytes
Maximum number of bytes to try and receive 
Fc9-u16-icon.png - UINT Timeout
Max amount of time in ms to wait between bytes 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png ReceiveString
Receives a string of bytes and returns the number of bytes received. 
Fc9-string-icon.png - STRING StringData
 
Fc9-u16-icon.png - UINT NumBytes
Maximum number of bytes to try and receive 
Fc9-u16-icon.png - UINT Timeout
Max amount of time in ms to wait between bytes 
Fc9-u8-icon.png - BYTE Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-7-icon.png Component Enable
A global flag to enable or disable the UART component from producing code. Useful for generating components with multiple communications options. 
Fc9-conn-icon.png Runtime
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-21-icon.png Console Columns
Number of characters that can be displayed on a single line of the console. 
Fc9-type-7-icon.png Auto Close
Auto close the port on Sim stop event 
Fc9-type-16-icon.png Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port Injector - Routes the communication data via a data injector component on the Panel. 
Fc9-type-16-icon.png COM Port
Lists all the current available COM port hardware on your PC. 
Fc9-type-7-icon.png Refresh Ports
 
Fc9-type-21-icon.png Baud Rate
COM port data rate in bits per second