LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot menu ring control XY graph?

Dear All,

Could you please help me to plot data on the XY Graph by selection option from menu ring.I run the code and logged the data into table.Instead of having four different XY graph on screen, i want to select the graph of my choice once the program execution done.

 

Thank you

0 Kudos
Message 1 of 10
(1,546 Views)

Sorry, we cannot help you by just looking at a picture of the front panel. How is the data arranged? What are the item/value pairs in the ring? 

If all data is in a 2D array, you can use the ring output to index into the array (either rows or columns) pick any two and create a complex array wired to the xy graph terminal.

 

There are millions of other ways the data could be held and we cannot help without significantly more details. Why not attach the VI?

0 Kudos
Message 2 of 10
(1,538 Views)

Dear altenbach,

I attached my VI.After the execution of Program, i want to plot graph of my interest by choosing from menu ring.

 

Thank you

0 Kudos
Message 3 of 10
(1,507 Views)

Hi Salman,

 

why do you need string functions to select one of 4 rows of a 2D numeric array?

 

Why are your rings set to DBL datatype when you want to select an integer entry?

 

 

Best regards,
GerdW


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

Most of your code seems flawed, so I took the liberty to clean it up a bit (Of course I understand that your data probably comes from elsewhere and this is just a simulation. Still it might give you some ideas).

 

  • There is absolutely no need to maximize the front panel to the screen.
  • If two cases differ only by the sign of one diagram constant, you don't need all that duplicate code!
  • In addition to what Gerd showed you, you also should update the axis labels.
  • I prefer complex arrays for XY graphs. Same difference!
  • Since your two rings should always have matching entries, you should make sure they do.
  • Make sure that all controls have typical default values.
  • If you want to select the axes during run, you probably need a toplevel while loop.
  • You probably want more reasonable formatting of the table. (not shown)

 

altenbach_0-1648401496565.png

 

0 Kudos
Message 5 of 10
(1,489 Views)

Dear Gerd,

sorry for my late reply and thank you very much for your suggestions.

Responses of your two questions

  • i did not get your first question .
  • i changed my rings to integer data type

According to your code, first we have to select the axis then waveform will be generated according to the selected axis.My question is, after the execution of program,how to get different plots by selecting the different axis i.e. at a same time we can get 12 plots by choosing from ring menu e.g R v/s I, R v/s V, R v/s R, R v/s P and same for others. I have attached a video of what i want to do

 

best regards,

Salman

0