Difference between revisions of "Component: GLCD Graph Creator (Displays: Graphical)"
Line 89: | Line 89: | ||
==Simulation macro reference== | ==Simulation macro reference== | ||
− | + | ===<span style="font-weight: normal;"><u><tt>ExportToCSV</tt></u></span>=== | |
+ | Exports the data in the graph to a CSV file. | ||
+ | '''Parameters''' | ||
+ | |||
+ | :[[Variable Types|<- STRING]] ''Filename'' | ||
+ | ::''This parameter may be returned back to the caller'' | ||
+ | |||
+ | |||
+ | '''Return value''' | ||
+ | |||
+ | :''This call does not return a value'' | ||
==Property reference== | ==Property reference== |
Revision as of 12:47, 12 March 2019
Author | Matrix TSL |
Version | 1.2 (Release) |
Category | Displays: Graphical |
Contents
GLCD Graph Creator component
A component to simplify the process of drawing graphs and charts using a graphical LCD.
Examples
The graph creator component must be linked to the graphical LCD using the gLCD Object property.
The X Coord, Y Coord, Width and Height component properties set the size and position of the graph on the gLCD.
In the attached example the ADC component sets the input to the graph. Every 50ms a sample is taken and added to the graph.
Any size of graph can be created. For efficiency it is best to try and stick to the following rules.
- The width should be equal to or a multiple of the number of points
- The height should be equal to or a multiple of the input range - Min Value 0 to Max Value 255 = input range of 256
- If Show Border is enabled then Width and Height should be as above plus 2 to account for the border pixels
Downloadable macro reference
AddPoint
Adds a new data point to the graph.
Parameters
- UINT Data
- Data Value to plot
- BYTE Index
- Plot Index: Range 0-7
Return value
- This call does not return a value
Initialise
Initialises the graph object on the GLCD to the specified dimensions.
X, Y coordinates dictate the top left corner of the graph.
Width, Height measurements dictate the size of the graph.
Parameters
- UINT X
- UINT Y
- UINT Width
- UINT Height
Return value
- This call does not return a value
Simulation macro reference
<span style="font-weight: normal;"><u><tt>ExportToCSV</tt></u></span>
Exports the data in the graph to a CSV file.
'''Parameters'''
- <- STRING ''Filename''
- ''This parameter may be returned back to the caller''
'''Return value'''
- ''This call does not return a value''
Property reference
gLCD Object
This property is of type Panel object and can be referenced with the variable name glcd_obj.
Graphical LCD Object to draw the bitmap image to
ColourDisplay
This property is of type True or false and can be referenced with the variable name Colour_Display.
Automatically detects if the graphical LCD object is colour or monochrome
Number Of Plots
This property is of type Fixed list of ints and can be referenced with the variable name NumPlots.
Determines the number of plots that can be displayed simultaneously on the graph.
Monochrome displays can only support a single plot.
Number Of Points
This property is of type Unsigned integer and can be referenced with the variable name NumPoints.
Number of data points the graph can store, multiplied by the number of plots.
Graph Style
This property is of type Fixed list of ints and can be referenced with the variable name GraphStyle.
No additional information
Min Value
This property is of type Signed integer and can be referenced with the variable name MinVal.
No additional information
Max Value
This property is of type Signed integer and can be referenced with the variable name MaxVal.
No additional information
Show Grid
This property is of type Fixed list of ints and can be referenced with the variable name ShowGrid.
No additional information
Background Colour
This property is of type Color picker and can be referenced with the variable name BgCol.
Determines the graph background colour.
Plot 1 Colour
This property is of type Color picker and can be referenced with the variable name P1Col.
Determines the graph plot colour.
Plot 2 Colour
This property is of type Color picker and can be referenced with the variable name P2Col.
Determines the graph plot colour.