-
Posts
282 -
Joined
-
Last visited
-
Days Won
37
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Darin
-
There may be hope: http://forums.ni.com/t5/LabVIEW/Can-t-change-decimal-sign-in-timestamp-BUG/m-p/1865381#M632913
-
My first advice is to walk down the hall and flog or bribe (depending on the individual) whoever it takes to get a native cross-platform way to do this. My usual solution since I am locked to Windoze is hijacking the Windows Message Queue, like this example:
-
Two words: Job Security.
-
Need LVOOP Object VIs in lvdata library
Darin replied to Jim Kring's topic in OpenG General Discussions
Clearly the fact that Shaun's code stubs the TypedefInfo Constant into the first Case Structure makes a huge speed impact. Actually, the two things that jump out at me are that the LV version stubs the variant as opposed to passing it through with the control and indicator on the root diagram like Shaun does (doubt it makes a difference on small items though), and that Shaun configures the CLFN to use any thread, perhaps the LV one uses the UI thread and this takes its toll (pesky default behavior). -
-
Hovering over a drop down menu is causing "Mouse Leave" event to trigger
Darin replied to JMak's topic in LabVIEW General
What I usually do is drop a class specifier constant and choose a class. Then I create a control from it. You do not need a sub VI for all of the possibilities, for example you pass a reference to a NamedNumeric control which will cover rings and enums (do not include data type). Then you will need one for a ComboBox. Hopefully that would cover it.- 8 replies
-
- tab control
- event structure
-
(and 3 more)
Tagged with:
-
Hovering over a drop down menu is causing "Mouse Leave" event to trigger
Darin replied to JMak's topic in LabVIEW General
Most of the time the Context Help says PRIVATE: blah blah blah, but not in this case. I'd be (even further) into hack-town if it weren't for a few of those events. Yes, kind of funny that way. A lot of built-in stuff uses those methods and events, and with some of this power comes great responsibility. You could try using Dynamic Event Registration, wrap the Reg Events Node inside a locked subVI, and then feed the refnums into the Event Structure. This would give access to the Event on any machine while sequestering the private bit. Then clean up the names a bit using a bundle function:- 8 replies
-
- 1
-
- tab control
- event structure
-
(and 3 more)
Tagged with:
-
Hovering over a drop down menu is causing "Mouse Leave" event to trigger
Darin replied to JMak's topic in LabVIEW General
My reply on the "dark side" accidentally pointed you towards a "super secret" private event that seems to do the job with minimal hacking. To learn more about them I suggest you read the pinned post in the Lava Scripting page, and then read about the required ini key here: http://labviewwiki.org/LabVIEW_configuration_file/Miscellaneous Some properties and events are private for very good reasons, others for more mysterious reasons. I would use them with caution, but I have not had problems with this particular one. Disclaimer: If your computer catches fire, you didn't hear about this from me.- 8 replies
-
- tab control
- event structure
-
(and 3 more)
Tagged with:
-
HDF5 seems conspicuously absent from the discussions and comparison charts.
-
I am hesitant to use the DDS in situations involving optimization. For reasons beknownst to NI it imposes artificial dataflow and the form factor of the different cases seldom lines up giving me awkward looking code. During the trial and error phases, the DDS is invaluable, no need to leave evidence of my mistakes. I do like to use it to hold code used to generate lookup tables though. Of course in this case the G code serves as a comment, a nice graphical comment as nature intended.
-
Two separate issues here. In the Trim Whitespace example, the documentation for the user is excellent IMO. The comments for the code are what I was referring to. Sometimes it is hard to appreciate that certain things are done deliberately, such as Reverse Array on the root diagram, or in ShaunR's version the constants being inside the Loop and not outside. Optimization and obfuscation are often close cousins in LV. As to reading G I suggest some immersion therapy. I find text distracting outside of terminal labels. A good way I find to achieve immersion is to be too lazy to add text comments.
-
Given that the OpenG standard is LV9, we should be posting VIs and snippets in that version. It is important to optimize for that version as well.
-
Wow, I head slapped myself silly after seeing that image, especially since that little piece of code was my modest contribution. I completely agree about OpenG showing best practice and all, I strongly disagree that this level of documentation is best practice. Looking at the original thread, the first suggested code was slightly more complex. I thought I would see if it was faster than the completely obvious method. It turns out no. Had the more complex code been faster, as it often can be, that would have been worth a comment. My usual philosophy is that well-written G is self-documenting, and adding text comments is like writing the letters of the notes on sheet music, unnecessary and redundant. A picture is worth a thousand words, this makes it seem like a picture requires a thousand words. If I were to add a comment, it would be that I benchmarked and the simple code turned out the fastest with quick descriptions of the alternative. If I see code like that, I don't question what it is doing, I usually want to know why. If I comment "slightly faster than byte array method", that could save my future self more time than "looping over characters in the input string". Again I agree with the spirit of Jim's comment, I'd simply look for a better example. I know that I am text-averse on my BD so my code is fertile ground for lessons in commenting. I'd suggest my Trim Whitespace code as needing a few more sticky notes and not this one.
-
At best, the Events are a bit like an occurrence, not a replacement for polling, just a good hint at what might be a good time to poll. The problem as AQ hints at, is that it can be tricky to catch all of the ways that a user can change the scale range. For example, what if I paste a new value, and then make another window active and then return to the FP. The new value is entered via this process without a key press or mouse click. Polling is a robust method to catch these changes. And since I started using LV long before the days of the Event Structure I will pass along a tip from the old days: a simple way to throttle the polling loop is to use the "Wait for Front Panel Activity" function with a long timeout (500 msec). Keeps it responsive when necessary, and out of your way when nothing is happening. In many instances I do not display the Marker values for a slider, and I actually use separate controls to set the range. This makes it very easy to detect the value change.
-
Just make darn sure that the grounds are isolated from the computer/USB ground. And if you are using it on a laptop which is not plugged in, make sure you know what you are connecting to. Other than that, I look to get as much bandwidth and as many bits as I can afford. I have looked into the BitScopes before and they would have been my choice at the time.
-
If you use 7.x mode and wire something which can not be represented by the Type String then supposedly you can get an error. Don't ask me what that something is, I don't know.
-
Of course the sample questions are skewed and slightly screwed up to begin with. Let's add a philosophical question. Assume you know the truly correct answer, and that it is different than the one you assume NI is looking for. Do you mark the correct answer on principle and lose the points, or do you choose the answer NI is looking for? I usually choose the former, but I am also inclined to rouse rabble. (If I ever found myself taking the CLAD I'd also like to think that one or two questions would not be making a difference).
-
Not that this level of documentation is always accurate, I usually rely on the Detailed Help for a given property, one of the characteristics listed in the table is "Loads the front panel into memory".
-
Along the lines of what Ben suggested, I believe you can simply add a second plot with x=0 for all y values and simply use that plot as the fill baseline for the first plot. I'd do the similar thing for the horizontal rendering (y=0 for all x) so you do not have to futz with the fill baseline via property nodes and can always fill to plot 1.
-
I should probably have mentioned since I often forget that I did not have to buy my iPad. Having used it and enjoyed it for a long time now, my original sentiment still applies, I would not have paid for one then and I still would not. It is at least twice the price that feels right for its functionality. Cost aside, it does not disappoint, however.
-
iPad/iPhone owner: If you have very specific sites in mind, this could be a pain. Much of the web has now acquiesced to Apple and provides iPad specific sites or iPad compatible content. Plenty of Flash-free content out there. A big exception used to be the NI forums, but you can now reply without resorting to raw html. Missing Flash is like missing .NET functions in LV for the Mac. Potentially nice and useful and all that, but there are usually better and more platform agnostic ways to go. I must be drinking the Kool-Aid since I consider "Flash Content" to be an oxymoron. Skyfire provides a kludge to handle some Flash video content if you are truly desperate. As for VI shots, I have not tried, but he calls it a Podcast so I'd suggest a gentle flogging if it did not work on the iPad. By all means let your wife and kids play with it. Soon enough they will want their own. Just give them a page or two to fill with Word World apps and what-not. You can separate email accounts, but not really prevent access. My wife is happy to use a Web interface to get her email, secure and easy on the iPad. You can easily skip the Mail app if you'd like. For document management I use DropBox, it is password protected and easy to keep in sync. Built in functionality works for me, Avagadro's Number of apps available if necessary.
-
It's Friday, so what the heck? Without taking up that much more space (in most cases) than the icon view you can give me some really useful information and capabilities on the BD. Certainly clears up the FP/BD relationship. I would use this in a lot of subVIs and totally bag the FP. Drop an indicator, choose the Control view and forget about probes.
- 74 replies
-
- 2
-
Scripting access to the picture in a BD decoration
Darin replied to jcarmody's topic in VI Scripting
There is a way, I'll post my code later when I get to my machine. The steps I take are as follows: Save a VI which contains only a simple placeholder PNG image. I use this as a template, and with some vi.lib gems I replace the MNGI block with new PNG data. Conventional scripting fixes the size of the decoration leaving a subVI with the desired PNG on the BD. I then place this SubVI on the target BD and inline it. Easy peasey. Attempts to paste images conventionally result in bitmaps. -
I always enjoy this discussion. First of all, no need to feel bad for James. If you follow the other discussions, you know if anything happens he will have the last laugh. If you have OCOOD (obsessive compulsive OO disorder), then it is likely you also suffer from I-have-two-primitives-wired-together-here-better-create-a-subVI syndrome. This results in a lot of time spent with the icon editor and plenty of whitespace to fill with terminals. I do not mind the iconified terminals so much in that case. Most times I worry more about blazing speed than reuse, so I have a dense coding style. My biggest problem with the icon view is that they take a lot of space and give little information back in return. Do I really need to see a little stop button icon when I am wiring to a boolean labelled Stop?. The exceptions are XControls, Graphs and Charts, I tolerate icons for those (when I give a darn, which is not often). I once submitted an idea to provide an option to de-Expressify the Express VIs so I could drop them in peace (no popup, icon view, no caption) but it was shot down in flames. Fortunately I only use two of them so I settle for Merge VIs on the palettes. Speaking of Express VIs, I will say that I see more use in the Block Node View of SubVIs than I do in the Icon View of terminals. Of course by that I mean epsilon > 0.
- 74 replies
-
As you tidy up the BD keep in mind that nobody would use these functions back to back since that is simply path to string. Basically I wanted a short path to verify the long path worked. As to the length, most of these functions will return the necessary length if you call with a null buffer (Length=0).