Jump to content

eberaud

Members
  • Posts

    291
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by eberaud

  1. I took the time to search for existing posts about this but surprisingly I didn't find anything. Here is what I want to achieve: I have a tiny LabVIEW executable that can perform basic operations on a single file. So far I need to open the executable, and then browse for the file. I would like to have a way to navigate in Windows Explorer while that executable is not running, and when I find a file I want to open in my executable I can right-click the file, and in the Windows context menu I can see my exe in the "Open with" menu. Even better, I would like to associate the special file extension to my executable so that I can simply double-click on it in Windows Explorer. There are probably several steps required to achieve this. Could you guide me through either one or all of them? Or point me to a useful resource? Thanks!
  2. You should probably save your VI for an older version of LabVIEW. Not everybody has LabVIEW 2016.
  3. In a slightly more advanced way, you can use a property node to get the array of pages (references). The number of elements in that array is the number of pages, so you can use this number instead of the constant for the comparison LogMAN is using to stop the loop.
  4. I had memory leaks that I investigated and fixed in the past but never of that kind! Usually the symptom is a slow but constant increase of the memory, in the order of 1MB every few minutes which adds up to 100MB in a few hours and 1GB after a few days. When I look at the memory usage in a graph, I see a constant gentle slope and I know I have a leak. Usually a while loop which keeps opening a reference and never releases it. But this time I had 5 hours of no leak at all where my application stayed nicely at 356MB, and suddenly it jumped to 1.5G in a 2s interval! Then it increased by 69MB/s for about 20s before stabilizing at 3GB. Then it regularly jumped back to 2GB for 1s and then back to 3GB for 30s, 2GB for 1s, 3GB for 30s, and so on... How could that be possible? Can I really have a piece of code that could manage to allocate 69MB/s? Any comments welcome!
  5. Probably a good idea to delete this post now.
  6. I'd suggest modifying the mechanical action of the Keep button to "Latch when released" (or "Latch when pressed", doesn't matter). This will reset the button to FALSE as soon as LabVIEW detects that it was set to TRUE by the user. So this will execute the code that populates the 2D array only once each time the user presses the Keep button. Additional comment: don't you want to restart populating the 1D array from scratch each time the Acquire button switches from FALSE to TRUE? Right now you keep appending and never discard the old elements.
  7. Have you checked the error description? It is defined as follows: The application is not able to keep up with the hardware acquisition. Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem. The issue might come from the fact that you're in continuous sample mode, so the hardware is going to keep filling a buffer and your Read function is supposed to partially flush it each time, but you only flush 1 sample when the case structure is TRUE, and you don't flush it at all when the case structure is FALSE. So the buffer fills faster than you flush it and eventually gets full and generates the error. I'm not 100% sure of my description but it makes sense to me. Also the way you generate your array of X for your graph is weird. You reset your timestamp shift register each time the structure is false. So when it becomes true again you don't compute the elapsed time since you started the VI, instead you get the elapsed time since the last time the structure was FALSE. Is that by design?
  8. Dear all, My company is hiring a new developer to join our software team. Please see link below for details and to apply. http://www.greenlightinnovation.com/company/careers/articles/253.php
  9. Did the mass compile and everything works fine now
  10. Thanks, that fixed my issue, but now it is stuck on "starting expression tester, please wait" (or something similar) and I need to kill the LabVIEW process after a few minutes
  11. I tried to open the Expression Tester but it can't find one of the dependency...
  12. I started implementing exactly what you're describing Tim. This RPN stuff is pretty neat
  13. I haven't had great experiences with DLL in the past so I wanted to stay away from it
  14. I tried, but no, Eval Formula Node.vi doesn't support min and max. Only the formula node supports it (along with modulo and remainder and others that I also need).
  15. A few years ago I wrote my own equation computing algorithm for my company's flagship software. The user will write equations using variable names and constants (for example a=2*b+3), and those equations run continuously every 100ms. The pros The user can add Min and Max expressions inside the equation. For example a=Min(b,c)+2. The syntax supports parenthesis. For example a=3*(b+c). The limitations You can have several operators but their priority is not respected. For example the result of 1+2*3 will be 9 instead of 7. The user has to write 1+(2*3) or 2*3+1 to get the correct result. You can't put an expression inside a "Power" calculation. For example, you can do a+b^c but you can't do a^(b+c). You would need to create a new variable d=b+c and then do a+d, so now you have 2 equations running in parallel all the time instead of 1. There is no support (even though it wouldn't be hard to add) for sin, cos, tan, modulo, square root... I am now thinking of using a built-in LabVIEW feature (or one the community might have created ) in order not to reinvent the wheel completely. Surely I am not the only person who needs to compute equations. I looked at vi.lib\gmath\parser.llb\Eval Formula String.vi and it seems to answer 90% of my needs, it is simple to use, but it doesn't support Min and Max expressions and writing a hybrid system would be complicated. What do people use out there? If I need to reinvent the wheel, I found interesting resources such as https://en.wikipedia.org/wiki/Shunting-yard_algorithm and https://en.wikipedia.org/wiki/Operator-precedence_parser so I think I can pull it off, but it's going to be very time consuming! Cheers
  16. Thanks for the explanation. Yes, bad terminology then...
  17. I read Darren's excellent article about creating healthy Dialog box (http://labviewartisan.blogspot.ca/2014/08/subvi-panels-as-modal-dialogs-how-to.html) I thought using a dynamic call and selecting the option Load and retain on first call would prevent loading the subVI in memory when loading but not running the caller VI. I created a super light project to test it but didn't get the expected behavior: - If I don't open the Caller, I don't see any VI in memory (except for the VI that reads the VIs in memory of course). - If I open the Caller, I see both the Static Callee and the Dynamic Callee, whereas I expected to see only the Static Callee. Did I misunderstand how that option works? VIs in memory.zip
  18. If at some point you need to integrate external code you'll likely find out that they only work with 32-bit. So unless your scope is well defined and you know it won't change, you're taking a big risk by moving to LV 64 bit.
  19. I see, so long story short, you don't really extract the PNG and feed it to .NET, you rather manipulate the ICO and then feed it to .NET still as an ICO. Correct?
  20. My question is about the piece of code in this screenshot of Read Ico File.vi. You seem to reassemble an .ico file again. Is that what you're doing?
  21. I like to understand the code I'm using instead of just blindly using it "since it works" I'm looking at your Read Ico File.vi. I found a Wikipedia page that describes the format of an .ico file so I understand perfectly what you're doing when you index the bytes coming from it. However I can't find anything that describes the content of a .NET Image Byte Array, so I don't understand what you're doing when you create that array. Can you point me to a web page that would explain this format? Cheers!
  22. Yeah no time to dig through VB code for now. Thanks, I appreciate the help
  23. Looks neat, thanks hooovahh. Now my problem is that it always uses the first (higher resolution) image of my .ico file. I need some code to choose which image to use. The vi.lib\Platform\icon.llb\Read Icons from ICO File.vi VI returns an array of clusters named icon data but those clusters are different from the imagedata.ctl typedef used by your VIs..
×
×
  • Create New...

Important Information

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