Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using multiple USB DAQs to generate 8 waveforms

Solved!
Go to solution

I am using two USB-6341 DAQs to generate a total of 8 pulse outputs.  I am trying to stagger firing 4 injectors which are turned on by a double acting valve, so I need to supply a pulse to one solenoid to turn it on ad then a pulse to the opposing solenoid to turn it off. I'm trying to fire the injectors at a frequency of around 16 Hz with a 1.6ms pulse width and fire them for a total of 1000 times. The frequency, pulse-width, and # of pulses needs to be programmable.

 

I've had no trouble with turning 2 solenoids on and off using the example for Counter - finite output - but if I try to add the next 2 solenoids, I'm not allowed to as Implicit DAQMX timing doesn't allow for 2 different devices to be connected.

 

It sort of works to program them in parallel (see program), but the timing between injector 2 and injector 3 where it transitions between the two USB DAQs is not accurate/inconsistent.  Am I missing something or is there a better way to go about doing this?

 

 

0 Kudos
Message 1 of 5
(2,449 Views)

I would try it with a continous 8bit/one port digital output hardware timed.

Sampleclock at least 10kSPS (0.1ms resolution) or higher. .. You haven't told us the timing requirements .. 😉

only one 6241 needed for up to 24 valves (DO driver assumed 🙂 )

 

define the updaterate , configure one DAQ task , generate the output pattern, stream it to the port(s)...

1MHz updaterate should always be possible , but maybe the internal 100kHz clock is fine?

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 5
(2,420 Views)

Is there a good example of this somewhere that I could take a look at?

 

Not sure what you mean by not including the timing requirements.  The signals will all be the same with the frequency between 5 and 20 Hz and the positive pulsewidth between 1.6 to 1.8 milliseconds.  Four of the signals should be staggered evenly so all 4 fire before the first signal fires the second time.  The other four signals trigger when the positive pulse falls for the corresponding signal to open the corresponding injector.

0 Kudos
Message 3 of 5
(2,405 Views)
Solution
Accepted by topic author GarryR

Never mind.  Looks like I can drive the four injector ON pulses using a method similar to above and then physically wire the pulses from one USB DAQ to the second DAQ to an unused PFI port and then use that to trigger a pulse on the falling edge.

0 Kudos
Message 4 of 5
(2,401 Views)

Sorry, I wasn't clear enough ... you didn't get the idea 😉

 

You only need one DAQ to control up to 24 solenoids (assuming you have a hardware that drives the solenoid from a DO pin) , we stay with 8 DOs and use the 8 DOs of port P0.

 

Assume you configure a DO sampleclock (update rate) of 100kHz, giving you 10µs timing resolution. 

 

you have a cycle of 5Hz -> 200ms ->  20k sample 

 

create one array of U8 size 20k. each bit of one byte control one DO line of port P0.

Fill the array with the pattern of choice and stream it to the P0 port using the DAQmx driver. ( no Windows/LabVIEW system running @home.. so you have to look up the shipped LabVIEW examples by yourself... somewhere hardware , DO , one port, loop or continious output...)

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 5
(2,385 Views)