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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie question - Core 1 exercise 7-1

Solved!
Go to solution

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:

 

fig 7-4

 

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!

 

Message 1 of 8
(5,012 Views)

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).


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 8
(5,009 Views)

Thanks, Sam!

1. I tried to connect this thermometer output to the bundle by name input, and this is the result:

clus.png

 

2. I don't understand, by what is the cluster type specified?

3. It helped!

🙂

0 Kudos
Message 3 of 8
(4,996 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 8
(4,987 Views)

@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:

 

fig 7-4

 

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.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 5 of 8
(4,984 Views)
Solution
Accepted by topic author MsEngineer

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:

ARGH.png


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 6 of 8
(4,978 Views)

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!

0 Kudos
Message 7 of 8
(4,930 Views)
No problem - good luck with learning LabVIEW! The forums are a great resource if you get stuck.

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 8 of 8
(4,905 Views)