10-19-2007 02:04 AM
I use a Pressure controller vi with analog input for pressure acquisition (Dev1/ai0) and PWM counter output for the feed back control pulse generation (Dev1/Ctr0)
and in another vi for the activation of a relay i generate pulse for the relay coil (Dev1/ai1) and measuring back the coil current thro another analog input(Dev1/ai1)
When i run the individual vi it works fine but i want to integrate both vi as a single vi and run for my purpose. I have to use the vi in such a way that when my presure controller is stabilized it has to activate the relay coil. I would like to use only one device .
The problem is i tried to use same device for all the channel and when the pressure controller is in active only i have to generate pulses for the relay coil and measure the current
but since the resource (Device ) is in use i will not able to genetrate pulses 9it gives error)
My question is: Is there any other way to do the above function using DAQmx so that when the first vi (pressure control vi)is in active i have to generate pulses to relay coil and measure the coil current
Over all i need a method to use more than one channel of a same device in a single vi (is there any way to synchronize the sample clock)
Thanks in advance
Chandru
10-19-2007 02:07 AM
10-22-2007 02:27 PM - edited 10-22-2007 02:27 PM
Hi Chasan,
First I will like to ask when you say “generate pulse for the relay coil (Dev1/ai1)” you meant Dev1/ao1? Also what card are you using? I want to make sure you are using a card with enough resources to meet your needs. Meanwhile, with the information you posted, you should be able to integrate both VIs in a single one. What I will suggest is to take a look at a couple of our examples for multi-function synchronization. Help->Find Examples-> (see picture attach).
On those examples you will see how we share the “sample clock” to synchronize multiple functions in one VI and how to use multiple channels from the same device. One more thing, I tried replicating your set up in MAX (measurement and automation explorer) and I was able to create one task with two analog inputs, another task for analog output and a last one for the counter output and it ran without problems, (I have a PCI-6251), so as long as you have the enough resources you should be able to do what you want to.
Message Edited by Jaime F on 10-22-2007 02:29 PM
Message Edited by Jaime F on 10-22-2007 02:32 PM