LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph - time versus voltage

Hi!

I am trying to use a xy graph to display on x axes time and display on y axes voltage. I have an output already, but I have it vertical (x=voltage, y=time, and I need it horizontal) and seems to work good vertical; however, when I try to switch them as they should be connecting voltage to y axe and time to x axe they are not as they suppose to be.

 

I will appreciate any suggestions,

Julieta.

0 Kudos
Message 1 of 4
(3,063 Views)

Please provide more information.

 

What is it actually doing and how is it different from what you want?  How about a screen shot of the results each way?  How about a copy of the VI with some data saved in it?

0 Kudos
Message 2 of 4
(3,053 Views)

Hi,

Sorry about the little information I provide before… I am using Labview 8.5.  I have two voltages v1 and v2, I used a state machine to switched between them using two different times (t1, t2). I would like to display the voltages on y axe, and time on x axe. I attached here a picture of the output and a picture of how I have connected the xy axes to make the graph work as you see on the output picture. I need the same, but I want it horizontal, not vertical as you see it. I tried before with others kinds of graph, but I can not make it work. Also, when I switch the xy as you see in my previous post, I do not have a correct output (it is different from the output I attached).  

 

In the output picture I can see what I need, but not as should be… On the x axe I have the voltage t1 (which is 3) that stay on 2 sec (y axe). Then switch to voltage t2 (which is 2), that stay on 3 sec (y axe). I want that, but horizontal not vertical as you see it. It should be the same order, begin on in t1 for 2sec, then switch to on t2 for 3sec. The part of the switching is working perfectly, I am just having problems to figure out how to connect the xy graph that display x = time and y = voltage as described above.

 

Julieta.

Download All
0 Kudos
Message 3 of 4
(3,045 Views)

Swapping the wires going into X input and Y input of the Build XY graph should be enough to do it.

 

One thing that concerns me about your screenshot is that you have a number of tunnels that are set up to use Default Values if Unwired.  So if any case runs that does not have data wired to the tunnel, you get default data (usually 0 for the numerics).  What is going on in the other cases and what data do you want coming out?

 

I'm also worried that the use of local variables may be causing race condition problems for you, but I can't see enough of your code to be able to determine that for sure.

0 Kudos
Message 4 of 4
(3,004 Views)