Jump to content

hooovahh

Moderators
  • Posts

    3,392
  • Joined

  • Last visited

  • Days Won

    284

Everything posted by hooovahh

  1. Yeah that's what I do. I read the build version from the file and display it in the about screen. I've also thought about pulling in the file creation date which if you are using an installer to install your software, should be the date the EXE was built, and not just the day you copied the file to the computer. I also set the build number with a pre-build which is the commit number in SVN. So then you have the major, minor, fix number, along with the commit for source code control, and the file creation date all in the about screen, and reports that are generated so you can look up what source code went with what software.
  2. No I meant integrate, which is the area under the curve. So comparing the area under the curve for some set amount of X time on the first waveform to the same amount of time on the second waveform, and perform the integration then subtract the two and you'll get the difference between the two waveforms for that period of time. When that number is the minimum for a range of values that that is where the two should line up. I think the amount of X time can just steadily increase. So look at the first 0.01 of waveform 2 and the last 0.01 of waveform 1. Perform integration and see the difference, now the first 0.02 of waveform 2 and the last 0.02 of waveform 1 and do the same. Of course you can do smaller slices of time. Attached is the code that I think does this operation. It looks at the length of time the second waveform has, and performs the integration on the two waveforms 100 times, with ever increasing X length. Then it finds when the two waveforms had most similar integral on that period of X. This 100 is again arbitrary but can be easily increased if you want more precision, it will just take longer the more slices you are using. Detect Waveform Alignment 2.zip
  3. You're beginning to sound like a customer. 10 Points is arbitrary, 0.5 tolerance as well I figured those could be adjusted as needed. I was just trying to come up with a slightly more robust solution while making some assumptions until more information came in. The non-even X would complicate things for sure. Having to perform more of an integration between times, and then look for when the subtracted integration between two lines at moving X is the minimum. But again I'd need more information about the types of overlap we are expecting. Can we always assume the second half of the first waveform is intended on overlap the second waveform? That would help simplify things a bit. Honestly most of my assumptions were based on the idea that these were two sets of data read from some analog device with hardware timing. Like an AI DAQ device, which is why I did it the way I did. The integration solution is probably a better way to go since it sounds like that is not true
  4. I wasn't sure what version of LabVIEW you were using. The snippet says 2009, but it forced me to open it in 2016 for some reason. Anyway attached is my quick attempt. It will take the last N points (in my case 10) from the first plot, and then try to find a match with a tolerance (in my case 0.5) in the second waveform. If no match is found maybe you could look into adjusting the tolerance. I also wasn't sure if the second waveform would always continue the first, so maybe grabbing the middle points from the first waveform would be better if you know there is that much overlap. Detect Waveform Alignment.vi
  5. Oh sure there are tons of ways to do this with 3rd party tools. My favorite happens to be one I helped develop posted here. With it I have been able to run a VI on a remote system which generates an HTML5 webpage, which I can view using chrome on another desktop, or my phone, or firefox running on an embedded Linux RT target. It has several limitations, like all clients connected will see the same UI but it is all open source and could be updated to your needs. Here are a list of other options, most of which I can't speak to the feature set of. As far as I know all of the official ways to do this (other than the new hottness teased at the last NI Week) all require some part of the run time engine to be installed.
  6. Interesting program, but is everything hard coded in terms of the word used? Eventually I'd suggest allowing to just update a single string with a new value and have the program just work. Your question isn't quite clear but keeping track of the number of wrong answers seems like something you are going to have to keep track of with a shift register or feedback node, incrementing with each wrong answer. Then you can build your path with a format into string so that you will select 2.jpg for two wrong answers. You could also embed the N images into a single Picture Ring control, then pick the image based on the number of incorrect answers.
  7. I've heard of people getting that kind of speed but I've never used it on any device. I found a couple of articles you probably already found talking about high speed serial stuff. http://www.ni.com/white-paper/52915/en/ http://digital.ni.com/public.nsf/allkb/D37754FFA24F7C3F86256706005B9BE7 I'm not aware of any special work that needs to be done to achieve a fast baud rate.
  8. Bummer. Well still most of the icons look alright when small but is definitely noticeable.
  9. FYI I made a separate post over here talking about my process of taking SVGs and making nice looking scaling icons using them, and I demonstrate it using your Dark and Light controls as templates.
  10. There is still no way through scripting to replace the decals on buttons to use a different image. But using some known LabVIEW calls we can extract the image and replace it, then save it with a new file name. This has been done several times replacing the PNG image data in the CTL file. The problem I have with this is PNG images don't scale well. If I have a PNG that is 16x16 pixels on a small button, and I happen to want to make this button for a larger touch screen UI, I can but the image will look poor. LabVIEW does support some vector images mainly the EMF and WMF file formats. So using an external program Inkscape, I wrote some code that will take an SVG file (which is vector based) convert it to an EMF, and replace the decals of buttons, as well as give the CTL a PNG icon, label, and boolean text. I recently re-discovered a website that has all kinds of useful flat icons, and makes them available as SVGs. So all that is needed is to download Inkscape, download an SVG, and run a VI that I've attached. In the zip is some Example Controls I've generated using the SVGs from the Essential Collection which make controls based on 6 different templates. The JKI Flat Dark/Light, the Flatline Dark/Light, and the System Vertical and Horizontal controls. The main VI is in Replace Button Decals\Create Control from SVG.vi. I could see this being used on a repository of SVGs at some central location like a network drive, and then call something like Tools>>Generate Controls which shows a database of icons, and control types, and then generates them, rather than generating tons of controls that might never be used. Oh and I did find this pretty handy program that allows for viewing SVG images in Windows Explorer. It really helps to be able to see the icons and organize them before generating controls. Vector SVG Controls.zip
  11. I'm sure you don't need more help finding flat icons, but I came across this site that has a decent amount of free and paid icon packs, with licenses that are relaxed enough to use in commercial applications. The site is a bit limiting in the amount you can download per day as a free user. I just saved a couple as SVG, then used an online site to convert to WMF but it seems Inkscape can do it through the command line too. WMF is the only vector image type that LabVIEW supports and with it you can make buttons with icons that scale with your button, and don't look like stretched when they get too small or too large.
  12. Well here are about 10 options with my favorite being the one already linked to in the first post of this thread. You decide what is the best fit for your application.
  13. LAVA has generally been about as little censorship as possible. Nothing in this post is explicitly crossing the line. It doesn't link to Warez and Crackz, and it doesn't mention piracy. It mentions a few things that could incriminate someone, but unless that someone asks a mod to delete it I see no reason to remove it. Of course I'm not the only moderator here and someone else could choose to remove it.
  14. Without an example VI, and more explanation in the post (like "listbox" isn't mentioned anywhere in the description) I wasn't sure what you were referring to. The easiest way of doing this is with an event structure and the Mouse Down? event. Here you can use the Discard? input, and if the right click mouse button was used, and the selected item is one that should be ignored, discard the click and no menu will come up.
  15. http://zone.ni.com/reference/en-XX/help/371361J-01/glang/set_menu_item_info/ Set Menu Item Info
  16. Sweet, look forward to seeing you again John.
  17. Nope. I mean you breaking your NDA with NI is one thing, but an NI employee breaking their NDA with NI by posting on LAVA would be career suicide. If you have questions about super secret private special stuff, you should ask questions in the designated super secret private special forum.
  18. We appreciate your activity here on the forum...but could you work on completing your thought. Is this an NI question? Is this a service and support question? If so contact them directly. Also it appears ass isn't on any filter of bad language so that's good to know.
  19. hooovahh

    Still Alive

    Yeah there are aspects of the new forum I knew I wouldn't really like. There is a social network aspect, where you can write on eachother's wall. Or follow other users activity. I don't really need this but the integrated Chrome notifications is nice, and the updated mobile browser. The moderator tools are more or less the same, and Michael takes care of the high level stuff enough that I don't know the impact of the new forum but I imagine it is for the best.
  20. hooovahh

    Still Alive

    Alot can change in 4 years, welcome back. Is this the first time you're seeing the LAVA face lift from a couple of years ago? What has kept you from LAVA (and/or LabVIEW)?
  21. I saw some mild performance benefit from using the IPE for variant look ups instead of the primitives, but I remember it being a bit of a pain to test and use at times. I think something about creating an attribute if it didn't exist. Maybe it was just the way I was trying to use them. Edit: found my speed tests on the dark side for writing and reading attributes, it seems writing is going to be faster with the primitive, but a read that does nothing but return the value, is slower with an IPE than the primitive. Of course I'm sure NI intended on this feature being used where you perform a read, manipulate the data, and write it back in the same structure, which will probably result in even better performance.
  22. So I've never used this particular piece of hardware before. But on Windows I have had a 12 port RS-232 serial device, connected via one USB to the PC and was able to communicate multiple ports in parallel. The solution for me was to use the parallelized for loop instead of plopping down multiple copies of the same VI. Right click the for loop and configure the parallization in your case setting the number of generated parallel loops to at least 8. Then use code similar to this with your subVI configured to reentrant of some kind. But honestly I can't think of a reason the parallel for loop would work, if your static declaration doesn't. Is there some other subVIs in your subVI that isn't reentrant? This could be a blocking call making all the other loops wait on each other anyway.
  23. I'm not an expert at this type of function, but your version doesn't produce the same output as the others. In your VI I gave Array 1 = [4] and Array 2 = [5] and the output was [4,5], and the first VI posted here results in an empty array for that input. I haven't done any speed test but with the advent of the conditional indexing terminal I'd suspect the simplest solution to be the modified version of what SuperS posted. Edit: Oh but that does include duplicates multiple times. Maybe a remove duplicates from the Array B, or remove duplicates from Array A and B since that output will never be larger than Array B.
  24. Demo time. So attached is what I was thinking. There are multiple ways of doing it I just went with the one I knew would work but might not be the best solution. Especially if the number of signals is more than 8. Run the Main Selection Window.vi. Then pick the number of signals between 1 and 3 (sorry I didn't do all 8 but I think you get the idea). Then for each of the 1 to 3 signals select the signal that it should be reading, and the viewing option which is either Graph, Value, or Value With Other Data which in my case is the running mean of the signal. Then click start. It will insert 1 of 3 VIs into the subpanel depending on the number of signals shown. In each VI is 1, 2, or 3 subpanels which inserts the core VI Signal Signal View 1, 2, or 3 times. This is the only VI that is reentrant. The benefit of this design is window resizing works nice. If you resize the main window all the sub windows get resized in real time and work pretty well without any extra code. I also included a queue to send messages to the independently running VIs. Right now the only command is quit but you could use this to send any data to one window, or multiple depending on how it is coded. Now actually getting your data being read in multiple instances may also require yet another parallel running task. If you have something like DAQ tasks all running on the same hardware, then you will likely need to publish that to a more global data space, so that each of the parallel running VIs can grab the signal they care about. In my demo I just used randomly generated data so each of them can run in parallel without having any hardware resource locking issues. Signal Selection Demo.zip
  25. You already see how to work on individual rows. What do you mean avoid selecting the rows every time? Where in the code are you selecting rows at all? If you want a given rows values search for it. You see that the Add function already searches for Row Names that match the one you are trying to add, and you get an index of where the match is. Index the Y and C values at that found index and you'll have the Y and C values for a given row. If it returns -1 then there was no match. This add also won't add a new name if the name already exists.
×
×
  • Create New...

Important Information

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