LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to choose which graph will be displayed

Solved!
Go to solution

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!

0 Kudos
Message 1 of 11
(2,953 Views)

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

Munna
0 Kudos
Message 2 of 11
(2,939 Views)

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
0 Kudos
Message 3 of 11
(2,938 Views)

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.

0 Kudos
Message 4 of 11
(2,922 Views)

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
0 Kudos
Message 5 of 11
(2,912 Views)

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.

0 Kudos
Message 6 of 11
(2,905 Views)

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.

0 Kudos
Message 7 of 11
(2,901 Views)
Solution
Accepted by topic author rhupd

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
0 Kudos
Message 8 of 11
(2,899 Views)

ignore

Munna
0 Kudos
Message 9 of 11
(2,898 Views)

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!

0 Kudos
Message 10 of 11
(2,886 Views)