UltimaSerial  XChart: A free charting control designed for data acquisition applications
USB-based DI-148, DI-158, DI-710, DI-715B & DI-718B are now supported by Ultimaserial
158u.jpg (11869 bytes)

Let UltimaSerial unleash the power of your Windaq Starter kit!

 

UltimaWaterfall

UltimaWaterfall

 

FFT1024

FFT1024

 

XChart

 

Ultimaserial Classroom

Lessons on how to use UltimaSerial

 

download.jpg (1018 bytes) Downloads

 

Registration.jpg (4365 bytes)

info@ultimaserial.com

 

 

XChart is a free charting control specifically designed for data acquisition applications. 

To install XChart, Ultimawaterfall and FFT1024, you may either download and install Charting controls for everyone or the Windaq Add-ons

Charting controls for everyone contains executable demos and VB samples for the charting utilities. The waveforms are generated by the sample instead of a specific hardware, thus making it a perfect starting point for incorporating these charting utilities with user data or waveforms acquired via other data acquisition suppliers

Two sample programs are included:

demo_xchart: demonstrate how to create an user data array to send data to XChart. 

demo_waterfall_1024: demonstrate how to create a waveform for FFT1024 and Ultimawaterfall

Windaq Add-ons contains the above,  Windaq add-ons and their VB source codes. For users familiar with DATAQ's DQChart, XChart is like a super set of DQChart. With minimum modification, you can immediately replace DQChart with XChart. 

properties and methods denote new features comparing to DQChart 

Properties and Methods:

short ActiveChannel: Specify the channel to receive the mouse/button/wheel scaling and offsetting operation if GroupSetting is enabled

Demonstrated in the source codes of Windaq oscilloscope add-on

boolean BaseLineLegend: When set, the color legends for each traces will be placed at the trace's baseline defined in BaseLine[ChannelIndex]. Otherwise, the legends will be displayed according to the channel allocation.

Demonstrated in the source codes of Windaq oscilloscope add-on

short Channel: Index of channel to plot, analog or digital. To plot a digital channel, Channel must be specified, and DigitalMask should be used. For analog channel, you may use ChannelMask to select the channel combination. If this number is -1, all channels (up to 16) will be used for analog charting.

XChart.Channel = -1
XChart.Chart A

This will plot all (up to 16) channels from A

XChart.Channel = 1
XChart.Chart A

This will plot only the second channel from A. The channel property is  now the index to the channels, where the first channel is indexed as 0.

long ChannelMask: To set up analog channel combination when all (up to 16) channels are allowed to plot, i.e.  Channel = -1

Demonstrated in the source codes of Windaq oscilloscope add-on

BSTR ChartText: Auxiliary text (up to 32 letters) to be placed in the chart. Its position is defined by SetTextPos(x,y)

Demonstrated in the source codes of Windaq oscilloscope add-on

To remove the ad-line "www.ultimaserial.com" at the end of ChartText, please register Ultimaserial package

boolean DigitalMask: To select a digital bit for plotting when Channel specifies a channel, i.e. Channel >=0

XChart.Channel=1
XChart.DigitalMask=2
XChart.Chart A
        
This will plot bit 1 of the second channel. 

short GridSpacingX: number of pixels between gridlines in X axis (default is 20). 

Starting June 26, 2007, negative number will be treated as 100th pixel. For example, -2320 will be 23.20 pixels. -1423 will be 14.23 pixels.

short GridSpacingY: number of pixels between gridlines in X axis (default is 20)

Starting June 26, 2007, negative number will be treated as 100th pixel. For example, -2320 will be 23.20 pixels. -1423 will be 14.23 pixels.

boolean GroupSetting: When set, the mouse/button scaling and offsetting operation will be applied to all the traces in the chart. Otherwise, only the ActiveChannel will be affected.

Demonstrated in the source codes of Windaq oscilloscope add-on

boolean Lock: When set, mouse scaling and offsetting operation will be disabled. Instead, the mouse position will be reported in CrossHair(offset) event when left button is pressed, and a vertical cursor will be displayed

Demonstrated in the source codes of Windaq oscilloscope add-on

OLE_COLOR PEraseBar: Defines the color palette for the erase bar

OLE_COLOR PGrid: Defines the color palette for the gridlines

OLE_COLOR PText: Defines the color palette for the auxiliary text

To change this property, you need to register Ultimaserial package

boolean ScrollMode: When set, left-moving scroll mode is enabled, otherwise, erase/scope mode is enabled

Demonstrated in the source codes of Windaq oscilloscope add-on

boolean ShowEraseBar: When set, the erase bar will be displayed in erase/scope mode.

boolean ShowLegend: When set, the color legends for each enabled channel will be displayed

Demonstrated in the source codes of Windaq oscilloscope add-on

boolean SolidBaseLine: When set, the horizontal gridline in the center of the chart will be a solid one

Demonstrated in the source codes of Windaq oscilloscope add-on

short Step: Number of data points to skip, if this number is a negative number S (minimum -4), each data point will be duplicated S times.

XChart.Step = 2
        
This will compress the waveform  on time-axis by skipping every other points

XChart.Step = -2
        
This will enlarge the waveform  on time-axis by duplicating every points twice

long Xmax: Returns the width of the chart in number of pixels

Demonstrated in the source codes of Windaq oscilloscope add-on

boolean SumWaveforms: When set, the trace in scope mode will NOT be erased when a new one is plotted

Demonstrated in the source codes of Windaq oscilloscope add-on

boolean DoubleActiveTrace: When set, the active trace will be highlighted.

Demonstrated in the source codes of Windaq oscilloscope add-on

short Persist: Persist delay factor when SumWaveforms is set. 0 to be infinity, 255 to be minimum persist delay, older waveforms fade away each time a new waveform is added to the chart, according to this factor (See the top of this page for visual effect). 

Demonstrated in the source codes of Windaq oscilloscope add-on

BSTR Key: XChart displays an ad-line at the end of ChartText unless Ultimaserial package is registered


void Chart(VARIANT Data): Chart the data, the data can be a single integer or array.

Dim vv(3, 100) As Integer

'fill the array with your own waveform

XChart.Chart (vv)

void ChartEx(short* Buffer, short Channel, short Total): Chart the data

void CopyToClipboard(void): Copy the image to clipboard. This method is offered as a bonus to users with paid registration

Demonstrated in the source codes of Windaq oscilloscope add-on

OLE_COLOR PLine(short Idx): Specify or retrieve the color palette of traces

Demonstrated in the source codes of Windaq oscilloscope add-on

void SetTextPos(short X, short Y): Specify the position of the auxiliary text, in terms of pixels, where X=0 and Y=0 denote the Upper-Left corner

Demonstrated in the source codes of Windaq oscilloscope add-on

To change this property, you need to register Ultimaserial package

long Ymax(short Idx): Specify or retrieve the maximum of a trace in relative to the chart

Change the Ymax and Ymin properties of XChart by the same steps, say 100 
XChart.Ymax(0) = DQChart.Ymax(0) - 100
XChart.Ymin(0) = DQChart.Ymin(0) - 100
        
Watch: The screen will be cleared before the new waveform comes in when you do that

long Ymin(short Idx): Specify or retrieve the minimum of a trace in relative to the chart 

Demonstrated in the source codes of Windaq oscilloscope add-on

long BaseLine(short Idx): Specify the baseline for a trace

Demonstrated in the source codes of Windaq oscilloscope add-on

void AuxCrossHair(short X, short Y): Add an auxiliary cross hair to the chart if X or Y are positive numbers. Note, the auxiliary cross hair will only update when a new waveform plots

Demonstrated in the source codes of Windaq oscilloscope add-on

Event

ChartChanged(long Min, long Max): The scaling is changed for the active channel (ungrouped), or all channels (grouped)  due to mouse/button scaling and button operation

Demonstrated in the source codes of Windaq oscilloscope add-on

CrossHair(long Offset): Report the mouse button position in X axis when Lock is set

Demonstrated in the source codes of Windaq oscilloscope add-on

Mouse/Button scaling/offsetting operation

When XChart.Lock = FALSE, You can use your mouse to the waveform up & down. When you push down the left button, you will see the shifting level indicator on the chart. 

To change the scale of the waveform, double-click the Left/Right mouse button to increase/decrease the amplitude of the waveform(s). 

You can  also use the mouse wheel to change the gain. To do so, click on the chart once so that the chart will get the focus, becoming the active component on your form, roll the wheel forward to increase the scale (zoom in), roll the wheel backward to decrease the scale (zoom out)

ChartChanged event will be fired when the scale or offset changes

 Last update: 04/21/08

Copyright: 2000-2005  www.UltimaSerial.com