Jump to content

Grampa_of_Oliva_n_Eden

Members
  • Posts

    2,767
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by Grampa_of_Oliva_n_Eden

  1. I gave up on the "Instantly infinately flexible" apps a while ago. Unless you can limit what the app will be doing, I never found a single GUI that would serve all needs.

    So how about turning it inside out and make the TL, a launcher that once they select from the flavors they want to use, hides itself and is never seen again and all version related stuff is kept in the code that realizes each flavor.

    Ben

  2. Ben,

    Yes, Option 2 would be a single element Q, where that element is a preallocated array of fixed length.

    Is DVR efficient? For some reason, I thought references made copies.

    And there's not a lot of number crunching. Just lots of Array Subsets and Replace Array Subsets. Now that you mention it, though, that could be primarily a memory bottleneck, which depending on the architecture of my CPU, may or may not be helped through parallelization.

    Gary

    I have limited experience with the DVR but it can operate in-place like the Q version you illustrated.

    Re: architecture

    Yes, but the inverse is also possible depending on the hardware architecture (cache size, type, and pipe-lining). If you array will fit into your cache and the cache writes don't interupt the pipe-line you could effectively use the memory management hardware to act as a colator running in paprallel with the CPU.

    But then again...

    If the Q or DVR version results in CPU waiting for a mutex to the shared buffer, you may be better off just letting one CPU do the work without interacting with the process scheduler (hint: Timed seq will let you dicatate which CPU it runs in so you could use the second CPU as a dedicated number cruncher.)

    Not claiming to know what I'm talking about, but always willing to learn,

    Ben

  3. Slimey? That I don't understand. I'd rather you discussed more rather than slip out, but it's your call.

    Please don't confuse my candid opinions with aggression or intolerance. I'm just looking for other people's takes on something which belongs to the ultimate question whose answer is 42.

    Shane.

    Disclaimer: Any simularity between the following story and any persons alive or dead is accidental.

    I used to have a buddy that was diagnosed as psychotic (?) and they eventually ended up locking him away and kept him under control with thorazene (?Sp?). Every time I would try to corner him on a point, he would never reply but would respond by changing the subject.

    looking back over my replies in this thread left me feeling that I was not replying.

    If I fail to reply directly to your thoughts it is because I simply don't know the answer OR what I believe is questionable.

    Case in point: "the ultimate question"

    I think that Solomon explored that question and answered it in Eclesiasties (?sp?) where I came away with (paraphrased) "So what is the end of it all? To serve God and be happy doing it." The "to serve" part drives ME to try to calibrate my virtue space.

    Ben

  4. I appreciate the response, even though I won't yet claim to have understood everything yet....

    I would argue, however, that even the origin of virtue space is actually an individual trait. Everyone's virtue system is slightly different. There are no absolute scales for virtue. So it in in reality a bit more complicated because a position x,y,z in one person't virtue space will not neccessarily co-exist with position x,y,z of another person's space.

    ...

    So while you and I most likely share a very large part of our beliefs of what is right and wrong, I think we might very well give very different reasons as to WHY they might be right or wrong.

    I'd better start working otherwise my boss will point my moral compass to a state of unemployment.....

    Shane.

    Thank you for the thought provoking response Shane. I feel a little slimey since I have been attempting to share my crazy ideas without offending so please excuse me if I try to slip out between the lines.

    I think we MAY agree that where we place the origin in our virtue space is an imporatant factor in who we are and our path either toward or away from that goal.

    "Why"

    Was it Shakespeare Hamlet that said "We see through a glass darkly."? Like the deep field study done with Hubble, (think data points are like photons) the more information we gather, the clearer the picture. By talking we share the data we have. Again taking an analogy too far... by doubling the number of observers, we are effectively increasing the apperture size and increasing our resolution.

    So again thank you for your reply!

    Ben

  5. I have some code that keeps arrays of the most recent states of thousands of objects (1000 in the attached example).

    The basic architecture of the code can be represented as shown (this a very simplified example that tries to capture what the real code does). And yes, I know that the initialization function is run more often than necessary. I just threw this together quickly to demonstrate dataflow.

    post-4344-126868108338_thumb.png

    Clearly, this does not work because the Parallel For Loop structure does not allow the use of the shift registers. I know, however, that I will never have duplicate index values in a call to this function so order of execution of the For Loop iterations does not matter. I also know that the lengths of the Index and Value arrays are highly variable at runtime.

    Because there really is no dependency between for-loop iterations, it seems like this should be parallelizable.

    So, does anyone have any suggestions? I was thinking I could maybe replace the shift registers with a queue containing the array:

    post-4344-126868163284_thumb.png

    Is that inefficient? Unsafe? How does the Parallel For Loop deal with this case? It claims to be executable.

    After robustness, speed is the ultimate consideration here.

    Thanks,

    Gary

    Option # is a single element Q?

    OPtion #2 will also allow using the DVR (data value reference) to replace the SR.

    Before i type more are you SURE the time you are trying to optimize is due to they many values tht have to be updated and NOT due to the associate crunching you have not shown above?

    Ben

  6. I was at the Arizona Regional last weekend and it was amazing!! The team I mentor won the Engineering Inspiration award so that means I'll also be going to Nationals in Atlanta next month with them.

    Good luck to everyone and I hope to see you in Atlanta!

    A bunch of my co-workers attended this week-end. THere was a team from Canada (?) with an impresive entry. Almost every time it got the ball it scored and that final "lift off of the ground" challenge... 3-seconds later it was off of the floor.

    Ben

  7. I've been trying to dig into LVOOP but I've run into some issues. This is my first attempt at OO design and implementation so I'm thinking I would get some advice before I pull all my hair out.

    My objective is to build an application that could acquire data from multiple source. This application will have a means to configure each data source and load/save configurations to file.

    My first crack at this from an OO approach:

    1- Create class called "unit". This represents a data source. Class data is "name" and "description"

    2- Create class called "serial unit". This inherits from "unit" but also has additional class data such as visa refnum, com functions. This class also has an array of "Channels" objects

    3- Create class called "Channels". Contains channels information such as name, location, units, scaling etc.

    4- Create class called "Configuration". This class contains an array of "unit" objects along with config path.

    In my app, I start by creating a "Configuration" object. The user can then add a "unit" to the configuration. Now the GUI to add a unit will change depending on the type of unit they would like to add. So if a user chooses to add "serial unit", I need to somehow convert my "unit" object (element in configuration) into a "serial unit" object (so that I can access "serial unit" specific methods). I've tried using "to more specific class" but it gives me an error Error 1448: Bad type cast. LabVIEW cannot treat the run-time value of this LabVIEW class as an instance of the given LabVIEW class."

    My next crack would be to change my configuration class to contain and array of serial units, array of daq units, etc.. for all my unit classes, rather than an array of "units". Is this the correct approach?

    I think that is the factory design pattern.

    http://zone.ni.com/wv/app/doc/p/id/wv-1295

    You build an array of all of the children of "unit" and populate a ring (for example) with each option. WHen the user selects using the ring, you can then index the array of classes to chose the flavor the user selected.

    To configure each you can call config method for the selected path that invokes the appropriate over-ride VI to show a FP and let them configure it.

    I'm not sure if any of tht helped,

    Ben

  8. I'd agree with this completely with a pedantic difference that I'm not at all convinced there's anywhere we SHOULD be. We just are.

    But our responsibility to decide is (even being pedantic) correct.

    Shane.

    Without wanting to get into a nasty argument I would wager that the above statement for any other subject other than "God" would lead you to the idea that the idea at hand is flawed and most likely to be incorrect.

    Shane.

    If I thought I was correct, I'd fight to make the point. But since I don't know what I'm talking about, ....

    Re: "anywhere we SHOULD be. We just are."

    Well that highlights the fact I left out a lot of ideas! maybe this belongs in another thread but I'll share just to hear if anyone else can relate. When stuying The Republic, I read about virtue and the idea that virtue is an intermediate state between two extremes. Being vituous in a cetain aspect of ones nature was a way of saying they are balanced and not to far one way or the other. The discusion in The Republic talked about the balance being struck along many possible lines "spend-thrift vs waster" Coward vs berzerker .... This lead to my own idea of a "virtue space" which has as many dimensions as there are virtues. Anyone of us can be plotted into virtue space and each of use would have a unique postition in that space. When turing my attention to the nature of the person who plots at the origin. The next step in the Saturday morning while drinking my coffee adventure lead me to think that since we all are located at different locations and our goal MAY be teh same (the origin of virtue space) then it makes sense to me that no two of us have the same path to tread. So the direction that is appropriate for me is the wrong path for others.

    So in the limited sense of my virtue-space there a place where I should move toward.

    Just my thoughts,

    Ben

  9. Ben,

    your analogy falls hard when taking into account that "God" is supposed to be all-knowing and did actually (according to scripture) create us.

    As such it would be more analagous to the robot dog part than the "real" dog because the "real" dog would suggest that we contain unknowns and therefore could not have beenmade by "God", a theory I could wholeheartily support BTW.

    Shane.

    ...

    All anaolgies break down when stretched to far, which may be the case for every analogy applied to God since attempts by limited being to understand an unlimited simply can not work ( A set can not be prooved from within a set Goedl?). What I expressed was me attempting to exercise the phrase "we were created in God's image." by looking at our nauture to try an understand a little more about what is beyond our capability to understand. The understanding that I shared, is just what works for me when I am trying to understand "why" God would let be screw-up and what purpose it would serve in his plan.

    I don't know the validity. I only know that where I am is not where I should be and its up to me to decide on the direction and stick with it.

    Ben

  10. Title should read "array OF refnum"...

    This is a crosspost.

    This one just bit me so I thought I should share. It looks like the Search 1D Array function behaves unexpectedly when used with an array of VI refnums. So far I have only reproduced it in LabVIEW 2009 SP1, but I ran some code in 8.6.1 that seemed to have the same symptoms.

    post-123-126823142528_thumb.png

    When I run the code above, I always get a zero for the output "index of element". In the example shown I expect to get 3. In fact if you change that 3 on the array index to any number, you get zero on the output. My workaround is to typecast the refnum array to an array of I32 and also typecast the refnum that I'm searching for. That makes it work, but I'm still freaked out by the odd behavior.

    Note that the VI you throw the snippet into must be reentrant. I believe the search is getting confused because the refnums all point to the same VI, albeit different instances of that VI. Of course, that is the whole point of using the search 1D array function. I am trying to identify a particular instance.

    Can anyone repeat this one?

    Thanks,

    Dan

    I don't have anything above 8.2 where I am so I have to ask... Does it do the dame thing if you insert a seq frame in the wire after the For loop and before the Serach?

    Mike Porter told me about an issue where he was checking all VI's in memory after loading them and they fialed to show up. A seq structure after the Open and before the "all VI in Memory" fixed the issue for him.

    This could be similar.

    Ben

  11. Speaking of which, can anyone remember when the definition of the word "quality" changed from "it's a good product" to "it's an exact duplicate of the previous one"? ...

    Meh, maybe it's just me.

    I once read/heard a story of when a company first went to a vendor in another country to supply resistors (?). They spec'd it at 100 ohms plus or minus 5%. ..... The vendor was inserting resistors that were 95 adn 105 ohms plus or minus 0.1% to meet the spec.

    frusty.gif

    In that case as well as the one you are speaking about, language may be playing a part.

    Maybe we should be asking for fail-safe cars instead of quality cars.

    Speaking for myself I concider LV a quality product with some versions having a higher quality than others. As long as we don't bend over backwards, a license comes with updates that fix the worst problems as long as we don't introduce any new stuff when applying the fixes.

    Years ago people didn't want to buy cars of the first model year assuming there would be problems. It was assumed you would get a better product with the next year. Same applies to LV and we do get a more powerful and robust development environment with each update.

    But as they evolves over the years changes to the design can introduce problems. In both cases crashes are bad and should and are fixed through recalls or updates.

    But in the case of cars you never hear an add that says "Buy the new 2010 model, it does not crash!" (Yes I'm getting to a point).

    Adds that claim "Our new software is not as buggy as the old stuff!" have probably been copyrighted by MS.

    Ben

  12. Well... yes and no. I find it interesting that the Toyota issue is being made much more of an issue here in the US than anywhere else in the world. Maybe it's because I'm in Detroit and it seems that Toyota pretty much all the local media can talk about right now. Perhaps a nod to the big three?

    But you can't have one without the other smile.gif

    Intersting that the majority stock-holder in Government Motors is highlighting flaws in the competion's quality?

    Ben

  13. Any details on that (when was it, CAR #)?

    "

    From my post of 3 Dec 2008

    ...

    46949

    Since that number looks funny it was given to me on SR# 1290801.

    This is supposed to document an issue where LV does not always close files when it returns to the splash screen. I have to close LV completely before I can delete the directory where I was working. The note from the PSE passed to me from the AE was;

    1- The PSE said the root cause of this behavior is due to Windows:

    "Windows is updating the application's working directory when the file dialog is called. This can be easily tested by opening another VI/ project at a different path and then rename/move the original project (which should work). "

    ...

    "

    Ben

  14. That's a really good point - if you've got LabVIEW 2009 and don't have an SSP then you somehow got around the system. Therefore, this issue shouldn't be effecting anyone...

    Its possible to purchase a license without the SSP. A couple of weeks ago a customer wanted to clone an app certified by the FAA that was in LV 7.0. They purchased teh license for LV 2009 so they could leaglly install LV 7. In that case the SSp did not make any sense for them.

    Ben

  15. I thought a new version of LV always came with one free year of SSP? So, the service pack should be free for anyone who bought a copy of LV2009, right?

    And for those of us who maintain SSP, it is free anyways (or at least covered by the SSP fees)

    Maybe the student edition of LV does not come with the 1 year of SSP, but checking the NI web site, the base, full, pro and dev suite versions all include one year of SSP in their price.

    So, who is actually paying for this service pack? Anyone?

    I have customer that had to drop the SSP due to budget reasons besides they were running of closet space for all of the update disks that were not installed) and then latter needed to upgrade. Rather than buy a new license NI let them pay for the SSP on their old license (or something like that). In my experience Ni has always given the customer the best possible options.

    Ben

  16. I'm not going to argue about the SSP, but I do take exception with "Stop writing crappy code" <- NI's code isn't crappy. In fact, it's of an excellent standard. The problem is that LabVIEW (and all the associated toolkits) contains millions of lines of code, and they can't (and IMHO shouldn't) test every single line of it for every single permutation - that's just not possible. They use a different strategy: the beta programme, where the average Joe can find out if what NI's thinking of releasing will work for what they want - their own use cases. In short, if you want better code (ie: code that works for your specific use case(s)) then test it within the beta programme.

    The voluntary Beta Program can be improved in a couple of simple ways.

    1) Change the EULA that comes with the Beta to back us up if the Beta testing goes sour on us. If I try out a Beta and it steps on my machine (renders the official releases inoperative) then one of the tools I use to make a living (my mahcine) is jeopardized and according to the EULA "Tough luck Ben!". This translates as "Wait until you retire." for me so I am out of Beta test cycle on those grounds alone.

    2) Use the Bug Report records to find the people that have found and reported the most bugs and offer them a resonable rate to use BETA code (with full support if something goes wrong after codding for a moth or so) in there every day work.

    Since neither of the two items above apply to the BETA, I wait for the "dot-zero" version where I do have support and my boss does pay me to use it and will not fire me if I do. As I find the bugs I report them. So until there is a serious change in the policies this situation will not change.

    Now for what may be a retorical or just a philosophical Q

    What other industry can expect serious product testing by people that are volunteers?

    Just my 2 cents,

    Ben

    • Like 1
  17. Eric, Ben,

    The issue in this case is not with VI snippets, but how they are attached and/or displayed in forums or web pages. Often the image is just a placholder for the real image file. The placeholder image doesn't contain any of the VI code for the snippet feature to work. When you drag it, you get the circle with line through it (operation not allowed).

    When you find these cases, right click on the image and select "Save Target as..." (not "Save Picture as...") to save it to you computer. Then drag the resulting image file to your LabVIEW VI and the snippet should work fine.

    I was able to get all the snippets you referenced into LabVIEW, though some searched for missing VIs or typedefs that aren't saved in the snippet.

    -Scott

    Confession time!

    I only looked at the links from the original post and the second one takes you to "Groovy Thermometer" which simply can not work.

    Ben

  18. Thanks for the reply, Ben

    Property nodes may be part of it, but I found some other examples that also don't work. This one uses a strict type def which may be causing the problem:

    http://decibel.ni.co.../state-machines

    This one, even the 2-D array constants (which worked in the link in the orginal post) don't work:

    http://decibel.ni.co...t/docs/DOC-6108

    Just look at Snippets as if they where a "Public BETA" for the time being. THe good news is that "Create Sub-VI" did not get damaged along the way. rolleyes.gif

    Ben

  19. I suspect there is a simple answer to this, but I'll be darned if I can figure it out. Why don't code snippets always work? For example, I can drag and drop every snippet on this page just fine:

    http://zone.ni.com/d...a/tut/p/id/9330

    But when I try and drag and drop this snippet:

    http://decibel.ni.co...t/docs/DOC-9812

    I get the "circle with a line through it" cursor. No error, no explaination, just no drop. It happens all the time on snippets. Is it a version issue? I'm using LV9f2.

    Snippets only work ofr the most trivial examples. Virtually every Snippet that uses a property nodes is bad because it repalce the explicitly linkedproperty node with a ref and a property node where the ref is not for the original control.

    If you want to make it work, pop-up on the control and select create ref and use THAT ref instead of the one used in the Snippet.

    Confirmed bug by the way,

    Ben

×
×
  • Create New...

Important Information

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