From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-05-2018 09:17 AM
Sorry I didnt understand the plot legend thing. Anyway that is not what I want. Think of me as the user and not the programmer. I select a value, I need to see it in the waveform chart or any kind of chart. Then I select another value I see them both. Since I am the user and not the programmer, I should able to work on the inputs and not on the waveform chart.
10-05-2018 09:26 AM
just check this image. you can understand clearly.
10-05-2018 09:50 AM
@govindsankar wrote:
Since I am the user and not the programmer, I should able to work on the inputs and not on the waveform chart.
The visibility checkbox is for the user, not the programmer. Have you tried?
The code you have posted earlier is plain silly and shows a basic lack of understanding of dataflow. Your FOR loop will run exactly once before the while loop and then the while loop will continuously show the same data over and over. Changing the numeric at runtime does not do anything. If you want to update the graph with new data, the FOR loop and numeric control belongs inside the while loop. (It is also extremely annoying if you maximize the front panel and diagram to the screen. Why would you do that??)
So we have two different problems and it is still not clear what you want:
For (1), the visibility checkbox is all you need. For (2) we need more information, for example what is the maximum number of channels, etc.
Note that your array indicator is pointless. Charts have digital displays that you can show.
Here is a quick rewrite using the visibility checkbox. See if this is sufficient. If not describe one more time what you want to do. Where does the data come from?
10-05-2018 10:23 AM
Data comes from a thermal board. There are like 32 thermal readings. But that is not the point. Right now I need to create one for myself. As far as the for loop outside the while loop, I did it like that because I only want 1 reading. I know waveform chart is showing that varies over time, so if it is just one reading then there is no variation. But that is not important. I did the array thing just to get some random values. So forget about that as well. Just think that there are 5 readings coming from a board. There is a graphical user interface that will let the user select one or multiple readings to be shown in the waveform. You can use anything like a button or create clusters from the 5 or something. Anything can be done. It doesnt have to be arrays. I just need to represent one or more of those 5 values in the waveform by clicking on something but not on the waveform. Click on something in the GUI:
10-05-2018 10:35 AM
@govindsankar wrote:
Click on something in the GUI:
As we said, click on the visibility checkbox! 😄
In what way does this not solve your problem?
10-05-2018 10:54 AM
It doesnt solve my problem because that is not what I want. Ok how about another way. Forget about the waveform chart. There are 5 values and I need to insert this 5 values into an array. How I insert is I click on one value it gets inserted into the array and I click another value it gets inserted into the array at the next position. I unclick it then the corresponding value is removed from the array. I have been trying to do this for a long time. But the problem is first of all I have not done the delte from array. I just have done add into array and every time I run the program the values before ending the program last time still stays in the array. So i thought i create a local variable and initialised the array to a 0 value array in the beginning before the loop starts. But then nothing is happening with the array. I cannot insert values into the arry when I do that. Please help me with this question.
10-05-2018 11:45 AM - edited 10-05-2018 11:58 AM
You need to keep the array in a properly initialized shift register. There are plenty of forum examples for exactly that.
(Sorry, posting by phone)
10-06-2018 05:10 AM
Hi govind,
how often have you heard about those FREE TRAINING resources offered in the header of the LabVIEW board?
How often have you taken those trainings?
How I insert is I click on one value it gets inserted into the array and I click another value it gets inserted into the array at the next position. I unclick it then the corresponding value is removed from the array.
Simple:
(Ofcourse it would make sense to put those values and buttons in arrays.)
So i thought i create a local variable
Wrong.
Whenever you think "I create a local variable" you should THINK DATAFLOW and find a different way!
But then nothing is happening with the array. I cannot insert values into the arry when I do that. Please help me with this question.
So you did "something". Your "something" doesnt work (as expected).
And you want us to help you with this "something" but you hesitate to attach this "something" to your message!?
10-06-2018 09:01 AM
Sorry I am not hesitant to attach something. I will attach it first thing on Monday. Thank you
10-06-2018 11:35 AM
@govindsankar wrote:
It doesnt solve my problem because that is not what I want. Ok how about another way. Forget about the waveform chart. There are 5 values and I need to insert this 5 values into an array. How I insert is I click on one value it gets inserted into the array and I click another value it gets inserted into the array at the next position. I unclick it then the corresponding value is removed from the array. I have been trying to do this for a long time. But the problem is first of all I have not done the delte from array. I just have done add into array and every time I run the program the values before ending the program last time still stays in the array. So i thought i create a local variable and initialised the array to a 0 value array in the beginning before the loop starts. But then nothing is happening with the array. I cannot insert values into the arry when I do that. Please help me with this question.
Yes, please attach your code on Monday, because none of this makes much sense, probably mostly because of the terminology you are using.
Gerd's solution will just build a new array from the selected values and that seems all that's needed to create the reduced array from selected elements. Obviously you have something else in mind.