Jump to content

eaolson

Members
  • Posts

    261
  • Joined

  • Last visited

Everything posted by eaolson

  1. When I saw the subject for this thread, what briefly popped into my head was: public class Cruise { private List passengers; private City departingFrom; private City destination; public void sendSos(); public Person kingOfTheWorld(); } Sigh.
  2. QUOTE (Darren @ Aug 22 2008, 10:23 AM) I think that all that big mess o' code is a good example of one of LabVIEW's greatest weaknesses: it's hard to build a GUI. Yes, there are lots of great, feature-rich widgets, but it's really hard to put them together in a meaningful way. Compare with Java's http://en.wikipedia.org/wiki/Swing_%28Java%29' rel='nofollow' target="_blank">Swing, for example, then realize that Java is 40% younger than LabVIEW. A simple, four-element window just shouldn't have to build its own layout manager from scratch.
  3. QUOTE (Michael_Aivaliotis @ Aug 21 2008, 02:51 PM) Nope, in fact I went back into that VI and added that code for a reason. It's in a fairly simple application I'm building that will be compiled to an executable. The top-level VI does not display the menu bar or the tool bar (and therefore, it doesn't display the VI icon, either). If you just use Exit, what happens when the VI stops is that (a) the VI stops, (b) the tool bar, menu bar, and icon are redisplayed, and ( c) then the VI window closes. That means that closing the VI or some programmatic closing of the VI causes the window to flicker and resize itself before it closes. I found that unattractive and possibly confusing. It also draws attention to the fact that this is a program written in LabVIEW. (Not inherently bad, just unecessary.) So this version first hides the window from view, then closes it, and there is no flickering issue.
  4. Over at some other thread, crelf said, " I strongly suggest that this topic go to a new thread." And, lo, there was a new thread. So when is it a good and bad idea to use a sequence structure? Should they be banned outright? Even removed from the language? Personally, I think they should be discouraged, are often bad style, but are occasionally necessary. Just the other day, I wrote this: I genuinely don't see any way to guarantee proper execution order without the sequence structure. I usually find the only time I ever use them is when I'm using a LabVIEW node where I can't enforce data flow any other way, e.g. with Wait.
  5. QUOTE (Norm Kirchner @ Aug 20 2008, 01:17 PM) I notice that 174.24.0.120 is in a block of reserved IP addresses. Is your computer part of a private network or anything? I didn't know about the Resolve Machine Alias node until now, either. However, I can't get it to give me anything other than an invalid input error. How is it supposed to work? The help page is distinctly unhelpful.
  6. QUOTE (normandinf @ Aug 19 2008, 03:27 PM) I happen to have a fairly common first name / last name combination. Common enough that, when I went to college, I wound up sharing a mailbox with someone with the exact same first and last name because no one else could tell our mail apart. A few months ago I Googled myself just to see what would happen. I came across some postings by someone with the same user name as me in a couple of corners of USENET that are, shall we say, less than entirely family-friendly. I'm a bit worried that's going to cause a problem for me someday. Anyway, the original topic of this thread is around here somewhere...
  7. QUOTE (LV_FPGA_SE @ Aug 19 2008, 01:33 PM) And vice versa. You might wind up hiring a single person that can't travel easily because she cares for her elderly mother or something. QUOTE (crelf) Innappropriate, and (at least in the USA) I think asking marital status is illegal. That was my understanding, too. I've just been on a few interviews lately and it's been asked in just about every one.
  8. QUOTE (crelf @ Aug 19 2008, 09:24 AM) I agree that it's a horrible question, but disagree that it's likely discriminatory. Inappropriate, perhaps, as I think questions about an interviewee's personal life tend to be. If your family is well enough off and/or you went to an inexpensive enough school that your family could pay for it, well, should that really reflect badly on you? Not intending to threadjack, but ... asking an interviewee if he/she is married. Appropriate or inappropriate?
  9. QUOTE (jgcode @ Aug 17 2008, 05:57 PM) I have used dqGOOP under RT and it does work. This was under LabVIEW 7.1.1, so I'm not sure if things have changed since then.
  10. QUOTE (Tom Bress @ Aug 13 2008, 03:58 PM) I, too, am a lone wolf. I've been using SVN and TortoiseSVN for a couple of years now and wonder how I ever lived without it. I'm just not quite clear on the difference between edit-merge and check-in/check-out. Could someone explain a bit?
  11. QUOTE (Justin Goeres @ Aug 12 2008, 06:30 PM) Stuff like this just makes me sad. It seems to be a combination of basic scientific ignorance, combined with the general anti-intellectualism in our culture, with a healthy dose of paranoid schizophrenia thrown in. It's kind of why I wish people would stop responding to alfa in the 5th Dimension thread. Mental illness ain't funny.
  12. QUOTE (shoneill @ Aug 11 2008, 10:06 AM) True, but it seems to me that the API is more important than the internal storage mechanism. You've got: Java's BufferedImage.getRGB(int x, int y) ImageJ's ImagePlus.getPixel(int x, int y) ImageMagick's MagickGetImagePixelColor(... long x,long y, ...) I wonder if the discrepancies here are due to thinking about arrays in terms of matrices (row, col) vs. Cartesian coordinates (x,y). Matlab actually does store arrays in column-wise format, for some reason.
  13. QUOTE (mross @ Aug 8 2008, 12:56 PM) And yet almost any time you're talking about an index of pixels for an image, they're in (x,y) coordinates, which is really (col, row). That one bites me almost every time. I've seen different packages use (0,0) for the bottom-left or the upper-left pixel, too.
  14. QUOTE (Aristos Queue @ Aug 11 2008, 08:42 AM) Maybe it's just because my mind does actually work the same as that particular human, but I find the opposite to be true. Mostly because the search tab searches on every word you typed in, without regards to context, and searches every possible form of the words you used (format, formatting, formatter, etc.) It almost always finds a bunch of property pages for something unrelated to what I want. Example: search on "format specifier" or "error code" and your search results aren't very useful.
  15. QUOTE (zorro @ Aug 8 2008, 12:04 PM) The first index is the row, the second index is the column.
  16. QUOTE (BobHamburger @ Aug 5 2008, 10:52 PM) Darn useful. Two quick questions: Why the conditional disable structure? Are there targets for which the Tick Count VI isn't valid? Shouldn't the indicator really be outside the loop? I ask not because I suspect it would impact performance, but because I'm just not really clear when putting indicators and controls in a loop does or doesn't.
  17. There's always dqGOOP. Works via refnums, as you wanted. It works in pre-LV-8 versions, too.
  18. QUOTE (crelf @ Jul 29 2008, 11:00 AM) Agreed, I do this a lot too, mostly when I need to insert something I forgot between two other elements. I especially don't like the idea of having to worry about, not only what I click on, but from what direction the mouse approaches the thing I'm connecting it to. Maybe I'm just a bad mouser, but having to worry about whether I'm clicking two pixels above or two pixels below where I want to click would drive me nuts. (I'd hate those mouse touch-surfaces even more than I do now.) What happens if you connect the wire at a bend?
  19. QUOTE (Xrockyman @ Jul 29 2008, 11:09 AM) LabVIEW did not reorder anything. Your points are correctly plotted at (22,4) (25,3) (0, 2) (1, 36), etc. If you look at where the points on your graph are location, you will see they are indeed at those (x,y) coordinates, just as you told LabVIEW to do. I suspect your complaint is that the lines connecting the points are drawn unexpectedly. You probably want the lines to connect the points in ascending x-axis order. LabVIEW is connecting the points in the order that the array is in. Right now, your lowest x-axis coordinate is on point #3, so you have a line connecting point #2 (x=25) with point #3 (x=0). You need to sort your array over the x-coordinate. If that's not your intent, you need to describe your problem better.
  20. The one that annoys me the most is that, when you paste a local variable onto a block diagram, LabVIEW instead creates a new control/indicator and pastes in a local variable for that, instead of the original. It's "copy and paste," not "copy and paste in something kinda similar." The location of the new terminal isn't predictable, often winds up halfway across the diagram, and resizes any loops that are set to Auto-Grow. What I always wind up doing is undoing the paste, control-dragging the local to some free area of the diagram, and dragging it into position.
  21. QUOTE (Yair @ Jul 24 2008, 12:00 PM) Inherent problem, no. But I have seen people saying basically that it's bad style. QUOTE The problems come if you have two in the same loop (bad, since they can block) or when you handle filter events in more than one without knowing how they work or when you use the same dynamic event registration refnum in both structures, etc. I don't use dynamic events a whole lot, so I wasn't aware of that last issue (or had forgotten about it) until just now. It's just obscure enough, and kind of buried in the Help, that I think it warrants repeating: Each event structure must have it's own Register For Events node. Craig S. explains why here.
  22. QUOTE (Daklu @ Jul 24 2008, 08:39 AM) Yes, either you'll have to have something use Preview Notifier and poll every so often, or have a separate thread/loop with a WON node. Depending on what you're doing with the data, the event method may be a good way to go. I know it's generally considered bad form (and can be problematic) to have more than one Event Structure. Is that still the case if you segregate one event structure handling UI events and another handling data-driven user events? Depending on what you do with the data and what your data collection rate is, I wonder if mixing the two could lead to the front panel seeming sluggish.
  23. QUOTE (Daklu @ Jul 23 2008, 12:31 PM) It seems to me that this may be susceptible to race conditions. It sounds like you might have this sort of thing going on: 1. You run Start to begin data acquisition, which spawns a separate thread. That thread runs for a while. 2. You run Stop to tell the separate thread (the dynamic VI) to stop running. How does the dynamic VI know when to stop? 3. The dynamic VI notices that it's been told to stop, and actually stops. 4. You then read the value of the control on the dynamic VI via Get Control Value. The problem is that after #2, you may not have anything in place to make sure #3 happens before #4. It could happen the other way around, depending on the whims of the thread scheduling system. QUOTE I also have "Read n" and "Read t" methods that captures n data packets and captures packets for t time respectively. These would benefit from the notifier I think. If you're retrieving N data points, rather than just one, you could also look into using a queue instead of a notifier. A notifier handles one element, a queue handles many. QUOTE For this to work wouldn't I need to have a separate loop in the main vi dedicated to waiting for the notifier? Depends on exactly how you do it. The Wait on Notification node blocks until it receives a notification or (optionally) until it times out. You can also use the Preview Notifier node to check to see if a notification has been sent yet. QUOTE Since my implementation is in a class, I don't have a main vi in my class to monitor the notification from the dynamic vi. That's exactly what the Wait on Notification node does: monitors a notification. QUOTE Isn't this resolved by putting the indicator in the data collection loop where it is continuously updated? True. You could continuously keep the control in the dynamic VI up-to-date and grab its value using the Get Control Value method. That may have a significant speed impact. Property nodes run in the UI thread, so they are slow. I'm not sure if Invoke nodes run the same way. Note that you'll also have to manually convert the output from a variant to the correct data type. Notifiers and queues know the correct data type and do that for you. Again, you'll have to beware race conditions to make sure your dynamic VI is in the state that you think it's in.
  24. QUOTE (normandinf @ Jul 22 2008, 07:34 PM) The problem with that is the indicator won't be updated until the dynamic VI finishes and you're not exactly sure when that will be. So Get Control Value may return the initial value or the final value depending on when you call it. I would suggest using a notifier to pass out the value that you want. You need to give the dynamic VI the notifier, which adds an extra step, have the dynamic VI put the correct value in the notifier, then just wait in the top level VI for the notifier to be populated with a value.
  25. QUOTE (crelf @ Jul 22 2008, 09:50 AM) Announcements about relevant commercial products are one thing. This was pretty obvious spam. This guy has been posting the http://www.google.com/search?q=%22For+real+time+concepts+on+quicktest+professional,+training+,+QTP+scripts+and+Certification+Material%22&hl=en&client=firefox-a&rls=org.mozilla:en-US%3a%6ffficial&hs=K0h&filter=0' rel='nofollow' target="_blank">same comment to dozens of different blogs.
×
×
  • Create New...

Important Information

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