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
(822 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
(814 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
(783 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
(776 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
(765 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 Kudos
Message 6 of 10
(725 Views)

Dear altenbach,

sorry for late reply,

first of all thank you for your suggestions.

 

  • according your code, i can change the axis es while running the code and get the desired output waveform.
  • but i want to change the axis,once the code execution completed.Kindly go through the video that i have uploaded.

best regards,

Salman

0 Kudos
Message 7 of 10
(724 Views)

Hi Salman,

 


@Salman206 wrote:

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.


AFTER THE EXECUTION of your VI that VI will not do anything for you!

When you want to handle the data again and again then your code still needs to be executed!

 

(Would you want to still edit your Word document after you closed MSWord executable?)

Best regards,
GerdW


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

Hii,

Ideally what you are saying is the correct only.But i am getting different plots after executing only once the program ( this is from KI6220 software provided by Keithley).I have attached video for your reference.it is happening in that software. so ,out of curiosity, i posted here,how it is happening.

 

So i thought weather , we can link the table content to the xy plot.As we have all the data in the table.so can we connect this table data to plot by ring menu,

 best regards,

Salman

0 Kudos
Message 9 of 10
(710 Views)

In your Video, the VI always executes and I really don't understand what you want us to look at.

 

So this is the Keithley demo, not your code? Is this just an executable or do you have access to the diagram? Are you trying to duplicate that functionality?

 


@Salman206 wrote:

So i thought weather , we can link the table content to the xy plot.As we have all the data in the table.so can we connect this table data to plot by ring menu,


The table and the plot are both indicators and receive the same data from a source upstream. Why would you want data from an formatted indicator instead of a wire??? Maybe I completely misunderstand what you are trying to do.

 

0 Kudos
Message 10 of 10
(706 Views)