Component: UART SCADA (CAL) (Peripheral CAL)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 2.1 (Release)
Category Peripheral CAL


Image UART SCADA (CAL) 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.


Examples

No additional examples


Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

Receive

Receive a Character

Parameters

BYTE Timeout
Period to wait for the character to be received


Return value

INT


Send

Send the Character

Parameters

UINT Char
The Character to send


Return value

This call does not return a value


GetConsoleHandle

No additional information


Parameters

This macro has no parameters


Return value

HANDLE


Init

Initialize the component with the specified properties

Parameters

This macro has no parameters


Return value

This call does not return a value


Uninit

Un-initialize the UART and release the resources

Parameters

This macro has no parameters


Return value

This call does not return a value



Property reference

Component Enable

This property is of type True or false and can be referenced with the variable name UseUART.

A global flag to enable or disable the UART component from producing code.

Useful for generating components with multiple communications options.

Console Data

This property is of type True or false and can be referenced with the variable name ConsoleData.

Selects if the console data is automatically generated or not

Console Columns

This property is of type Unsigned integer and can be referenced with the variable name ConsoleColumns.

Number of characters that can be displayed on a single line of the console.

Data Source

This property is of type Fixed list of ints and can be referenced with the variable name DataSource.

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.

COM Port

This property is of type Fixed list of ints and can be referenced with the variable name com_port.

Lists all the current available COM port hardware on your PC.

Refresh Ports

This property is of type True or false and can be referenced with the variable name RefreshPorts.

No additional information


Baud Rate

This property is of type Unsigned integer and can be referenced with the variable name baud.

COM port data rate in bits per second