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 (Aristos Queue @ Jul 8 2008, 10:06 AM)

    The Wikipedia says

    "

    The Active Object design pattern decouples method execution from method invocation that reside in their own thread of control.[1] The goal is to introduce concurrency, by using asynchronous method invocation and a scheduler for handling requests.[2]

    The pattern consists of six elements[3]:

    • a proxy, which provides an interface towards clients with publicly accessible methods
    • an interface which defines the method request on an active object
    • a list of pending requests from clients
    • a scheduler, which decides which request to execute next
    • the implementation of the active object method.
    • a callback or variable for the client to receive the result.

    "

    So the approach i am taking is;

    The "proxy, which provides an interface" The class provides methods which use queues to post method requests to the back-ground VI (*.VIT).

    The "interface which defines the method request " I think I have covered with a type-def'd queue containing an enum that specifies the requested method.

    The "list of pending requests " is realized by using the queue.

    The "a scheduler, " is implemented in code that checks for method invocations otherwise it handles the "update work" (eg scroll text)

    The "the implementation of the active object method. " is realized with appropriate code to handle what is found in the que.

    The "a callback or variable for the client to receive the result. " is realized in a response queue that is fed from the results of the code for each method.

    The above scheme is just my first attempt at an active object and is my attempt to realize in LV something that matches the description of an "Active Object".

    Again thanks all for your replies!

    Ben

    PS Ton, My boss is already taking a chance by letting me code this app in LVOOP. I'd only make him more nervous if I jumped right to the XControl to handle this part of the design. If I design this properly, I should be able to pass the project to one of my rookies to finish-up.

  2. QUOTE (JFM @ Jul 8 2008, 04:18 AM)

    As Aristos said, these specific controls are part of an add-on package, but you can change the appearance of existing LabVIEW controls as well;

    * If you only need to change the looks of a control, use the control editor.

    * If you need to change the behaviour, e.g. to use specific formatting depending on the value, use Xcontrols.

    /J

    Adding to the above.

    The one big plus of the DSC add-on is the colors of the controls can be set at run time. A control that has been customized looese this option.

    Ben

  3. QUOTE (Aristos Queue @ Jul 7 2008, 06:41 PM)

    LabVIEW does not have any metaclasses. LabVIEW Object is a class. It is the ancestor class that all other classes inherit from.

    When Tomi dropped the rectangle, he instantiated an object. An object is an instance of a class. There's no such thing as a "metaclass" in LabVIEW*.

    * unless you're talking about the C++ code in the LabVIEW.exe which contains a class "LVClass" which is the C++ class that defines what it is to be a LabVIEW class and inherits from class Library which inherits from ... well, something else. I've put this as a footnote because I felt it was important to specify what a metaclass would be -- if G code had one -- but I didn't want to confuse anyone who just wanted a straight answer and would just glaze over footnotes.

    No. We name the front panel element "LabVIEW Object" because that is an FP control for the class LabVIEW Object specifically. The data value of that control is an object. What kind of object? LabVIEW Object.

    If we add other class FP controls to the palettes in the future, they'll be named for their class.

    Already done, and done incredibly well, by the folks over at Endevo. If you need UML, check out their UML tools. Very powerful, very clean user interface.

    Thank you Aristos!

    Its nice being wrong in this neighborhood. Plenty of people willing to straighten you out. So the term metaclass really does not come into play in LabVIEW applications.

    I got all excited about Tomi's video and typical for myslef did not explain myself well. When I was asking about UML what I was actually thinking about was what Craig Larman calls "Sequence Diagrams". I got to the point were he introduced the idea of an "active object" and I am curious about how an active object would be implemented in LabVIEW. From its description I have gone off and created code that spawns off (VI server run no-wait) a VI that is coded to watch an input queue for one of its methods being invoked. The non-active objects appear to quickly and easily manifest themselves from one of the templates. But they return their resluts imediately and there is "nothing hanging around" to do the follow-up work.

    Say I wanted to mod Tomi's example such that it had a scrolling string field. I'd want that class to regularly update its image without being "tickled" by the GUI.

    So that is what I really had in mind. How do I implement active objects in LV?

    Sorry about the tangent all!

    Ben

  4. QUOTE (san26141 @ Jul 7 2008, 09:26 PM)

    I can't open the vi (Displaying_an_image_from_a_web_page.vi ) or image. An "error" pops up saying that they may have been moved or deleted. Where can I download this vi if it is still available?

    Thanks

    Several options:

    • Crelf removed it
    • It got lost in the archives of the internet
    • LabVIEW has sent a bot to the LAVA database removing this attachment

    But the code is quite simple, and you can easily recreate it from the images supplied. Oops the image is gone too.

    A similar piece of code is given on the dark side.

    Ton

  5. QUOTE (kristos_b @ Jul 7 2008, 09:25 PM)

    I guess you can not expect much from software timing but still this looks pretty weird. Specially that the rest looks quite regular.

    I believe that digital data uses RLE encoding (if nothing changes nothing is stored), maybe you see a side effect of that.

    Ton

  6. QUOTE (kristos_b @ Jul 7 2008, 09:00 PM)

    Simple case is to write to one output line pattern i.e. 010101011111111111111111111010101 and on the scope you will see 010101011010101.

    But I don't see that in the code/screenshots, maybe you should widen the scope frame?

    Could you specify which code/image you mean?

    In het second set I count 9 '1' on p0.2 while p0.3 is high, this is perfectly reflected by channel 2 and 3 on the scope image.

    Wait, I see on the first set that the dip on channel 1 (p0.4) is too early.

    But this is all with software timing?

    I never trust those ;)

    Ton

  7. QUOTE (Yair @ Jul 7 2008, 07:14 PM)

    The rectangle is simply a child class of shape (or whatever the hierarchy is in this case) - when you drop one, you are creating an object, not a class.

    Yes that's right, it's the reason LabVIEW names the front panel palette element 'LabVIEW object'

    We are using the Endevo by-reference Goop implementation.

    It has two kinds of data attributes:

    Class attributes which are the same for all the objects of that class

    Object attributes which are specific to a single object

    The fun thing is you can set and get class attributes from a class constant without creating an object.

    On the video:

    Respect!

    I've done two swf movies for the Code Capture Tool and it is hard.

    What program have you used to capture your screen activities, I've used Jing but found it is not real-time.

    Ton

  8. QUOTE (solerpwr07 @ Jul 7 2008, 06:14 PM)

    Hope all had a good holiday and long weekend.

    ive put up the area of code where it displays the loads put on each of the different (8) test specimens. can the change in load be carried out directly from (after) the doubles; replace the area where you all generated data? i know there is a space issue, but that can be taken care of.

    Hi,

    This code is unmaintaneble. I suppose it grows every week.

    What's the use of the 2D arrays? You can use 'concatenate arrays' (right click on the build array nodes)

    Why devide by 5, absolute, multiply by 5? Absolute would do.

    You should write wrappers around a lot of the functionality you use, you can place the feedback nodes inside those VIs

    Ton

  9. QUOTE (dannyt @ Jul 7 2008, 01:50 PM)

    We use ClearCase as our source control tool and when I do a build (using the OpenG builder) I generate a Build of Material (BOM) which I save a part of the build log

    ...

    So you can easily (one click) say which products use a specific user.lib VI?

    About the network drive, what happens if you work 'offline'? all your code is gone.

    QUOTE

    small rant.

    I can never understand why all the LabVIEW people seem to like the fact that everything is locally install, to me it make good team working and control a nightmare almost impractical at time I feel, certainly from the point of a "quality assurance manager"

    I say, multiple LabVIEW versions, I say ActiveX.

    Both of these urge me to separate my user.lib development from the actual user.lib.

    ActiveX will always recompile one a new computer, thus a new version to distribute between computers though no code has changed.

    If you upgrade from 8.5 to 8.5.1 your whole user.lib will be recompile though no code has changed.

    What if you find a bug, you fix it. But you also use the code in LabVIEW 8.2 (and 7.1 and 6.1)? Where do you make the fix?

    Ton

  10. QUOTE (dannyt @ Jul 7 2008, 06:50 AM)

    I can never understand why all the LabVIEW people seem to like the fact that everything is locally install, to me it make good team working and control a nightmare almost impractical at time I feel, certainly from the point of a "quality assurance manager"

    In Windows you have the option to place a shortcut to a network folder in the local user.lib directory and have the VI libraries on the network show up in the user function palette.

    Not the ideal solution, but a step in the direction.

  11. My advice:

    Start over from scratch, have a look at the examples in the help file. Look for simultanious IO. The express VIs you use are not suitable for hardware clocked timing.

    Good luck,

    Ton

    PS Forget all the express VIs you use except the XY graph.

  12. QUOTE (Tomi Maila @ Jul 7 2008, 07:08 AM)

    I'm afraid you will need to stay unproductive for a while ;)

    Ok then I'll fight my way through the fog myself. I you hear a scream, you'll know which direction the abys lies.

    Your discision of classes reminded me of a passage I recently read in Craig Larman's "Applying UML and Patterns, An introduction to Object-Oriented Analysis and Design and Iteractive Developement, Third Edition" where on page 236 and 237 he writes;

    "

    You can show class or static method calls by using a lifeline box label that indicates the receiving object is a class, or more precisely, an instance of a metaclass (see Figure 15.20).

    What di I mean? For example, in Java and Smalltalk, all classes are conceptually or literally instances of class Class; in .NET classes are instances of class Type. The classes Class and Type are metaclasses, which means their instances are themselves classes. A specific class, as class Calendar, is itself an instance of class Class. Thus, calss Calendar is an instance of a metaclass! It may help to drink some beer before trying to understand this.

    "

    All typos are of-course mine. (BTW: I recomend Craig's book for getting into UML)

    So ...

    The class Rectangle you showed in your project is a metaclass and when you drop one on your picture, you are instaciating a class?

    Ben

    "

  13. QUOTE (Tomi Maila @ Jul 7 2008, 09:50 AM)

    Verry good video :worship: - Now I have just to wait till I can use classes on LabVIEW RT :oops: ...

  14. QUOTE (dannyt @ Jul 7 2008, 10:44 AM)

    Once in the source control system I can do all the tracking I need without tagging.

    Really?

    I have not found a source control code that allows you to trace from which code which VIs are called.

    I think user.lib code should be developed somewhere else and should be installed into user.lib, and the source of these VIs should under SCC. During a built I would like to built a list of all the VIs (with identifiers) so I can keep trace.

    Ton

  15. QUOTE (Tomi Maila @ Jul 7 2008, 03:50 AM)

    :worship:

    Great!

    I need to watch the next nine episodes before noon today so I can stay productive.

    Do plan on realizing UML in LV?

    Which episode will cover instaciating active objects?

    Ben

  16. I have a question.

    I am thinking about a policy which allows our company to track which user.lib VI is used where so we can decide for which programs we have to retest upgrades of VI libraries.

    I want to be able when building an application to read which VIs are used inside the app. A simple routine is reading all of the children VIs and store this array.

    A more sophisticated way is a cross-link database where for every reuse VI is tracked in which applications it is used. I am thinking to give each reuse VI a special tag to have an easy access database field.

    Some option are:

    • VI description with a special string like ***Internal Reference #### Version 0.9*** (NI has such fields)
    • A tag on the frontpanel like OpenG has
    • A tag on the block diagram
    • A tag using VI tags

    I am thinking about the latter, the tags are invisible to the user, can be accessed via VI server, the downside is that they are not supported by NI (what do I care, I do more unsupported stuff).

    What are your thoughts?

    Ton

  17. QUOTE (Yair @ Jul 5 2008, 02:13 PM)

    As you know I can't post usable code. But it just so happens that the code I have now will be re-written has bugs and generally... sucks. Besides, I have not added the Killer Rabbit object yet, so what good is it.

    So see attached.

    Demo VI is "Drop_Generic"

    These notes show you what the controls do.

    http://lavag.org/old_files/monthly_07_2008/post-29-1215362777.png' target="_blank">post-29-1215362777.png?width=400

    A Index of element on screen. This is as dropped order.

    B Stop demo

    C Toggle between edit and operate mode

    D Ring lets you select object to drop

    E load from file. some objects do not operate after re-loading

    F Save design to file

    G value that will be written to the object at index (A)

    H Read the selected objects value

    I Write the selected object

    J value read from object

    K File spec of bmp file that serves as background. You must set this before running demo. I included some samples under "Graphic_Operations/Background_Images"

    If you happen figure out why two of my three booleans do not work after re-load I would not mind at all.

    Have fun,

    Ben

  18. You must be in the same class as this poster.

    What have you tried so far? Do you have any code to show us of what you are working on? What is the interface from the

    USB6008 to your LCD display? What kind of signals do you need to send to the LCD display?

    There's not much we can tell you with the little you told us. Look at some of the basic examples installed with LabVIEW to become more familiar with LabVIEW before programming the USB 6008.

  19. QUOTE (dispossessed @ Jul 5 2008, 01:32 AM)

    Hi,

    One Thing I just realize.. if you want a particular number of fps, I would recommend to trigger the camera, I think this is the best way to do since you know how fast the images are taken by the camera and then you just have to make sure you go fast enough to extract and save them to HD.

    Can you try to find a trigger source ?

    Second thing, I checked the camera specs, it appears that in 10bits config the max frame rate is 15fps and in 8bits config the max frame rate is 30fps.

    So...

    Also, as I said I couldn't test it because I don't have hardware at the moment. But with the same architecture I had very good results.

    There are a few things that can be improved in the code I posted, first, to find the bottle neck, here is what I would do :

    - check that the "extract loop" gets all the images, by placing an http://decibel.ni.com/content/docs/DOC-1106' target="_blank">history probe on the "buffer extracted" wire, if this is not continuous, increase the number of buffer you allocate for image acquisition.

    - once you're sure that all the buffer are extracted at the rate you need, graph the Q size to make sure it doesn't no kep increasing... if it does, it means your HD is not fast enough (which I really doubt in your case, seeing the figures you gave :-o)

    ps: here is the main VI with slight change to graph continuously the Q size.

    Hope this helps

  20. QUOTE (normandinf @ Jul 4 2008, 02:41 PM)

    Does that mean these people had some kind of "One-year slavery contracts" with landlords? Work for me the whole year and if you don't leave early, you get paid? That seems real harsh! (even compared with late 1800's where some french workers got a union and gained the right to stop 15 minutes for lunch... and as of this day, they only had to bring one pound of coal a day to heat the factory... But at least they got paid each week!)

    Yes, exactly. You pretty much committed to an employer for the year and had to stay 'til the end to get paid. "You have to be present to win."

  21. QUOTE (normandinf @ Jul 4 2008, 02:41 PM)

    Does that mean these people had some kind of "One-year slavery contracts" with landlords? Work for me the whole year and if you don't leave early, you get paid? That seems real harsh! (even compared with late 1800's where some french workers got a union and gained the right to stop 15 minutes for lunch... and as of this day, they only had to bring one pound of coal a day to heat the factory... But at least they got paid each week!)

    Yes, exactly. You pretty much committed to an employer for the year and had to stay 'til the end to get paid. "You have to be present to win."

×
×
  • Create New...

Important Information

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