Jump to content

hooovahh

Moderators
  • Posts

    3,445
  • Joined

  • Last visited

  • Days Won

    292

Everything posted by hooovahh

  1. I think this is a weak argument. I mean I agree that it isn't very flexible, but how often do you start a comment with # and then no space? That is the only time a bookmark is made. If you have the comment "Here we take our # of samples and average them" it won't make a bookmark. You need to deliberately make a comment starting with # then no space. Yeah this one I think is a big over sight by NI. I mean they have a product, which semi-relies on free labels to be in a specific format to be able to pull requirements. When making the bookmark manager it should have some how incorporated that standard. That being said I know you can modify the requirements gateway reading functions to look for #tag instead of [tag] just like I think it uses [covers] could be #covers. I just think that what ever you came up with (which looks great and probably is more flexible) probably isn't as fast as NI's implementation, because they were able to put whatever hooks into the VI to make finding bookmarks faster. Wouldn't it be nice if your code used the bookmark manager searching tools instead of your own, assuming NI's is faster for larger projects. EDIT: By the way awesome discovery. Bookmarks are saved in the VI in a human readable format. They can be found by going to the BKMK block of the VI file, this can make finding bookmarks much faster since you don't need to even open a VI reference to the file, you simply need to open it and read the bytes of the file.
  2. Because NI has support for custom Bookmark Managers, I'm guessing that Shaun could make his own that merges the functionality of the two.
  3. Attached is what I was describing. Hydraulic Pressure units Hooovahh Edit2.vi
  4. I'm having some weirdness with the edit cell position selecting the 0,0 cell when it shouldn't so I won't upload what I have. But what you need to do is add an event to the event structure which is "Edit Cell?". Here you can get the String which is the new string value of the cell you edit. Then convert that to a number then back to a string. This is a much simpler way of getting a valid number. Then write that back to the String on the right side of the event structure. In that case you should also fire another Value Signaling event causing the output values to be recalculated with the new value. Also Decimal Digit? function takes a string, not a single char character. You can use this to validate the input as well.
  5. Just an FYI LabVIEW 2013 SP1 appears to be up on NI's site. http://www.ni.com/download/labview-development-system-2013-sp1/4527/en/ I generally only stick with SP1 releases for products, so for me this is when I get to actually use all the new features in 2013 on real programs. Another odd thing is the release date is in the future stating 3/10/14.
  6. Well how bout that. What I'm guessing this means is behind the scenes NI has a way to list all VIs in memory including the clones of VIs. In the past getting these VIs was very difficult. The thread on the LabVIEW Task Manager mention that to get the reentrant clone reference the simply way was to basically guess the clone number and check from 0 to some arbitrary upper limit looking to open the VI reference by name. AQ in this post mentioned how he was trying to slip in some stuff in 2014. http://lavag.org/topic/14921-labview-task-manager/page-3#entry105032
  7. Just after making that my signature Crelf came up to me and expressed concern that having that be my signature might further enforce the rumor that he uses other accounts to troll on the forums. This rumor is not true. Which is something that a troll account might say.
  8. I changed the Window appearance first. Hit CTRL + I or go to the VI Properties window, then I went to Window Appearance and selected Dialog, then hit customize and made the window non-modal (default), and allowed minimizing the window. Then I colored the panel by bringing up the paint tool and selecting the System Color "Window" which is the system color that a normal Windows program will have as a background. These steps help make the UI more Windows like.
  9. Without knowing the scope of the application it's hard to say if an OO approach is necessary. What question by the way do you have about the "Execution"? Be more specific what feature you want to know how it was done.
  10. Attached is what I think you want. It has the close fix mentioned by Tim. It also handles a close to stop as well. Basically I added a Mouse Down? event and then discard the click if it was in a column other then the Control Value. I still set the Value Signaling event so that when a row is clicked the value changes and gets the data from that set and does the string conversion you already had. I also set the listbox to highlight the entire row. Visually I like this better. I also changed the data type back to a scalar because you only allowed them to select 1 item anyway. MCL test Hooovahh Edit.vi
  11. Several issues with your code. The first is a race condition where you are converting to string, then try to convert back using a local variable. You are reading that variable, and writing to it at the same time and you have no idea who read or wrote to it first. I see you pulling out all of the components of time then adding them, then converting to a U64. A U64 doesn't have a fractional component, but you are adding fractional seconds. This means your resolution will only be 1 second not 1 millisecond. I'm also not sure why you are only interested in the time component and not the date. This maybe a requirement of some kind but I thought it odd and actually didn't notice until just now but I already wrote a working conversion to a hex string and back that contain the date. I'd also use a time constant or control for the time stamp instead of current time. Current time changes each time you run and having a constant (or control) allows you to run it and see where the conversion isn't working. My attached code takes the time stamp. Multiplies it by 1000 so we are now looking at the number of milliseconds not seconds. Then put that into a U64, and convert to string. The reverse is just as simple. Convert string to hex, divide by 1000 then convert back into a time stamp. hex to String and back.vi
  12. CSV is a flat file structure. You can open it in notepad and see the data in the 2D format separated by commas and new lines. CSV does not support a third dimension of data. To store data in a way that Excel opens it and has multiple tabs you'll need a different file structure. Using the Report Generation Toolkit you can have control over the file and save it as an XLSX which has support for worksheets (tabs). Also you may be interested in generating a TDMS file using the build int TDMS write VIs. NI then has a free add-in that opens TDMS in Excel and it also supports groups which is shown as workbooks when opened in Excel.
  13. Clusters being static is by design. If you data type is flexible at run time then you don't want a cluster you want a variant (which may or may not be a cluster). But at some point you need to know what you are dealing with.
  14. This is the only thing I can think of that would work as well but it probably is very error prone. Lets say your control size is 100px high according to the Housing Size property. That will likely include the borders, and any small spaces around the slider, and possibly things like the label/caption and digital display. These things will need to be taken into account and the range from min to max on the control and may not be very accurate.
  15. Just ran into this one personally. Not sure what the offending VI is but replacing the one in the vi.lib with the one you posted fixed it. Can't wait until SP1.
  16. Please do not double post. If you are unhappy with your first post you are welcome to edit it, or us the Report to Moderator button to get posts edited or deleted. On topic could you post some code of what you have. It's still a little difficult knowing what you want. You are saying what method can you use to move an item that the user selects up or down? Okay so I think I found what you were talking about, and I think I have a solution. I don't know if there is a better way of using it, but what it will do is find the parent of the current tag, then find all children under that parent. Then find within that list of children, where does our current tag exist. Then move that position. Alternatively you could allow the user to click and drag to move items around, but I admit that getting this to work the way you want can be a pain. Tree Move Item Up.vi
  17. A user complained that these links are dead. I don't have the original VI but I implemented some code that is similar in functionality. You click cells in a Table, or Multicolumn Listbox and the color changes. There is also a Clear Color button that changes all cells back to white. Saved in 2011. This cannot be done with an array control because the only thing that can be different between elements of an array is the value. If you try to set the background color it will set it for all elements in the array not just the one cell. Color Cells Mouse Click.vi
  18. I don't fully understand the situation. You have a listbox that the user can edit and you want to know when they make an entry that is already an entry and prevent it? OpenG array tools has Remove Duplicates from 1D array and this can help determine if there are duplicates. If you can post a simplified version of what you are doing and I think we can help.
  19. If taskkill doesn't work you have bigger problems. I'm guessing you aren't performing a taskkill but instead are politely asking the application to exit. And if it isn't responding it won't exit. In task manager go to the Processes tab, find your application and click End Process. This is a taskkill and will remove the application from memory. If you are on the Applications tab and try End Task this does not perform a taskkill but instead tries to close the application more gracefully and may take longer or not work at all. Again as discussed in this thread task killing an application is not something to be taken lightly, and under the right circumstances may have no ill effects. Generally this is only used when an application isn't responding and you don't want to reboot your computer to get back to a usable state.
  20. I agree, I was just trying to give the most complete answer.
  21. This is true, and I would also recommend an actual database, but that doesn't mean you can't do it with TDMS. I've seen someone use TDMS as their configuration file format, replacing INI files. Of course that was crazy and it didn't catch on but it could be done.
  22. The shortcuts are in the LabVIEW.ini (as you have discovered) and are under the key QuickDropDiagramShortcuts and QuickDropPanelShortcuts. Copying just these items to the new LabVIEW.ini will bring along the shortcuts. Internally we have a package with added quickdrop functions. Packages can have a PostInstall VI called and my post install VI will add these lines to the current LabVIEW.ini.
  23. The original post can clarify but I think the complaint is that when the VI from the tools menu is ran from the project explorer, the App.MenuLaunchApp doesn't return the application instance that the project is using.
  24. Please do not make duplicate posts. If you make a post and want it moved, use the Report to Moderator button. Sorry I don't have anything to add to the issue you are having.
  25. The first method that comes to mind is using Windows DLL calls to set the parent window as the LabVIEW front panel, and the child window as your C# application. This will work but looks a little ugly because you will have the title bar of your C# program inside your front panel and looks unnatural. I did a quick search and found this post that I think has some code on setting parent/child windows. http://forums.ni.com/t5/LabVIEW/Set-Parent-window-using-User32-at-lv7-1/td-p/1950469 To do this you'd need the HWND of both the parent and child windows. I'm betting there is a nicer way to do this and I hope someone else answers because admittedly this feels like a hack method.
×
×
  • Create New...

Important Information

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