10-04-2018 09:43 AM
I am trying to program 2 conditions using a case structure and a switch. Switch has 2 values, i.e when switch is on it sets the multiple case and when switch is of it sets the single case. Now what are the multiple and single cases. I have a while loop around the whole program with a wait of 500ms. Now in the single case a random number generator generates values every 500 ms and when the case is in multiple 3 random number generates values every 500 ms. What I want to do is represent these conditions in a waveform chart. So when the switch is in the single position then the waveform chart will show the single random number generators value over time and similarly when the switch is in the multiple position the waveform chart must be able to show all 3 values varying over time. But when i dont know how to do this. I have attached the vi which I attempted called sample.vi. Kindly do help me. Thanking you in advance.
Solved! Go to Solution.
10-04-2018 10:33 AM
10-04-2018 10:53 AM - edited 10-04-2018 10:56 AM
you have to build data into an array for waveform chart display. check the block diagram which i have attached in this post.
i'm using labview 2015. so, i was not able to check your VI. i hope my solution would be helpful.
10-04-2018 11:11 AM
Here is basically what Gerd was suggesting.
NaN values are not shown on charts and graphs. Make sure to correctly set the cluster size of array-to-cluster.
(You only need exactly one "10" diagram constant. You can use a FOR loop to repeat a certain operation (e.g. generate random number and multiply it). No need for all that duplicate code.)
10-05-2018 07:27 AM
I have an array of values and I need to represent them in a waveform chart. The thing is I dont want to represent them all at once. I want to select values. For eg if there are 10 values, i select 5, the waveform shows the 5th value change over time. If i select 2 next without deselecting 5, then it shows both 5 and 2 and so on. It doesnt have to be an array. I just tried. The thing is I have different values and I need to represent them in a waveform chart over time and I need to select values according to my interest, like if there are 30 values and I need to 5,12,21 and 29, then I will select them and the chart shows all of them vary over time. I just tried to practice with array. It can be anything which helps to select the value. I have attached something which I have been trying. I dont know how much of it is ok. It could all be wrong since I have just connected array to a waveform chart. Please help on how to solve this problem. Kindly awaiting the reply. Thank You very much.
10-05-2018 07:49 AM
10-05-2018 07:52 AM
Right click on the Waveform chart > Visible items > enable plot legend.
Right click on the plot legend > Visible items > Enable plot visibility check box.
you can drag the plot legend either vertically or horizontally for choosing multiple plots.
There you can select the plots, you want to see in waveform chart.
10-05-2018 08:29 AM
I will explain once again. Consider I have 5 different numerical values say a,b,c,d,e. Now my task is to represent these values in a Waveform Chart. Lets say there are 5 buttons also for eg. A button for each numerical value. If i click on button 3 three numerical value 3 i.e c will be shown in waveform chart. If i deselect the button the wave form chart will be empty again. If i select both button 3 and 5 then numerical values 3 and 5 i.e c and e must be shown in waveform chart and so on. Anyway can be done. By forming these 5 values into an array or forming them into a cluster etc. Kindly please help me.
10-05-2018 08:31 AM
I know the index array function but with the index array function I am only able to insert one value in the chart at a time.
10-05-2018 08:56 AM
Just connect all data to the waveform chart. And follow what i have posted above.