-
Posts
148 -
Joined
-
Last visited
-
Days Won
6
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Stagg54
-
I'm trying to use the Heap Peak to get rid of some insane objects. However I am having problems with the F button. I've highlighted the appropriate entry in the right window, but for some reason clicking the F button does nothing. Now this vi has several tabs. It is possible its on a hidden tab and that's why it is not showing up? Anyone have any experience with this? I am using 2011 SP1 F1 if that helps.
-
I should have read Darren's article first, because that is exactly what he suggested.
-
My suggestion is similar to Tons. I just use an array of cluster, where each cluster contains just an array.
-
NI software engineering, advanced arch courses worthwhile?
Stagg54 replied to MarkCG's topic in Certification and Training
Just took the CLA-R last week and I can tell you definitely want to at least read the book and take the practice exam before you take the CLA-R. I'm sure its possible to pass without doing that, but it would be very difficult. -
Creating a thin line overlay with no borders
Stagg54 replied to Mark Balla's topic in User Interface
Maybe its an OS requirement? -
NI software engineering, advanced arch courses worthwhile?
Stagg54 replied to MarkCG's topic in Certification and Training
That must be fairly recent, because three or four years ago when I took the course it was based on Endevo's course and it was horrible. I sure the course you've designed is much better. I work with several people who have many years of experience and still write crap code. You don't need a certificate to write good code, but having a certificate proves that you've written good code at least once. I would rather have someone with a small amount of experience writing good code, than a lot of experience writing bad code. -
It was my first experience with a service request and it went quite well. Luckily I was able to upgrade to LV2011 for this project, otherwise I probably would have been much more upset.
-
I was able to upgrade to LV2011 SP1 and the problem went away. Not exactly what I was looking for, but it did work. I did not try the force recompile. At some point I may go back and do that just to see what happens. Thanks for all the advice and help. And thanks for NI for pointing me in the right direction.
-
I did try recreating the class and that did not work. I have not tried the forced recompile. How does that differ from a mass compile?
-
So I filed a service request on this and NI has been helpful but I haven't managed to resolve it yet, so I'll post what I know here and maybe someone will have an answer. It appears from talking to NI that this may have been resolved in 2011. Currently I am using 2010 SP1, 32bit on Windows 7. Upgrading to 2011 may not be option. I'm looking into that. Here is how I noticed the issue: I was trying to deploy and run some code on an RT target. When I deployed the code it asked me to save a particular lvclass file. I hadn't changed the class, so I'm not sure why it wanted to save it. I clicked ok to save and got into this endless loop where it kept asking me to save it. Clicking cancel got me out of the loop, but then I couldn't deploy the app. I thought maybe the class was corrupted so I tried to mass compile it and I got the following error: Fatal Internal Error at OMUDclasslinker.cpp line 4161. I tried running the same code not on RT but within the regular LabVIEW environment and it ran fine. I also noticed that: The save-all button is always enabled and everytime I click it and click on the show details button, it says that there have been changes to this particular class as well as its parent, even though I haven't changed anything. When I click save, this time I get no error, but afterwards the saveall button is still enabled. And the next time I click it the same thing happens. Anyone have any thoughts?
-
Libraries and best practices
Stagg54 replied to Stagg54's topic in Application Design & Architecture
That was what I was thinking. I guess I'll have to look a little closer at my design. to jgcode: It's not really causing problems so much as it seems odd to me that to load and work on a low-level component I have to load essentially the whole project. I think goes back to what Daklu said about dependencies. I think I need to readjust my paradigm to "let high level components depend on low level components, but not the oher way around." -
Finally trying to understand and learn Object Oriented
Stagg54 replied to jdebuhr's topic in Object-Oriented Programming
My recommendation would be to start small. The actor framework to me seems like a rather advanced OOP concept. Although I really do like it. -
I'm just curious how many use libraries in your day to day development (I'm assuming a fair amount of you do). I'd like to know how and why you use them, especially if you are using multiple libraries in the same project. I'm running into this problem and I'm not sure its inherant in using libraries or if I'm just misusing them or not using them as intended. I have this project and every major component is in its own library. I have a config library. I have a notification library. I have a synchornization library. I have a file writing library. I have a TCP/IP communication library etc. However what I find is when I want work on one small component it ends up loading almost every library in the project. For example in my notification library, if I load any vi in that library it loads the whole notification library. There is a vi somewhere in the notification library that sends out a TCP/IP message. Because it uses a vi in the TCP/IP communication library to get a queue ref, now it loads the TCP/IP library. And also somewhere in the notification library it writes something to a file, so it loads the file library which happens so use a semaphore to control access to the file which loads the synchronization library, which somewhere has config file entry which determines the size of some queue which no requires loading the configuration library. And it goes on and on. So now to edit a single low-level vi I end up loading multiple libraries into LabVIEW. Anyone else run into this problem? How do you handle it? How do you determine what to put in libraries and what not to? This problem gets even worse, because I have 2 applications. One is an HMI app running on Windows and the other is an RT app. For communication I send objects over TCP/IP and have a command pattern that runs on the recieving end. When I do that however then I up loading half the HMI app into memory on the RT target, just because one of the messages references a library on the HMI. Now I have all this code loaded in RT that is intended for the HMI and will never run in the RT app. Did I explain my problem well enough? thoughts?
-
for what it is worth, I passed the CLA with an LVOOP implementation. unfortunately I can't post it (for obvious reasons)
-
Try grabbing the Y array and just rotate it. If I understand what you are trying to do correctly then that should work.
-
I'm starting this new project where I have to send some objects over TCP/IP. I'm planning on flattening it to a string on one side and then unflattening it on the other. So far I haven't run into any problems, but I've only really tried it in the development environment with 2 vis on the same local machine. I'm basically using the command pattern to send commands over a TCP/IP link so I'm counting on the recieving end to recreate the correct child class, which it appears to be doing. The only potential issue I am aware of is making sure both sides have the same class definitions What other issues might I run into? I'm sending the objects from a Windows box running a exe built with LV2010 64bit and I'm sending it to a RT box running an exe built in LV2010RT 32bit. Can I make this work in that situation? Is the 64 vs 32 bit going to create any problems?
-
disclaimer: first of all this is related to the NI challenge problem. Not asking anyone to give away any solutions or anything, I just want a better understanding of how LabVIEW manages arrays. And hopefully I'm not giving too much away by my questions. I have some questions about how LabVIEW handles arrays and memory management My understanding (please correct me if I am wrong): 1. LabVIEW stores arrays in continuous blocks of memory, which it requests from Windows Memory manager in chunks. I believe LabVIEW just keeps a pointer to the first element. When you split the wire it makes another copy if necessary. The show buffer allocations should show you were this occurs. 2. Using build array inside a FOR or while loop is not optimal because it can cause LabVIEW to have to go to Windows memory manager to request more memory (I believe under the hood it is somewhat smart about this and often requests more than is needed). 3. When using the build array is much more efficient to add onto the end of an array because when adding to the beginning LabVIEW has to shift everything to make room for the new data at the beginning So my questions: 1. deleting an element from the middle of an array - should require LabVIEW to move (shift) everything in the array after that point. Correct? 2. deleting an element from the end of the array - should not require LabVIEW to do any kind of shifting or anything (in theory i should just change the size of the array). Correct? 3. How does LabVIEW handle shifting? I assume that it it splits that array at the point where it is shifting (ie. what would become the new index 0)and then takes the first and second half and moves them to a temporary location and then appends the first half to the end of the second half. is that correct? Some of these questions may already have been answered somewhere. If so, if you could point me in the right direction that would be great. thanks, Sam
-
in this case though I'm not entirely sure. The problem is the realtime output is continuous. So to make a simple semaphore work I would have to: Periodically stop the realtime task Release Resources Release the Semaphore Reacquire the Semaphore Reacquire the resources Resume output Playback from the file only occurs rarely. So I would constantly have the overhead of releasing the resources and then reacquiring them and 99% of the time it would just simply release and immediately reacquire. I'm not a DAQmx genius (in fact I know very little about it, just the basics) but I have to think that would chew up a lot of CPU time/resources. It kinds seems like polling versus being more event driven. It seems that even if I were to use a semaphore I would have to use some sort of notifer/event (or something similar) as well to stop the continuous output task so that I am not constantly stopping and starting it. Hence I was thinking that if I have to incorporate both a notifier and a semaphore that bundling them in a class might make sense. Am I still making it more complicated or is there an easier solution? oh and to add another wrench into the works there is talk of building the part of the program that does playback from files into its own seperate application, which opens a whole new can of worms.
-
Well simple is usually better.
-
So here is my situation I inherited some code that has a bunch of parallel loops. Several of them share hardware. Specifically we have 1 channel of AO that goes to amplifier/speaker setup. Normally we use this channel to output realtime signals from our sensors. But there is a portion of the program that can "hijack" this AO channel and use it to output data from a file. The problem is not only interrupting the realtime output but also that the 2 tasks have different parameters/setup (for example sample rate, continuous vs. finite samples, etc.) So when this was developed they previously had 2 seperate programs and when they combined them they ran into all kinds of problems, so they invented this crazy scheme using all kinds of global variables to coordinate and do some handshaking. It's a mess. Its super-buggy and it needs rewritten. We also have a similar issue with an AO that is used for injecting test signals (we have 2 different types of test signals). I would like to implement an OOP solution. I'm still trying to wrap my mind around the problem, but I'm thinking about having some sort of arbiter class. It would decide who gets control of the resources. I'm thinking that to do it that way the arbiter would have to be by-ref. I was thinking of having some sort of "Output Data" method, where you pass it the data you want to ouput and tell it what type of output it is and it handles setting up the resources and coordination. Any thoughts? Am I on the right track? Would you use a different approach? Also, I'd kind of like to draw this up in UML. Anyone know of any good UML tutorials (as it pertains to OOP and classes)? thanks, Sam
-
I use Yairs solution quite often and it works very well. (although I often use a shift register - I haven't quite adopted the feedback node yet). I've always referred to it as a "self-intializing functional global constant".
-
SAP => Run for the hills!
-
That sounds like agreat idea! Thanks for the suggestion.
-
That assumes that they are the same, which they are not. I could search through all VIs in memory, but that could be a bear (the app has 1000's of vis). Also then I how do I figure out which one is active? I could try the FP.Is Frontmost property but according to its help entry it ignores floating windows. Anyone have any other thoughts? On a side note: does anyone know what the Application.Active VI property is returning? I haven't been able to decipher it.
-
Here is what I need to accomplish: The powers that be want all front panels in a particular application to have this feature they call "auto-snap". Basically all visible front panels should "snap" back into place if the user tries to moves them around (by clicking on the title bar and dragging them). The user should be able to hit the F2 key to unlock the window and move it where ever they want. Pressing F2 again should lock it again and snap it back into its original position. My original design was to create a "brat vi" (I got that term from Norm Kirchner - he calls it that because it manipulates its parent). Basically you dropped it into each vi that had a visible front panel. All you had to pass it was a notifier to tell it when to exit. It ran in parallel and automatically pulled out the callers ref and registered for the key down event and took care of everything. Very cool and it worked very well. Only downside is that you had to drop it into every vi with a frontpanel. A bit of a pain for anything you may want to reuse for another project. Now here is my problem. Now they want to pull in this reusable library that I have. I don't want to drop this brat vi into my reusable library. Most of the timeI don't want this feature and I don't want to pollute my library with something that is only going to be used for this one special case. Now this reusable library has one main entry point/UI vi. Now I can modify my brat vi to accept a reference and run it in parallel with the main UI of my reuse library. All works well until my reuse library calls up a subvi that shows its front panel. What I would like to do is launch a vi in parallel with everything that would automatically detect when a new vi is opened and becomes the active front panel and then to act upon that. That would be nice because then instead of dropping it into every UI vi, I can just drop it once and run it in parallel with my main vi. I guess my question is: How do I get a reference to the vi that is active (ie. that the user is currently interacting - ignoring subpanels for the moment -although my reuse library uses those heavily so maybe that will cause some problems as well.) I found the Application.Active VI property which I thought would do want I wanted. (Its a scripting node, but is supposedly works in the run-time which is what I need.) Unfortunately it does not appear to be returning what I am looking for. I'm nost sure what its returning. Even though Scripting is now supported (I'm using LV2009 by the way) there is not any documentation on what the term Active VI means. I does not appear to mean what I thought it did. Anyway, is what I'm trying to do possible? Does anyone see a better way to solve my problem? Did I do a good enough job explaining it? thanks,