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: 

Plotting 2 arrays

Hi Altenbach,
 
I have another question for you. This time it has to do with using the bundle function. I'm having a hard time creating the "constants" to specify the initial x and delta X values on a bundle function. The data is an auto-indexed 1D array floating point numeric.  I'm even wondering if there is something wrong with my software since it seems this task could be done by just right-clicking and selecting creat constant.
When I right-click and select "creat" all the options for selection appear dimed and non functional. Is there any reason why this could be happening?.  I'd really appreaciate any suggestions.
 
Thanks
 
 
0 Kudos
Message 31 of 52
(1,104 Views)


Mbdeck wrote:
When I right-click and select "creat" all the options for selection appear dimed and non functional. Is there any reason why this could be happening?. 
NO, right-clicking on a bundle function will not work, because LabVIEW has NO idea what you want and all datatypes are allowed. For a bundle function, there is not just the choice between (control, indicator,constant), but a valid input could be anything (number, complicated cluster, type definition, file reference, 3D boolean array, etc.). Just place a numeric diagram constant on the diagram and select the correct representation (probably DBL). You can also right-click on any wire of the correct datatype and create a constant of same. Just find a thin orange wire, right-click, create constant. You could even create a constant on the array wire, pull out the element and throw away the container. 😄
 
Of course if you wire a cluster of the correct type to the center connector of the bundle node, LabVIEW knows what should be there and "create constant" will work just fine. (image).


Message Edited by altenbach on 04-27-2008 09:52 AM
0 Kudos
Message 32 of 52
(1,095 Views)
Thanks a lot Altenbach. That was very helpful.
0 Kudos
Message 33 of 52
(1,085 Views)

Hi Altenbach,

I'm going through the online labview basics course and I'm finding a line of code involving a shift register and a case structure quite confusing. I don't know how to paste the code but I provided the link so you can look at it. It is the Temperature control VI.

Scroll down to the block diagram. The code that I don't quite understand is the one that has the bottom shift register. What do you think was the purpose for that bottom shift register?. Why was it initialized to zero?.  What value does the right- bottom shift register return?.

If you can just explain those lower lines of codes involving the bottom shift register, the "greater than sign", the "select function" and how it affects the "High Value", that will be great.

Thanks.

 Link:   http://cnx.org/content/m12247/latest/

 

 

0 Kudos
Message 34 of 52
(1,033 Views)


Mbdeck wrote:
If you can just explain those lower lines of codes involving the bottom shift register, the "greater than sign", the "select function" and how it affects the "High Value", that will be great.
You can think of a shift register as a memory location that keeps track of a certain value across iterations of the loop.
 
In this case, the shift register contains the highest temperature value encountered during the run.
 
The initialization with zero is a common mistake here (unless we are dealing with kelvin temperatures! ;)). It should be initialized with "-inf". Can you see why? 🙂
 
The value in the shift register starts out at zero. Whenever a new temperature measurement is higher than the value in the shift register, the new (higher) value is placed into the shift register. If the new temperature value is less than the shift register, the value from the shift register is kept. The "greater" comparison results in a boolean true or false and the "select" picks one of the two inputs accordingly.
 
At the end of the program, the shift register contains the highes temperature encountered during the run of the program. The "High value" indicator shows the current value of the shift register at each iteration of the loop.


Message Edited by altenbach on 05-12-2008 05:53 PM
0 Kudos
Message 35 of 52
(1,022 Views)

 Altenbach,

How is it going?. I have another question for you. This time it has to do with case structures. The problem is shown below:

Build a VI that uses the Formula Node to calculate the following equations: y1=x3+x2+5 y2=mx+b . Use only one Formula Node for both equations and use a semicolon (;) after each equation in the node.

 
How do you go about setting this up in a case structure?. I guess my problem is understanding what's needed to be done. I'll appreciate any suggestions and help. 
 
Thanks
0 Kudos
Message 36 of 52
(972 Views)

This is completely unrelated to the previous problem, so you should probably start a new thread.

I have no idea why you think you need a case structure for a formula node problem. This makes no sense. 😉

0 Kudos
Message 37 of 52
(966 Views)
Sorry I meant a formular node not a case structure. It was a mistake on my part Smiley Very Happy. So how would you do this Formular Node problem?
0 Kudos
Message 38 of 52
(962 Views)
What have you tried so far? Where did you get stuck?
0 Kudos
Message 39 of 52
(959 Views)
 I created a control and an indicator and wired them to the input and output of the formular node.
 
I had one x input and two y outputs ie y1 and y2.
 
I plugged in the two equations ending each with a semi-colon and wired only the y1 to the output.
 
Long story short, the code apparently wasn't correct since it didn't execute. I think the issue here is figuring out how to define the problem so that it can be executed by the formular node. 
0 Kudos
Message 40 of 52
(953 Views)