Jump to content

hooovahh

Moderators
  • Posts

    3,365
  • Joined

  • Last visited

  • Days Won

    268

Posts posted by hooovahh

  1. Literally orders of magnitude faster I'll give you that.  My only concern would be that Xnodes are the deep underbelly of LabVIEW and have no support, and NI's official opinion is that they should not be used (unless the XNode is made by NI of course).  Which is why I was looking for non-XNode code that can do the same and still be as easy to use as the XNode.  Turns out my first attempt met those criteria but is much much slower.

  2. I was making some subVI that used a private method, and I wanted to know by looking at the subVI that it was private and shouldn't be used in end applications.  I thought the easiest way was to color the icon to have a background the same brownish color that private methods have.  I had difficulty finding the color that was the closes because of this reason and ended up trying a bunch of things to get it right.  It just seemed odd to me that LabVIEW's property nodes had a color that my subVI could not come very close to.

     

    All of this apparently is due to the limitation Darin mentioned.

    • Like 1
  3. Bundling n-arrays into a cluster is scalable just because it is possible?

    I don't know what you mean by this.  Yes it is possible to scale up the example to support any number of items for any data types.

     

    Your new method is the most obvious, but I was originally trying to stay true to the XNode feel, where there is a terminal that is added, then the new data is wired to it, and the selector chooses which one.  This method has two operations to add a new item to the selector.  Add the new terminal, and connect the data to the new terminal.  Your method is similar but if I needed to select from a large number of items (say 50) then making the bundle to be of that size is easier then adding a new 50 cases to a case structure.  

     

    Of course if I needed to select from 50 different items I may do something altogether different.

     

    But to be honest I use your method all the time, and made my method for the first time today.

  4. Well, it is not how I would have built it either, but previous comments sounded like it was not possible at all. I just wanted to check for myself. ;)

    It is possible, given the limitation that all arrays have the same number of elements and are the same size.  If I have 4 3D arrays to choose from they all need to be the same size in each dimension.

     

    But using clusters does have another runtime issue.  A cluster can be mixed data types, so if Item 1 is a string, and Item 2 is a double an error will occur with my method if you select item 2 because the Variant to Data will throw an error at runtime, but still allow the VI to run, where your method will create a broken arrow.

  5. Tell me that's not actually how you would code the logic to pick a certain input array based on a selector input and pass it to an output. It's Friday, you get the benefit of the doubt here.   :lol:

    See my previous comment to hooovah  :P

    Oh give me a break.  I wanted something scalable with as few clicks as possible to add new items, using as little foot print as possible.  Normally I wouldn't use such a function but I challenge anyone to come up with a better solution that is smaller, or uses less clicks to add items.

     

    ALSO I used a cluster because my arrays are not the same size so a build array function would cause wrong data (without the added code to know the size the output should be) which I don't need to worry about with a cluster.

  6. @hooovahh : how is this different than a build array and index? ....

     

    with arrays on inputs ... you can build an array of arrays ?

    with this xnode, no problem.

    Okay so build array and index won't work for arrays, but build cluster and select will work.

     

    post-6627-0-62571400-1369397878.png

     

    Don't let me detract from the work you did.  I have yet to make an XNode from scratch and what you learned can be valuable knowledge.  I just won't be using your XNode is all.

  7. Here are my basic requirements:

    1. It has to be web based. I move between different computers and I want to see the exact same thing on all of them, so not Outlook.
    2. It has to be able to import my Reader subscriptions.
    3. It has to allow the option of looking at each feed separately (If I understand correctly Outlook basically throws everything into your inbox and I don't want something like that).
    4. I don't need something with a mobile app or anything like that. I usually only access these from PCs.

     

    No recommendations but I did want to comment on number 3.  Outlook doesn't throw any RSS feeds into your inbox.  They have an RSS Feeds folder, then under that is a folder for each feed.  I also wasn't aware that Google Reader was going away.  I set it up a few years ago and used it off and on but I didn't like the way it did a few things so hardly used it.

  8. Your code makes me sad.  I've seen worst code before but your code should be cleaned up and documented before your project is complete.

     

    First issue you will run into is the fact that your DAQ card is probably not a simultaneous sampling card.  So when you tell the card to read 1000 samples on two channels, it will read 1000 samples on one channel, then 1000 samples on the next channel.  So your samples will not be taken at the same time, and your phase will not be correct because by the time you are done taking 1000 samples on the first channel, the second waveform will have changed.  If you are taking measurements at the same time then this isn't an issue but many DAQ cards don't support this.

     

    Have you tried graphing the two signals you read?  This may help in seeing why the phase calculation is not what you expect.

     

    Attached is a VI that calculates the phase difference between two signals using the same technique you have and it gives the correct results even with noise.

    Signal Phase.vi

    • Like 1
  9. Assuming the accelerator exists, I usually simulate the Alt+? followed by the accelerator keypresses. 

    Great suggestion.  Won't work in my case but thanks.  In my scenario (which I probably should have mentioned) I'm envisioning a time when a VI could be shown in a floating window, or in a subpanel.  When it is in a subpanel I would remove the menu bar (so it looks more like part of the main VI), and then have some other mechanism to run the menu bar from the main VI, possible through a right click menu.  When the menu bar isn't being seen (and in a subpanel) the Alt + F method (for file) doesn't work.  

     

    I can of course catch the event of a separate right click menu and show the same options as a menu bar, I just thought if there is a way from the Main VI to call the menu item of the VI in a subpanel then no extra code would be required.

  10. So in 2011 and 2012 with the super secret key turned on there is an "Invoke Built In Menu Item" for a VI.  It states very clearly "NOT IMPLEMENTED" so I assume don't use this your computer will explode.  

     

    But this feature would be nice.  I was wondering if anyone had a method for invoking a menu item from a VI, and if anyone knew if/when this feature will be implemented?  I noticed there is a similar invoke method for an application, but this makes me think it won't work for a VI specific menu item.

     

    So this is a bad example but I have a Help >> About Us menu item, how could I problematically call that as if the user pressed the menu item?  There are many, work arounds I just thought this would be one of the cleanest for my setup.

  11. I have topspeed database I inherited to work with and I have some files password protected. Is it any way to unlock those files.

     

    Best Regards

    Batimba

    It is unclear if you are talking about the database being password protected or something else.  This is a LabVIEW forum and has little (if any) topspeed database experience.  If this is regarding LabVIEW please re-phrase the question so it is clear you are talking about LabVIEW.

  12. If you have the "treat read-only VIs as locked". Otherwise, dirty dots can happen.

    So if the file is read-only it can still be edited, (so a dirty dot) but you can't save it so any changes will not be kept, which in my mind is the real reason to set the file to read only.  Sure I could edit a VI that is read-only, keep it in memory and then the changes will be implemented, but as soon as I close LabVIEW (and changes are discarded) the VI will revert back to the original file.

  13. :D

     

    Just out of curiousity... What's the use case for applying password protection on the VIs? I've never really thought about this before.

     

    ~Dan

    Or to prevent accidental changes to VIs in the vi.lib.  Of course changing the file to be read-only maybe an easier alternative for this.

  14. Well this is an interesting one.  I've seen this event before and I just never had a need for it so I never used it.  I assumed it worked the same way you wanted to use it.  I couldn't open your snippet (I believe Lava may have removed the meta data on upload) but I made a quick VI that was blank, and a new VI that opened its reference and tried to do what you did.  Sure enough I got the same error 1027.  

     

    I tried tricking the method a few ways because I noticed if the VI was running I could register for the event but couldn't select any thing on the block diagram.  So I tried running the VI registering and then stopping it but that didn't work.  I also tried the "Fake Exec State" posted on Lava, and that didn't work either.

  15. What was actually described there was a second EXE which functions as the splash screen. That second EXE saves what the RAM usage of the real EXE was after loading and then simply monitors RAM usage as the real EXE is loading and displays that as a percentage of the saved value. I'm assuming that should give a reasonably accurate answer, assuming a clean load of the app uses more-or-less the same amount of RAM (which may not actually be the case if you close the app and reopen, etc.).

    Oh sorry I misunderstood.  In that case yes that would work decently well but probably not perfect.  Even so any of these suggestions are better then what we have now, when a Main.vi is the startup VI and takes upwards of 20 seconds before the user even sees anything indicating the program is running.

  16. I found this way easier than vipm, to make sure all development system uses the right sets of VIs.

    I suggest you try this, it's so easy, and has been working really good.

    //Mike

    I'm also going to side on Yair with the version issue.  At times I've had up to 9 versions of LabVIEW installed on my machine at once.  Unless you have a separate folder (or repository) for each version of LabVIEW there are going to be some issues for me using it.  And if you do have a separate location for each version then, when there is some bug fix I now need to fix it in each location.

     

    Also I don't know how I feel about editing a users LabVIEW.ini.  On the one hand it should be no different then adding tools menu items, or quick drop functions, but for some reason I feel like the LabVIEW.ini is a place for a user to customize LabVIEW the way they prefer it.  What about the dreaded Auto Tool argument?  Am I to force all developers to not use Auto Tool (or force them to use it)?  Sure the majority of the settings we can all agree on (insert auto-feedback, terminals as icons, separate compiled code), I'm just thinking about the few that are user specific.

     

    I also like the fact that I can take one VIPC file which can contain all internal and external reuse code, and settings, and take it to a computer that is offline.  There are many times where a PC will be in an environment where internet is not an option and bringing reuse tools and components (as well as SVN) are difficult.  Now I just grab one VIPC which is a snapshot of the reuse used on a project.  This is also great for configuration management because years down the road I can say exactly what VIs were used from the user.lib.  I guess SVN could do that too with revision tracking so that's not as big of a deal.

     

    I'm glad it works for you but there are too many reasons for me to not use SVN for these types of changes. 

×
×
  • Create New...

Important Information

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