Jump to content

Darin

Members
  • Posts

    282
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by Darin

  1. I'll take the "rube" that properly handles 'NaN' six days a week and twice on Sunday...
  2. Typically I would use a regex to validate a number, for a decimal number you could use ^[+-]?[0-9]+$ with Match Pattern to perform validation. In this case you could also verify that the remaining string is empty when you use Scan from String.
  3. I may or may not have an opinion about 'pipes' being appropriately used in this case, but that is beside the point. If the object is a "pipe with one element" than it is a pipe and that is what it should be called. In the documentation you can create an acronym or initialization or abbreviation, but that is what I think it should be instead of a new name. You define it the first time you use it (or perhaps the first time in each section if you want) and then use the shorthand version. For example, a single element queue is a queue, it does not need a new name. If you get tired of writing it then simply write a single element queue (SEQ) and carry on. A single element pipe (SEP) is one option. I'd rather describe it as a blocking pipe or non-blocking pipe, or as the choice whether or not to enable spooling or buffering on the pipe.
  4. I am running LV12 at the moment so I can not see your VI, but you described it well enough I think. I would suggest a keyed sort of your ItemNames. Use a loop to bundle the item name and its current index into a cluster array (in that order). Sort this cluster array. Create a single cluster consisting of the new name and its old index (the listbox value I presume) and search for this element inside the sorted cluster array. Use the index of the match as the new value of your listbox and update the item names with the sorted strings. For the size of arrays likely to occur in a typical listbox I would sort the strings separately instead of trying to unbundle in a loop.
  5. I prefer the windows shell function to the command line call myself, but Windows is easy either way. Linux is simple, once you know the default file browser (Nautilus, Dolphin, ....). This is easily found by querying xdg-mime. Then it is a simple system exec call to launch the file browser. Mac requires Applescript. Simply use system exec and the osascript command to tell Finder to select the file. In LV14 you may even be able to skip system exec and use the call Applescript function.
  6. From squinting on my iPhone I can tell that your constant '2' should be sqrt(2). Looks good otherwise.
  7. I can make sense of most of the ads I am hit with around here (LV training, hardware and the like). This one has me a little puzzled: Based on my experience at many Chinese restaurants, I could save people $500 and tell them the outlook is not so good.... I am tempted to click, but a bit afraid of the resulting ads. Reminded me of this: http://www.wsj.com/articles/SB1038261936872356908?mobile=y Update: I clicked and now I have tears in my eyes from reading the reviews, you know something is up when there are 132 of them. I can not decide what is funnier though, the joke reviews or the reviewers who do not get the jokes. And my guess is that somehow the ad was chosen based on the name of the MSoft email program which must have cropped up somewhere..... And for more good Amazon reviews I suggest the RAND book of random digits. I am waiting for the audio book read by Betty White....
  8. I have been doing this as long as I can remember using a combination of SyncToy and DropBox. Works great once the tasks are configured in SyncToy. I have various tasks configured, settings, work in progress code, all reuse code. As an added bonus, it functions as a touch-free backup/SCC/package manager safety net which lets me work away worry free on code which is not suitable or ready for the SCC lockdown. And it is just as easy to sync to a USB stick as it is DropBox so I am never without an up-to-date configuration. A few bummers, certain absolute paths and screen coordinate settings can be irritating when copied from machine to machine. Less of an issue for the VM applications. Second, there is no "merge" operation here, so you have to be diligent about keeping things serialized. Again, for my workflow it is more about being able to go from machine to machine and keep working, and not about bouncing around between machines and trying to keep them in sync.
  9. Put an Equals? comparison and you will see that it is in fact a bit-for-bit replica of the input. Right-click your 50.01 constant, select Display Format and up the number of SigDigits to 17-18 and compare. 50.01 simply does not have an exact DBL representation.
  10. Right-click the Table Indicator and 'Create Constant'. What you will notice is that the data type of the Table is a 2-D array of strings and you are creating a 1-D array. Add one more build array and it will work (right-click the broken wire and it will even give you the option to insert Build Array). Transpose the array as desired.
  11. I do not trust individual benchmarks of two operations in parallel. Especially when RT gets involved. Try serializing the two functions and see what the timing difference is then.
  12. Try with a four digit year instead '%Y'. Just a guess.
  13. I have not found much that goes wrong by relating the position to the endpoint. The only tricky thing to remember is that one endpoint can have more than one terminal. Of course I have tried for years to convince people that no purpose is served by allowing terminals, tunnels and the like to be overlapping but I am basically alone on that one. Basically I have stopped sharing scripting code because I get tired of having to check for these kind of special cases that complicate and obfuscate my code. I prefer to keep it for personal use only and then I know that most of these corner cases are ruled out.
  14. The XNode uses a CLFN with the library wired by path. I have used this CLFN inside an executable, see if it works for you.
  15. Of course when you create the constant it is only the VI reference which is strictly typed. If it is subject to change, it should be encapsulated like anything else, and as drjdpowell just mentioned, the Type Def is a natural choice. Somedays I'd say that makes a pretty good slogan for LV....
  16. Simply create a constant from the reference terminals of Open VI reference or any of the ACBR or CBR nodes and you get a VI Type Specifier constant. You can drag a VI on top of the constant to set the type, or choose browse under Select VI Class on the right-click menu. Either way, the VI you choose is not statically linked, it simply sets the type.
  17. What part was too harsh? That if I were using Mac/Linux I would certainly welcome 64-bit versions (and that it clearly took most of the development time) or that I found very little difference between LV13 and LV14 on my Windoze machine. I have stated elsewhere on multiple occasions that I think the 64-bit versions are the big story of LV14 yet the marketing so far has still been trumpeting new features like the icon.
  18. My link dropped out of the last post. The icon at #1 was a joke, one day my LV Getting Started Window pointed me here to check out the "The Top 3 new features of LV2014". Since renamed to "3 new features..." but notice the URL. https://decibel.ni.com/content/blogs/labview-news-english/2014/07/11/sneak-preview-the-top-3-new-features-of-labview-2014#/
  19. How could that exhaustive list not include the top new feature...The new icon! The 64-bit Mac version clearly took most of the developer free energy this release cycle. That segment of the population should be very happy, of course they are also embarking on a de facto beta period. New releases are a bit risky, new releases on a new platform are risky squared. My real fear is that the meteorological conditions next week could be right for a Stignado if the cold air from the Austin convention center mixes with hot smoke being blown up my backside by a Blue-team member describing the "awesome new features that will revolutionize my LV development". They simply aren't there. I am perfectly happy hearing why they aren't there (limited resources, budgets, etc.) and why I should expect them in the next few releases (laying groundwork, etc.), it just seems like the default discussion is "no really, they are there, aren't they great?". If I were a new user then there would be no reason not to move to LV14. Likewise, if I was looking to move to the Mac or Linux platform, LV14 is a most welcome development. As for a Windoze user considering an upgrade, I did not see much there to make it worth the pain.
  20. It will be a cold day in Austin during NI week (or let's say it will be hotter inside the convention center than outside during NI Week) before I will use property node accessors again. I once succumbed to their siren song and wrote some SDR code using them. The inability to inline subVIs containing property nodes was a disaster, I had to write a QuickDrop shortcut to replace the property nodes with their underlying accessor VIs. Simply doing that (it was not so simple in practice) allowed me to inline certain SubVIs and then the code worked. No changes to the underlying VIs, just removing them from the PN was enough. Want to quibble over what a "big" difference is. A seemingly "small" difference which means the difference between being able to process the IQ data in less time that it took to acquire it or not is by definition a "big" difference in my book. In summary: you could write code that shows that Property Nodes are in fact faster than the underlying SubVIs. Nice, but not so helpful in the real world. When the rubber meets the road, the inability to inline can hurt much, much more than some minuscule performance difference.
  21. I usually start spewing Always Copy nodes around until it works. I have seen cases where aliasing causes problems like this and worse. I have seen dataflow go bad when a buffer is improperly reused leading to downstream code running early with old values. Ouch.
  22. I have no idea which property is being used, but many scripting properties are available in the RTE, especially the read-only ones. You should double check the detailed help to see if that property is available in the RTE.
  23. Create the custom boolean control you would like for the Timestamp control. Customize a Timestamp control, right-click the button, select replace and choose your custom control. Here I use a snazzy classic switch:
  24. Use the default value property (assuming you have a control reference) as input to the Application Method aptly named "Data Type Color". This is where the class browser Ctrl-Shift-B comes in very handy. Also works in conjunction with wires and control terminals.
×
×
  • Create New...

Important Information

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