Jump to content

MikaelH

Members
  • Posts

    835
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by MikaelH

  1. Hi Jeffrey It's always nice to get a peak into your design solutions :-) I guess you have 2 base class methods Thread 1 and Thread 2 that you override like this: I tried the solution the way I would have done it, and it worked as suspected. I’m using the GDS’s design pattern function to create a spawning process for every Station object. In this process I call the Thread VI. Have a look at the design and check out the video describing how Design Patterns in GDS works. http://goop.endevo.n...DesignPatterns/ Threads.zip Cheers, Mikael
  2. So there you go guys, another reason to use classes in you applications :-)
  3. Hi Since I have almost all my VIs in classes in my app, so when I want to dynamically run a VI (method), I use the Open VI ref using the string name instead of path: "MyClass.lvclass:MyDynamicVI.vi" and as long as I use any VI on this class the whole class will be loaded in memory by LabVIEW and it works without me knowing the absolute path. //Mikael
  4. If you remove the INI files, LV will not load the GDS in memory. If GDS should be loaded, all files have to be compiled, if any file needs to be compiled (or LabVIEW thinks it need to be recompiled), LV will crash. I have only tested it once myself and I got it working at least once, but I'll look into this issue. Cheers, Mikael
  5. Just make sure you remove the 3 ini files, and LV should start as normal.
  6. Yes I have use it a bit, but your right LabVIEW does hang if any VIs aren't Pre-Compiled. So to solve this, you hav e to: 1) After installing GDS, move the 3 ini files in the folder: LabVIEW 2009\resource\Framework\Providers\Endevo 2) Make all VIs in this folder Writable (Not Read-Only) 3) Also make sure these folders are also Writable: \project and vi.lib\addons 4) Start LabVIEW and Masscompile all files in these 3 locations. 5) Just to be sure I would open all VIs direct under the folder: LabVIEW 2009\resource\Framework\Providers\Endevo, and verify that they really don't have a * in the title bar. ANd is so resave all when closing. 6) Quit LabVIEW 7) Move the 3 ini files back and restart LabVIEW Let me know how it went. I do have a beta GDS-version, that might work better, let me know if you want to try that one. //Mikael
  7. But you can't use Auto-Populate folder within a class. Classes and Auto-Populate folders don't go togeather
  8. Hi Shaun It looks like your after the “Iterator” design pattern. (Page 257, in Design Patterns http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612). Just google it. E.g. http://www.cs.unb.ca/profs/wdu/cs4015w02/ch5d.htm Cheers, Mikael
  9. I most often use the reference based class templates, and I then use the Endevo GOOP 3 class provider in GDS. But when possible I use the normal by value approach, but I still use GDS, but uses the LabVIEW Native class provider to make my life easier. Cheers, Mikael
  10. Hi Daryl I'm sorry to here that the OOP class didn't deliver what it promised. You could start here: http://lavag.org/top...-goop-prgamming I've also uploaded some videos, but those are focusing on the Goop Development Suite. 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 Tomi has made a nice video that you can try. http://expressionflo...ts-and-classes/ Cheers, Mikael
  11. Hi We're running XP, and most of them are XP embedded. We started to notice this problem when we updated the code to be LV 2009 compatible. The funtion takes a string in and returns a Configuration Ref Num, in LV 2009, this is replaced by a class. So in the initial design we used the "Private" functions in the Config VIs to create the object, but in LV 2009 this is not possible since we can use the private VIs any more. This is the initial code, which always has been working: And here is the code we changed to and started generating problems. LcString_OpenConfigDataUsingString.vi This problem has become more and more frequent for some reason, before is occurred about 0-2 times a week, but latelty we saw it several times a day. Maybe it's the virus protection application that causes the problem. Cheers, Mikael
  12. Hi We have experienced some strange things on some computers running the a LV executable applications. We download ini-file content from a database and temporary write them to an ini-file so we can use the Configuration File VIs. 1) We delete the file (it might already exist) 2) We write a new file 3) We open it with the “Open Config Data” VI. So easy, but we have experienced problems on some computers running this code in an LV executable. It always works when running it from the Dev Environment. (FYI the VI that create this Config data Refnum is not reentrant) The problem is that the file is empty. Why I see an empty file is probably because I use the Default input to the “Open Config Data” VI, that lets it Create the file if it doesn’t exist. But why is it not created. Any ideas? Is Window treating files in the Temporary folder different? Are commands (e.g. the Delete File), somehow cashed in Windows and executed later when the file is in the temporary folder? We have solved it by doing this for now, but why why why???? Cheers and happy New Year guys. Mikael
  13. Hi Jeff If you can upload the same code in 8.6, I can help you quicker, since I won't have access to LV-2009 until tonight :-) Or. you can just port a screen shot of your "Stop Loop Query" But here are some tips/question. I guess the "Stop Loops" sets a flag in the attribute and the "Stop Loop Query" checks it?! Reading from the attribute is normally a quick task, but if the size of the attribute is huge, it will taks some time. You can check the attribute size, using the "Tools->Debuggers->Endevo Object Debugger..." option. I would suggest that you check how often this "Stop Loop Query" is called in other loops, so you don't call it so often LabVIEW has to wait for access to it. When I need a faster attribute access and I know it's a Singleton, I use one LabVIEW 2-Style Global If you have many caller to the "Stop Loop Query"-VI, you can change it's Priority to subroutine (VI Properties->Execution). And when you use this VI on the block diagrams you can right click on it and select option: "Skip Subroutine Call if Busy" I also use the Profiler to see how much time is spend in accessing the attributes of the class. Cheers, MIkael
  14. Don't you need to: DECLARE @NewTestID int I would suggest to write a Stored Procedure that does it. Cheers, Mikael
  15. Also rember to only use Single Precision SGL, that will half your data size, and is probably good enough. So if your happy to get: 3.1415927 instead of 3.1415926 SGL should work fine Cheers, Mikael
  16. Singleton or not… I often use Singleton classes, it might be because I’m lazy wiring the class wire through all my application. Here is a brief description of why I use singletons. This is how my standard implementation of my manufacturing rigs looks like. I use a top level VI, and some singleton classes and a bunch of instrument driver classes. Let’s look at the current rig I’m working on. This rig should: 1. Place, align and glue 3 optical components on the DUT. 2. Every component is held by a motorized stage with 4-5 axis. 3. Every stage has about 7-10 additional digital IOs 4. There is an over all vision system with 2 cameras with different lighting controls. 5. There is an additional optical measurement system I’m using for alignment. In total it’s about 50 IOs in the system from simple position sensors, pneumatic values to 13 motorized stages, cameras, glue dispense systems and other more advanced measurement system. So where should I start when implementing a large system like this? I start by looking at the system from an operator’s perspective, what can I see? I see 3 separate motor stages. I see a camera and lighting arm, holding 2 cameras and some lamps. So I decide to create 3 classes, one for every motor stage, this is because they look completely different and hold different components. I name the classes after what component they are holding. So one stage will be called “Mirror”-class, and I choose to use a singleton class here. So why do I use a singleton class? I know that I will only use one of these objects in my application, but the main reason is that I don’t want to clutter the block diagram of my Main VI, that is going to use this object ;-) This “Mirror”-class will aggregate all instrument objects it needs, e.g. 4 motion control motors. This class will encapsulate all functions I might need to perform on the Mirror component. I will have a public method (a method that my main VI will call) named “Pick up and place mirror at initial location”, and also one called “Cure Mirror Glue”. These methods will be a bit abstract and I let the method figure out how to perform these actions. That way I get a good abstraction level, and it’s easy to follow the application flow in my Main VI. I never allow my main VI to access the instruments direct, so I’m forced to go through an abstraction layer. By using this approach, I can break down the complex system into smaller solvable parts, in my case I use classes. And for this project I use only singleton classes in my application component layer that abstracts the driver layer from the main VI. Cheers, Mikael
  17. Hi I'm a GDS fan (no wounder ), so I just right click in the Project Tree amd selectes New->GOOP Class (Using The Endevo's Reference based provider). Then I just select a singelton class type, it's so easy :-) ..one advantage I like about this template (or any GDS class templates) is that if there is a new version of the class template I've used, the GDS toolkit can automatically update the class to the new template. Cheers, Mikael
  18. Cool, but I can so recommend a database, MSSQL-EXPRESS or MYSQL are both free and very easy to install and use. //Mikael
  19. Hi We use a central MSSQL production database, where we have all software listed, plus a change log what have been changed between all versions. So every time the application starts up it check if it's Software Part Number and revisi0n is the latest one, if not it displays all changes between the versions and gives the user an option to upgrade. If they decide to upgrade I start another LabVIEW exe-file located on the network (instead of using a batch file) and closes the current application. The Upgrade application, takes a copy of the current version and stores it locally in an OldVersions-folder, and then download the next version (using the database as a reference). When it's copied the application in place it starts it up. It also gives the user an option to revert back to the old version if the new version has some problems. To get this working smooth fully, we have a Configuration Management tool (simple LV app), to help out with creating new versions in the database and upload, commit and tag every release. Cheers, Mikael
  20. Yes, it's free, no limitations. //Mikael
  21. My favorite is FogBugz, because it's faster and have some extra fun features. But Eventum has what's needed for a bug tracking system, but our version is a bit slow compared to FogBugz. //Mike
  22. I use FogBugz which I really like (it's free for up to 2 users), and Eventum (MySQL-Bug Tracking tool).
  23. This issue has been CAR'ed now.
  24. Hi I’m a bit puzzled about NI's Motion Control Driver VIs and maybe someone can answer this question. - The In and out of the Board ID /Handle has a coercion dot. - That is because they are of 2 different type defs. - My question is why aren’t they of the same type def????? Cheers, Mikael
  25. I would probably use the right click menu option, otherwise you can do something like this. Cheers, Mikael GrayOut.vi
×
×
  • Create New...

Important Information

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