Jump to content

Jordan Kuehn

Members
  • Posts

    690
  • Joined

  • Last visited

  • Days Won

    21

Posts posted by Jordan Kuehn

  1. Well, an approach we use differs in letter from what you are attempting, but maybe accomplishes the larger goal.

    Our Views do handle control events (that's the easiest place to handle them!), but when an event happens they send a message to the Controller, which instructs the Model what to do. In some applications the messages are commands using the Command Pattern, so that we can use one message type (of the top-level Command class) and therefore a single message pipe (user event, shared variable, queue, or other messaging system). (In practice we often send basic shared variables from the View and then translate these to Commands before sending them to the Controller, because the messages may come from various sources, but that is a fine point.)

    Paul

    I've read your whitepaper and I like your approach in general. Have you released this code for public use or is it proprietary? You can pm me if it's going to derail this forum thread.

  2. No probs.

    I would also suggest, if you have not done so already, spending a little bit at data socket, shared variables and FP binding.

    I didn't think this was in the CLAD or hadn't seen it in the sample exams and got whacked with 3-4 questions on it back when I took it. yes.gif

    Just don't skip over it like I did.

    I took the CLAD in 2009 and there wasn't anything regarding these topics. Perhaps they have changed it since you took it? I was working for NI at the time and had a pretty good grasp of what would be on the exam :cool:

  3. the problem is that the UI code exists within the SubVIs. I will be pumping data into them in a producer-consumer fashion, but need to get User Interface events from them.

    jkuehn,

    You can do what your wanting by using dynamic events. If you search for that in the example finder I believe you will find some examples. Basically you need to pass the reference for the control of the subVI to the 'control' VI where you will register the specific type of event you want to process, mouse over, value change, etc.

    Jason

    Ok. That's what I was hoping to avoid, but I can make that work.

  4. Here's possibly a simple question. I'd like to have a main program that launches subvis which provide the main UI. I don't want the subVIs to handle events though, I want the single controlling process to get the events and handle them. Is there an easy way to do this, or will I have to create custom user events for every single one I want using control references?

  5. From my experience, auto-scaling front panels in LabVIEW rarely produces good results. I always set the boundaries of my front panel first (in your case you would need to find the parameters that cause the panel to fit the screen for your resolution) and then I start developing the UI accordingly.

    Agreed. It seems to only work well when the only object in the pane is a graph or chart.

    • Like 1
  6. durnek60:

    I think the first thing that would come to my mind would be the second approach you have taken, gathering the data from the registry. I have not spent any time with the dll files and cannot help much with those. I'll think about it and see if another approach comes to mind.

    • Like 1
  7. On an unrelated note, what is your end application? It appears to me that you are having trouble getting the ueye drivers to work in LabVIEW. I have done this for use with an Edmund Optics camera and there were a few subtleties I discovered. If this information would be relevant to you, just let me know and I'll explain here in the forum.

    • Like 1
  8. How about not being able to solve it even a single time, because the cards have been dealt in such a way that you can't even make a move or where you can only make a single move and then you're stuck (which I have seen happen more than once)?

    Then it's not unfair, it's just a flawed game.

  9. You didn't mention this so I will for others benefit.

    The VIs in the DAQmx tool kit are locked meaning the code is not able to be seen.

    Would you be willing to share the code with us?

    I'm sure many members would be interested to see how this is done.

    Mark

    From the comments on the site:

    The code is more of a "freeware" version than a demo. The feature set isn't at all limited. I just have the VI's locked to protect the intellectual investment that developing this VI's took.

    If you are interested in the code, please email me at dannyb@dmcinfo.com and I can provide you with more info or with other VI's.

  10. jkuehn, How do I tell Windows to set a custom environment variable? Is there a Windows system file that I edit?

    It varies a bit from OS to OS, but it's something along the lines of this (Windows 7). Right click Computer -> Properties -> Advanced System Settings -> Advanced Tab -> Environment Variables...

    Then you are presented with user variables and system variables that you can modify all you want.

    • Like 1
  11. There is one option I can think of here - that the user double clicked the button in the subVI and that the subVI closed after processing the first click. The event structure then remembers the second event and processes it the next time the subVI runs. I have seen this happen before, but this doesn't seem to match your description, though.

    I've actually been thinking of posting an idea to the idea exchange for a feature which would prevent this from happening, but I couldn't come up with a good method of preventing this and it is a relatively rare occurrence, as it only happens with users who double-click buttons.

    Perhaps, but I think in this case it would be about as unlikely as the user having tabbed several times, hit enter, and did it again. That button hasn't been used for quite some time.

    And perhaps the value change event structure could capture double click events in a similar fashion to how windows does it? Then it could be a boolean input into the case.

×
×
  • Create New...

Important Information

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