10-31-2020 09:36 AM
I have this thing to do my I do not understand clearly how should I generate the data cluser. Can you help me out? I tried a lot to figure it out but can not manage to find the answer.
Create a SubVI for generating a data cluster consisting in: a sinusoidal signal, a cosinusoidal signal, a ramp signal, an integer value for number of points and a string containing the sinusoidal data values converted to text. The inputs of the SubVI will be: the number of points and amplitude of the generated signals. Demonstrate the functionality of the SubVI by creating a *.vi for displaying the signals and additional data on a graph/indicators.
10-31-2020 11:23 AM
It is so much easier for us to work with code, rather than pictures of code.
Do the following:
Bob Schor
10-31-2020 11:48 AM
Here is the code.
10-31-2020 12:01 PM
That's very helpful. You do realize, don't you, that you'll need to build a second Cluster? One with elements "Sinusoid" (what type of element is this?), "CoSinusoid", "Ramp", "# Points" (you can use symbols like "#" in naming Elements in LabVIEW, very nice), and "Data String". You've got four of the components on your Block Diagram (though you used different names than I chose, which is fine), but no Cluster to put them into. Create the Cluster, get the missing fifth element onto a Wire, and wire up you Cluster!
Bob Schor
10-31-2020 12:03 PM
For the second cluster how can I enter that items in it? I had some problems trying to create also a second cluster.
10-31-2020 12:03 PM
That's very helpful. You do realize, don't you, that you'll need to build a second Cluster? One with elements "Sinusoid" (what type of element is this?), "CoSinusoid", "Ramp", "# Points" (you can use symbols like "#" in naming Elements in LabVIEW, very nice), and "Data String". You've got four of the components on your Block Diagram (though you used different names than I chose, which is fine), but no Cluster to put them into. Create the Cluster, get the missing fifth element onto a Wire, and wire up your Cluster!
Bob Schor
10-31-2020 12:07 PM - edited 10-31-2020 12:07 PM
Something like this?
10-31-2020 12:10 PM
Oops, ignore the previous (accidental) double Post.
Go back to my first Post, where I tell you where to learn about Clusters. Read the section Creating Cluster Controls and Indicators (you will be creating an Indicator). Read a little more in that section and you'll (I hope) learn how to do a Bundle by Name and build your Cluster.
Are you trying to "learn on your own"? If so, you need to read a bit more and think about what you are reading. If you are learning in a class, either you are not paying attention, your instructor is doing a very poor job of communicating with you, or you are not asking for explanations when he or she "goes too fast" for you to follow. Don't be afraid to ask for a better explanation.
Bob Schor
10-31-2020 12:41 PM
I apologize -- now I'm being careless. I see you have a thick orange wire (which means that it is an Array of Floats, Dbls in your case) going from a Ramp Pattern VI to something called "Waveform Ramp", which I (carelessly) thought was an Indicator of type Array of Dbl. Nope, it is a Waveform Graph (perfectly legal to have), which can take an Array of Dbls as its input. While there can be times when you'd want to make a Cluster having Waveform Graphs as elements (rare, I suspect), Clusters are much more likely to have the relevant Data (here, Array of Dbl) and their elements.
Bob Schor
P.S. -- I'm busy writing some moderately hairy LabVIEW code using some LabVIEW technology that's somewhat new to me, so I've been popping in and out of the Forums while my code compiles and tests, which may explain my "fuzzy thinking" ...