08-19-2014 06:00 PM
Hi, I have an issue with my first LabView program can anyone help me please?
The function of my program is to manualy or automaticaly save the data obtained with the multimeter
My program worked fine until I wanted to add a file creation function each time the program runs, but the program creates a file every 5 seconds, I have tried using a loop and case but I cant make it work, it still creates a file every 5 seconds.
Any tips?
Aditionaly I have tried to program a keyboard input for the buttons in the vi using a few examples I found around the forum but my program just lags and I cant even start measuring.
I atach my vi for inspection , thanks in advance
08-19-2014 06:24 PM - edited 08-19-2014 06:29 PM
From the absence of any sort of while or for loop in here, I am assuming that you are using the run continuously button to run this program. This is generally a bad idea, and can be strenuous to run.
Might I suggest looking at some example programs and seeing how you can compare them to your program.
[Edit]
I've had a quick tidy up of your code, putting it inside a while loop and moving the file generation and MM setup outside of the loop. Have a look at this and see if it runs better.
08-21-2014 12:51 PM
Hi Joamal:
The suggestions made by ogk.nz are correct you need to organize the Flow of your program. The Example sent is a good place to start and I would recommend reviewing the Getting Started Guide For LabVIEW to perfect your design and architectures. You can find it at http://www.learnni.com/
Check the Get Started Here option and on your Far left there will be a display menu where you can Review the Getting Started Modules.
Any other questions make sure to post them on our discussion forums
08-21-2014 04:40 PM
Thanks it actually works pretty well, I didnt knew that I shouldnt use the run continuosly button xD.
Now I only have one problem left, and its that the multimeter doesnt change its configuration( V, A, Resis etc) , only when I start the program, I tried moving the config block inside the loop but the multimeter starts to blink, it works but I dont know if it could damage the instrument(reconfiguring every second), so maybe you can help me to find a way to make it work fine?, I tried using an event structure with the option wheel value change as trigger but didnt work well tough, it kept reseting the configuration back to 0(dc voltage) .
Any ideas?
08-21-2014 05:37 PM
It probably shouldn't damage anythin constantly updating the loop, although it does introduce overhead and is generally not tidy, to avoid the constant updating I would recommend looking into shift-registers or feedback nodes. On that note, I'll leave you with this snippet, I'm sure you can see how it might apply.
[Side-note; In case you don't know how to use a snippet, download and save the image, then drag the file from your explorer into a block diagram.]
08-21-2014 05:58 PM