06-02-2016 11:19 AM
Hi guys,
I am using a DAQ configured into 2 signals every 5hz into a while loop.
The fact is that i dont need that huge amount of data, i only need to see graphically.
On the other side i have a measurement to file block where i want to save the input data lets say every 15 minutes.
How is the best way to implement this?
Regards
Solved! Go to Solution.
06-02-2016 12:04 PM
06-02-2016 12:14 PM
"Get rid of Express VI's", "Use an Express VI". I'm confused! Which is it?
Seriously, Elapsed Time is one of the better Express VI's. Trying to avoid Express VI's for things like DAQ assistant is helpful because it hides a lot of things, and limits your flexibility. The combination of Express VI's and the blue dynamic datatype wire (DDT) is where problems really start to occur. Things will magically wire together and seem to work, until you realize all of the configuration settings and actual datatypes are hidden and things aren't quite working the way you wanted them to.
06-02-2016 12:25 PM
06-02-2016 12:29 PM
Hmm Maybe too obvious only 2 weeks with LV.
Not working atm. Any help? 🙂
Appreciate your time
06-02-2016 12:38 PM
Hi Ivanhe,
even after just 2 weeks you should always say the mantra "THINK DATAFLOW"! It's the very basic LabVIEW programming principle…
When you want to do something in a loop you should put the code into the loop!
Right now your ElapsedTime will execute only AFTER the first loop has been finished!
06-02-2016 12:43 PM
Maybe i am wrong but...
If i use the elapsed time, during that time my DAQ input won't work, am i wrong?
I want to get the signals every time but just recording every X minutes.
Is it possible with the elapsed time?
I would prefere to do coding atm 😄 😄 😄
06-02-2016 12:49 PM - edited 06-02-2016 12:54 PM
Think i got
EDIT: Nope, brings me open file error
06-02-2016 12:55 PM
That will work.
The only thing that concerns me is that event structure hanging out in space above the loop, and no obvious sign there are any other loops. That event structure will happen in parallel with the while loop you show. If you have a master while loop around everything, then it won't run again until your lower stop button is pressed. If there is no master while loop, then that event structure can only occur once.
And I'm going to bet whatever events you have in that event structure are set to the default setting of locking the front panel until the even case executes, which means your VI will lock up cold the second time you trigger an event, (unless you happen to hit the stop button first). And if two events happen and the FP locks up, you'll never be able to hit the stop button to stop the lower loop. You'll be forced to abort the VI.
06-02-2016 12:58 PM - edited 06-02-2016 01:00 PM
Hi Ivanhe,
If i use the elapsed time, during that time my DAQ input won't work, am i wrong?
Did you try?
You're wrong…
I want to get the signals every time but just recording every X minutes. Is it possible with the elapsed time?
Yes, that's why I suggested it!
Nope, brings me open file error
Ok. What did you do in your VI?
The problem with attaching images is: we cannot debug your VI.
The problem with ExpressVIs is: they hide a lot of information. One information is the name of the input you used to connect the boolean wire to…
And you forgot the case structure - I repeat:
Use the ElapsedTime ExpressVI and a case structure…
(I wonder why people asking for help don't read the answers carefully…)
To put the suggestion into pseudocode:
IF ElapsedTime(X minutes) THEN save data to measurement file ENDIF