LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx simultaneously acquire different signal types

Hello All,
 
I'm wondering how to acquire (and maybe generate) multiple signal types simultaneously using DAQmx. I've seen a few good examples that acquire multiple channels, but they all have the same type of analog input. What I want to do is acquire voltages (SCC-AI03) and temperature (SCC-TC02) at the same time.  I may also want to be generating a PWM signal  (SCC-CTR01) while monitoring the inputs.
 
The best example I've seen used a For Loop to sequence through the different settings for each physical channel, but that assumes you are sticking with one type of task - i.e. AI Voltage.
 
It also seems like I need to end (clear) one task of a specific type before I begin a task of a different type.
 
Example scenario - Generate a PWM signal to drive a part (DC solenoid) while monitoring changing voltages on one or more analog inputs while also monitoring a thermocouple. Right now I can do all of these things separately - I just don't know how to manipulate the tasks to do them concurrently.
 
I'm using a 6025E card connected to an SCC-2345. I am on Labview 7.0
 
Thanks for any help.
 
 
0 Kudos
Message 1 of 8
(4,631 Views)

Hello DougR,

If I understand your problem, this is relatively easy to do. Put all the same kind of measurements in one task so that you will get one task which measure your voltage and another task which measure the temperature. The same for the PWM generation. I usually use one task per counter.

A question would be how are you measuring your data= continiously or only in a limited time? If you do it continiously, you can start all your tasks in one VI and get your data in another VI. When you don't need to measure anymore, you can close your tasks.

Example:

Start.vi:
Starts the task "voltage" which measures the channel SCC-AI03
Starts the task "temperature" which measures the channel SCC-TC02
Starts the task "PWM" which generate a PWM signal on the terminal SCC-CTR01

AnyDummyVI.vi:
In this VI you can get your data from the DAQmx buffer as you want. You may want to get the voltage only, or the voltage and the temperature. Only use DAQmx Read.vi with the corresponding task name ("voltage", "temperature"). Do the same for the PWM signal. May be you may want to do separate VIs for acquiring you data and setting your PWM signal.

Close.vi:
Don't forget to stop your task!!!

Regards,
Risotto

0 Kudos
Message 2 of 8
(4,622 Views)
You do not use multiple tasks for different types of acquisition. A single analog input task can contain voltage, termperature, or any other type of measurement. The DAQ board itself is always measuring voltage. You simply can not have two different tasks of the same type (i.e. analog input) run at the same time. It doesn't matter if one task is for measuring a voltage, one a temperature, and one a current. they are all the same to the hardware. If you are using the DAQ Assistant, it's simple to add channels. After you create the task with one input type, simply click the Add Channels button. You will be asked for the type of measurement you want to take just like you were when DAQ Assistant was first run.
0 Kudos
Message 3 of 8
(4,620 Views)

Hello,

I think you have identified the crux of my problem. If it is not possible to have more than one type of task running at any one time, then how does one measure different signal types? I have tried the add channels method you mentioned, but that wants to treat all added channels the same is the first channel you set up.

To verify this, I started a blank vi and put the DAQ Express on the block diagram. I immediately configured one channel as Analog Input>Voltage. I then attempted to add the thermocouple module as an additional channel. It shows up in the structure of physical channels but when I add it, it is treated like another analog voltage input and not an analog thermocouple input. The result is my thermocouple is being treated as if it is a +/-10 vdc device which it isn't.

It seems like what Risotto is suggesting is on the right track - i.e. some sort of software multiplexing - although I wish there were an easier way. Are you saying that is not going to work? Surely measuring multiple signal types must be possible, I've been doing it with PLC's for years.

Thanks to all who have responded so quickly to this.  Sorry if this question makes me seem daft or thick headed. I am.

Doug Rhodes

 

 

 

 

0 Kudos
Message 4 of 8
(4,612 Views)

I don't know what you might be doing wrong. When you click on the Add Channels, you should see what is in the first image. After you select the analog input in the board, you should see what is in the second image.

Message Edited by Dennis Knutson on 03-15-2007 11:39 AM

Download All
0 Kudos
Message 5 of 8
(4,608 Views)

I'm not sure what I'm doing wrong either. I can say that your screen shots depict a different version of Labview than what I have. Is it possible that my version (7.0) isn't this flexible? My DAQ Assistant only wants to add "like" channels.  The first channel added sets the stage. If I first configure a thermocouple, then all channels I add afterword are seen as thermocouples.  If you have access to version 7.0, it would be interesting to see if you have similar results.

It would be great if I could just set everything up using the DAQ Assistant, but that does not seem possible.

 

Thanks,

Doug Rhodes

0 Kudos
Message 6 of 8
(4,599 Views)
I don't have easy access to 7.0 with DAQmx installed. I suspect that all that you need to do is to upgrade your version of DAQmx. The latest version with support for 7.0 is 8.1.
0 Kudos
Message 7 of 8
(4,593 Views)

Hello:

It seems like you are having trouble configuring DAQ assistant, there is way around it though.  You can manunally set up your analog inputs with cascading DAQmx create channel.VI, while routing the same task through them.  Since you are reading all the analog inputs at the same time, you should not and can not create multiple tasks at the same time because all the analog inputs are multiplexed together and share the same clock.

-Joey Cao

0 Kudos
Message 8 of 8
(4,569 Views)