LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

There must be a better way of doing this

Solved!
Go to solution

There must be a better way of doing this!

 

25 seperate reports - 1 voltage recorded per chanel every minute for 21 hrs (in the end - timings will need to be changed)

 

Anybody got any ideas/pointers

 

CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 1 of 46
(4,715 Views)

Ever hear of a loop? Are you actually wanting to create 25 separate reports, or 1 report?

 

How do you run the VI? Please don't tell me you're using the Run Continuously button. If you are, STOP. Create a while loop to enclose your code and wire the loop condition to a Stop button.

0 Kudos
Message 2 of 46
(4,694 Views)

Nicely commented 🙂

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 3 of 46
(4,679 Views)

That VI should win the Rube Goldberg of the Decade award.  Smiley Surprised

- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 46
(4,672 Views)

Something like this should get you close.

 

17793i0FFAB217462B9592

Tim
GHSP
Message 5 of 46
(4,670 Views)

Arrr, she's a beaut isn't she? lol

 

I know that VI isn't the way forward, but it was fun to see the mass of lines on my screen! Smiley Happy

 

I'm trying to create 25 separate reports each containing 2 graphs and the other data (pass/fail,date etc.). The DAQassistant is squiring from 75 analog channels (ie three AI per report - 2 for the graphs and one for the case structure) and i want to record a voltage from each channel every minute for 21 hrs, and then create the 25 reports at the end of the 21hrs.

 

Aeastet: Firstly thanks a lot for this help. I think i can see what's going on in your VI (tell me if I'm wrong!) - The DAQ Assistant reads the voltages based on the timings specified, which means if I set the number of finite samples to say 20 and the frequency of samples to 1, then the DAQ will take 20 seconds to record 20 data points (one a second) per channel. Then the DAQ pumps this data into the loop which creates reports (N number of reports).

 

Couple of questions:

 - will the loop be able to separate the different channels ie first report contains data from AI1, AI2 and AI3, then the second contains data from AI4, AI5 and AI6 etc.? Is this the purpose of the array VIs?

-and what is the array function that the Array subset is wired to (can't find the icon in my array pallet)?

 

smercurio_fc: The DAQ assistant is set to finite number of samples, therefore is stops when it records that number, right? Then the reports are written which completes and ends the program - surely the while loop is therefore redundant?

 

Jim: Thankyou, comments are my life and these were a labour of loveSmiley Wink

 

tbob: Just tell me when and where the Limo will pick me up and take me to the award ceremony!

 

 

Cheers guys,

 

CC

 

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 6 of 46
(4,622 Views)

Perhaps you need to browse through some of the free Labview course material;) Your code was funny. I have gone through a Doom level quicker than the the time it took to get an overview of your code. But do not worry we have all been new to Labview some time. Labview as every computer language need some learning



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 46
(4,601 Views)
Solution
Accepted by topic author ChrissyC

The DAQ Assistant reads the voltages based on the timings specified, which means if I set the number of finite samples to say 20 and the frequency of samples to 1, then the DAQ will take 20 seconds to record 20 data points (one a second) per channel. Then the DAQ pumps this data into the loop which creates reports (N number of reports).

 

TO Answer this question: The DAQ Assistant will do exactly what you are suggesting here. 

 

Couple of questions:

 - will the loop be able to separate the different channels ie first report contains data from AI1, AI2 and AI3, then the second contains data from AI4, AI5 and AI6 etc.? Is this the purpose of the array VIs?

 

TO Answer this question: If you look inside the fore loop you see that I have the array sub set function. I have attached the index to the increment and then multiply X 3. So the first time through the loop I take 0 and mulitply by 3 and get zero. second time through I multiply 1 X 3 and get 3. The second thing I do on the array sub set is to give it a length of 3. This will make it return only three arrays. So this will give me the next three arrays every time through. So the first time through I get AI0, AI1 and AI2, second time through AI3, AI4 and AI5 or however you have the channels configured.

 

17931i0C876371147AB18E

 

-and what is the array function that the Array subset is wired to (can't find the icon in my array pallet)?

 

TO Answer this question: Index array. It automatically changes to handel a 2D array.

Tim
GHSP
Message 8 of 46
(4,570 Views)

If I had a test running for 21 hours I’d like some reassurance that everything was running OK, you might get a sensor fail. I would put the DAQ Assistant in a loop, set it to just 1 scan. Your DAQ loop can handle the timing, then count the number of loop iterations and exit to the 'limit checking and report For loop' when you’ve completed 21x60 readings. You could add a chart in the DAQ loop to a display key measurement data and add an option to abort the test if things go wrong.

 

Ian

0 Kudos
Message 9 of 46
(4,550 Views)

Aeastet - Thank you so, so much. It's all so clear now! ........................... although it's not as fancy looking as my first attempt Smiley Wink

 

Ian - The test running for 21 hrs will be set to run at the end of the working day, about 16:00, and the next time anyone will look at it will be at 07:30 in the morning. So there's not going to be anyone around to do anything if it goes wrong! The data i'm collecting is simply output voltages from a much larger piece of equipment.

 

Thanks for all your help guys and i'm glad i could give a few people a chuckle with my fantastic first attempt!

 

CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 10 of 46
(4,539 Views)