LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

insert array subset

Thanks Ravens Fan.
0 Kudos
Message 11 of 33
(2,132 Views)
Looking at your screenshots from your original post, it looks like you have arrays of strings (pink wire) rather than DBL's (which would be orange wire.)  So if you are sorting strings, the results you are getting make sense.
Message 12 of 33
(2,132 Views)
Thanks corys.
0 Kudos
Message 13 of 33
(2,131 Views)
Is there a way to turn concatenate arrays on by default in the build array function?
0 Kudos
Message 14 of 33
(2,117 Views)
I see. When I created the .ctl with the parameters I used a dbl numeric. Once you suggested that it was a string, I remembered using a numeric to string converter. HA. It has been a long morning. Also, I have found a sort function that works for me. Thanks again.
0 Kudos
Message 15 of 33
(2,110 Views)

Glad to hear you've got things workin', and I definitely know how those long mornings go. Smiley Wink

As far as concatenate arrays by default, I don't know of a way to do this, unless the inputs are of different dimensions (in which case, concatenate is not only the default, but the only option).

Message Edited by corys on 08-17-2007 10:42 AM

-Cory
Message 16 of 33
(2,109 Views)
I cannot get this output to show up as a selection when I wire it to a case structure selector. I know I am missing something little in my wiring or choice that i made. What is it and what is the rule of thumb when doing this? Attached is what I currently have and it does not give me a selection of Diode or Transistor. In the array in the picture, I am selecting Diode or Transistor in the case structor depending on what the element in the array is.
0 Kudos
Message 17 of 33
(2,093 Views)

Using a string as the selector, you will have to physically select where it says "True" and change it to "Transistor", or whichever the case may be you wish to add.  Doing this, however, you will have to be careful about spelling errors, such as in the posted example (several elements are spelled "Transisto" rather than "Transistor").  When using case structures like this, I tend to use enums, which not only make available cases as with a boolean, but is added protection against spelling errors.  If you were to go that route, you could bundle it into a cluster with the your data array.

In short, you have to change the cases yourself with a string wired into the selector, and be wary of spelling errors, as they are easy to acrue and sometimes difficult to debug, as we tend to read what we think we wrote, rather than what's actually on screen.

Good luck!

-Cory
Message 18 of 33
(2,084 Views)
Yes, I agree about the spelling issues. I would love to make this work as an eum. What I don't understand is how will building help me here? I was hoping to make this an output of the VI  for selection in a case structure. In the last attachement, I was using as string as you noticed and I have since changed that to an enum. Here is what I have now and it seems to work. Do you have any suggestions to make this better or is it basically exceptable from a programmer's standpoint?
0 Kudos
Message 19 of 33
(2,077 Views)

If you go the route in your picture, you can actually replace the case structure with a "Boolean to (0,1)" node.  If your comparison returns true, it will change it to 1, and false becomes 0, the same as your case structure (assuming no additional code takes place in the false case).

This method seems a bit counter-intuitive, however, as you are currently using a case structure to determine an output to be used in a case structure.  Judging from what I've seen, I think I would use an array of clusters in place of your current array of strings.  Each cluster would contain the data points along with an enum.  The auto-indexing of the array would work just the same, but then instead of using a case structure to determine which enum constant to use, you can simply unbundle it.

I hope this helps! Smiley Very Happy

-Cory
0 Kudos
Message 20 of 33
(2,073 Views)