Jump to content

MikaelH

Members
  • Posts

    835
  • Joined

  • Last visited

  • Days Won

    49

Posts posted by MikaelH

  1. Head First Design Patterns is an excellent book for learning how to use OOP to do what you want.

    I like that book as well and recently bought my LV team a book each, the perfect valentines present :-)

    post-941-0-45671500-1329631824_thumb.jpg

    I have also implemented the Decorator Design pattern using referenced based objects with the DVR. (Symbio’s GOOP4).

    DecoratorPattern.zip

    You can read this design pattern here for free:

    http://oreilly.com/catalog/hfdesignpat/chapter/ch03.pdf

    Cheers,

    Mike

  2. Hi Guys

    Sorry for using such a bad word as LabWindows here on LAVA, but I have a development team in Fremont and Shanghai that develop all their code in LabWindows. Since you can't do all cool stuff there I had to write the intelligent code in LabVIEW, and have them to call my LV exe file.

    I let them control the behaviour to my exe file with arguments so they can call it like this: MES_Finish.exe --PreCure or MES_Finish.exe –PostCure

    But the developers say that LabWindows can't call exe files with arguments.

    Does anybody know if this is true?

    A work around that didn't work either, was for them to call 2 batch files with the argument syntax in.

    Cheers,

    Mike

  3. I would use OO to solve your problem and use a picture control to draw all your objects.

    The Top level application just keeps track of an array of objects that could be of different types but they are all inheriting a common base class.

    The main application calls the BaseObject.Draw method(VI) on all the objects when you need to update the screen.

    When you click on the picture control, the main VI goes through all Objects and calls a method(VI) to see if the Mouse coordinate is within the objects boundary.

    I like this approach since all object could have different state and if you right click on them and would like to display a drop down menu, all objects can decide what menu options are valid for this object.

    • Like 1
  4. Only because our hardware APIs are so poorly designed as to require references. The world doesn't have to work that way, but by historical precedent it does.

    Too bad you weren't involved in the FileIO/driver design from the start, then LV might have been a pure data Flow language.

    But maybe we need to start with a Pure DataFlow operating system to get it working properly.

  5. I remember the simultaneous look of wonderment, confusion and disgust on my students' faces when I used to teach the Endevo GOOP course.

    Chris, you looked a bit confused the first couple of hours when I taught you the course 10 years ago.

    Now it's of course Symbio's GOOP course, and we're about to release a new version of GOOP Development Suite any day now.

    Anti-Flow

    Is Reference Objects, Anti-flow?

    I guess it is, but it's also how you use it, this picture below is a reference singleton class that I call in a data flow sequence.

    post-941-0-92415400-1327959448.png

    Should you try to avoid Anti-flow?

    Good luck and try.

    All very simple applications could be done in pure Data-Flow, but as soon as you use any advanced features such as: File-IO, DaqMX, Vision, Queues, Semaphores, DVRs, Instrument References you are using references.

    In my opinion, if you are an advanced user and ready for classes in LabVIEW, you already know the difference between Data-Flow and By Reference, and you know when to use the different techniques.

    Cheers,

    Mike

  6. Have you tried to Delete the event case and recreated it?

    Maybe even Delete the control and recreate it.

    You can also try using the Lock Front panel for the event, and place a SetBusy inside the event, then go to another state in your state machine, do your stuff there with the dialog boxes, and then SetUnbusy, and go back to the Event Structure again.

    Cheers,

    Mike

×
×
  • Create New...

Important Information

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