Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by JKSH

  1. Ah, you're right. Thanks for correcting me. That explains the why @Xin Li found that "some queries are not executed": If 2 web service VIs try to execute a write query at the same time, one of them will fail.with an SQLITE_BUSY error and the data is lost.
  2. Write extra code inside your web service VIs. The code should take all the query details (query type and parameters) and take all the SQL VI outputs (results, error clusters) and log them to a text file on disk. However, multiple VIs won't be able to open the log file simultaneously, so you should create a dedicated "consumer loop" in your application. Your web service VIs can pass the log data to the consumer loop via a queue. Although text files don't support concurrent writes, SQLite does. However, it is not bulletproof and it's possible for it to fail: https://www.sqlite.org/lockingv3.html That's why we recommend that you add logging code so that you can see what's going on. [EDIT: SQLite does not support concurrent writes] How do you "see" the error? You can't easily use Probes in reentrant VIs. That's why a log file is recommended.
  3. Let your application log all queries to a file. Be sure to log the execution results and errors too. Are any queries missing? Do you see any errors?
  4. No problem. It's not clear to me: Does your lab already use a LIMS? Or does your supervisor want to introduce a new LIMS? The LIMS documentation will tell how how to integrate your test data into the LIMS. Read it to find out.
  5. Can you explain in more detail what you mean by "LIMS compatibility"? Which part(s) of a LIMS should the software talk to? What does your software do? Ask your supervisor for the LIMS technical manual or user manual. That should give you the technical details of the brand of LIMS that they're using. This webpage describes a LIMS in general: https://thirdwaveanalytics.com/blog/what-does-a-lims-do/
  6. Voted ages ago. Thanks for posting detailed instructions, @hooovahh: https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/NI-Linux-Real-Time-PXI-x86-VM/m-p/3561064/highlight/true?profile.language=en#M2107 That's what helped me get started in the first place!
  7. Yes, that can do the job. It will take some time to write the script, however. (I'd set aside a few days if you've never done VI scripting before) Could you simply modify LibA instead of replacing it with a different library with the same interface?
  8. Unfortunately, there is no straightforward way to do this in LabVIEW. I can think of one trick which takes advantage of the LabVIEW Project Explorer: When a library gets renamed or moved, the Project Explorer automatically updates the links in all of the project's VIs. So, Close LabVIEW. Temporarily delete or move LibB away to a completely different folder where it can't be found by LabVIEW. Open your project's .lvproj file. Use the LabVIEW Project Explorer to rename LibA.lvlib to LibB.lvlib, saving it in the folder where the real LibB used to be. This will update all your project VIs' links. Click "Save All" on your project to make the update permanent. Close your project. Delete the fake LibB and all the old LibA VIs. Restore the real LibB. Open your project. It should now pick up LibB instead of LibA. (It might complain that the LibB VIs were not in the expected folder. If it does, just "Save All" again and it will be happy after that) Make sure you back up everything before attempting this; rinse and repeat will all your projects. Caveat: If your project uses LibA in more than 1 Application Instance, LabVIEW will lock the library when you open your project, which blocks you from doing step #4.
  9. Are those front panels part of your intended Embedded UI, or only for debugging? When I run VIs on the cRIO "from source", both (1) and (2) work correctly for me on the cRIO's screen but not on the PC's screen (including preallocated re-entrant VIs). Tested with LV 2017 SP1 + cRIO-903x image in a VM. It is always worth having the cRIO screen visible during embedded UI development because what you see on the PC is not what you get on the cRIO: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LZ9SAM
  10. I suggest spending most of your energy on choosing a VCS for your team, as this is the part that takes the most effort for your team to adopt. I'd say that the other aspects (project management/issue tracking, documentation) have a lower barrier to entry. Can you elaborate on which parts of the centralized model are most important to you? I'm guessing it's because a distributed VCS (DVCS) can do just about everything that a centralized VCS can, but the converse is not true (hence my previous question). As a result, the online community (which is far more visible than corporations) are moving to a DVCS. The 2 reasons I can think of for a company to stick to a centralized VCS instead of switching to a DVCS are: Inertia. If the developers are already familiar with an existing tool, there is a cost to switch. They want an extremely high level of control and security over the code base. A centralized VCS makes it a bit harder for a rogue employee to make off which the whole commit history (but it doesn't stop them from taking the current snapshot). If the separate applications interface with each other well, how important is it to still have a single application/platform? Does your team have any existing interactions with the software engineering group? Can you get any support from them? Do you anticipate your team working with them in the future? If so, then the best choice for your team might be whatever the software engineering group is already using. That provides a lower barrier for collaboration between both groups. If you expect to be completely isolated from the software engineering group, then I'm guessing there is not much difference between the possible solutions you have listed. All of them will come with an initial learning curve; the important thing is to pick one, get everyone on board, and get familiarized together. I believe all modern hosting platforms support this. Be aware that none of the common VCSes were designed to work with something like LabVIEW; they were all designed to work with text-based code. So, regardless of which VCS you choose, LabVIEW devs must learn to take a bit more care to avoid triggering conflicts (and learn to handle the conflicts once they occur). How "big" are your team's projects? How often do you produce a new release? Are there parts of your release process where you go, "Man, this part is tedious and error-prone... It would be great to automate this"? CI is most useful when you have a lot of people working on the same code base and/or you have teammates who churn out commits at lightning speed. It can still be beneficial for small teams, but the impact is less pronounced (and the cost-to-benefit ratio is higher) CD is most useful when you want to release often, and/or your release process is tedious. DevOps is most useful for a large organization who wants better collaboration between their developers and their operators, and who want to make deployment more efficient. As you described yourself as a "small team with a badly overdue need for SCC", I suspect these are lower priority for you right now. Again, getting SCC in place first will probably be the most helpful; the automations can always be added after you've tamed the chaos.
  11. Spoken like a true LabVIEW dev 😁 That's a really good idea
  12. JKSH

    NI PCIe-5140s

    Google isn't revealing anything for me. Who is the manufacturer of this card? (Normally, the NI website hosts documentation of NI products -- even deprecated ones)
  13. That is expected. As I wrote previously, Git and Hg are very similar to each other in scope/functionality (but not in workflow details!). 5 years ago, people were saying that we should just pick one or the other and stick with it; we gained nothing from using both. Today, there is a benefit to learning Git: It gives us easier access to the plethora of code bases around the world, and it helps us move forward from incidents like Bitbucket's bombshell. You have just described Git (and SVN, according to @shoneill). The exact steps differ but the concepts are the same. Agreed. My analogy with an unsaved VI was a poor one, I realized. Unlike a power cut which is quite plausible, it is actually quite difficult to accidentally lose commits unless we ignore prompts/hints/warnings like the ones @LogMAN posted. Yes, Git could be made safer by automatically preserving "detached" branches and requiring the user to manually discard them, rather than automatically hiding them when the user moves away. I guess I've never encountered this issue in my 9 years of regular Git use because I habitually create a branch before making any new commits at an old point. This highlights the importance of running UX tests on people who aren't familiar with a product!
  14. I switched from Subversion to Git many years ago and encountered quite a steep learning curve but it was well worth it in the end -- Not having to be connected to the server all the time was a great boon. I haven't used Mercurial much, but from what I read Hg and Git were supposed to be similar to each other (at least when compared to SVN or Perforce) Yes, your choice of client has a huge impact on your experience. I find GitHub Desktop far too limiting; I like the power of SourceTree but I wouldn't recommend it to newcomers of Git -- too much power and too many options can overwhelm. Having said that, SourceTree supports Mercurial too. Perhaps @drjdpowell can use SourceTree to create and manage a Mercurial project, and then repeat the same steps for a Git project? This might help you to see the parallels between the 2 technologies and learn Git faster. Every single commit in the Git history can be checked out. If you ask git to check out Branch X, your HEAD now points to the latest commit on Branch X. If you ask git to check out Commit Y, your HEAD now points to Commit Y and is now considered "detached" (because it is not attached to a specific branch). To avoid "detached HEAD state", all you have to do is specify a branch when you check out. I have a use-case for entering detached HEAD state: Suppose I've made many commits recently and then discover a bug in my code. I want to go back to an earlier snapshot of my code, so I check out a commit that I think is good. Voila, I'm now in detached HEAD state and I can run my old code for debugging. When my HEAD is detached, I think of it as working on an anonymous/unnamed branch (a bit like how I can edit and run an unsaved VI, but if my PC loses power the VI is gone) Don't let the terminology discourage you; your journey will be worth it. Happy coding!
  15. I believe DAQmx and XNET have different timing mechanisms. This thread might contain useful clues: https://forums.ni.com/t5/Automotive-and-Embedded-Networks/XNET-Timestamp-and-Windows-Timestamp-Synchronization/td-p/3367619?profile.language=en
  16. The different letters mean nobody could confuse it with the TechCrunch logo either:
  17. Good find. I completely forgot that I posted that! 😅
  18. Even before this became available, the Hidden Gems palette would expose Split String.vi and Join Strings.vi which come bundled with LabVIEW (vi.lib\AdvancedString\) but which are not shown in the palette out-of-the-box. I'm not sure why NI created new VIs instead of exposing the Hidden Gems ones. I liked the Hidden versions better as they take less space on the block diagram. Note also that the out-of-the-box version has fewer features: The Hidden Gems version allows you to Ignore Case The OpenG version allows you to Ignore Case AND Ignore Duplicate Delimiters
  19. There are 2 separate sets of limits: Scale.Maximum/Scale.Minimum and Data Entry Limits.Maximum/Data Entry Limits.Minimum. The digital display simply shows the value stored in the Slide -- in other words, it shows what you'd see from the Slide's terminal, local variable, or Value property node. The underlying issue is that the Slide's value remains unchanged when you update the Scale limits. The Scale limits set the visible range on the GUI but they don't set the range of allowable values. To get the behaviour you want, you don't need to use a property node on the digital display but you must: Set "Respond to value outside limits" to "Coerce" instead of "Ignore" Programmatically update the Data Entry Limits
  20. Important: Make sure you sign up for a 4G service that does not use Carrier Grade NAT. If your cRIO is behind CG-NAT, then knowing its public IP won't help you. If your service gives you a unique public address, then the public IP address points directly to your modem. In this case, you're good to go with hooovah's method. If your service is under CG-NAT, then the public IP address points to your carrier's modem which is outside your control. In this case, hooovah's method won't work. Dynamic IP addresses are a fact of life now unless you're willing to pay up, or unless you obtained a static address many years ago and you've never cancelled the service since then. (Hopefully, IPv6 will solve the problem -- but it's not supported everywhere yet) I'll haven't used any of these before so I'll leave this to experienced people.
  21. There are multiple considerations: Public IP address: Your mobile carrier (or Internet service provider) assigns you a public IP address. STATIC public IP address: Be aware that this is an increasingly rare commodity. I don't know which country you live in, but I'd be very surprised if your consumer mobile carrier provides static public IP addresses anymore. You might find a commercial/enterprise provider that still sells static IP addresses, or you can use a Dynamic DNS (DDNS) service like https://www.noip.com/ -- DDNS allows you to connect to an address like neilpate.ddns.net which stays static even if your IP address is dynamic. Unique public IP address PER DEVICE: Unfortunately, if you have 1 SIM card, you will get 1 public IP address to be shared between your Windows PC and all of your cRIOs. This is the same as your home Internet: All the PCs, laptops, tablets, phones, and other smart devices that connect to your home Wi-Fi all share a single public IP address. This is Network Address Translation (NAT) in action. If you really want multiple unique public addresses, you'll need multiple SIM cards. Unique public IP address per SIM card???: Nowadays, you also need to double-check if your carrier even provides you with a unique public IP address at all! Carriers around the world have started implementing Carrier-Grade NAT (CG-NAT) for both mobile and home Internet users. This means your SIM card might share a public IP address with many other SIM cards. If this is the case, then DDNS won't work! Suppose you have 1 public IP address, and each of your devices host a web service at port 443. You can assign a unique port per device on your modem and do port forwarding as you mentioned: Dev PC --> neilpate.ddns.net:54430 (modem) --> (Windows PC) Dev PC --> neilpate.ddns.net:54431 (modem) --> (cRIO 1) Dev PC --> neilpate.ddns.net:54432 (modem) --> (cRIO 2) This means the client program on the Dev PC needs to know to use a non-standard port. You can do this easily in a web browser or a terminal emulator, but I'm not sure that LabVIEW can use a custom port to connect/deploy a cRIO. Alternative solutions You don't necessarily need a public IP address for remote access. Some modems can be configured to automatically connect to a Virtual Private Network (VPN). If you enable VPN access to your office and you ask your modem to connect to that VPN, your devices will be on the same (local) subnet as the Dev PC in your office -- we have done this for a cRIO that's deployed into the middle of a desert. If your modem doesn't support this, you could configure each device to individually connect to the VPN instead. Or, your provider might offer enterprise-level solutions that connect multiple sites to the same VPN. For example, they could offer SIM cards that provide a direct connection to your corporate VPN without the need to configure your modem or devices. Yes, these are commonly solved. The issue is that there are so many possible solutions, so you need to figure out which one works best for your use-case.
  22. My gut feeling says that a Mass Compile could make this problem go away.
  23. There's an Idea Exchange entry about this for LabVIEW CG, but it really should extend to NXG too: https://forums.ni.com/t5/NI-Package-Management-Idea/Install-the-same-package-to-multiple-versions-of-LabVIEW/idi-p/3965419
  24. If I'm not mistaken, this is a gray area because no court or judge has ever contemplated this question before. The general broad understanding is "No, it's not a strict requirement, but there are reasons to do so": https://softwareengineering.stackexchange.com/questions/125836/do-you-have-to-include-a-license-notice-with-every-source-file That's OK. It's a bit like the Ur-Quan Masters project -- The code is open-source, but not everyone can play it with the non-open-source 3DO assets unless they already own a copy: https://wiki.uqm.stack.nl/The_Ur-Quan_Masters_Technical_FAQ#How_do_I_use_the_3DO_intro_and_victory_movies_in_the_game.3F Anyway, by making your part open-source, you already make it much easier for others to achieve the object detection stuff! Here's an even shorter and blunter license: http://www.wtfpl.net/about/ (altough you might be less likely to receive a pint when someone becomes rich from your work) Note: "Public domain" has a specific meaning in copyright law, and it doesn't just mean "viewable by the public". If a work is said to be in the "public domain", that means either copyright has expired, or its authors have formally renounced their claim to copyright. As @jacobson said, a piece of code can be publicly viewable but the viewers might not have permission to incorporate the code into their own work. If you want to disclaim copyright (as opposed to using a license that says "I own this code, but you can do whatever you want with it"), see https://unlicense.org/ You can do it all in LabVIEW itself:
  25. That's what I meant by "write a bit more code" It's not a showstopper though, especially since we can put that in a VIM. Thanks for the video link.
  • Create New...

Important Information

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