Jump to content

Michael Aivaliotis

Administrators
  • Posts

    6,217
  • Joined

  • Last visited

  • Days Won

    120

Posts posted by Michael Aivaliotis

  1. 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?

  2. 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?
  3. 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?

  4. 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.

  5. 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.

  6. 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?

  7. 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.

  8. 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.
  9. 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?

  10. 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.

  11. 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

  12. I'm surprised that NI support was no help. I was able to reproduce it in 2 mins even in 711. Must be a reported bug already... strange. All I did was:

    1. New VI
    2. Placed a Chart
    3. Right-Click>select>stack plots
    4. Right-Click>select>Visible Items>Scale Legend
    5. Then click on the bottom right corner of the scale legend and stretch it down one element (it's an array).
    6. Click on the lock button.

    Enjoy.

    post-2-1136972946.gif?width=400

  13. Hmm, I never had my hands on the Lego Robolab development system but I believe that it is a special version of LabVIEW in such a way that the VIs are somehow signed to only work in the Robolab software. On the other hand normal VIs will also not run in the Robolab software, much like the limitations of VIs with earlier evaluation versions of LabVIEW. Probably not something you couldn't overcome with some digging, but well..

    Well, you know what can happen if our advanced LV developers here on the forums get an idea stuck in their heads:

    http://forums.lavausergroup.org/index.php?showforum=29

    Let's not go down that path...

    My son was a little too young or the mindstorms kit this past Christmas, so I held off. I think i will definitly look into NXT this year.

  14. I think you missed where I said in the 2nd sentance; "My laptop" = no PCI/AGP slots and no way to upgrade other than memory. But yes, the quick and dirty solution would be to raise the min requirements to run my program but that would take away from my target market.
    I have a hunch...

    Based on my experience, new LV developers usually pass data to the UI by using the value property and most of the time with ctrl references. I don't want to stereotype but if I'm wrong, let me know. This might be your problem since this method of passing data is slow. If you can, just wire data to the terminals of the indicators by a wire or use a local. If it is too much work to re-write your code then you can use the "defer panel updates" property.

  15. Yes, do a search on build array, shift register, x-y graph, whatever! I am just a rookie, you all can say what you like, but don't forget you also grew up from a student.

    Why not tell me to do a search in google? Everything need a beginning, don't be so pride. Still thanks that you tell me the great help by using "search" something in the LV help

    The keywords I asked you to search for are components used in building the solution.

    Based on the fragment of information you gave me in your original post, I was able to come up with something...

    Make sure to quote your sources in your school report. LAVA Forums... ya right.

    post-2-1136936783.gif?width=400

  16. Anybody can tell me that how to do the following things in labview?

    Basically, I need a n dimension array which can take as much data as user inputs, after a few calculations, each entry in the array will refer to a number. At last the program can plot them on a graph whose x-axis stands for the data, and y-axis stands for result.

    Cause I am a student, teacher throw this question to me without any instruction, I need some help.

    I love this... hey guys, where's that post stupid/please-make-my-homework/offending questions here" forum? that i2dx mentioned a while back?

    Do a search on build array, shift register, while loop, xy graph, in the LV help...

×
×
  • Create New...

Important Information

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