09-30-2016 07:23 AM - edited 09-30-2016 07:24 AM
Hello everyone.
Iam quite new to Labview and I built an application to read data from to Temperature/Humidity sensors. The Write to measurement file Express VI is configured so that a new file is used afte 1000 samples.
Now I want to copy the file before the new one into a differerent folder directly after is has been closed. I tried to set a copy function outside of the while loop and change the tunnel mode to indexing but that doesn´t seem to work.
I only get an error (see attached VI).
I would be very happy for any kind of help,
thanks in advance,
best regards,
Michael
09-30-2016 07:36 AM
You need to take the basic LabVIEW Tutorials, and pay attention to how Loops and Tunnels work together. Do you see the Path wire coming out of your While loop? Do you see the tunnel? Compare that output tunnel with the one for the Error Wire just below it. Do you know the significance of the two tunnels?
Do you know how to use LabVIEW Help? Turn Help on (type Ctrl-H) and inspect the dotted (broken) wire coming out of the tunnel. You can also hover over the wire and it should tell you why it is broken (which is a Big Fat Hint).
Bob Schor
09-30-2016 07:52 AM
Thanks for your reply Bob.
Well,I guess it´s not working because of the different data types, but I don´t know which function I have to use to convert it to the proper one.
Cheers,
Michael
09-30-2016 08:20 AM
Nope. If you'd followed my advice and looked at the broken wire, you would have seen this message:
Now follow the rest of my advice, learn about loops, and learn about the different types of tunnels. You can find links to LabVIEW Tutorials on the Web, and also on the first pages of this Forum. This will be covered in one of the first lessons. Or ask a classmate or your instructor.
Bob Schor
09-30-2016 04:02 PM
Hi.
Sorry to ask again. Maybe this seems obvious for someone who has worked with Labview some days.
I find it hard to understand the Auto indexing function..
As I can see, the tunnel has a breaket inside, which means it is an array!?
What I want:
The DAQ is acquiring data continously.
After some hours, a new file is used.
Thats the point where I want to extract the filename of the previous file and copy that info a different folder.
I tried to extract index 1 from the array, but that does not. work.
Please be patient 🙂
Michael
09-30-2016 04:39 PM - edited 09-30-2016 04:41 PM
As others have said, you need to do a few simple tutorials before continuing.
You (and nobody else!) made that tunnel autoindexing, because while loops don't autoindex by default. (Maybe you started with a FOR loop and converted to a while loop?).
If the copying should occur at regular intevals, it belong inside the loop, but in a case structure that turns true every 2000 iterations.
Your use of the event structure is completely misguided. It can only execute once per run.
Try to get away from express VIs and dynamic data, they just obfuscate things.
What you need is a state machine. LabVIEW ships with some nice templates.