Jump to content

hooovahh

Moderators
  • Posts

    3,360
  • Joined

  • Last visited

  • Days Won

    268

Everything posted by hooovahh

  1. I remember there was some kind of odd-ness with a few tree controls as well where two tree controls looked the same where you could select items by checking boxes in one, but the other was an indicator with boxes that couldn't be checked. Also don't let your self be impressed with the graphical view shown in demos. With more than 10 requirements that view is worthless. I remember a few projects with several hundred, and one with over a thousand requirements where that view was just a blur of lines.
  2. What version of DAQmx is installed? Likely not it, but I didn't see it mentioned any where. It sounds like it is seen by MAX to some extent so I'm guessing the version installed is fine.
  3. That's nothing. I can't seem to find it right now but I have pictures of me unpacking my carry on luggage for a business trip that was 2 weeks. I had one bag with clothes, and one laptop bag with all my electronics. When I got home I took a series of pictures as I unpacked because I had a very large pile of clothes, which appeared to be 3-4 times larger than the suite case that contained them. As you can imagine the bag with the clothes in it was very dense and heavy.
  4. Yeah I couldn't help but notice you are running XP. I'm sure you know this already but I like to remind myself, XP came out almost 11 years ago. Service packs have changed XP since that original release, but I can't imagine using very much 11 year old software today that was designed for consumers. Good luck with your future upgrades.
  5. Here is my 2011 in Windows 7 x64. I'm having a difficult time seeing any difference between the two. I haven't used any thing earlier than 2009 in so long (it feels like more than a few years) so I can't say when the change happened. That only had 9 Kudos and it got implemented? I guess there's hope for any feature request.
  6. You dislike the concatenate string function so much that I use it just out of spite. But seriously I have a bad habit of over using the concatenate function and find that using format into string is almost always better.
  7. The OpenG tool look interesting. Was there a reason it wasn't built into a package? Possibly into the Application Control? Or Builder package? I think there are places that the OpenG method, and my method could both be improved. Over the weekend I was thinking about all the stupid things I did in mine that could be much simpler, and support for array of controls could be made simpler too so you just need to make a scalar of the data type then specify the size. Not sure if I'll ever have time to improve my method but I wanted to get it out there for others to look at and possibly improve on.
  8. So in a recent discussion here the was talks about scripting polymorphic VIs. At the time I was surprised to hear that no one had made scripting code to generate polymorphic VIs. This feeling passed when I realized several people have attempted to generate polymorphic VIs through scripting. There are some on NI's site here, as well as some older ones on Lava as well. Still I didn't realize this until I had taken my own go at it. So here is a really beta version of my attempt to generate VIs that are 99% the same as another VI, with the small exception that the controls on the front panel have been replaced with a different control. Attached is my quick and dirty approach. Open "Main Create Wizard.vi" and run the VI, it will prompt you for a VI to use as a template. I have included an OpenG version of the Filter 1D array under the Example Files, I also renamed it so it shouldn't conflict with already installed OpenG code. Then choose the controls that you would like to replace in the new interface by clicking the boolean corresponding to the control connected to the connector pane of the VI you selected. Then choose the control types to replace the selected controls with. These control types are just controls on disk and by adding any control to the folder "Control Types" you will be adding them as an option in this window. At the moment it is quite limited. You can only replace controls that are on the connector pane, and they all must be replaced with the same control. So you can't do anything fancy like replace one control with a path, and another with a 1D array of a path. I think that wouldn't be too difficult to add but I didn't want to spend too much time on it. The code should then generate a VI for each control type you selected in the same folder as the template VI you selected at the start. This code relies on some OpenG packages, I'm not sure all of them but File, and Array for sure. Let me know if you have any questions, and feel free to modify and post your updates. Create Polymorphic VIs hooovahh.zip
  9. I'm actually quite surprised no one has made a scripting VI (or no one has shared it) that can do this. I agree it should be build into the IDE (which is why I gave a Kudo) but this doesn't seem that hard. If I get some time I may give it a try.
  10. I'll be at the Walled Lake location. It's hard to tell from the site but is this basically the NI Week presentation on 2012 with a little Q&A?
  11. I just had to try the link to see what comes up. Turns out this thread is the number one result for whatever my hear desires on this site, go figure. And just to stay on topic I will not be attending NI week this year. My boss mentioned it, but I said no. I just started this new job and didn't think it was good timing to leave so soon after starting. But we agreed next year I will be going. I've never been to NI week but am excited for the chance to go, even if it won't be for another year.
  12. I realize some of my posts are a little long winded so I don't blame you for not picking up on what I was trying to say. In my first post I said this: Which was my way of saying that the search should be throughout the string. If I knew it was at the beginning I would use your technique with the string subset. Also I may be missing something, but why does concatenating a "^" symbol cause the Match Pattern method to work faster?
  13. I'm starting to get inconsistent results, but from what I've seen it looks to be one of the better solutions but not the best. The best I've seen would either be Method 3, or Method 3, modified as wouter suggests. In my tests this did not perform as well as the others. It would usually be 4th or 5th place in any array size. Not terrible but not the method I would prefer.
  14. I'm not quite sure why but your VIs on my system took 34 seconds to search through, using 10,000 items in the array, and it took over 900MB of private memory. To compare my original post took a minimum of 169ms and 1.4GB of private memory for all 6 methods. At the start of all of this I said the only real criteria was time for execution so the memory usage is a little unfair to add as a requirement, I simply wanted to give a comparison.
  15. An alternative to the toolkit could be a command line call to FTP the files. I think the toolkit version is the clearest solution, but if all you want to do is this one function you may be able to do it another way. All though it is just $500. Windows has a built in FTP command line program (just FTP at a command prompt). I've never used it but I assume it has the ability to login to a server and send a file over.
  16. To help with the clarity I've made a VI that shows the error. It will make a new VI, drop down an event structure, add a frame to it, and then optionally attempt to remove that frame, then open the block diagram to see the result. If you choose to remove the frame after making it, there will be the error we are talking about.
  17. Thanks Crelf, you saying that made me realize this may be better answered at NI's forums so I posted there as well.
  18. Wow thanks alot Wouter. I'm not sure why I didn't think of pre-allocation. I think this would make a nice little reuse nuggest for the community or OpenG some day. I also did notice that with a smaller sample this method 2 with pre-allocation doesn't always win but it may be the best solution overall.
  19. Crosspost in NI Forums So I saw a new error today, one I've never seen before but I'm assuming other have. It is error 1072, and the text along with it is the following: I was not aware that LabVIEW shipped with method calls that are available without hacking, which are not implemented. I was attempting to use a invoke node to remove a frame from an event structure. I was first frustrated in the fact that I couldn't programatically get the name of each event case. There is a Lava post here which attempts to read it using OCR but has issues with different system fonts, clear type, and cross platform issues. I decided to just delete the frame based on the index and not the text since that seemed to difficult to find. Apparently this won't work either and I was forced to come up with a work around using a disabled diagram structure, which would have duplicate code in each case, other than in one the event structure has the one case removed that I wanted. I would then remove the disabled structure leaving the case I want, with the events I want. The post I linked to earlier is from 2009, and I'm a little surprised to find out that the event structure scripting tools are still immature. Can anyone comment on their development? Or what other scripting functions are available to but not implemented? I assume features like "Remove Frame" are implemented and NI uses them, they just aren't exposed. If that's the case I'm surprised that NI couldn't find the time to expose these functions in the couple of years scripting has been mainstream.
  20. So I embarked on a little journey this morning. Many times when developing code I have the need to search an array of string for some pattern. Usually I am looking for some set of characters in a string and then I need to get the whole string, and possibly the index that the string was found in the array. There are many different ways to do what I just mentioned, some more obvious then others, and I wanted to know which was the methods that should not be used for larger arrays, and which method appears to be the best, on a Windows machine with time to process being the only thing to judge on. So attached you'll find a VI (saved in 2011) which generates an array of strings. Each string will be between 5 and 15 characters long and the array size is controllable from the front panel. For approximately half the elements in the array, a string will be appended to the front of the generated string. These are the values we will search for. We then search the array looking for the indexes that contain the string we are looking for. In this example the string is appended to the front, but I would like to make this generic and I am assuming the string we are looking for could be any where in the string not just the beginning. I use 6 different methods for finding the indexes and calculate the time it took to find them. I noticed for arrays of 1000 elements or less it doesn't matter too much. Each of the 6 methods take 0 or 1 milliseconds to complete. For 10,000, or 100,000 the winner is Method 2, which uses the Search/Split String, combined with the OpenG Conditional Auto-Indexing Tunnel. I know this is such a simple task, and for most cases it doesn't matter, but I was wondering what others have found. Is there a method that is generally preferred more? My thoughts would be that Method 1 would have been the fastest, since we only have to iterate over the items once, instead of an OpenG method, but I do realize the Build Array is an operation which can be bad for memory. Search Array Of Strings.vi
  21. I went from 2009 to 2011 so I'm not sure which neat new features are from 2010 or 2011. The changes for me aren't some thing I can't live without, but I do use some of the newer features all the time.
  22. I'll admit that the current top 10 has no killer apps, but it has several things that I would use on a daily basis to help me save time, either in development, or to better document my own code. I have also seen some good ideas with not much attention. LAVA is a decent sized community, and if we collectively see something we want in LabVIEW, NI will notice hopefully implement it. Let me be clear I'm not saying we should all band together and vote for one thing, I'm saying that if an idea is truly a good idea, and it doesn't have much attention, post about it here and let the community decide.
  23. I usually start with a NI example, they aren't perfect but they give a nice starting off point. I recommend the "TDMS Logging - Cont Log and Read Data.vi" found here: <LabVIEW Directory>\examples\DAQmx\Analog In\Measure Voltage.llb\TDMS Logging - Cont Log and Read Data.vi I'm guessing your problem is the fact that you are doing a single sample read, which takes a very short amount of time, but then in a loop read again, this whole time the AI read task is still running filling up a buffer, and by the time windows requests another single sample, there maybe hundreds of samples waiting to be read. This eventually fills up and you run out of your buffer on the DAQ hardware. To prevent this try to decrease the sample rate, or increasing the number of samples to read. The example above uses 1K samples at 10KHz.
  24. I'm sure you don't need my compliments, but that is a very impressive looking graph.
  25. Yeah I'll admit I was half expecting it to just be a stationary model. When I saw it spinning I really wanted to see it go all out, and start spinning until the thing broke up all of its pieces. I guess that wouldn't be too good of an ending to 8 weeks worth of work.
×
×
  • Create New...

Important Information

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