Jump to content

MikaelH

Members
  • Posts

    835
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by MikaelH

  1. Hi guys We're working on it and are into to the final testing phase of it. This should be done by next week. I hope you can wait one more week. Cheers, Mikael
  2. I agree, its soooo annoying , but I’m happy they changed the Shift-Right click option on a tab control that really annoyed me when upgrading to 8.6 In 8.6 you can’t get to the tool palette when Shift-Right clicking on a tab control.
  3. Good on you. Let me know when you're up for a
  4. In did this a long time ago like this (only for windows). Make a system call to "Dir nothing.txt" this will give you this result: H:\>dir nothing.txt Volume in drive H is Data Volume Serial Number is [color="#ff0000"]64BA-5E87[/color] Directory of H:\File Not FoundH:\> Then just parse the string //Mikael
  5. MikaelH

    Endevo_Object1.PNG

    From the album: Icons

  6. That's a good feature. It would be good though to be able to define a Project Specific VI(s) that always is ran before you start your main VI in a Project. Of cause I like to see the option of defining a Main VI in a project so then you press Ctrl-R from the Project Tree, it should automatically start your Projects Main VI. //Mikael
  7. Interface The concept interface doesn’t exist in LabVIEW yet, but I hope that it will be added in the future. An interface class is an abstract class that only contains empty methods/VIs. So when someone calls this method/VI the call should be forward to the real implementation of this method in the class that implements this interface, just like normal inheritance, but instead of deriving for this Interface class the OO term is to implement this interface. Many design patterns uses the Interface concept e.g. Command Pattern and Observer. So how do you implement an interface in LabVIEW? Of cause you can make your classes all inherit from the Interface class they need to use. But is really a UUT a kind of command? Is a Player a kind of Observer? You should always be able to say the <child class> is a type of <parent class> E.g. A car is a type of vehicle. But maybe you can ignore this rule for those classes, but maybe you want to implement several interfaces, then you’d run into trouble. The way I implement this in LabVIEW is by using an Interface Helper class. So if I have this example where 2 different classes like to implement MyInterface. I have to create an extra Interface child class to the Interface parent class, so I can make use of the powerful dynamic dispatch. These are two very small classes only containing the methods defined by the interface. So when someone calls the Update method/VI in the Interface class, that call will be directed to the Update methods in my X_MyInterafce class which only forwards the call to the Update method in the Player or Spectator class. This way I can implement several interfaces. I’ve made a small example code that uses this approach together with the observer design pattern ( PartII). Project: TennisGame.zip You need some Class VIs you get when installing GDS Key: COMM-UNIT-YEDI-TION-2009 The main VI does these things: Creates the TennisBall, 2 Players, X no of Spectators Creates the Help classes PlayerInterface and SpectatorInterface These 2 help classes are used as inputs to the Ball:AttachObserver method. The AttachObserver method stores the reference to all observers/subscribers The main VI updates the Ball's position using the SetBallPosition method. This method sets the new positions and also calls the NotifyObserver method. The NotifyObserver calls the update method on all Observers that are attached. The Update method in the Player and Spectator class, has now been informed that the tennis ball has been moved and they update their private attribute they have of the balls position. This might not the best way of implementing this problem, but shows how the players and spectators can be notified when something they have subscribed to happens. Cheers, Mikael
  8. Tomi has made one parser that you can find in the OpenG root class template. I've a version of that code in one on my VIs, it looks like this: GetClassName.vi //Mikael
  9. Hi Regarding the GDS, I've created some videos of how to use it and how to get started with OO. These videos haven't been officially released but could been accessed here at the moment. www.goop.endevo.net/GDS/videos/GDSFeatures www.goop.endevo.net/GDS/videos/GettingStarted www.goop.endevo.net/GDS/videos/DesignPatterns www.goop.endevo.net/GDS/videos/StateMachine www.goop.endevo.net/GDS/videos/Debugger Cheers, Mikael
  10. Make sure you don't wire the Working directory Path!!! //Mikael
  11. Yes you can, but the execution properties has to be "Run when open". Just type: "c:\program files\national instruments\labview 8.6\labview.exe" "c:\test1.vi" You can read about this in the LabVIEW Help, just serach for "Launching a VI from the Command Line" //Mikael
  12. QUOTE (rssharpe @ May 24 2009, 03:03 AM) And you could also use the picture control and use the drawing funtions to draw your own control, I would use that for the pitch,roll,heading and then customize a Gauge control to create the compass. //MIkael
  13. QUOTE (Michael Aivaliotis @ Mar 28 2009, 07:36 AM) If you try the Add Method->Property Method using the GDS toolkit, does it them work? Cheers, Mikael
  14. Could you first answer these questions: What result are you after? Do you what to see if there is a exact match, or just get a value indicating how good the match is? And also could you give me some real data to play with. E.g. save the 2 waveforms as "Make Current Values Default". Cheers, Mikael
  15. Hi The content of the Data (dat) file is not correct, the While loop never terminates. What result are you after? Do you what to see if there is a exact match, or just get a value indicating how good the match is? One solution could be to find the peaks in the different waveforms and compare the locations of these peaks. You could add a LowPass-Filter and then compare the waveform as you did in your code. Cheers, Mikael
  16. I've seen this many time. I normally get it when (for some reasons) not all VIs gets copied to the Build, directory. In 8.5 this happened to me when I had a Library containing classes. If I didn't forced the Builder to add the Library as a "Include" file I couldn't get it to work. But that problem was fixed in 8.6. //Mikael
  17. This is how I've done. Download File:post-941-1236207439.zip Cheers, Mikael
  18. Same here, I e.g. use a special Error code for User Abort, so I can terminate a test sequence as fast as possible. //Mikael
  19. Same here, I e.g. use a special Error code for User Abort, so I can terminate a test sequence as fast as possible. //Mikael
  20. I normally use a udl-file. (create a empty text file and rename it to something.udl , and then double click on it) My software reads this UDL/Text file and grabs the Provider string from it. E.g. Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Production;Data Source=MYSERVER The file is unicode and so you have to strip off all NULL-characters. If the file don't exists I start by creating it by just writing this Unicode-text file. Cheers, Mikael
  21. QUOTE (crelf @ Feb 23 2009, 04:06 AM) You could always do an XControl and combine the normal Table with a Picture control on the top, just for displaying the columns. //Mikael
  22. QUOTE (zmarcoz @ Feb 23 2009, 10:34 AM) ..or why don't you use an object oriented approach with simulated objects. This is how I’ve solved it. All instruments inherits from a VdTestInstrument-Base class This class has child classes for every instrument type I need. E.g. Power Supply, Digital Input units, Switches, Climate Chambers. For every sub group of instrument e.g. the Label Printing-class, I create a Simulated class and then the real implementation classes in this example I have three different implementations for printing a label. In every Simulation class I register this simulated object to a <SINGELTON> class I call “VdTestInstrumentSimulation”. ;-)This class shows a dialog box where I can select which simulated objects to open. The dialog box dynamically opens the “SimulationDialog” method in the simulated class that gives the user an interface to the Simulated object. Here the user can monitor what is written to the object and also control what responses the object should report back when you do a e.g. Read function on the object. E.g. This is how I can simulate all instruments on my Rig, I also of cause create a simulated DUT unit so I can test my software completely before deploying it in production. Cheers, Mikael
  23. Thanks Kenny I've just updtaed the code, and it should all be there now. //Mikael
  24. I might as weel post my suduko solver I did years ago. I got stuck on a Suduko on a 4 hour train ride, so to solve it I of cause used LabVIEW. I might be a bit messy, but I had less than 4 hours to get it working. Cheers, Mikael
  25. QUOTE (Jim Kring @ Feb 20 2009, 08:26 AM) I can of cause add a checkbox that allows the tool to delete any existing method before, but that's a bit scary. If I add an automated backup feature of the deleted/removed method then it would be quite safe. We're just about to release a new version and I'll see if I can squeeze this function in. QUOTE (Jim Kring @ Feb 20 2009, 08:26 AM) 2) The GDS "Clone VI" dialog only permits sending the new clone to a single class. I want to send it to about 30 sibling classes. Ideally, I don't want to have to do a "Clone VI" operation 30 times. You can clone a method (from the base class), to one or all siblings, see image below: I haven't added the function of sending a method to several other classes but it's a small task to do that. I can create a beta version for you during the weekend if you are interested? Cheers, Mikael
×
×
  • Create New...

Important Information

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