cancel
Showing results for 
Search instead for 
Did you mean: 

How to choose which graph will be displayed

SOLVED
rhupd
Member
Solved!

How to choose which graph will be displayed

Message contains an attachment

I have a chart with 3 push buttons.  All 3 buttons are connected to signal simulators.  The first one is supposed to display a sine graph with an offset of 1, the second is a sine graph with an offset of 3 and the 3rd one is a graph with an offset of 5.  I want to be able to push any button and have the graph appear or disappear.  I could show 0, 1, 2 or all 3 graphs at the same time depending on which buttons are pushed.  Can someone please help me figure out what I'm doing wrong?  I'm a beginner so please be patient if I use the wrong terminology or have trouble keeping up.

 

Thanks!

10 REPLIES 10
Munna232
Active Participant

Re: How to choose which graph will be displayed

Message contains an attachment

Check this . you can hide graph by changing at Graph Legend index check box.

Munna
GerdW
Knight of NI

Re: How to choose which graph will be displayed

Message contains an attachment

Hi rhupd,

 

you need to learn to use basic array functions, simplify your block diagram, remove sequence structures, using graphs instead of charts, so much more…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
rhupd
Member

Re: How to choose which graph will be displayed

Hi GerdW,

 

From what I understand, a graph is used to simply display data whereas a chart stores it.  I want to be able to remember the data being generated so that I can store continuous data for e.g. 2 hours and then be able to access it later.  I also looked at your vi - thank you for the suggestion.  I'm currently studying it and trying to figure out what's happenening.

Highlighted
GerdW
Knight of NI

Re: How to choose which graph will be displayed

Hi rhupd,

 

in your VI you are using shift registers to store data. Why use a chart to do the same again (resulting in double memory allocations)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
rhupd
Member

Re: How to choose which graph will be displayed

Hi GerdW,

 

I tried running your vi and the second two options don't work.  I used the probe to check and there's no data coming out of the 2nd and 3rd arrays, only the first one.  Why is it doing that?

 

Thank you.

rhupd
Member

Re: How to choose which graph will be displayed

Hi GerdW,

 

So if I use a graph with shift registers, I could choose an option and see data.  When I unclick an option, the graph disappears and if I click it again, the signal will appear again with its history i.e. the old data will also be displayed and it won't just start from a new point.  That's a very messy sentence - I hope you can understand what I mean!

 

Thanks.

GerdW
Knight of NI
Solution

Re: How to choose which graph will be displayed

Message contains an attachment

Hi rhupd,

 

it's because you used the wrong array function and I didn't check all options…

 

See attachment.

 

Edit:

You can edit messages. No need to post two messages within minutes…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Munna232
Active Participant

Re: How to choose which graph will be displayed

ignore

Munna
rhupd
Member

Re: How to choose which graph will be displayed

Hi GerdW,

 

Thank you for your help!  I've been working on this for a week before I finally decided to get help.  

 

Also, how can I edit my message after I post it?

 

Thanks!