LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop data acquisition of one channel while continuing to monitor another?

Solved!
Go to solution

I'm wondering if it is possible to stop and collect data (Ex: Send to excel) coming from one channel on my DAQ (Ex: channel ai0), but continue to collect data from any other channels (Ex: ai2).

0 Kudos
Message 1 of 11
(3,295 Views)

You can continue acquiring both, but select only the desired channel(s) for logging to file. Are you really writing to excel?

0 Kudos
Message 2 of 11
(3,288 Views)

The answer, of course, is "It depends".  Without seeing your code, we can't answer the question.  What it depends on is whether the data (ai0 and ai2) are coming from the same DAQmx function or two separate ones.

 

On the other hand, it is certainly possible to start and stop sending the data from ai0 to Excel, as that is definitely a "separate process".  Indeed, it is not unusual to turn on the ADCs, record/monitor all the channels, then decide to start/stop saving independently.

 

Bob Schor

0 Kudos
Message 3 of 11
(3,278 Views)
Thank you for the responses. I haven't started any code yet, but I'll write something up and see if I have any problems.

Yes, my initial guess is that I would need the data in excel form. Is this something you wouldn't recommend for any reason?

Basically, I wanted to see if it was possible before I started. I guess it'll be easier to point out solutions once I have code. I'll probably have something by tomorrow.
0 Kudos
Message 4 of 11
(3,264 Views)

It really depends on such things as Data Rate and What are you Doing with the data.  I had a project that involved testing the sense of smell -- you wave two bottles under someone's nose, and ask which smell is stronger (they push a button).  If they get it right, you use weaker smells, wrong, you use stronger.  At some point, you are hovering over their threshold, and the program detects this and stops.

 

The data rates are low (2-5 points/minute), there are only 30-40 points per subject, and the psychologists doing the study are Excel experts, so Excel was a great choice.  I wouldn't use it to study eye movements recorded at 1KHz ...

 

Bob Schor

0 Kudos
Message 5 of 11
(3,257 Views)

I created and attached a labview program. So I'm using a USB 6009 with differential inputs, meaning I have 4 inputs with the DAQ to use. As you can see in the program, each input is used to read either voltage or current. From here, I'd like to have a button that a user could click that would export data to excel without disturpting the data collection of the other voltages/currents. Ideally, they would be able to specficy the start and end time of data that they would like to see in excel. Also, this data collection could be running for days to weeks to months, so I would probably need a way to clear a set of data automatically or with another button that a user clicks to free up hard drive space. 

 

My assumption is that I would need a two button dialog box, a button, and then an export to excel somehow all connected to eachother. I'm not sure how to deal with the clear data problem. I'm assuming the program will be running indefinitely and the user will simply collect data that they need without stopping the program. The only time I imagine someone stopping the program is if there is some error or glitch. In the future, I will need more inputs, meaning I will need more DAQs. I'm guessing that just mean copy and pasting what I already have for each new DAQ I buy.

0 Kudos
Message 6 of 11
(3,147 Views)
Solution
Accepted by topic author msiwk

You are making things way too difficult for yourself here.

 

1. You are using charts.  This is great!  Here is the thing about charts: they keep a history.  So you do not need to do the Append Waveforms.  Just wire the waveforms straight into the chart.

2. Change your From Dynamic Data Type to output a waveform.  It will make your charts a little happier.

3. You can right-click on the chart while the program is running and there is an option to Export->To Excel.  No extra coding needed.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 11
(3,117 Views)

Oh wow, I didn't realize how convoluted I was making things. I'm new to Labview so thank you for making things simplier. I have two follow up questions to this. Do you suggest I make a new thread or continue with this one?

 

My two questions are:

 

1) How can I export to excel a select timeframe from the waveform chart?

 

2) If the chart keeps a history, will I need to clear it eventually to make space for memory?

0 Kudos
Message 8 of 11
(3,103 Views)

In addition, you don't need the extra scalar indicators next to the charts. Simply right-click the chart and "visible items...digital display". Now you only have one terminal, simplifying the diagram. You can define the display formatting as needed.


msiwk wrote:

2) If the chart keeps a history, will I need to clear it eventually to make space for memory?


The history size is defined for each chart (right-click...chart history lenght). No need for any code.

Message 9 of 11
(3,093 Views)

@altenbach wrote:

In addition, you don't need the extra scalar indicators next to the charts. Simply right-click the chart and "visible items...digital display". Now you only have one terminal, simplifying the diagram. You can define the display formatting as needed.


I thought of that and then got distracted.

 

If you want to make things even simpler, you can play around with Scales in DAQmx and then you don't even need all of that math in the VI since it will just be done by DAQmx for you.

 

As Altenbach stated, you just set the history length via a right-click option on the chart.  The chart has a circular buffer in it, so it throws away old data.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 11
(3,085 Views)