From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Stream from multiple cdaq module types

I need to read a strain gage, a counter and a byte of DIO from a Compact DAQ . I can do all seperatly but not very fast. I can stream multiple channels of the same type but not different types. Is there any way to to read multiple channels of different types (modules) at the same time, at 1000hz?

 

0 Kudos
Message 1 of 8
(4,487 Views)

Hi Biznisend, 

 

What CompactDAQ chassis and modules are you using? The sampling rate will depend on what hardware you have. Just to clarify, are you wanting to take these measurements at exactly the same time (simultaneous acquisition) or would multiplexed acquisition suffice?

 

 

Thanks,

Rita Prather
Software Product Manager
rita.prather@ni.com
National Instruments
0 Kudos
Message 2 of 8
(4,470 Views)
Hi Rita, I'm using a cDAQ -9184 chassis, a 9401 DIO card to connect an encoder to the chassis counters and a 9218 Universal AI module for a strain gage. I need to log the strain measurement and encoder count at 1khz. I can stream the analog pretty fast. I can't assign different cannel types to a single task and I can't use the system clock for multiple tasks. The readings don't have to be exactly simultaneous but close. How would you muliplex reading two modules? Thanks, Steve
0 Kudos
Message 3 of 8
(4,465 Views)

You can actually use the same sample clock for two tasks. Go ahead and check out this link:

 

http://www.ni.com/tutorial/5376/en/

 

Especially look at number 3, sample clock synchronization. 

 

Thanks,

Rita Prather
Software Product Manager
rita.prather@ni.com
National Instruments
0 Kudos
Message 4 of 8
(4,456 Views)
Rita, Using your multiplex suggestion, I rearranged the order of my sample clocks. As in your LabVIEW example I CAN use multiple sample clocks. My problem is the counter. If I assign a clock to the counter task I get a error "External sample clock source must be specified for this application." If I don't use the sample clock the reads are very slow. Now that I have seperate clocks for each task, I can speed up the reading conciderable w/o having to stream. My problem now now being able to use a clock with the chassis onboard counters. How do I use an external clock? Steve
0 Kudos
Message 5 of 8
(4,452 Views)

Hi Steve,

 

Try looking into this:

 

http://digital.ni.com/public.nsf/allkb/ADFC4DD8C9690232862575B70079FBD4?OpenDocument

 

 

Thanks,

Rita Prather
Software Product Manager
rita.prather@ni.com
National Instruments
0 Kudos
Message 6 of 8
(4,443 Views)
Rita, I can connect to and use the counters. The problem is I can only read about 40hz and I need 1kz. I had the same problem reading AI channels from the 9218 module. I assigned a clock to the AI task and now I can get about 1.5khz. If I assign a clock to a DI task on the 9401 I can read that very fast as well. But if I try to assign a clock to a count task on the 9401, I get the "needs external clock error". I don't whant to clock the counter, just read it. I should add, this is a VB.NET DAQmx project. While I understand the VI examples, they aren't real helpful. But the componant use should be the same regardless of text or graphic. Steve
0 Kudos
Message 7 of 8
(4,436 Views)

Hi Steve,

 

I confirmed that with your setup, you should be able to access the external clock on the cDAQ chassis. You can specify the particular timebase coming from your cDAQ chassis, as long as you have the correct syntax. 

Thanks,

Rita Prather
Software Product Manager
rita.prather@ni.com
National Instruments
0 Kudos
Message 8 of 8
(4,425 Views)