JeffG Posted January 6, 2010 Report Share Posted January 6, 2010 I'm relatively new to LV and a beginner in OOP. I have a singleton class for routine overhead (writen by an experierenced developer) that randomly slows a timed loop down to a craw, running on a MS workstation. Without the obect the loop runs in less than 1 ms, with it I can randomly see 30-70ms. How does one go about diagnosing such problems with GOOP objects? Thanks- Jeff Quote Link to comment
crelf Posted January 6, 2010 Report Share Posted January 6, 2010 How does one go about diagnosing such problems with GOOP objects? You can start by uploading some code for us to look at Also, is it GOOP or is it LVOOP (or a different flavor of OOP)? GOOP specifically refers to classes/methods written using the Endevo toolkit, LV-OOP is the built-in LabVIEW OO framework. It's important for us to know what we're dealing with to help you. Quote Link to comment
JeffG Posted January 6, 2010 Author Report Share Posted January 6, 2010 It is Endevo GOOP. What's the best format to use to post code? Quote Link to comment
asbo Posted January 6, 2010 Report Share Posted January 6, 2010 It is Endevo GOOP. What's the best format to use to post code? Since it's probably not just a single VI, it's best to package everything into a ZIP file and then attach it to your post. Quote Link to comment
JeffG Posted January 6, 2010 Author Report Share Posted January 6, 2010 I was looking for a nice scrolled window to place a LV block diagram in. I've attached a jpg of the loop, the only object used is to check a master stop setting to shut down the loop. The zip file has the class. I know its way cluttered AxleSupervisor_class.zip Quote Link to comment
MikaelH Posted January 6, 2010 Report Share Posted January 6, 2010 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 Quote Link to comment
JeffG Posted January 7, 2010 Author Report Share Posted January 7, 2010 Thanks for the suggestions. Dose OOP pose systemic issues with regard to timing and speed? Are there timing issues with OOP when run on non-RT targets? While I'm happy to live with functional globals the use of singleton classes without the need to pass references was attractive. Thanks - Jeff Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.