03-15-2007 10:43 AM
03-15-2007 11:03 AM
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
03-15-2007 11:12 AM
03-15-2007 12:23 PM
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
03-15-2007 12:37 PM - edited 03-15-2007 12:37 PM
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
03-15-2007 01:10 PM
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
03-15-2007 01:32 PM
03-16-2007 11:09 AM
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