Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/2015 in all areas

  1. 1) SQLite isn’t a compression format, and as a flat table won’t necessarily be any smaller on disk than a spreadsheet file. Larger actually, due to the various lookup indexes. However, you have the opportunity to use structured data, avoiding a lot of duplication, which can end up with smaller file sizes (or, at least, the freedom to add much more info at not much larger size). For example, you have “site†and “sending app†strings that repeat often. If you instead saved keys into separate “Site†and “Application†tables, you could store lots of info in them that can be “joined†in with a “VIEWâ€. Similarly you could have an “Errors†table that allowed extended error descriptions instead of just a simple error code (or error severity, etc.). The joining VIEW would look something like: CREATE VIEW Event_VIEW AS SELECT * FROM Application_Events JOIN Errors USING (ErrCode) JOIN Site USING (SiteID) JOIN Application USING (AppID) Your UI would then query this View, and filter on any info in all these table. Find all events whose error description contains the word “testâ€, for example. 2) Look up “LIMIT†and “OFFSETâ€, and study how they are used in the “Cyth SQLite Log Viewerâ€. In that viewer, updating the filtering of a selected UI table takes ms, not seconds. This is because only the visible rows of the UI table are actually selected. When the User moves the scrollbar, the SELECT is repeated multiple times per second, meaning that it looks to the User like a table with thousands of rows. And one is free to use a lot of slow property nodes to do things like text colour, since one is never doing more than a few dozen rows. 3) I wouldn’t bother with VACUUM in a logging application, as the space from any deletion will just get used for later inserts. Use VACUUM if you delete a large amount without intending to reuse the space. 4) You cannot unlock the file if you’ve dropped the pointer to the connection without closing it, I’m afraid. You have to restart LabVIEW to unload the SQLite dll. Your code should always call the Finalize and Close methods, even on error. Hi Rob, You need to wrap multiple INSERTs into a single transaction with “BEGIN†and “COMMITâ€. Each transaction requires verified writing to the disk twice, and a hard disk only spins on the the order of once every 10 ms. You need to buffer your data and do a bulk insert about once a second (place a FOR LOOP between the “Prepare†and “Finalize†subVIs in you code image, and feed in an array of your data clusters). This touches on jollybandit’s question (5): durability against power failure by confirmed writing to disk is time consuming, so you need some kind of tradeoff between immediate saving and delayed buffering. About one save per second is what I do.
    1 point
  2. The first post I made created the XNode and abilities using scripting. It would create the XNode, which is a library, then invoke the Add Ability where you specify the ability to add. Both the Create XNode, and the Add Ability don't work if you don't have a XNode license. Additionally List Members which usually tells you what items are in a library also doesn't work without a license. So I'm not sure what other scripting functions you could try from the project window. Just like with adding a VI to a project, you can't invoke a Create VI on a project using scripting. You first create the VI, then use the Add Item. And at this point we can't create the item, but we could probably add it if one was made. The only other hope I had was to see if the Project Provider Framework was used to implement the XNode creation in the project window. It wasn't, that would have been too easy. Just so I'm not completely defeated I figured I could at least post a XNode which has all the abilities on it for a version of LabVIEW. So if you want a 2013 XNode attached is one that has every ability. If you don't like the name, you can open the XNode in LabVIEW, and perform a rename which will resave all the members. That part does work without a license. To remove an Ability delete the VI, then open the XNode in a text editor, and remove the Item section for that ability. There are plenty of deprecated abilities that I probably should have included. Like how Build Menu has 4 older versions when you should probably just use the newest. XNode All Abilities 2013.zip
    1 point
  3. DISTek Integration is again providing a door prize for the BBQ. This year we giving away an ultra cool "LabVIEW Physical Computing Kit" that includes a Digilent chipKIT WF32 development board and the LabVIEW Home Bundle. The board features built-in WiFi and an SD card slot as well the following: Microchip® PIC32MX695F512L microcontroller (80 Mhz 32-bit MIPS, 512K Flash, 128K SRAM) Microchip MRF24WG0MA WiFi module Micro SD card connector USB 2.0 OTG controller with A and micro-AB connectors 43 available I/O pins Four user LEDs PC connection uses a USB A > mini B cable (not included) 12 analog inputs 3.3V operating voltage 80Mhz operating frequency 7V to 15V input voltage (recommended) 30V input voltage (maximum) 0V to 3.3V analog input voltage range High efficiency, switching 3.3V power supply providing low power operation LabVIEW Home Bundle is targeted at "Makers" (https://www.labviewmakerhub.com). This software is licensed for personal, non-commercial, non-industrial, non-academic purposes. Applications may be distributed only for non-commercial, non-industrial, non-academic purposes.
    1 point
×
×
  • Create New...

Important Information

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