Jump to content

Jim Kring

Members
  • Posts

    3,905
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by Jim Kring

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

    Chris: I think this is very interesting and worth developing into an OpenG project (we were actually discussing SQLite integration with LabVIEW, last week). We could build the shared library on all platforms and make it a cross-platform toolkit. I'm more than happy to help get it into the OpenG Toolkit. Send me a PM, and we can discuss.

    Cheers,

  2. Thank you Jim!

    I tried your solution, and i have attached a simple vi... the starting point of long walk toward the unknown!!!

    The problem is that as you suspected: users need to interact with the controls!

    Do you have you other suggestions for me?

    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.

  3. Federico: Can you use a picture control to achieve the desired result?. You can obtain a control's image by invoking the VI Server method Get Image. You can then draw this image on a picture control. You can do this multiple times, draw them in different positions, and in the desired (Z) orders. You only need one real control for each type of control you wish to draw -- you can change the control to the desired value. However, if users need to interact with the controls, it gets tricky.

  4. Hi Forrest,

    That sounds frustrating. You've definitely done everything right: you have contacted NI, sent them an example, and documented your problem and how you recover from it. I guess that I would look for some solution that might allow you to "reconnect" with the DAQ device without having to physically unplug it.

    There is probably a way to achieve this using Windows API calls -- but, I am not sure.

    A quick Google search and following the first result to a USB Developers FAQ brought me to a FAQ entry called "How can my application reset, disable, or restart a USB device?". The answer says that "The DevCon example in the Windows DDK is a command-line utility that shows how to enable, disable, restart, update, remove and query devices using the SetupAPI and CfgMgr32 API functions". I did a search on the Microsoft Support Site for CfgMgr32 and the second search result was to the DevCon command-line utility page.

    The DevCon utility is a command-line utility that acts as an alternative to Device Manager. Using DevCon, you can enable, disable, restart, update, remove, and query individual devices or groups of devices. DevCon also provides information that is relevant to the driver developer and is not available in Device Manager.

    The DevCon command-line utility page has a link to...

    Download.gifDownload the DevCon package

    You can call this program (DevCon.exe) using SystemExec.vi to execute it from the command-line.

    Please let us know if this works, or if you have any other questions. I'm very interested because your problem might happen to the rest of us, and it would be comforting to know that there is a good work-around solution.

    Good luck,

  5. Well, I'm glad to hear that it's a bug rather than some strange attempt from NI to remove functionality. It's a shame since this is a useful function for implementing some powerful design patterns.

    btw, is it me or is this the buggiest LV release yet?

    There could be a lot of things going on. It certainly depends on how you measure bugs. For example, you might look at any of the following:

    1) Number of New Bugs Total

    2) Number of New Bugs per Total Software Features

    3) Number of New Bugs per New Software Features

    4) Number of New Bugs Reported on LAVA

    Since the number of new software features in LabVIEW has grown significantly with the release of LabVIEW 8.0, I wonder about how much #3 has grown.

    Certainly #4 is growing rapidly. But, the number of posts in the LabVIEW 7.1 Buglist is 51, and the number of posts in the LabVIEW 8.0 bulist is only 25. So, maybe 8.0 is only 49% as buggy as 7.1 :laugh: Of course, there has been a lot more time to find the bugs in 7.1 -- it would be interesting to see the number of posts verses time in the bug forums.

  6. You will probably need to ask your IT department how you can access your web server. If you are connecting from a computer on your companies network or over VPN, then yes, you will use an address like http://mycomputer/myproject.html, but if you are accessing your computer from the Internet, then you would need to use an address like http://mycomputer.mycompany.com/myproject.html. Probably your IT department will not go for this option, since there are many security issues.

  7. Here's an update...

    There is no access provided to the 32-bit type descriptors in LabVIEW 8.0. NI recommends using the Variant API VIs (which are new to LabVIEW 8.0) located in:

    .\vi.lib\Utility\VariantDataType

    These are similar to OpenG's LabVIEW Data Tools library (but do not offer any where near the breadth of functionality of the OpenG library). The vi.lib Variant API will likely be extended to support more variant operations (currently there is not nearly enough functionality in this API to be of much use). And, the Type Descriptor interface will likely be phased out; but not very soon, due to the fact that there are a large number of toolkits and other VIs that use 7.x Type Descriptors.
  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.

    make sure that you have the oglib_error package installed.

  9. A while ago, I posted an example of using Callback VIs to handle Dynamic User Events. It seems that LabVIEW does not pass the User Event data, as it does for VI Server and ActiveX events -- basically my example is broken. Is this a bug in LabVIEW 8.0 or did NI take this feature away?

    If you open in LabVIEW 8.0 and (1) delete the broken wire and (2) right-click on the Register Event Callback node to Create Callback VI, you will notice that the newly created Callback VI is missing the User Event Data. Please, NI, tell me that this is a bug and will be fixed in 8.0.1.

    CAR#: 3TGB7CSQ

    Status: Fixed in 8.0.1

  10. Ahhh, okay. I'll play around with that a bit, haven't done much GUI-based scripting like this yet. BTW, do you think my idea of displays in a tab control on the master VI sounds like a reasonable thing? The routine VI would basically have a reference to the appropriate display indicator on one page of the tab control on the main VI, and then update it. It looks like datasockets might have been designed to do this sort of thing, but I haven't found any good documentation on datasockets.

    Jeff: This isn't an approach that I have tried. It might work, but I would need to see an example. On first thought, the communication seems a bit obfuscated -- I don't like datasocket much either.

    I have seen people using it for dumping stuff they dont 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.

    PJM: Thanks an interesting idea. Usually, I put the inputs and outputs of a user interface VI off-screen. Having them in a different page of a tab control would clean things up a bit. And, you would know where to find them -- when they are off-screen, you don't know if they are up/down/left/right :wacko: However, the only trick part is how do you easily change to the tab that contains the input/output controls/indicators? I guess that you could double-click on a terminal, and it would hilight the control on the front panel, thus changing to the visible tab. Another option could be to have the VI programmatically hide the tabs when it starts running and make them visible again once it completes execution.

    6. Show/Hide Controls -- In UIs that have CPU intesive indicators (Tables, Graphs, ect.), I have a show/hide option that I used to implement with the visible property, but I now use tabs. The added bennefit is that I can put a message or picture in the empy tab saying that the indicators have been hidden for faster execution.

    Alan: I have done something similar once, but mine was for "locking" the user interface. When the VI was "locked" it displayed a tab, that contained a "password" string control and an "unlock" button. Once the user unlocked the VI, it switched back to the tab containing all of the VI's functionality.

  11. Jeff: I believe that adding/moving controls into the page of a tab is an editing operation (which means that you cannot do it while the VI is running). To do what you want requires scripting, using the "Create Contorl from Type Descriptor.vi" [sic] to create new controls or the GObj.Move method to move an existing control into the Page of the tab control (specifying the Page reference as the new owner). See the example, below:

    post-17-1137362539.png?width=400

  12. Here are some ways that I use the tab control:

    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.

    2. Wizard Screens -- Use the tab control for building a Wizard user interface, where the tab's are hidden (the user cannot click on the tabs). Each screen of the wizard is in a different page of the tab control, and the pages are programmatically changed, as the user presses the Next or Back button.

    3. System (Dialog) Raised Box Decoration -- Since there are no System (Dialog) raised-box decorations, I will commonly use a Dialog Tab Control with one page and the tab hidden, as a subsitute for a Dialog Raised Box.

    4. A Better "Grouping" Mechanism -- An extra benefit of #3 is that the controls inside of the single page tab control are now grouped -- without actually having to use the Group feature -- and can be moved around by simply moving the tab control. If you use a Modern (3-D) or Classic (2-D) tab control, you can even make the tab control transparent.

    post-17-1137274826.png?width=400

    Can you think of other good uses for the tab control?

    • Like 1
×
×
  • Create New...

Important Information

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