01-19-2022 04:01 AM
Hello All, Hope everyone is doing good in covid time. I have came across one interesting problem. We want to build a vi which will return us available size of C drive D drive and E drive on any computer.(Naming of drives are given as example).
We have tried searching for labview help but there are no such VIs which can give us disk size available on Windows machine.
Any hard coder here please guide us!
Thanks
Solved! Go to Solution.
01-19-2022 04:27 AM - edited 01-19-2022 04:27 AM
Open ni example finder and search for memory.
You will get a example named resource monitor.vi
It will help you.
01-19-2022 05:10 AM - edited 01-19-2022 05:10 AM
@kartiknattar ha scritto:
Open ni example finder and search for memory.
You will get a example named resource monitor.vi
It will help you.
This vi requires an additional NI driver (System Configuration).
There's for sure the possibility to use .NET or other system calls to get this number.
A simpler method is to run the console command dir C:\ (or whatever unit) and parse the output string.
In the example below I show the final part of the output string where the penultimate line contains the required size.
01-19-2022 05:14 AM
01-19-2022 05:23 AM
wiebe@CARYA ha scritto:
Ah, it's so simple... I never used this function.
I gave confidence to the OP claim (that there is no solution available) but I should have not.
Actually, if you lack experience also means you don't know where and how search something.
01-19-2022 08:07 AM
Man instead of making fun of me try helping. We do not have full development version of labview accessible to us. We get hardly 1 hr to use labview in our institute. Thanks for your reply anyways. This vi returns size of only 1 disk.
01-19-2022 08:15 AM - edited 01-19-2022 08:17 AM
@LamarDavisss ha scritto:
Man instead of making fun of me try helping. We do not have full development version of labview accessible to us. We get hardly 1 hr to use labview in our institute. Thanks for your reply anyways. This vi returns size of only 1 disk.
Believe me, I tried to help, but I should have given a check to the Advanced File Functions palette before. My bad.
I can add that everyone here did not know where to search for a few weeks/months after starting to program with LabVIEW.
01-19-2022 09:21 AM
@LamarDavisss wrote:
Man instead of making fun of me try helping. We do not have full development version of labview accessible to us. We get hardly 1 hr to use labview in our institute. Thanks for your reply anyways. This vi returns size of only 1 disk.
AFAIC, the joke was mostly on himself, not you...
Put the function in a loop and loop over each letter:
01-20-2022 04:29 AM
Thats look great. Thank you so much for your contribution.
01-20-2022 04:38 AM
Hey mate! Do you have this VI with you. If yes can you please post it here?