Jump to content

Yair

Members
  • Posts

    2,869
  • Joined

  • Last visited

  • Days Won

    44

Posts posted by Yair

  1. QUOTE(BrokenArrow @ Feb 18 2007, 10:18 PM)

    ...responses on a Sunday!
    Don't beat the NI forums. This place is usually more active over the second half of the weekend, but there are some users there who will post answers in the weekend as well.

    QUOTE

    Yen, I've used the MouseDown event in the past, but it gave me trouble on EXE's.

    The Picture Ring is great, but you can't "click on it".

    I'm not sure which problem you've had. For detecting click positions you should use the front panel coordinates you can get from the property nodes and the position and size of the control itself. The size and position of the window should have nothing to do with it.

    Note that I refered to the picture control, not the picture ring, but in any case, even if you did mean the picture control, you can most definitely "click on it", you just need to use the data from the mouse down event to find out where. If by "click" you mean that it is not a control which will respond at all times to your interaction, you are absolutely correct (although maybe it would work with XControls. I don't have any experience with them myself).

  2. You might wish to check out the picture control which can allow you to do basically anything you want. There are several threads both here and on the NI forums with all kinds of examples.

    In the case of your octagon example, I would suggest making the background of the control transparent and use the Mouse Down event to feed a reference and a position into a subVI which will control this. If you really want to abstract this, you can run this is as a seperate process which will register the mouse down event, but you will also need some way to stop the process.

    This can allow you to create any kind of control you like, but you won't see the control at edit time and the control itself will not have any value.

  3. QUOTE(geirove @ Feb 18 2007, 01:42 AM)

    http://forums.ni.com/ni/board/message?board.id=170&message.id=230583#M230583' target="_blank">Here.

    It is really much better to include a link, so that people can see with a single click whether anyone else already helped. The same applies to the NI forums.

    You might want to try the NI FieldPoint board, where you're likely to get an answer. It's been a while since the last time I wrote an FP app, and I don't think it handled custom error codes, so I can't help you there.

  4. OK, of course now I thought about looking at the automated weekly reminder which no one reads:

    QUOTE

    To make mail easier to sort for the readers of this list, in those cases where your query is machine-specific, I'd like to ask you to try to identify your postings by adding [M], [W], [L] or to the beginning of your Subject: line for Mac, Windows, linux or Sun, respectively. If your question is of a more general nature, don't worry about this. Since LabVIEW is cross platform this is not an indication of which platform you happen to be using.

    Thanks.

  5. QUOTE(crelf @ Dec 20 2006, 02:03 AM)

    It's funny - I sometimes feel like I should be putting [W] at the start of my topic titles :)

    Am I the only one who doesn't know what these prefixes actually mean? This keeps troubling me when I see Info LabVIEW posts and I couldn't find any answer for this after a couple of searches.

  6. QUOTE(dsaunders @ Feb 15 2007, 10:37 PM)

    I guess at this point I have a related question - For a collection of related functions where no storage is needed (or is provided by an internally called FG) is it advantageous to have a single FG with multiple operations, or to have multiple VIs clearly showing their function?

    Personally, I prefer multiple VIs.

    Yes, it means that there is some code duplication (in my case, all the VIs call the manager VI and pass the reference coming out of it into the SQL query generating VI and those two could probably be outside the case structure if this was a single VI), but that is minimal and you avoid having a single huge VI and avoid having to select the value from an enum with many values. Instead, I can split my VIs into directories based on functionality.

    For a small number of functions, however, the single VI approach might be more convenient.

  7. QUOTE(Aristos Queue @ Feb 15 2007, 09:18 AM)

    I was discussing software testing and how cool it was that every VI of LabVIEW was independently runnable.

    :worship: I didn't realize how much I take this for granted by now. It is only when explaining about LV to someone who doesn't know it or when being reminded like this that I remember how good this property is.

  8. QUOTE(dsaunders @ Feb 15 2007, 08:03 PM)

    I would still appreciate if someone has an opinion about which choice is *better*.

    I suppose that depends on what you want to do with the code.

    The first type is much easier to use. For instance, I use that for communicating with a database, where I can simply have a function "List XXX.vi" which will return a list of whatever and I don't have to wire the connection refnum all over my code, because each of the functions which communicate with the DB starts by calling a functional global which is responsible for managing the connection (opening, closing, getting, checking validity).

    If I wanted to have more than one DB, however, then I would either need to duplicate all the code (bad), give a name to each function (not very efficient) or pass a reference to my instance (what's done by basically every implementation and can make you pass wires all over your code).

    I would say that if there is a chance that you could have more than one instance of this, then you should use one of the GOOP frameworks and create a class for this. If you don't, going the FG way is more fun, but just be sure to mind your reentrancy (if you're calling the VIs in parallel).

  9. I just tried in 7.1 and it seems to work fine - I created a typedef cluster, placed a copy of it in the diagram, made the labels of the controls inside it visible and the constant was resized to show the labels. I guess that means this is a bug in 8.2.

    Incidentally, I don't usually use constants of typedef clusters because they can mess up the diagram. Instead, I create a VI which only has an indicator of the typedef and use that as the output of the VI.

    You can then wire the output from this VI into any bundle by name node to get the names of the elements and the VI itself remains the same size no matter how many elements you add to the typedef.

    Then, if you want to see the structure of the cluster, you can use the context help window and hover over the wire or simply double click the VI.

  10. Crosspost.

    QUOTE(Aristos Queue @ Feb 15 2007, 08:31 AM)

    So the other common trick is to take the string from the Call Chain primitive and add it to a Queue. When you catch the event, dequeue the string. Since events are caught in order that they are fired, you can be guaranteed that the item at the front of the queue is the string for the event you just caught.

    That is assuming you are following the recommendations and not monitoring the same event in more than one event structure, in which case only one structure will be able to dequeue and the other will either time out, get stuck or dequeue the next element.

    (and please don't lecture on not monitoring the same event in more than one structure. :unsure: I haven't done this myself, but this is not something I'm ruling outright if it would be appropriate and the necessary precautions are taken).

  11. Basically, no.

    However, you can run an LV EXE without installing it (or at least you could before 8.2 and if you didn't use any hardware) by placing the executable in the same folder as the RTE.

    You can also do this a little more nicely by using the method described here (I used something similar to have my application as the default option when inserting a USB flash drive).

  12. I don't have 8.2 and I'm not familiar with the way the application builder works in 8.x, but from what I understand, the language files would add little overhead to the RTE, which in practice is about a 90 MB minimum.

    Why are you trying to minimize the size of the RTE?

    If you need to send your application through email and you want to avoid sending a large file, instruct your users to download the RTE from NI's site and install it themselves and just send them the executable.

    Other options would be to send them a CD with your installer or to upload it to a public server and supply them with the download link.

  13. I thought it was 97.7%...

    C'mon Chris, if you had read the book you would have known that 97.7% of people are below animal level.

    This is apparently after they've been animals in past lives, so they seem to be devolving, but apparently it means that 17.7% manage to either stay at animal level or maybe go back to the human level? :blink:

    BTW, the whole reincarnation thing goes really well with the quantam physics stuff.

    The "e" constant from the numerics pallette will add some color variation to your signature.

    Damn, I had thought of that and then forgot it.

    Also, did you know that if you play with the ASCII values of those characters and with the e constant you can get to 97.7? :yes:

    Did you notice that if you now add

  14. I can't try this at the moment, but I believe all you have to do is right click the image in the navigator, copy it and then paste it in the diagram.

    I have found when editing controls that LV's clipboard does not always get the images from the OS clipboard, so I often have to paste the image in the control editor and then right click it and select Copy to Clipboard, so you might need to do the same.

    Why do you want to place images in the block diagram?

  15. I have no idea what you want, but the image navigator (at least in the versions before 8) is simply a browser for images which you can right click to modify and copy to use in your application. You're not supposed to use it for anything other than edit time design.

    If you want to access the actual image files, I believe they're simply WMF files found in one of the folders (probably National Instruments\Shared\DSC\Something or something similar, I don't remember exactly).

×
×
  • Create New...

Important Information

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