Jump to content

JKSH

Members
  • Posts

    494
  • Joined

  • Last visited

  • Days Won

    36

Everything posted by JKSH

  1. Yes, we need to pick the right tool for the job at hand. Also, I think spending some time to do things the low-level way helps us understand how to optimize our use of high-level tools. Learning how registers are implemented helped me write better C code. Learning memory management in C helped me understand and appreciate what LabVIEW is doing behind the scenes, so I can write better LabVIEW code.
  2. Hi, When you run a standalone application, your Form's constructor and the other methods all run in the same thread. However, LabVIEW automatically switches between different threads to run your code. You will get a .NET exception if your Form is accessed from the "wrong" thread. See http://stackoverflow.com/questions/6373645/c-sharp-winforms-how-to-set-main-function-stathreadattribute to get started.
  3. I took up C as an elective while studying Electrical Engineering, and discovered that I really enjoyed programming. So, I learnt C++ as a hobby, which opened doors to an internship to develop a small embedded system. Then, I used my hobby and internship portfolio to land myself a full-time job in a LabVIEW house :-D
  4. Ok, let me check that I've understood you correctly: You want to compress the image and save it to your hard drive, to view the image in the future. Is that correct? Can you explain what you mean by "real time"? One thing isn't clear to me: How did you produce this .png image? PNG is one of the many image compression formats out there. So, if you have a PNG image, that means it's already compressed. You will need to strike a balance between image quality and compression size. For example, see the Write JPEG File compression VI: http://zone.ni.com/reference/en-XX/help/371361L-01/lvpict/write_jpeg_file/ It lets you choose image quality. If you choose "high quality", you will get less degradation, but a bigger file size. Note also that PNG is not optimized for compressing photographs, while JPEG was designed for compressing photographs.
  5. Which technique is better? That depends on what you want to do with the image. Can you describe your project in more detail, and tell us how you want to use the image?
  6. Hi, Have you already chosen the type of compression that you want to apply? How do you plan to use the compressed image(s)? Here's one possibility: http://www.ni.com/example/30667/en/
  7. Hi, I don't have a solution immediately, but try flattening your cluster with both LabVIEW 2012 and 2014. Save the flattened strings to disk, and then compare them with a hex editor. What differences do you see? I believe that setting is for compatibility between LabVIEW 7.x and 8.x http://www.ni.com/pdf/manuals/371780e.pdf Anyway, could you please provide a link to any documentation/discussion about the change in the internal data format between 2012 and 2014? The latest changes I could find are between LabVIEW 2011 and 2012: http://forums.ni.com/t5/LabVIEW/Why-is-a-flattened-variant-different-in-LabVIEW-2012-and-LabVIEW/td-p/2329878
  8. Hi, Please show your code. Did you install NI-Serial on your RT target? What do you mean by "doesn't work"?
  9. Another way to think of it is in terms of deep copy vs. shallow copy. You can think of a branch as a shallow copy -- there are two wire branches representing the same data so it looks like 2 copies, but internally they refer to the same block of memory. However, if 2nd branch needs to modify the data while the 1st branch still needs to access the original data, then the 2nd branch will fully duplicate the data (i.e. make a deep copy) and modify this copy. For a more technical and in-depth look at the topic, see the VI Memory Usage article. (P.S. I'f I'm not mistaken, this copy-on-write mechanism only applies to structures like strings, arrays, and clusters. Scalars (Booleans and single numbers) are always copied fully, as the impact is negligible.)
  10. To be fair, he did say it was a comment made in jest (see post #7)
  11. What happens? Sounds like a bug that needs squashing. NI would do well to accept contributions from the community!
  12. The easiest way to mark everything (including LVClasses) is to load the LVProj file and go to Project -> Properties -> Project -> Mark Existing Items
  13. Have you made sure you pass the arrays as Array Data Pointers, and not any other format? http://zone.ni.com/reference/en-XX/help/371361L-01/lvexcodeconcepts/array_and_string_options/ What happens if you call this DLL from another C++ program? Well, you are using LabVIEW data to create objectPoints. Crashes caused by memory errors don't always happen immediately. For example, the error could have happened in arr2vect(), but program only crashes when you call calibrateCamera(). Or, by removing calibrateCamera(), you changed the memory layout of your program in a way such that the error doesn't cause a crash anymore.
  14. I've seen this issue extremely frequently over the past few weeks (sometimes, LavaG.org is one-day-up, two-days-down for me). Is anyone else seeing this?
  15. Hi, Have a look at the FPGA Math & Analysis VIs and Functions. There are ready-made Butterworth and Notch filters. By the way, if you want to post any code in the future, open your LabVIEW Block Diagram, select the code, and click "Edit" -> "Create VI Snippet from Selection". That produces a high-quality PNG file that other users can import directly into LabVIEW to test your code.
  16. An SQLite database consists of a single standalone file, which your application can place anywhere it wants. No need to install a server. (That's why it's called "Lite") There's even the option of an in-memory SQLite database (which exists in RAM only, not on disk -- the user will never know that SQLite was involved)
  17. Ah, I didn't realize that LabVIEW had LAA support. Thanks for sharing!
  18. Hi, I presume you meant that you are running a 64-bit OS. However, note that a 32-bit application running in 64-bit Windows is still limited to 2 GB RAM by default: http://stackoverflow.com/questions/639540/how-much-memory-can-a-32-bit-process-access-on-a-64-bit-operating-system This is a historical relic of LabVIEW. The same error code was used to represent two different errors in different modules (Code 2 could mean LabVIEW-out-of-memory, OR GPIB-has-no-listeners). Unfortunately, that means LabVIEW now can't differentiate between the two errors. So, both error messages are displayed: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/More-sensible-error-messages/idi-p/2244422
  19. Hi, There are a few ways you can do this. First way Make the program in A write "true" to the NSV when it starts, and make it write "false" before it quits. This is simple, but there is one disadvantage: If the program in A doesn't quit properly, then the value will stay "true". For example, if computer A loses power, the program stops running but it can't write "false". Second way Make the program in A write a value to the NSV every second. The program in B doesn't check the value, but it checks the timestamp. If the timestamp doesn't change for 5 seconds, then B sets a local flag to "false".
  20. Isn't that upside-down? LVClasses are specializations of LVLibs, so they inherit the strengths and weaknesses of LVLibs, not the other way round. If LVLibs are improved, then LVClasses will automatically gain those improvements too. If I've understood Jack's point correctly, the issue is that the one-function-per-VI system significantly increases the number of files in a project. This increases the effort required to write and refactor code (all LabVIEW code, not just LVClass code). This also amplifies the lags caused by widespread static linking.
  21. Great work! How long did this take you to make? I had to click "Undo" 3 times to beat it...
  22. JKSH

    Hooray!

    A worthy initial goal Does that include "standalone" OpenGL? OpenGL support would be great for advanced data visualization in LabVIEW. As for momentum, I have a large stop-start project myself. I found it very useful to document my thought processes and experimental findings. I'd get back into the project after a ~2-week hiatus and would've forgotten much of what I was planning. The documents helped me get back into it quickly without having to restart.
  23. That means the computers aren't connected properly. You must get pinging to work first. Without this basic step, UDP definitely won't work. What are the IP addresses and subnet masks of your two computers?
  24. JKSH

    Hooray!

    Nice! Extra points for demo-ing with Star Control 2 I saw this on Google+ last month: https://plus.google.com/107942026210962154106/posts/9cZoas7UgLy Are you guys working together?
×
×
  • Create New...

Important Information

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