Jump to content

Aristos Queue

Members
  • Posts

    3,183
  • Joined

  • Last visited

  • Days Won

    204

Posts posted by Aristos Queue

  1. QUOTE (mesmith @ Sep 8 2008, 09:52 AM)
    I second what Jeffery said - it's not a question of being able to explain the error after it happens, it's a question of knowing exactly what errors might be generated so I can make intelligent choices of how to handle them at run time in my deployed applications. Seems there should be a better way than just trying as many potential run-time scenarios as one can think of and then writing the code to handle the errors generated - what about those scenarios you didn't anticipate? Now I've potentially got a customer calling and asking why his system just generated some error that shut down his test when if I had explicit knowledge that error could be generated I might have been able to handle it much more elegantly.
    Look at the online help for Obtain Queue. Search the help for the phrase "This function might return". Is this the sort of thing you're wanting to see on all functions?

  2. QUOTE (jdunham @ May 20 2009, 11:53 PM)

    With a measly 6000 error codes. We've used a good portion of them, and undoubtedly they would conflict with other users' codes if were were ever to share code. I don't suppose we could have a few more of the 4 billion codes available? Whom do we have to waterboard to make this happen?
    No need for waterboarding. No one had ever asked for a larger range.

    As of this morning, the range 500000 to 599999 is now reserved for users.

    • Like 2
  3. QUOTE (PJM_labview @ May 20 2009, 03:48 PM)
    In LabVIEW 8.6 I am unable to horizontally shrink the project explorer window below a certain point (~ 360 pixels). This used to be possible in previous LabVIEW version (ex LV 8.2). Is there a way to re-enable this (maybe an ini key)?
    Funny you should ask. I've asked the same question of the developer who made this change. If you remind me at NI Week, we can ask him again together. *growl* No, there's no ini key to put it back.

  4. QUOTE (Black Pearl @ May 20 2009, 08:38 PM)

    This is a historical flaw, I don't remember why that happend. They had no central repositiory for the error these times, maybe. But yes, every user is reporting you a GPIB error and never ever a file error.
    Weird... error code 7 is one of the ones I deal with on a daily basis (just today, in fact, I fixed a bug today involving a function returning it and the next function in line not handling it correctly) and I've never had the GPIB error... this could be because except for a week of training 9 years ago, I've never had reason to use GPIB. :-)

    The common NI Error Code Database came into being in LV 6.1. Prior to that, every group had its own error codes, and of course, every group started counting at 1... except for one group ( I forget which) that actually used error code zero as an error. Ug. Nowadays we have reserved error code ranges for different products, and we offset the errors coming from the operating system into their own region. There's even two ranges reserved for our customers. :-)

    • Like 1
  5. We had a bug appear in the development version of LabVIEW this week. It was the kind that makes developers ask questions like, "How did that happen and if we don't fix it can we call it a feature?"

    Let me stress that this isn't a bug in any shipping version of LabVIEW.

    The bug: Mass Compile only runs to completion if you keep moving the mouse. If you stop moving the mouse, mass compile hangs. The faster you move the mouse, the faster mass compile runs.

    I and a couple others spent three days hunting this bug down, but along the way, there were many comments about the introduction of the new "LabVIEW Fit" -- a new product for building arm endurance in LabVIEW users. Imagine all these buff programmers (well, buff in one arm, anyway) showing up at NI Week, where we hand out t-shirts that said "I compiled vi.lib!" on the front. For the less athletic, NI offers new hardware: a mouse that moves back and forth for you. For only $100, you could buy the new NI Metronome Mouse so you can practice piano while you wait for your mass compile to complete.

    Other suggestions included

    -- the manual progress bar, where users had to click on each pixel themselves to advance the progress bar, one pixel at a time, thus solving the problem of inaccurate progress bars

    -- "click the gopher" web ads -- if you click the gopher, you win a million dollars in Viagra and home mortgages!

    Alas, we did finally find what the issue was -- XControls were waiting for UI events that would never come during a mass compile -- so these fantastic features will never be. But I thought our users would like to know that we never stop thinking about ways to improve your lives.

    :-)

  6. QUOTE (shoneill @ May 19 2009, 03:12 PM)
    So XControls are for visualisation OUTSIDE of the class?
    The depressing news is that this won't be fixed in the next version of LV. There's a deep architectural barrier preventing the circular load from working correctly.

  7. QUOTE (shoneill @ May 19 2009, 05:19 AM)

    Has this been fined as a bug? I see it as a major problem as it makes LVOOP and XControls almost mutually exclusive whereas they shoiuld really be a perfect match.
    Less a bug and more an incomplete feature. But, yes, it is a known issue. I've discussed it elsewhere.

    An even bigger known issue: Do not create a circular link from your XControl to your class. In other words, write your class completely and then write your XControl using the class... do not put the XControl or any property/invoke node for the XControl into member VIs of the class. The circular load leads -- sometimes, most commonly in a built app -- to VIs that are permanently broken and no matter what you do the run arrow will not become fixed.

  8. QUOTE (kchc @ May 14 2009, 12:31 PM)

    1) How do I know what vi object class should be used for what sort of node?
    It's type is "Function". There is no more specific class for most primitive nodes. How would you know this? The easiest solution is to drop a node on your block diagram, then open a reference to that diagram, get the reference to the nodes on that diagram and then use the "Class Name" property to find out what the most specific class of the node actually is.

    QUOTE

    2) How can I create the appropriate vi object class constant on my block diagram?

    Use the Create New Object primitive which is not found anywhere in the palettes and is not addable through any ini token magic. You have to find an unpassword protected block diagram somewhere that has that primitive on it and copy it. I think OpenG has some scripting tools that expose this prim.

  9. The answer will be different depending upon the architecture of your XControl. I think you'll need to post a screenshot of your block diagram for your Facade.vi and your caller VI for anyone to be able to help.

  10. QUOTE (PaulG. @ May 7 2009, 01:13 PM)

    Because the i terminal returns the number of iterations that are completed, and the i terminal returns its value during the current iteration. If you want the iteration count after the loop runs, wire the output of the N terminal, not the i terminal.

    QUOTE (Gary Rubin @ May 7 2009, 12:09 PM)

    Why does a numeric constant in the BD default to I32, while a control/indicator on the FP defaults to a double?

    Because most people want double type for the numeric. But it is really nice on the BD constant to drop it and then, if you need floating point, to type in a value using a decimal point and the constant will automatically change to double type. If it dropped as double by default, if you typed 3, we wouldn't be able to assume that meant you wanted an integer.

    We'd probably do the same thing on the FP except that most people never type into the thing that drops onto the FP... they just leave the value as zero (and you wouldn't want it coercing to a new type everytime you typed a value into it while you were debugging!).

  11. RED ALERT. This is a LV crash waiting to happen. This is a very very very dangrerous piece of code: QUOTE

    NoSub.png

    Let me explain what you have done: You have taken a control reference of one control and used the Type Cast to unconditionally change the type of the wire without changing the value of the wire. You are now calling operations on a cluster refnum that are only defined for a boolean refnum. The Value property itself may work at the moment, but you are one change in LV's source code away from crashing entirely if someone in R&D writes any code that assumes "if the type is this then I can do this" where "this" is an operation not defined for clusters.

    I don't care how cool you think this is. It is fundamentally unsafe code. Normally if LV crashes that means there's a bug that LV R&D should be fixing. Hard casting refnums is one of only two ways that I know of that users can write code that can crash LV itself that is not a bug (the other being calls into a badly written DLL). You *can* get lucky on individual functions and not crash, but even then you cannot be sure that you are getting back meaningful results. Unfortunately, sometimes it doesn't crash and sometimes the results are meaningful, which can only encourage you to do this sort of thing more.

    If you want to cast refnums, you should use the To More Specific and To More Generic primitives. If those prims give you broken wires for a given cast then that is a cast YOU ARE NOT MEANT TO BE ABLE TO DO. The Type Cast allows this hard unrestricted casting because there are cases where you are only using the refnums as lookup table numbers or something like that. It is not meant for changing types and then actually invoking methods.

  12. That's a flaw in our documentation scheme. All four of the "Available with..." fields in the help apply ONLY to methods and properties of VI refnums, but those four fields get printed for help for all of our properties and methods. Ignore them.

    All VIs In Memory correctly returns all the VIs in that application instance including standard VIs, control VIs, poly VIs, global VIs, and custom probe VIs. I don't konw what it does with the pseudo VIs (such as the clipboard VI or the proxy VIs that are created when one app instance makes a remote call to another app instance). Those aren't really VIs as customers know them, but they have attributes that make them look like VIs to many of LV's underlying subroutines, and they do appear in the VI Hierarchy Window, so maybe they're in the list too, but I can easily see them not being there.

    [LATER EDIT] I talked with our tech writers. This bug in our documentation process has already been reported and will be fixed in the next version of LabVIEW.

  13. QUOTE (ShaunR @ May 4 2009, 03:17 PM)
    So does invoking a property or method cause Labview to copy the data in an object? Or is it all pointer arithmatic.
    When it needs a copy, it makes a copy. When it does not it does not. An easy example -- if you unbundle data from one object and bundle it into another object, clearly a copy is made along the way. If you unbundle using the Inplace Element Structure, modify the value and then put the value right back into the object using the bundle node on the other side of the structure, no copy is made.

  14. QUOTE (ShaunR @ May 4 2009, 04:19 AM)
    Ummm. Maybe it had something to do with this statement from Ernest.
    Ok, he has a large data structure somewhere. But why is that structure being duplicated? Is he legitimately running out of memory because he is updating that structure using local variables? Has he drawn some wire branch such that LV cannot inplace one copy of the data all the way through his program?

  15. QUOTE (ShaunR @ May 3 2009, 03:37 AM)

    I disagree. IF it worked as it says on the tin (or labview help in this case), this is exactly the scenario where you would use it. Says nothing in the help that it won't work on classes (and they ARE vi's so it should, as in I would see that as a bug too). A slight performance hit using it is better than using up so much memory that you start using the swap file which would be even worse.
    Setting aside the bug with LV classes, the primitive DOES work the way it says in the LV help. That's the problem. A "slight performance hit" would be putting it mildly. For very simple VIs, that primitive can introduce slowdowns of hundreds of percent, and for complex VIs, it can be significantly more. If a user is having problems with too much memory usage in his/her LabVIEW application, there are many things I would suggest he/she attempt before trying that primitive. It is, in fact, dead last on my list of solutions to consider. Don't misunderstand me -- there are situations where it is the right solution. But those situations are rare.

    QUOTE

    His problem is plain to me. Large data set remains in memory when not needed. I'm guessing that invoking the the properties and methods also creates copies of that data which remain in memory.

    And although you might be correct in your diagnosis, I would like to hear confirmation of that from Ernest. And even if you are correct in that there is a large data allocation somewhere that is being copied too often, you have no evidence that it has anything to do with LV classes other than that it happens to be occurring while running one of the member VIs. Problems with large waveforms, strings or arrays can appear in many places. I get multiple bug reports each week assigned to my team that something is wrong with LV classes simply because there's a member VI somewhere in the VI hierarchy without anyone doing any analysis of where the problem is truly coming from.

  16. QUOTE (ShaunR @ May 2 2009, 09:50 AM)

    The Request Deallocation function might be of use here

    A) Known issue: in LV8.2, 8.5 and 8.6, the Request Dealloc prim does not affect allocations of LV class objects. So any objects allocated in the dataspace of VIs -- not just member VIs, but any VIs -- will not be deallocated by the prim. That does not mean they are leaked. We simply leave the allocations in place. This bug will be fixed in the next release of LV. (It is not listed on the official Known Issues page because it was discovered relatively recently. This prim is very rarely used, as demonstrated by the fact that it took 3 versions of LV before anyone noticed it wasn't having any effect.)

    B) Using this primitive often creates more problems than it solves performance-wise. I have a strong suspicion that it would not be desirable to use this even if it did affect LV class instances. Besides, Ernest already found some manual mechanism that he tried... I'm curious what that mechanism is. I think we need to know that before we can recommend solutions to the problem he is seeing. If he really does want the entire VI to leave memory, for example, the Request Dealloc prim is not the solution.

  17. Step 1. Use Edit >> Select All on the front panel to select all the controls/indicators/free labels/etc.

    Step 2. There's a ring on the front panel just to the right of the Run Arrow that is the font ring. Click it and select a larger font size. All the selected objects will get larger.

    ALTERNATIVE:

    Drop all your controls/indicators from the System palette. The controls in that palette are tied to the operating system settings. I assume that the default font on a touch screen is fairly large, so when you load those VIs on a touch screen, the text will be larger. Note that system controls also change color based on your OS settings.

  18. Hello, Ernest. I am the lead architect for the OO features.

    I do not understand your questions, in particular these two lines:QUOTE

    I have been quite surprised to see that, every time I called a method of the said class, the corresponding vi remains in memory.
    QUOTE

    The only way I could found to free the memory was to do it manually.

    In the first, if a VI calls a subVI, the subVI typically stays in memory. Why do you think there would be any difference in behavior if the subVI is a member of a class? Could you be more explicit about the unexpected behavior you are observing and why it is unexpected?

    In the second, LV doesn't have a "delete" or "freemem" command, so I am not sure to what you are referring. Could you describe this manual method that you're using?

×
×
  • Create New...

Important Information

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