Jump to content

Francois Normandin

Members
  • Posts

    1,209
  • Joined

  • Last visited

  • Days Won

    46

Posts posted by Francois Normandin

  1. QUOTE (MikaelH @ Nov 23 2008, 04:09 PM)

    That's a good point indeed. I had thought only of invariant properties, but this is a good peeble... since I'm also working on a TCP client-server!

    QUOTE (MikaelH @ Nov 23 2008, 04:09 PM)

    But to get this working you have to use the Class Attributes in a special way.

    The class attribute of a VdLabelPrinter objects will not have anything in common a VdDigitalContoler object. So I can't really use a Static method GetInstrumentByType, from the Base class VdTestInstrument to get these objects.

    So I have to store the references to all objects in a Class Attribute that is Common for all created objects that is derived from the VdTestInstrument base class.

    So you actually have 2 different class attributes to store data in.

    1) If you wire the lvclass wire into the lock attribute, you will get a unique shared memory for a objects of that type.

    2) If you don't wire the reference into the lock attribute, you will get a unique shared memory that you can access between all classes that derives from this class.

    That's exactly the answer I was looking for. Not only was I wondering what would happen if I changed inheritance or created new related classes, but I see there are two possible implementations based on how I really want to share information between the objects. And that's a trick that will hopefully keep me from running in the wall when I try to design it.

    thanks Mikael.

    QUOTE (TG @ Nov 23 2008, 02:25 PM)

    I have learned to ignore them in the few limited GOOP designs I have attempted, however there must most assuredly be uses for them..

    Sounds a lot like me! ;)

    Well now that I know of the TCPIP address example, I'll try to find other ways to make use of them.

  2. I've got a theoretical question on GOOP Classes. :book:

    I'm usually defining my object attributes for anything that could be different from one object to the other (ID, init parameters, position, speed, etc.) and, as I understand it, the class attributes are for everything that is class invariant (let's say supply voltage, material, dimensions, etc.). But I usually never use the class attributes and put all the fixed parameters in the object attributes, initialize them once with "Object_Create" and never change them in the course of my program. I think it's not optimal design but it works rather simply and it's more readable for colleagues less familiar with OOP.

    I would like to know if it is good practice to simply ignore the class attributes? My concern is as to what would happen if in the future I were to create a sister-class and make these two classes inherit from a parent. Those sister classes will have different class attributes... How well does it scale up? Will I run into a wall one way or the other? Any comments?

    thanks,

    Francois.

  3. QUOTE (km4hr @ Nov 20 2008, 09:58 AM)

    Charts created on my system appear to be sitting on raised panels. I see pictures in LabVIEW books that show charts sitting directly on the background "canvas?". I like that better. How do I get rid of those funky looking raised panels?

    I also see LabVIEW screens that have controls grouped together inside nicely chiseled frames with rounded corners. The frame is a thin line that surrounds the controls. The frame might have a label inside a gap on the upper left-hand corner of the chiseled line. This looks great. How is it done?

    You can customize each controls.

    Replace the recessed panel with a nice system frame (or chiseled frame) to have it automatically adjust to your graph:

    • Like 1
  4. QUOTE (harika @ Nov 15 2008, 05:45 AM)

    normally the graph showing the variation for only for particular value.i want the graph for phase difference for two signals for all values at a time by varying the frequency(0-40HZ) difference.

    Hi Harika,

    Could you be more specific in your question? For example, do you want to know how to have a second axis displayed or is your question about how to calculate the phase variance?

    If you think a screenshot of your code or a VI would help us understand better your problem, please post it as well. ;)

  5. QUOTE (tnt @ Nov 13 2008, 07:03 AM)

    I think it fails because you already destroy your image inside the subvi,

    it is better to create the image outside (before) the while-loop, and destroy it after stopping the while-loop.

    You're right about that. While the indicator is still there, it refers to a pointer in memory. Destroying the image in the subvi effectively destroys it everywhere as well, except if you've made a copy of it. That goes against dataflow thinking... I prefer to think of IMAQ images more as a reference to a memory space than a linear process.

  6. QUOTE (Dan DeFriese @ Nov 11 2008, 02:01 PM)

    It still leaves the question open: Why would a new LV user tackle this kind of problem? It's not the kind of work that a teacher would ask for as part of a normal LV learning process, so I'm wondering if Saif really wants this or maybe he/she wants to do something else? I think the "VI hierarchy" might have been the real answer to the question asked... Or maybe "Display a subVi's front panel in a SubPanel?" would have been such an assignment.

    Anyway, I would not have proposed this solution if I thought it was a real homework question... :nono:

    LATE ADDITION (EDIT):

    QUOTE (saif @ Nov 11 2008, 02:15 PM)

    Or the other way round, if it is possible to put an image on front panel and then it will put subVi on the block diagram

    That's what Palettes are for...

    Otherwise, you'll need to dynamically call subVI's and use scripting. I don't think you want to go there, yet.

    QUOTE (saif @ Nov 11 2008, 02:15 PM)

    Homework???

    QUOTE (saif @ Nov 11 2008, 02:15 PM)

    I have different components(images files bmp,wmf ) to show on the front panel. when a user put subvi, then on the front panel we can get the image of the subVI.

    See image code up there...

  7. QUOTE (saif @ Nov 11 2008, 01:18 PM)

    Hi

    I am a new user of LabView. I have some problem in working out with subVI.

    I have created a subVI.Is there any way that when i put the subvi on the block diagram then on the front panel i can show an icon or any image representation of that subVI. So that the user may know that subVI is placed on the block diagram just by looking at the image on the front panel.

    Can you explain why you'd want to do that? It's not that it's impossible, but I don't understand why anyone would want this... especially if he's new to LabVIEW.

  8. Hi Thang,

    I have a simple 2D image rotation that you might use (with some tweaks to have a better GUI). I've set it up with a steering wheel jpeg for you to try. If that's close to what you need, you'll have to improve it by trimming the edges and perhaps smoothing the image by doing some interpolating. Anyhow, try this out...

    Saved for 8.0. (OpenG Arrays library needed)

    Download File:post-10515-1226381134.zip

×
×
  • Create New...

Important Information

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