LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with graph/chart

Solved!
Go to solution

Heey everyone,

 

I am currently using a Spider8 and Labview to gain data from sensors, after that i use Labview to process the data to charts or graphs. Alltough I have 2 small problems using a chart/graph:

 

1: For some charts/graphs i want to use 1 Y-axis (example: volts or current) and 1 X-axis, time. I want this time to be like a clock which only counts seconds (example: 0-100sec), using absolute or relative time for formatting is not an option because they count way too much/fast. There is an example of these kind of charts/graphs in the appendix: currents vs time measurement.

 

2: For most of the other charts/graphs i want to use several Y-axis (example for a motor: current, RPM and torque) and i want to use a X-axis which can go "back" (example for a motor: rotations). There is an example of these kind of charts/graphs in the appendix: Torque measurement.

 

I dont have any idea of how to do this the right way, so your help is very welcome 😄

 

Thanks!

--------------------------------------------------
Currently using labview 8.2.1
Download All
0 Kudos
Message 1 of 11
(4,554 Views)

Hi grasman,

 

the 2nd one is cleary an XY-graph. Here you provide xy-pairs to plot any kind of curve.

 

the 1st one seems to be a kind of scaling problem "plots too much/fast". Either change the x-axis scaling (multiplier) to adapt your DAQ speed or also change to an XY-graph where you provide time values (in seconds) for the x-axis too.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(4,543 Views)

Heey GerdW,

 

Thanks for your post, im now going to try the XY-graph directly.

 

 

Thank you:D!

--------------------------------------------------
Currently using labview 8.2.1
0 Kudos
Message 3 of 11
(4,540 Views)

For more than one Y scale:

 

1. Right-click the Y scale and select "Duplicate Scale" 

 

1.jpg

 

2. Click on the Plot you want for that scale, go to "Y Scale" and select the one you just made (renamed as appropriate).

 

2.jpg

 

You can also choose "Swap Sides" to put a scale onto the right side of the chart/graph.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 11
(4,526 Views)

heey jcarmody, thanks for your reply. I followed your steps and used it with an XY-graph and it looks nice but how am I able to get more of the signals in one graph? can it just be done by using "merge signals" for the Y-axis on the XY-graph?

 

Thank you all.

--------------------------------------------------
Currently using labview 8.2.1
0 Kudos
Message 5 of 11
(4,510 Views)

heey jcarmody, thanks for your reply. I followed your steps and used it with an XY-graph and it looks nice but how am I able to get more of the signals in one graph? can it just be done by using "merge signals" for the Y-axis on the XY-graph?

 

I mean, for example: 1 y-axis has a range from -10 to 10 and the other has a range from -150 to +150, but i still want the signals to look good in the graph/chart. Just like the picture i send earlier, torque measurement.

 

Thank you all.

--------------------------------------------------
Currently using labview 8.2.1
0 Kudos
Message 6 of 11
(4,505 Views)

Could anyone help me please? I have used the XY-graph for both graphs i wanted to make and they work. The point is I want to use an XY-graph (with several Y-axis) so i can plot in several different signals. For example we have 2 signals for the XY-graph: one is going from -10 to +10 and the other from -150 to +150 but i`ve created a graph which has 2 Y-axis (one from -20 to +20 for signal 1, one from -200 to +200 for signal 2). Well how am I able to say that signal 1 is for y-axis 1 and signal 2 is for Y-axis 2. I have tried to use a "merge signals" to merge signal 1 and 2 for the Y-axis but this doesn`t really work, it only shows me 1 of the 2 signals for Y-axis 1 depending which one is on top in the merge signals block. PS: I have posted the vi which im testing this problem with in the appendix.

 

If anyone knows how to solve this problem, please help me :(!

--------------------------------------------------
Currently using labview 8.2.1
0 Kudos
Message 7 of 11
(4,467 Views)
Solution
Accepted by Grasman

Hi grasman,

 

have you read jcarmodys message on how to apply a plot to a y-scale?

 

See attachment on how to plot 2 curves onto one xy-graph and to attach each plot to one scale. I strictly followed the context help of the graph and jcarmodys message...

 

I would also suggest to stay away from express vis: they tend to make more problems than provide help. You are more involved in type conversions (to/from DDT) - using simple wires gives you just more control over whats happening in your code!

Message Edited by GerdW on 11-12-2009 09:49 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(4,459 Views)

Heey GerdW, thanks for your reply. I followed your instructions/vi and it works because when i run my program now i can see the right values with probes in the block diagram. But for some reason i cant see them on the graphs 😐 i really dont know why that is:S i attached the vi to this message.

--------------------------------------------------
Currently using labview 8.2.1
0 Kudos
Message 9 of 11
(4,456 Views)

Hi grasman,

 

the problem is in several points:

1) change your plot style to show points instead of lines

2) you only plot one point per curve because of the way the arrays are generated (initialize arrays of size 1, a simple build array node will do here too)

3) switch on auto-scale

 

You have to collect the data in shift registers to have a history - graphs only plot what they are wired with, charts have their own history buffer...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(4,454 Views)