LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

zero equals to one?

Hello everyone. I just found some extrengely weird behavior in a Vi i'm working on. In the attached coefficients.vi, the values of several output (such as trans2,r1,t2,refl2) are good when  you check them with a probe before entering in the 'bundle by name' but the values that are written in the 'bundle by name' are wrong (with the default values entered). Can someone figure this out for me because I'm totally lost on that one!

thank you
tonh
0 Kudos
Message 1 of 7
(2,976 Views)
Several of your subVIs are missing, so there's no way for us to run the code to see the values for ourselves. Please post the additional subVIs. Also, what does this have to do with the question posed in your title thread "zero equals to one?" ? The problem you describe seems unrelated to that vague question.
0 Kudos
Message 2 of 7
(2,962 Views)
oh snap.. I thought I put all the required sub-vis in the zip file. Sorry for that!
The expected values to be written in the bundle by name are either zero or one for those specific default values and in some cases zeros egal to ones...

thanks again
tonh



Message Edité par tonh le 07-17-2008 10:41 AM
Download All
0 Kudos
Message 3 of 7
(2,951 Views)
Your cluster orderings don't match. The order of the elements in your cluster constant is different than the order of the elements in your clluster indicator. If you right-click on the Bundle by Name output terminal and select "Create -> Indicator" you will see a different cluster ordering. If you use a typedef you would not have this problem since you could create a cluster constant that's tied to the typedef.
0 Kudos
Message 4 of 7
(2,933 Views)
Problem solved I guess. Thank you smecurio, you're always there when I need you hahaha!
I tried to read a bit about typedefs but I'm a bit lost with those. Is there any easy way to do that for my peculiar case?

tonh
0 Kudos
Message 5 of 7
(2,925 Views)
  1. Right-click on the output cluster and select Advanced->Customize...
  2. In the Control Editor window set your cluster order (you probably just want to make it sequential based on what you see).
  3. In the toolbar select "Type Def" from the control type menu.
  4. Save the control within your project folder.
  5. Close the control. You will be asked if you want to replace the control with the one you just created. Say yes.

Once you do this you will see a little red dot on your terminal, indicating a coercion that's occuring. This is due to the fact that the cluster constant is not tied to the typedef. Simply right-click on the terminal of the output cluster indicator and select Create -> Constant. Now you have a cluster constant version of your typedef. Use that instead of the cluster constant that you have.
Message 6 of 7
(2,916 Views)
Thank you SO much!
0 Kudos
Message 7 of 7
(2,884 Views)