-
Posts
715 -
Joined
-
Last visited
-
Days Won
81
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by LogMAN
-
Find orphan VIs in project hierarchy (on disk)
LogMAN replied to LogMAN's topic in Source Code Control
No. I just checked with a dummy project. Any code within unreachable cases is ignored. It doesn't matter if it's directly in the main VI, an inline VI, or a normal sub-VI. You can use Booleans, Numerics or whatever you like. Put code in an unreachable case and it is not listed by Get VI Dependencies. Maybe I should file a CAR and see what NI thinks. In my opinion the dependencies should either be listed, or the VI should break. -
Find orphan VIs in project hierarchy (on disk)
LogMAN replied to LogMAN's topic in Source Code Control
Okay, finally found a minute to do this. Here is the same VI but this time with a legit invoke node that doesn't require internet magic: I find the execution speed slower by a huge magnitude (minutes vs. seconds). That's obviously because everything is being loaded into memory. It can be made faster by unchecking some of the options though. Anyways, this VI returns even more Orphans than the original one which it really shouldn't (it recognizes VIs in conditional disables which the old one didn't). That was very confusing until I found the reason for it: "Get VI Dependencies" will ignore code that is inside a case structure with a constant wired to it (at least if that's the case in the top-level VI). Don't know if this is intended, but that's how it works. -
Find orphan VIs in project hierarchy (on disk)
LogMAN replied to LogMAN's topic in Source Code Control
By the sounds of it your solution is more solid and works with more complex projects, which is very nice. I'll play around with that node for a bit, might prove useful for future cleanups... Actually the "Linker.Read Info From File" reminded me of how the VIPM generates packages. VIPM has the same issues regarding conditional disables, so I think it uses the same mechanism. -
Hello everyone, I want to share a VI that I recently created to search for orphan files in a (very! ) messy project. As it turned out it's actually very easy to do that (if you find super-secret stuff on the net): This VI will find files (VIs, Controls, Classes, etc...) in your project folder that are not linked by a given top-level VI. This is done by comparing the call-chain of the top-level VI with the files on disk. It assumes your files are in folders relative to the specified root directory. This also means that files outside the hierarchy will be ignored (vi.lib and such). Be aware of (at least) two things: This VI will return false friends if you happen to have any "Open VI Reference" call with constant VI names or paths connected to it (not a problem if you use static VI references). VIs in diagram disable structures are not listed in the call-chain. So if you use conditional (or regular) disable structures this VI will return false friends. Does anyone know a solution to number 2. actually? Hope this proves useful to you too.
-
Way better Still you perform many write operations by executing the SQL in a loop without a transaction. The more values you have, the slower your loop becomes. Your current implementation might result in incomplete data in case of SQL errors (you can't undo your actions)! Try to add a transaction around your loop (It's very easy to do, costs nothing and is at least worth a try): Transactions will prevent file-writes for as long as they are not committed (this is why it might save you some more time). By calling the Commit VI at the end, all data will be written in one go. In case of errors you can just reverse everything by doing a rollback (The Commit VI will do a rollback on error automatically).
-
Use a prepared statement and a transaction. Your current implementation requires writing for each iteration which is slow obviously. Check out the "Insert many rows code template" on the SQLite Library >> Code Templates palette. The prepared statement will allow you to use binding which is very useful as it maintains data types in your application. See following Picture for an example (I can't test it right now, but it should work like that):
-
Switch some forums to question & answer format.
LogMAN replied to Michael Aivaliotis's topic in Site News
LAVA used to float the marked answers on top of everything. It's just that hardly anyone marked a post as answer. Maybe it was not obvious enough how to do it, or the nature of the topic did not allow for a single post to be THE answer. -
The VI does exactly what jj321 said it does, access the control of a clone VI. I think the reason why nobody is answering is because there is no question, just someone sharing news with everyone Here is the snippet of the VI: I don't know why anybody would want to access the controls of a clone VI like that since you would normally pass data while calling it. On the other hand if you need access to information from the VI there are other ways like notifier or queues. I have used a similar approach to call LabVIEW applications via ActiveX and sending information between the caller and the executable, but never from within LabVIEW... @jj321 would you care to explain the use-case of your VI?
- 6 replies
-
- 1
-
-
- front panel
- clone
-
(and 2 more)
Tagged with:
-
What package are you talking about?
-
Switch some forums to question & answer format.
LogMAN replied to Michael Aivaliotis's topic in Site News
Now that's a very good point. I didn't notice until now and I like it very much! Because we missed said feature? -
Switch some forums to question & answer format.
LogMAN replied to Michael Aivaliotis's topic in Site News
Me too, but people don't like when I down-vote them, so I do it ~stealthy~ Damn you logic! You are in my way! You are right of course, I can't argue against that. Now where is my (:brokenheart: Dislike this) button? -
Switch some forums to question & answer format.
LogMAN replied to Michael Aivaliotis's topic in Site News
Figured. Funny thing is I actually wrote a couple of sentences about that, but deleted them in the end This is what I dislike about the voting system (it's an extreme case, but a case nonetheless): http://meta.stackexchange.com/questions/228358/why-my-questions-on-stackoverflow-are-getting-downvotes-without-explanation The system can only work if used the intended way. By the way, is it possible to disable the "voting-down" button and leave the "voting-up" button active? -
Switch some forums to question & answer format.
LogMAN replied to Michael Aivaliotis's topic in Site News
Isn't that more or less what our good old (♥ Like this) button is for? It serves its purpose just fine - even though we cannot filter for that right now (*hint*)... In my opinion the best answer is the one that answered the question of the one who asked and not the one everyone else votes as the best answer. There might even be an answer that is very well written, explains an important aspect or is especially funny and ends up as the top answer without even answering the initial question. The possibility to vote someones answer down on the other hand is misunderstood very quickly and will alienate people who fear "bad scores". It also hinders dialog as people just need a single mouse-click in order to judge someones answer. So how about posting the initial question in the General forum and let the voting score decide? Where is the voting system when you need it? -
-
Amen. Thanks Neil I was attempting to write the exact thing right now (though I had trouble finding the right words) One thing I want to mention related to the graphs from above: Maybe there are less topics started overall, however the existing ones are extemly helpful as is and being continued on a regular basis (even ones that are over 10 years old). This forum provides a tremendous amount of knowledge, ideas and funny things which lure me to come back every day (sometimes even on holidays ). Also: Don't trust statistics you didn't forge yourself
-
-
Have you checked your settings here?: https://lavag.org/notifications/options/ email notifications were disabled for me, maybe it's the same for you too.
-
Not sure if this helps, but hooovahh secretly explained the XNode editor on YouTube (I recommend watching the entire video btw ): It is closely followed by a quick introduction to the Variant Repository https://www.youtube.com/watch?v=R2En7yMANi8&feature=youtu.be&t=34m44s Wow, new Lava embeds videos now
-
The Articles area looks very broken to me (see attached picture): https://lavag.org/index.html/ Any other page is fine though.
-
issue on OpenG sub vi and LabVIEW runtime library.
LogMAN replied to labmaster's topic in OpenG General Discussions
I think you have no choice but to try and re-produce all steps your user has taken to get to that kind of issue (you could connect via remote desktop and let the user show you). With the little information we have there are at least two things I would check: 1) Check if the correct RunTime-Engine has been installed. 2) Check if all necessary files of your application are present. (The dialog clearly states two are missing) There are two types of RunTime-Engines available for LV2012, minimum and standard. Standard is the one your user needs. I'm not sure what happens if you install the minimum one, but it's worth mentioning. If your application consists of separate folders with VIs next to your executable, some of them might be missing. The same goes with external plug-ins and such. -
Destruct object from an Array after Cleanup
LogMAN replied to kull3rk3ks's topic in Object-Oriented Programming
The way your VI is implemented is the correct way to dispose of objects (or any given non-reference type in LabVIEW). The wire has "loose" ends (after the last VI), so that particular copy of the object is removed from memory automatically. Only reference-types must be closed explicitly (like the DVR). So your final VI just has to take care of references within that object to prevent reference leaks. -
Okay, this is getting a bit off-topic as the discussion is about a specific problem which is not necessarily sqlite related. So I guess this should be moved to a separate thread. drjdpowell alredy mentioned, that sqlite is not the best solution if your data is not structured. TDMS on the other hand is for use with graph data, but creates index files in the process and stores data in a format readable to other applications (like Excel). That is what slows down your writing/reading speed. As far as I understand you want to store an exact copy of what you have in memory to disk in order to retrieve it at a later time. The most efficient way to do that are binary files. Binary files have no overhead. They don't index your data as TDMS files do, and they don't allow you to filter for specific items like an (sqlite) database. In fact the write/read speed is only limited by your hard drive, a limit that cannot be overcome. It works with any datatype and is similar to a BLOB. The only thing to keep in mind is, that binary files are useless if you don't know the exact datatype (same as BLOBs). But I guess for your project that is not an issue (you can always build a converter program if necessary). So I created a little test VI to show the performance of binary files: This VI creates a file of 400MB on the users desktop. It takes about 2 seconds to write all data to disk and 250ms to read it back into memory. Now if I reduce the file size to 4MB it takes 12ms to write and 2ms to read. Notice that the VI takes more time if the file already exists on disk (as it has to be deleted first). Also notice: I'm working with an SSD, so good old HDDs will obviously take more time.
-
@drjdpowell: I installed the latest version of your library (1.6.2). There is a new VI called "SQLite Database Path" which is missing the output terminal for "Last INSERT RowID":
-
installation error LabVIEW 2014 64-bit on windows 10
LogMAN replied to kuroko's topic in LabVIEW General
I guess you mean that the other way around Thank you for the great links, I didn't know there was such a detailed list of supported versions specifically for Windows 10. This will save much time and effort for anyone planning to take that step. Also one would think they would keep the shop up-to-date in order to sell the product... -
installation error LabVIEW 2014 64-bit on windows 10
LogMAN replied to kuroko's topic in LabVIEW General
Welcome to LabVIEW and welcome to the forums, hope you enjoy your stay LabVIEW does not yet officially support Windows 10, see LabVIEW Operating System Support. That being said I've successfully installed LV2011 and LV2015 (x64) on Windows 10 and had no problems with the installer (don't know about LV2014 though). As far as I can tell from your screenshots, LabVIEW is already installed on your system (does not require any more disk space). Are you sure that's not the case? Did you install LabVIEW before upgrading to Windows 10? => Check if there is a folder "C:\Program Files\National Instruments" Let me already give you answers to two possible scenarios: If you can find the "National Instruments" folder under "Program Files" you have most likely upgraded from a previous Windows version without resetting your computer. That might work for many applications, however in my experience this causes more trouble than resetting your computer and installing everything from scratch. Check the Recovery options in Windows 10 to learn how to do that (use the 'Remove everything') option and make sure to create backups of your important files first. This will of course require you to install and configure all of your applications again (including all settings you've don in Windows)! Don't do that if you don't know how! It might be that LV2014 specifically has issues on Windows 10. Your license key will work with different versions of LabVIEW however (should work with every version from 8.0 upwards). Try downloading the latest version from their site (search over the web, or go to their FTP servers). Try installing LabVIEW 2015 (x64). Here is the direct link: ftp://ftp.ni.com/evaluation/labview/ekit/other/downloader/2015LV-64WinEng.exe Hope this works for you.