Jump to content

torekp

Members
  • Posts

    216
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by torekp

  1. In regard to variant, I am missing the type string from the flatten/unflatten to string primitives. This make variant introspection, in the spirit of the OpenG variant tools, pretty much no longer possible for new data type.

    OK, I think of myself as a bit of a Labview geek, but I don't get what's so cool about variants. Obviously sometimes you have no choice but to use them, database stuff in particular. But otherwise, why convert from other types to variant?

    Also, another person implied that variants are an alternative to passing data by wire. How?

  2. [...]Table 2 (Plots)

    col 1 = PlotID_pk, autonumber (primary key)

    col 2 = GraphID_fk, (foreign key) integer

    col (n) = (plot info ....)

    col (n+1) = (other plot info)

    I don't understand what is going into Table 2 - plot colors and point styles, stuff like that?

    I like snooper's idea, but if you don't need to query limited ranges of data, maybe the best thing would be to store the X values and Y values as "blobs". Then you could put multiple plots' and graphs' worth of data into one table, as seems to be your intention, and only have a few rows. I'm pretty much a DB ignoramus so take this suggestion with a grain of salt.

    In my limited experience of transferring data to/from LabView and DB, there is no problem dealing with a few thousands of rows in a table.

  3. Alright, now I have a slightly new problem. I have an intensity graph, and I want to dynamically change the "Amplitude" or "Z Axis" or "Height" scaling. To be more clear, I want to be able to ignore all data points above a certain height for example (which I can figure out on my own) according to say a slider, and as the slider moves it also adjusts the intensity graph's "Amplitude" scaling so that the remaining data points appear in good contrast with each other.

    This was my idea for how to "zoom in" and isolate the areas that don't have as large bumps...any better way of doing this, and if not, how would you guys approach this?

    Thanks,

    Adam

    Create a Property Node by right-clicking your Intensity Graph on the block diagram. Select Z Scale -> Range -> Maximum. (You can enlarge the Node to two lines and add Minimum as the next property too, if you want.)

    What this does is color all points at or above your Maximum as white. I figure and hope that's what you wanted.

  4. Here's a small LLB (LV 8) with some of my favorite Stupid Array Tricks.

    Here's another few array tricks, primarily sort_Excel_style, which crelf's multicolumn listbox sorter reminded me of. This isn't as user-friendly, but it allows you to pick multiple columns (or rows instead) by which to sort. So if two lines are "tied" (have the same thing) in column 1, you can break the tie using your second-priority column, say column 9 for example. And if they're equal there as well, then ... and so on for up to 7 "priority" columns. Why 7? It would get more and more clumsy for more priorities (see middle diagram below), and I couldn't figure out how to make it inherently flexible.

    post-4616-1149618445.png?width=400

    post-4616-1149618460.png?width=400

    post-4616-1149619060.png?width=400

    post-4616-1149618976.png?width=400

    post-4616-1149618543.png?width=400

    Download File:post-4616-1149618861.zip

  5. mballa makes a good point about controls with no connection on the connector pane. I often make a control with no connection in subVI GUIs where the subVI gets called multiple times, and on the 2nd and following calls, I want the control to start out with the value that the user last left it with.

    Also, you probably want to modify the VI properties of your subVI. Hit ctrl-I, select Appearance, and check "show front panel when called" and "close afterwards if originally closed".

  6. More free advice worth twice the price:

    If you're at all familiar with Matlab, I would strongly urge you to write a version of the Matlab program that can handle a whole array at once. Array manipulation is what makes Matlab great! If there's a lot of data, your performance will improve.

  7. Manfred,

    I tweaked your VI to make it even faster. At least, it's faster with really large strings (I used a large text file to test with). I'm throwing in the tester VI.

    The difference is, I initialized the array shift register with the original string (as byte array) and used replace array element (at index i) instead of append to array.

    You also can use this trick when you are deleting elements instead of replacing them - just be sure to keep track of the modified array length, and take a subset after the loop.

    Download File:post-4616-1147350812.viDownload File:post-4616-1147350375.vi

    Edit: revised to eliminate the bug pointed out by larsen

  8. Here's a small LLB (LV 8) with some of my favorite Stupid Array Tricks. Array_of_Indices is a tiny little block diagram that I got tired of making over and over.

    post-4616-1145622933.png?width=400

    post-4616-1145622991.png?width=400

    listbox_to_booleans and vice-versa do exactly that.

    post-4616-1145623153.png?width=400

    post-4616-1145623171.png?width=400

    post-4616-1145623194.png?width=400

    post-4616-1145623223.png?width=400

    linspace_N_points_DBL creates a linearly spaced ascending or descending series; any resemblance to the Matlab command linspace is strictly in the mind of the author.

    post-4616-1145623680.png?width=400

    post-4616-1145623690.png?width=400

    And my favorite, multiple_indices_from_array, it's simple, stupid, and oh so useful. I wrote it before I learned to do the polymorphic VI thing, and I wonder if it isn't a little faster-executing this way anyway. And besides, it's very handy if you want to index multiple array types with the same list of indices, which I do a lot.

    post-4616-1145623708.png?width=400

    post-4616-1145623724.png?width=400

    Any suggestions, comments, or reciprocation ;) appreciated. I'd share more, but I forgot what it was Jim Kring said about how to keep you-know-who from copyrighting my ideas.

    Download File:post-4616-1145623818.llb

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.