# 0.8 Graphs

 Page 1 / 1
The creation of this content was supported in some part by NSF grant 0538934.

## Waveform chart

Waveform Charts provide a historical graphical representation of numeric data.

The following example will build a simple G program that will allow you to chart a sine wave as it is being generated on a point-by-point basis using the equation:

${y}_{i}=sin\left(0.2xi\right)$

Start with a while loop and add into it a Multiply and Sine functions, a numeric constant with value 0.2 and a Boolean control to stop the loop when its value is True. Arrange the diagram to look as in [link] .

To select a waveform chart, right click on the Front Panel window and select Waveform Chart from the Controls>>Modern>>Graph menu.

This places the Waveform Chart in the Front Panel window.

In the Block Diagram window, make sure that the Waveform Chart terminal is inside the while loop. Wire the output of the Sine function to this terminal.

Notice that Waveform Chart terminal is that of a numeric output.

Most modern computers will run this program too fast. Thus, before this program is executed, a delay of 125 milliseconds will be inserted in the while loop. This will allow users to see how the Waveform Chart operates as data samples are plotted in the chard.

From the Functions>>Programming>>Timing select Wait Until Next ms Multiple . This will put the while loop to sleep for the indicated number of milliseconds.

Drop the Wait Until Next ms Multiple function inside the loop and wire a constant to it with the value 125. This will delay the loop for 125 milliseconds. The final Waveform Chart program is shown in [link] .

The default graphing mode of the Waveform Chart is autoscaling. You will notice the auto-scaling property when the program first begins to run and the y-axis, labeled Amplitude, updates automatically as new numerical values are aggregated and displayed on the chart.

As the program continues to run, the graph continues to build as per the values associated with the x-axis, labeled Time , which correspond to the index value of the equations.

As the program continues to run, the autoscaling property also applies to the x-axis. Noticed the updated x-axis. For this example, the x-axis will continue updating so as long as the program is running. This gives the appearance of a scrolling strip chart.

Stopping and restarting the G program retains the numeric history and continues to aggregate the values for display.

The Waveform Chart options can be easily updated by right clicking on the Waveform Chart and selecting the appropriate option to update from the pop-up menu.

Selecting Properties from this pop-up menu brings up the Waveform Chart dialog window ( [link] ).

## Waveform graph

The Waveform Graph allows numeric arrays to be displayed graphically in the Front Panel window.

Similar to the previous example, we will build a simple G program that will allow you to graph a sine wave using the equation:

${y}_{i}=sin\left(0.2xi\right)$

for i=0, 1, 2, … , 99.

## Single plot

Start by building the following program shown in [link] .

Right click on the Front Panel window, select Waveform Graph from the Modern>>Graph pop-up menu, and drop it on the Front Panel window.

In the Block Diagram window you will see the Waveform Graph terminal. Wire the Sine function output to the Waveform Graph terminal through the For Loop .

Run the program. The resulting graph is shown in [link] .

## Multiplots

In this example a sine wave and a noisy sine wave will be plotted. Modify the previous example to add noise to the sine operation as shown in [link] .

Add a Build Array operator and wire the output of the Sine function and the multi-add operator containing the sine value plus some random noise between -0.5 and 0.5 to the Build Array operator. Wire the output of the Build Array operator to the Waveform Graph terminal.

You can continue adding 1D arrays to be multiplotted into a single Waveform Graph .

Run the program. The multiplot result is shown in [link] .

## Xy graph

The XY Graph plots x vs. y numeric values contained in arrays.

The example shown in [link] generates the spiral shown in [link] .

I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Abigail
for teaching engĺish at school how nano technology help us
Anassong
How can I make nanorobot?
Lily
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Berger describes sociologists as concerned with
Got questions? Join the online conversation and get instant answers!