![]() Use the third parameter ( xInc) on the PlotY method to specify the correct increment along the x-axis between each y value. The Plot and Chart methods have optional parameters that you can use to exactly specify how you want data to be visualized. The x-axis data does not correctly reflect the actual relative time the data was collected because the actual time period between each sample is 0.01 seconds (100 Hz). The temperature data shown in Figure 1 is plotted on the y-axis while the x-axis is automatically incremented by one unit for each y value plotted. In your program, replace simulation with actual data acquisition. Throughout this application note, several similar functions are used to simulate different types of measurements. Note: The GenerateTemperatureData function generates a one-dimensional array of values to simulate acquisition of temperature measurements. ![]() 'Generate random data to simulate 800 temperatureĭata = GenerateTemperatureData(800, 230#) The following example plots the engine temperature data when a user presses the Display Data button in the program shown in Figure 1: For example, imagine that you are collecting a single set of engine temperatures at a rate of 100 Hz. ![]() The Plot methods display real-time data acquired at relatively fast speeds or with a single acquisition. New data is appended to an existing plot, and you can preserve historical data in the graph. See the following section on Plotting Data. Download the Visualizing Data in Visual Basic example and read this application note at your computer so you can test the concepts and example. Note: This application note is designed to teach you how to visualize two-dimensional data with the CWGraph control through interactive discussion and examples.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |