LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple analog inputs performing different tasks

Hi everyone,

 

I'm relatively new to Labview (used 5 for some basic measurement whilst at uni!) and I've been tasked with some large scale data collection and report logging for work (thrown in at the deep end!).

 

I want to read 2 analog inputs (which are voltages) and get one data point every minute (what is the best way to do this? - a timed loop or can the DAQ assistant do this?) and export the data at the end of the program as a graph to a word report.

 

These inputs measure two voltages from a battery pack which is being charged/discharged. I have already played around with the word report generation package (thank god for the generous evaluation period! lol) and have been able to generate the report structure I want to use.

 

 

 

I also want to continuously read another analog input (again a voltage) and a digital input. The analog input will tell the report which test the battery is currently under and the digital input shows a global pass/fail state for the battery. At the moment I am using a case structure to write to the word report which test (if any) that the battery failed on.

 

The tests performed and the pass/fail conditions are all controlled separately from programming within the external test box, and are simply sent to the DAQ as voltages.

 

 

Now comes the fun part, I need to be able to duplicate this process 50 times (for 50 separate batteries being tested), can Labview handle that number of duplicate processes?

 

 

I also have a few questions regarding the DAQ assistant, as I said I want to be able to do different things with the analog inputs (ie 2 separate graphs and a numeric indicator) do I need to have three separate DAQ assistants running? Or can the signals be split up?

 

 

 

If anyone has any specific ideas/solutions about how to achieve all of this or could point me to some reading material or examples it would be most appreciated.

 

Thanks,

 

Christian Clear

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


0 Kudos
Message 1 of 6
(3,253 Views)

Hi Christian,

 

If you're reading multiple signals in the DAQ assistant you can split the signals using the Split Signals function located in the Functions Pallette under Express >> Signal Manipulation >> Split Signals. When you place the function on the block diagram you will be able to drag the bottom or top edge to increase the number of signals you want.

 

Are you doing the same test to the every battery at the same time? What hardwware are you using? LabVIEW should be able to handle it but it will also depend on your coding, the length of the tests against how quickly you want to move on to the next stage/test.

 

If you want to eliminate the overhead that comes with using a DAQ Assistant then right click on it and select Generate DAQmx Code. Best to do this in a blank VI first so you can see what is happening.

 

Regards

 

 

Rico P
Smiley Very Happy
0 Kudos
Message 2 of 6
(3,226 Views)

Cheers for the reply Rico.

 

The battery tests will all happen at roughly the same time, but the test equipment is really just 50 seperate test channels (one for each battery) and capable of operating independantly. However i really only want to record one data point every minute for approx. 21 hours (the every minute can change if there's not going to be enough memory etc.) for two of the AI per battery

 

Also, from a bit of research, I think i'm going to need a loop in order that all the final data i need (especialy the test number which is simply the voltage of one of the AI - ie 200mV = test 2, 300mV = test 3 etc.) is exported to the word report at the end of all of the tests. Will the split signals be able to transfer data through the loop? - i guess each data point will simply be a double precision or will i need to use the "index array.vi" in order to transfer the doubles?

 

 

i hope to use a USB DAQ (possibly the 6225 M series), the two tests i want to record data for are 16hrs and 5 hrs long.

 

 

Thanks again,

 

Christian

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


0 Kudos
Message 3 of 6
(3,218 Views)

Hi Christian

 

The 6225 has 80 Analogue inputs if you're using single-ended mode or 40 in differential mode.

 

Are you saying you only want to export the data at the end of the 21 hours? That would mean buffering the data for the whole time. I wouldn't do that because it means using more a more RAM, you might run out of memory or if there is a power cut you'll lose all the data.

If you're only logging once every minute why don't you export the data to Word after every test?

 

How do you mean "Will the split signals be able to transfer data through the loop?"?

 

You don't need to use an Index Array to transfer doubles.

 

There's quite a bit of your post that isn't very clear. Maybe you should send me what you've done so far?

 

Kind regards,

Rico P
Smiley Very Happy
0 Kudos
Message 4 of 6
(3,196 Views)

Hi Rico,

 

Sorry for not being clearer before.

 

What I want is to record the voltages read by the DAQ every minute. And at the end of the 21 hr test cycle export the data to a seperate word file for each battery pack being tested.

 

My code below, i think, reads the voltage once 0.5 seconds 10 times (therefore for 5 seconds in total)

 

and then at the completion of the loop exports all of those values as a graph to word.

 

The case structure simply writes passes and fails to the word report.

 

 

However If i were to remove the for loop and set the number of samples collected to say 10 and the sample rate to 1Hz then will the DAQ assistant take one sample every second for 10 seconds? Because i have done this and i get radically diferent graphs produced compared to my program below. Which way is correct?! lol

 

 

 

Also if i were to put in sepererate triggers for each of the channels i want to measure would the report still only be produced when the last measurement had been taken.

(e.g channel one to take measurements every minute beginning when the voltage was greater than 2V and then stop when the voltage went below 2V)

 

 

Thanks again,

 

Best Regards,

 

Christian

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


0 Kudos
Message 5 of 6
(3,188 Views)

Hi Christian,

 

If you remove the for loop and want the DAQ Assistant to take 10 samples at 1Hz you will need to change the settings in the DAQ Assistant (double click on it to bring up the settings). Set the Acquisition mode to N Samples, the Samples to Read to 10 and the Rate (Hz) to 1. This way the You will only move on in the code once the DAQ Assistant has collected 10 samples.

 

When you say triggers do you mean the trigger in the DAQ Assistant? If so, you can't set up separate triggers for each channel. Why don't you pragmatically look at the values of each channel and choose whether to ignore them or log them.

 

Regards,

Rico P
Smiley Very Happy
0 Kudos
Message 6 of 6
(3,133 Views)