10-25-2016 08:45 AM
Hello Everyone,
I started learning LabVIEW and I'm taking Core 1 training online. So far, everything went smoothly, but today I've encountered a difficulty and I can't find a solution.
The question regards exercise 7-1, figure 7-4.
I've open the block diagram and added most of the elements needed.This is what I have as for now:
The problems are:
1. when I expand "Unbundle by name" there is no "Units" element. When I try to add a new element, only multiplication of "Current Temperature" is displayed.
2. How do I add a specific cluster? I want to add "Weather Data In" on the left, how do I specify what cluster do I want to use?
3. Something is wrong with Weather Data Out cluster (the information is "This wire connects more than one data source").
Is it my fault and I'm doing something wrong or is something wrong with these example files?
I would very much appreciate your help!
Solved! Go to Solution.
10-25-2016 08:52 AM - edited 10-25-2016 08:53 AM
1. That is actually a 'bundle by name' - it requires you to wire the cluster in to update the specific values by name (to identify the type/items in the cluster and also to specify the values for items not listed (e.g. from a cluster constant or the previous value from the shift register on the loop). You need to wire your cluster to the terminal sticking out the top of the 'bundle by name'.
2. The cluster 'type' is defined by the. Normally you would use type definitions to make sure that the type of each cluster is the same. When you want to add an element to the cluster, you just update the type definition.
3. You have two 'sources' of data - the data coming out of the SubVI and the 'Weather Data Out' *control* (note you have it configured as a control and not an indicator).
10-25-2016 09:02 AM
Thanks, Sam!
1. I tried to connect this thermometer output to the bundle by name input, and this is the result:
2. I don't understand, by what is the cluster type specified?
3. It helped!
🙂
10-25-2016 09:14 AM
1. As the error states, you are trying to wire up a double output to a cluster input. Make a new cluster constant with all of the data you want in it and wire that to the cluster input of the Bundle By Name
2. If you haven't learned about Type Defined controls yet, I recommend you quickly find the lesson they talk about it. A type def is simply a way to define a data type.
10-25-2016 09:16 AM
@MsEngineer wrote:Hello Everyone,
I started learning LabVIEW and I'm taking Core 1 training online. So far, everything went smoothly, but today I've encountered a difficulty and I can't find a solution.
The question regards exercise 7-1, figure 7-4.
I've open the block diagram and added most of the elements needed.This is what I have as for now:
The problems are:
1. when I expand "Unbundle by name" there is no "Units" element. When I try to add a new element, only multiplication of "Current Temperature" is displayed.
2. How do I add a specific cluster? I want to add "Weather Data In" on the left, how do I specify what cluster do I want to use?
3. Something is wrong with Weather Data Out cluster (the information is "This wire connects more than one data source").
Is it my fault and I'm doing something wrong or is something wrong with these example files?
I would very much appreciate your help!
I gave you kudos simply because you are willing to put in the time to learn LabVIEW the right way. 🙂
10-25-2016 09:21 AM - edited 10-25-2016 09:27 AM
Firstly - apologies - I sometimes jump around while writing replies and forgot to finish that sentence. The type of the cluster in the bundle by name is specified by the cluster wire going into the bundle by name node. If you turn on context help by pressing Ctrl+H, you can hover over the cluster and it will show the items in that cluster. You will get errors if you try to connect two clusters that don't match. As crossrulz has said - you'll soon learn about type definitions which will help solve that problem as you can update the cluster in one place and the changes will be propagated everywhere you use that type-def'd cluster.
Can you upload your VI? (preferably for LV2014 or earlier)
It looks like you have wired the temperature out (an orange DBL wire) to a cluster input (which will be a pink wire!). The top right connection of the temperature VI I think is the cluster wire that you want.
Here is an example of how you can update values in a cluster:
10-25-2016 12:53 PM
Thanks to your answers I've realized that something must be wrong with the cluster! And it was, because somehow I've missed one of the exercices when this cluster was modified (that's why there was no "Unit" element)...
Now everything works perfectly 🙂
Thanks for your help!
10-25-2016 05:32 PM