Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/22/2018 in all areas

  1. New version is available. (LV2018 32-bit) http://www.ni.com/download/labview-development-system-2018/7406/en/
    1 point
  2. Here's another quick and dirty example just using local variables and two separate while loops. I don't like using sequences and local vars in practice myself, but this is just a way to show you a simple way to control parallel loops. It's quirky, but I hope it gives you an idea. There are much better ways to implement parallel loop control and communication, but I just wanted to provide a quick example for you. The "Stop" button is set up to use latch functionality, which isn't compatible with having it used as a local var, so I had to create a separate indicator for "Stop All" to "hold" the value to be used by the second loop. Please don't use this as the best example as it doesn't really show good LabVIEW programming practice, but will at least show you what's needed for parallel loops. Again, I hope I've helped you out! Untitled 2.vi
    1 point
  3. You're probably going to have to implement a producer/consumer design pattern if you want truly parallel processes. There are many examples of them in the LabVIEW examples. I wasn't sure whether going into producer/consumers was going to be overkill for what you wanted, but you may want to look into going that route based on your description. For simplicity's sake (and my lack of time), and to illustrate what I was talking about in my first paragraph using a timeout case, I've attached a VI (in LabVIEW 2016) that uses the timeout case. The default timeout is -1, which means that the event will wait forever or until an event occurs. In my attached, it waits for 100ms. You can have the timeout be as long or short as you want as long as it's greater than -1. To keep the value in your shift register, you'll have to wire your shift register value straight through your timeout case. If you don't, it will be overwritten by a default value (normally "0"). This method is a quick and dirty way of allowing the event structure to complete alongside your case structure and not be dependent on it while being in the same loop and not have the while loop hanging. I hope this helps! Untitled 1.vi
    1 point
  4. Everything in the loop must complete before it can run again. Therefore, if the case structure is in the same loop as an event structure, they have a relationship and aren't really independent.
    1 point
  5. I understand you are eager to learn programming in LabVIEW, but you should really start by learning the concepts first. The learning curve you try to take is way to high in my opinion. That being said, these are your current solutions as far as I can tell: 1) z = (x << 3) + (5 << y) 2) z = (x² ^ 2) | (y & 1) Again, you should manually calculate some results and see if your code returns the correct results.
    1 point
  6. These are part of the design of the database, I wouldn't imagine any api-level tool to have "support" for them except as a direct SQL call. I would absolutely do what you're doing and use a GUI to design the database, and then access it through the API. Mysql workbench is pretty powerful, but can be confusing. I've always used a tool called HeidiSQL for working with mysql/mariadb databases. Its nicer in my opinion for learning with. Some other thoughts: Mysql has a TCP server https://decibel.ni.com/content/docs/DOC-10453 which is faster for small interactions the mysql command line is a pain to use but could be better for bulk imports (eg from a giant mass of old CSV files). As shown in the link, Heidi can help you. Postgresdb is becoming more and more popular (among other things, mysql is now owned by oracle and spent a while sort of languishing -- for my personal load of several TB of indexed data, postgres performed significantly better out of box than a somewhat optimized mysql). If you decided to go this route there are two libraries to consider (in addition to the db connectivity toolkit). What you described, having a bunch of old measurement data in csv files and wanting to catalog them in a database-esque way for performance and ease of use is literally the sales pitch of Diadem. Like, almost verbatim. It may be 1 to N files depending on the configuration. Indices can sometimes be stored in separate files, and if you have a ton of data you would use partitioning to split the data up into different files based on parameters (eg where year(timestamp)=2018 you use partition 1, where year=2017 use partition 2, etc.). You don't reference the file directly. You usually use a connection string formatted like this: https://www.connectionstrings.com/mysql/ You cannot, you must have a server machine which runs the mysql service. To the best of my knowledge, the only database which you can put on a share drive and forget about is sqlite, but they recommend against it. I had never used the MDB format before but it looks like that is similarly accessible as a file. As with 2, you generally don't edit the files manually. You access the database through the server which exposes everything through SQL. They do, but I think its in the TB range. If you reach a single database file that is over a TB, you should learn about and use partitioning which breaks it down into smaller files. Not sure, but I believe the truly giant websites like google have their own database system they use. More generally, they divide the workload across a large number of machines. As an example: https://en.wikipedia.org/wiki/Shard_(database_architecture) You will need to install the database server somewhere. Assuming you've set up some server thats going to host your data, then you just need the client software. If you use the TCP-based connector mentioned above, that client software is just labview. However, that connector has no security implementation and gets bogged down with large data sets. If you want to use the database toolkit, you'll need the ODBC connector and perhaps to configure a data source as shown here, although you may be able to create a connection string at runtime.
    1 point
×
×
  • Create New...

Important Information

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