Jump to content

LAVA 1.0 Content

Members
  • Posts

    2,739
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by LAVA 1.0 Content

  1. QUOTE (Michael_Aivaliotis @ May 16 2008, 02:10 PM)

    ...

    I think the hardware vendors should start outsourcing the development to LAVA members.

    Lets hold this thought for a minute. OK long enough.

    [set Crazy Idea Mode = True]

    What would it take to make "LAVA Cerified" the LV equivelent of "Good Housekeeping" seal of approval?

    Vendors could submit drivers to a CR and if they the req's of the code repository, they get certified.

    LAVA could be supported by the income.

    [set Crazy Idea Mode = False]

    Ben

  2. QUOTE (Mobile-it @ May 16 2008, 10:10 AM)

    I have a question about automatically generating vi's.

    ...

    for instance something where we create 2 controls, 1 add function and 1 indicator? without opening LabVIEW?

    ...

    I am not sure what you are asking to do.

    If all of the VI's you want to open are of that form then a re-entrant VI will let you open and run as many as you want (memory limited).

    If you want to controll which operator (add, sutract, etc) then again a re-entrant VI with an option switch wil work.

    if you want to allow the user to define their own set of opertors, then life get complicated.

    Trying to help,

    Ben

  3. QUOTE (Yen @ May 16 2008, 05:30 AM)

    I apologize for attempting to enlighten the masses by broadening their knowledge.

    I'd like you to keep enlightening the masses. I get a kick out of picking up a word or two (never more than two at one sitting, the word for "earth" most often since there is a news paper ? of that name) very now and then when the news include someone speaking in Hebrew.

    Ben

  4. QUOTE (rolfk @ May 16 2008, 05:04 AM)

    Er! The big question here is for what is this good? ...

    Rolf Kalbermatter

    I am interested in finding a good solution to this Q since I have some widgets that can "see" and I will have to entertain them durring a test.

    The last time I looked, RT platforms did not offer a user interface. Maybe that has changed.

    Another way of twisting this request is rather than controlling the video output deterministicly, is to let a video run and then sync the system to the video. I believe there is some bandwidth allocated within composite video signals (before the front porch?) where digital info can be stuffed. A cRIO could watch the video signal and pull out (?) a frame count or something the that effect.

    Ben

  5. QUOTE (Aristos Queue @ May 15 2008, 08:51 PM)

    ...

    Since this VI has random input, not every code path is exercised on every execution, and so on successive execution there will be some terminals that get allocated for the first time.

    Eventually, all the code paths are allocated, and we reach equilibrium.

    Thanks Aristos!

    With a loop count of "50" the code was terminating with not enough memory. NI Support was able to see the increse in memory useage.

    So I f I had an intital step that forced non-default data into "everything" (? still have have to learn more to be able to figure out to do that! ?) the memory useage should not climb.

    [back at work and trying some more]

    I got rid of the random number stuff and just wired a true to make all regions bad then cranked up the benchmark for 100 iterations. Got message saying out of memory but it also ID'd the offending VI as the code that generates the images and puts them in the queue.

    So I hacked the code to eleminate the queue all together and what was looking like a memory leak is now gone. I'll say that this makes sense since with a loop count of 100 I am creating and then re-creating the queues 100 times. On top of that I am stuffing 150 elements of image data into each queue. I already understand that the resource allocated for queues are only freed up when LV terminates, so.....

    I don't think there is a memory leak but rather my example is simply not manamging memory properly.

    RE: Speed

    The task version is still running faster (about 40%). I am coming to understand that fact being due to how the two methods are implemented. In the task version, the individual sub-sections of the widgets are checked using explicit code for each region. This code construct (attempt to ofuscate?) lends it self well to multithreading as indicated by the CPU usage of both cores being higher durring the "task" part of the benchmark. In the LVOOP implelemtation (help me out with terminology) regions are all handled by the same code (decomposition?) so parallel execution is just not possible.

    [And after some further thought...]

    The decompostion (?) observation I made above seems to parallel "Normalizing" a database where a "fully-normalized" DB can perform better if it is slightly "de-normalized". ("Just because we CAN do something does not mean we SHOULD do something." (Paraphrase from Jurasic Park, Jeff Goldblooms character)).

    Thanks for your comments and reading!

    Ben

  6. QUOTE (MikaelH @ May 15 2008, 04:05 PM)

    Agreed!

    See here for NI 5431 Video Generator that used in the app I mentioned earlier.

    We used that to calibrate the guns in the "old" tube type TV's. If your image is simple (small) you may e able to use the built-in looping and chage images on the fly.

    Ben

  7. I found the example located in

    C:\Program Files\National Instruments\LabVIEW 8.5\examples\lvoop\BoardTesting

    This example claims the work being done using the traditional Task approach is the same as in the OO version. While studying these examples I sensed the OO version was taking longer so I did my standard benchmark code (note: I added output terminal of the results to the icon of both versions) and it turns out YES the LVOOP is slower!

    post-29-1210878876.png?width=400

    Watching the Task manager shows the LVOOP version is spending much more time idle (not using all of CPU, waiting on mutex, maybe durring dynamic dispatch (?) ).

    So are there any ideas on how to make the LVOOP version as fast as the Task verions?

    Thank you!

    Ben

    PS: That example I showed above will demonstrate a memory leak (I think ). Is the a BUG in LVOOP that I don't know about?

  8. QUOTE (Tomi Maila @ May 15 2008, 11:22 AM)

    ...

    Does anyone have experience on deterministic video displaying. Any suggestions to any direction?

    I have never done it myself so I can do is voice some ideas.

    I don't think using a standard PC display with the OS driver and screen refresh characteristics is do-able since determinism is just not part of the architecture.

    You may want to try seraching for a DVD player that has external control that would allow single-stepping the images. You could drive the single-step using a DO from a counter.

    I have driven TV's with simulated video signals from an Arbitrary Waveform Generator. When I did that, the memory of the Arb board was limited. You may want to check on what the current mem capacity of the Arb is now. I think NI was even providing some software at that time to make this easier. (been a long time since i did that one).

    Just trying to help out. If nothing else maybe one of these ideas will inspire a proper solution.

    Ben

  9. QUOTE (shoneill @ May 15 2008, 09:00 AM)

    Well I'd love to try that at home, but you didn't actually say what it WAS...... Tune in next week?

    Shane.

    Details! :headbang:

    A single person drinking a bottle of Ouzo and chasing it with shots of expresso. I offered to help him with the Ouzo but he was "conducting an experiment".

    Ben

  10. QUOTE (shoneill @ May 15 2008, 06:34 AM)

    [Old memory awakened]

    The two words "Greece" and "Ouzo" remind me of a Med-cruise when I learned that "alcohol poisoning" was a reality.

    Trivia:

    "Pepsi" (not the diet stuff) in an emergency can be used to help a person accelerate the passing of toxics from the body.

    Warning:

    Do NOT try this trick at home! The people involved in this memory were professional sailors and trained for this work.

    Ben

  11. QUOTE (Tomi Maila @ May 14 2008, 06:59 AM)

    The figures on the image have a certain order as layers from the bottom to the top of the image. The figures on higher layers can exist on top of figures on lower layers. Therefore the figures need to always be drawn in order i.e. you simply cannot change the color of some figure by redrawing it and ignore all other figures as this would make the drawn figure to appear on the top.

    In this example I would do the color change the following way.

    - Iterate trough the Picture stack to see which figures are selected. To iterate the stack, use a method similar to Picture.lvclass:Draw.vi which iterates the stack and draws each item in the stack.

    - For each selected item in the stack, call the set color method to set the color of that item

    - Then call Draw method for the whole stack, the whole picture will be redrawn (do not undraw, it's more complicated)

    Create a selection tool in a similar way to the other drawing tools. For the Mouse Down method of the selection tool, iterate the picture stack the same way as above from top to bottom to see which item was clicked. The way I would do it is to add a new dynamic dispatch method to graphics object class for checking if this particular object was clicked. Then implement the method on each of the shape classes. The method would return true if the click occurred on the item. Then when iterating the stack, class this method for each item in the stack. The first item this method returns true would be the one that was clicked on.

    You can use array instead of the stack. I used the stack to show how data and call recursion work in LVOOP. If your items are in a stack, you need to iterate trought the stack. There are no references. However memory wise, LabVIEW can iterate the stack in-place. However, if you use recursive calls to iterate the recursive data structure, you end up having many clones of your iteration methods in memory. At least as long as AQ decides to implement something called tail recursion. Last time I asked, the answer was it won't be implemented anytime soon.

    Tomi

    Thank you Chris and Tomi,

    I appreciate your replies and will attempt to understand them. :rolleyes:

    For the application I have in mind to try out the LVOOP technology, the array version rather than the stacked version will probably fit my needs better.

    BUT.... before I get too carried away...

    A lot of the right-ups of LVOOP make mention of in-place and by-reference features.

    can anyone speak to the performance of a "well-structured-and-implemented-LVOOP" application?

    THe app I want to try this one will be supporting two 24 inch touch-panel screens that will serve as arbitrary (i.e. user defined) user interfaces, where I need to provide good response times (less than 1 second 1/4 second or less would be good). So when a user touch one of the screens I have to able to quickly ID which object was clicked and perform what ever operation is appropriate for that widget. The "what ever operation is appropriate " phrase makes me think that the dynamic dispatch feature of LVOOP will be very handy and also allow for adding additional widgets to the screen as time goes on.

    THis app will also have to run as an executable.

    Is LVOOP solid enough to run as an exe?

    Hoping I finally found a good excuse for learning LVOOP,

    Ben

  12. Is there a way to view the relationships of members of a class? Something that shows what is the Parent and what is the child.

    I'm trying to answer my own questions (above) so ti seems I should look for the parent of all of the objects since my "change color after the fact" change request affects all of the drawable objects.

    Or am I going at this the wrong way and I should expect to (?) write a new method (?) for each of the shapes?

    Still trying,

    Ben

  13. Hi Tomi,

    I really have to thank you for posting this example. It is starting to make this OO stuff click for me.

    I have been going over your example and re-reading the article by Aristos Queue. I am not comforatable enough with the terminology to summarize what I have learned yet. While conducting this exercise, I have asked myself a couple of questions that I can't answer. I hope they are easy for you (or others).

    1) How would I modify this example if I wanted to change the color of an object already on the screen? (undraw all until I get to the one I want, fix it, and then re-draw?)

    2) If I wanted to allow the user to click on a previously drawn object and change it to a different shape, how can I use the click coordinates to figure out which of the objects it goes with?

    3) Your examples keeps the shapes in what appears to be a stack that you add to or remove from. How does LVOOP let me get at arbitrary shapes with out popping them of the stack?

    I hope these Q's are very basic.

    Still trying to "slip another tool into my bag",

    Ben

  14. QUOTE (BrokenArrow @ May 13 2008, 10:21 AM)

    When is a VI a "driver" ?

    1. It never is
    2. It always is, if it talks to hardware
    3. When the VI works only on a specific brand/model/part number of device
    4. When its main purpose is to make API calls
    5. When your manager, vendor, or girlfriend referes to it as such

    Thanks! :rolleyes:

    There is probably a forma definition of a driver somewhere, that I 'll others find and link.

    Years ago I asked "what is the difference between a mainframe and a super-mini computer?" The response was "Anything that cost more than $1M is a mainframe."

    To me a driver is software entity that translates opeartional requests into hardware interactions that produce required results. An automobile driver takes request "turn left" slow down" and manipulates the hardware for that end. A disk driver accepts read request (read 100 bytes from block sector 500) into a "seek command" "header verify" "read 512 bytes" "transfer to client buffer".

    Ben

  15. QUOTE (tcplomp @ May 13 2008, 09:55 AM)

    ... an example to change an array of strings into a type-def.

    Ton

    Good point Ton!

    Provided you don't have to change the enums at run time (which you can't in an active VI) you can define values of a ring and then replace the ring with an enum. Provided the enum does not end up being sparse (not all values defined) this makes it much easier to define all of the enum values.

    Ben

×
×
  • Create New...

Important Information

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