Jump to content

Michael Aivaliotis

Administrators
  • Posts

    6,196
  • Joined

  • Last visited

  • Days Won

    104

Posts posted by Michael Aivaliotis

  1. I made a simple vi that used 2 identical parallel while loops with shift registers doing an increment. Both loops were attached to local variables of a stop button. Did you know that there is no priority and the loops don't run even close to each other! One will run away fron the other :wacko: . The difference ranged from .5 to 1.4 of that of the other loop. Really weird. This is with no wait ms and with a wait ms of 0ms.
    If you add a larger delay like 10ms, you will see they are much closer. Are you running this on LV RTOS?
  2. I have seen tricks where a "real" control, which is usually hidden, is moved under the mouse and made visible as the user moves mouses over the control images inside the picture control -- it is not perceivable by the user. This allows the user to interact with the real control.

    I think that Jim's approach would be the best and is not too bad to implement. You already have the mouse coordinates. You could (and should) use an event structure to trap user clicks on the picture control.

    No matter how you look at it, however, you have a tough challenge. Sometimes the easiest solution is to just remove the requirement. Do you really need this GUI or is there some other approach.

  3. Hi

    i'm testing LabSQL with mysql 4 due ODBC driver on Windows XP2

    I try different types of simple query but i report poor performance

    1000 select of INT about 900ms

    using Query browser i execute he same query in about 15 ms!

    i don't know why, maybe a bug in ODBC.

    Do you have any feedback on performance?

    Bye,

    Alessandro.

    Yes, well this is a known (to me) bottleneck with the LabSQL stuff. There are changes you have to make to some VI's that may speed things up. Here are the two VI's before:

    post-2-1138082105.gif?width=400

    And here are the two VI's after:

    post-2-1138082278.gif?width=400

  4. You could put a sequence structure inside you while if there is a set order to your test program. If you want to use the stacked sequence structure, you can right click on the border and select 'add sequence local' to carry values from one sequence to another.

    Nate

    I would suggest you at least use a state machine. You will quickly find that your program will be more difficult to manage as time goes on. State machine architecture helps as you add more and more functionality over time. This is always the case with LabVIEW code. Here is the FAQ link on them:

    What is a State Machine?

  5. I've been working with SQLite 3 (www.sqlite.org) for the last couple of days. And had good success with and had some good success in developing a wrapper for SQLite that can easily be used in LabView. I'm writing this wrapper in LabWindows/CVI, but it is all standard ANSI C, and not very much of it anyway. I was wondering if there is a call for an embedded database like SQLite in the LabView world. I don't use databases very much but when I ran across an article about SQLite I couldn't resist toying with it. I have no problem posting the code, if there is interest, and I think it could prove to be a useful addition to the OpenG toolkit, if there was a call to develop it into a library compatable with OpenG. One nice thing is that SQLite is at least as cross-platform as LabView!

    I await your responses!

    Chris Davis

    Maybe you can educate us a little bit. I've worked with several database engines but not SQLite. I understand it's embedded. Does this mean you cannot access it from an ODBC interface? Can you create a DLL that can be called through LabVIEW?
  6. Not updating more than 5 times a second isn't an option. It needs to be 17Hz on most systems, no if ands or buts about it. The reasoning is too complicated to get into here. I'm going to try the defer panel updates property and see how that works out.

    1. All my loops have a wait of either 0 or 1ms. The 0ms is for user events that I don't want to miss on even the slowest machine.

    You probably need fast updating because you are using the GUI as feedback for some manual tuning operation that the operator performs?

    Are you using an event structure? If so, then I don't see how you can miss user events. They are qeued up in the event structure. I'm not sure why you are having such problems with slow screen updates. Is it possible to see an image of your code?

  7. This is the way I'd like to do it, I don't like working with the subpanels.

    THe thing is the data types, amount of data, etc, will be variable and depends on the subroutine running. So sometimes I'd want to display an XY graph, sometimes strings, sometimes an array of floats, etc. But what would be a decent architectural way of moving data to the FP of ther other VI? Since the datatypes are always changing, maybe it is desirable to use the subpanels ,though. But when you say move the data to the UI, what are the best ways for doing this? I figured I could send some references to the acquisition program, and send raw data to the UI that way, not sure if this is the best way.

    Yes, well what you want is to isolate the main GUI from knowing or even caring about the representation requirements of the test routine. One way to do this is to build a framework into the main GUI that calls various methods of the routines. This is where GOOP helps. For example, you would make each test routine a class that has several methods. One of the methods would be "run test", and another coould be "display data". When you call the "display data" method, you would pass it a reference to a location that you want the data to be displayed. The location would be an embeded panel. Now, the GUI doesn't care how the data will be displayed. All it knows is that data will appear in this embeded panel. You can really do some powerfull stuff with this. For example you could call the "display data" method multiple times. Each call would create a new instance of the data display object. This would allow, for example, multiple views into the same data (one graph zoomed, another expanded).

    You may ask the question. So how is the data displayed. Well, this is the exclusive responsibility of the class. It has knowledge of the data and would have a VI panel dedicated to this. This could be a seperate VI or handled within the same test routine. Now, you could even go one step further and make the "data display" a class. Then you could make it generic enough to handle your data. Your test routines would call this class and pass them the GUI reference. Let's face it, how may data types do you have? Graph, Boolean, String, Numeric. If it can handle those then you're golden.

    Also, don't lock yourself into the very limiting "Main Window" concept. With the approach mentioned, you can have multiple windows, each displaying a different piece of data. Your customers will love you for this.

  8. So I tried it today and an error popped up, "Please find the file 'Build Error Cluster___ogtk.vi"

    Apparently this is the only vi I don't have and I used Commander to download the package. Is it missing or what's up? How to rectify the problem. If I don't get a reply soon here I'll post on the openG forum. I just thought it was more relevent here for future search.

    Just a quick thought. Many of the packages have dependancies. This means packages depend on other packages to be installed. I think the problem is that you need to install the oglib_error-2.2-1 package as well. The current released version of Commander does not have dependancy checking. This is a future feature.

  9. 1. Configuration/Options Dialog -- Put configuration parameters for different categories (or aspects of the software) into different tabs. This mode of use is probably the most common.

    This is the preferred usage of tabs that I would like to see. I have seen main UI windows implemented with tabs and I got to say it stinks. What it comes down to is the programmer's lack of creativity in presenting data and information to the user. Yes, let's slap a couple of extra tabs to cram some more data into an already crowded front panel. See a great example of how not to use tabs:http://forums.lavausergroup.org/index.php?...pe=post&id=1912

    If the purpose of a tab control is to navigate the user through some tasks then use a tree control on the left side with revealing information on the right. Again, the underlying thread should be static properties that can be changed or manipulated. Once this is accomplished, the window is closed and forgotten.

    I have seen people using it for dumping stuff they don't want to see on the UI

    5. Garbage collector -- Use a 2 tab control, put everything in the first one that the user should not see (for example VI inputs, VI outputs ...). In the second tab put the UI controls that the user is expected to interact with. At run time make sure the second tab is selected and that the user do not see the tab control.

    Well, cool, this can happen but I am totally against using the tab control as something outside it's intended purpose. I also find it annoying when I have to "decode" the GUI just to find some input and output controls that should be right out in the open. You don't need to hide the controls or indicators. The less editing of the code I do the better. If a panel resizing will reveal a control then they can be placed to the left of the GUI objects. Panels only resize to the right or down.

    I was actually just about to ask this question in general, and after coming to LAVA User Group today, I found you happened to asked a nice segway question yesterday. So here's my question - does anybody know how to ADD controls to a tab page programmatically? I can see how to READ the controls on any page of the tabs, but I'd like to put them in programmatically.

    Why are you thinking of this? Why would you want to make such a complicated GUI window? You need to analyze and find out what your lowest data object is and how it can be displayed. Then decide how multiples of these data object can be presented as a group or individually. What are their relationships and how will they be manipulated by the user. There are many directions you can go here. For example, multiple test routines can generate plots that get pushed onto a common graph. This graph would allow you to add or remove plots as needed. You might also allow the ability to spawn multiple instances of these graphing windows all pointing to selective data. Make the user interface generic enough to accept data input from various sources without forcing the user to look at only one thing at a time. This is my main beef with tabs. It allows only a limited view into the system. What is the problem with multiple windows? Why can't I see gauges and graphs and test parameters all at the same time?

  10. Well, maybe as I get older I get less and less adventurous. I am afraid that the only reason I would switch to LV8 is if a customer specifically requests it. Even then I would ask them to give me a compelling reason. It would have to be some feature in LV8 that they can't live without, or something that can't be done in LV7.

    If you are an integrator and are getting paid time and materials then you get paid either way, but if you are on fixed cost projects then it would be suicide to switch to a new LV version just because NI is preaching about it.

  11. My solution to your issue would be to create a Master DQ3class that manages the other minor classes. The Master class would have an array of

    minor class references in its data cluster.

    Essentially DQ3 is a type of global variable just like LV2. You could just as easily create another DQ3 class or a Single item que to do what your requesting.

    Yes I believe this was an oversight.

    Here is the current template I use if you are interested.

    Some support VI's are missing, can you re-upload the zip. Since you're a Premium Member, just go back and re-edit your original post and replace the attachment. No need to re-post.
  12. I was just informed by someone at NI (thanks again, Darren!), that the LabVIEW documentation calls them Functional Globals.

    You can find this in the help, here:

    Fundaments >> Multitasking, Multithreading, and Multiprocessing >> Concepts >> Suggestions for Using Execution Systems and Priorities

    Synchronizing Access to Global and Local Variables and External Resources >> Functional Global Variables

    You can also find a few references to them in the help if you search for "Functional Global" (include the quotes when you do your search).

    Well, yes, we kinda knew that already didn't we? This is also included as part of the material in the LV basics course. I think the point of asking the community for feedback on usage is to find out what real LV users do...

    Don't forget that NI often changes the terminology of certain things over time to fit some new marketing goals and strategies. Don't be surprised if you will soon see the term global variable and functional global be replaced with the term "Shared Variable"... Yes, let's introduce more confusion for the new user, shall we?

  13. Yup, wrong, I read about not doing that and so I don't. I wire directly to the terminal and if I can't, I'll use a local, and then those LV2 globals. Do you think it's better to run LV2 globals than locals? My program is self contained and any data I pass to a seperate VI would be to a VI's connector. I use shift registers and feedback nodes as often as I can. I'm getting better but the larger the program gets (exe is almost a meg now) the more locals I seem to have to run :( .
    Ok, that's good. You are my friend now... :wub: .

    I don't know how the loop timing is configured since you haven't shown us the code yet, but you might want to look at placing a wait function within the loop that updates the front panel. If you already have wait functions or timeouts, how long are they? Is it possible to send a screen capture of that portion of the code? Adding a small time delay usually allows the processor time to perform other tasks and reduces the load.

  14. Please, some help (it's really important !!!)

    We need to know how to acquire sound from a webcam with Labview 6.1

    We have a Logitech Pro 4000 and we haven't any activeX control or dll provided with.

    Use the sound VI's already located within LV. If the audio from the microphone of the webcam shows up in windows devices as availabel, then you wil lbe able to access it with these VI's.

    post-2-1137004038.gif?width=400

×
×
  • Create New...

Important Information

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