Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I aquire Digital input and analog input simultaneously using M-Series in Labview?

This topic has been touched on for other cards, but I am hoping someone can tell me if this is possible using M-Series, namely PCI-6251.  I need to acquire an analog input and also a digital 16-bit port both at 1MHz synchonously.  I have been trying to set up a simple digital acquire at 1Mhz in DAQmx, but it isn't as straighforward as an analog input.  For digital I can't simply specify the "sample rate" like I can in analog.  Do I need to set up a 1MHz counter or something and trigger the analog and digital inputs off the counter?  Hopefully someone can let me know if I am going in the right direction on this...  This seems like the quintescential "mixed signal" application that one would think the multifunction M-Series would be ideal for, but I haven't found any high speed digital acquisition example vi's.
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 1 of 11
(4,814 Views)
Hi billings11,
What you are trying to do is definitely possible with M Series.  NI calls this "Correlated DIO", and it refers to using a clock from a different sub-system (or external clock) as the digital sample clock.  As you were getting at in your post, with M Series devices, there is no dedicated digital timing, so another clock must be used.  
-Alan A.
0 Kudos
Message 2 of 11
(4,795 Views)
Alan,
 
Thanks for the help.  This is exactly what I was looking for.  I took this example and modified it to be a bit more powerful.  Then I added a counter and some additional triggering functionality and came up with a vi that will acquire n channels of ai at 1Mhz and n lines of DIO at 10MHz simultaneously and syncronized of the same digital trigger.  I thought I'd link it in.  I have tried this and it lets me get 24 bits of DIO at 10Mhz and 4 channels of ai at 250kHz each, but all simultaneously starting at the same trigger so I get a perfect mixed signal plot.  M series really has some nice functaionality to be able to do this.
 
-Devin
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 3 of 11
(4,765 Views)
Devin,
Your VI looks great!  I'm glad I was able to point you in the right direction.  Thanks for posting your code.   And I agree, M Series has some awesome functionality;)
-Alan A.
0 Kudos
Message 4 of 11
(4,748 Views)
Hello Billings11,

How did you manage to read 16 lines at 1 MHz with the 6251? I am trying to do something similar (2 AO, 6 AI, 8 bit DO 16 bit DI ) but am only able to have the first port of the 6251 (or 6221 we also have) use for bufferd (or multisample) DIO. This is due to the fact that only the first port of 8 lines is correlated.

Could you explain how you did this?

Thanks,

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 11
(4,648 Views)
Ton, you are correct that the 6251 only has 8 clock-able digital lines.  So it is not possible to do timed digital reads or writes with more than 8 lines on the 6251.  However, the 62x4 or 62x9 devices all have 32 clocked digital lines.  You will need one of those boards to meet your digital I/O needs. 
-Alan A.
Message 6 of 11
(4,630 Views)

I must have tried this with 8 bits and assumed that it would work with the advertised 24 bits for the 6251.  I suppose I need to stop trusting sales documents and start digging deeper into the engineering specifications. 

I was planning to use this vi with a 6259 in an upcoming application.  Now that I look I see where it actually defines the DIO lines and PFI lines in the specifications.  It definitely looks like the 6259 is a far greater value for mixed signal work than just the 6251 when you look at the costs and the extra DIO.  I believe this vi should work with the 6259 properly, at least for the actual 32 bits of DIO, excluding the glorified PFI's.

-Devin
I got 99 problems but 8.6 ain't one.
Message 7 of 11
(4,623 Views)
 

I understand what you are saying, but the product page tries to make this evident.  Notice, one of the bullets is "Correlated DIO (8 clocked lines, 10MHz)..." 
Again, I understand your confusion, just wanted to point that out.
-Alan A.

0 Kudos
Message 8 of 11
(4,619 Views)

I see what you are talking about.  It's just that "Correlated DIO" is an NI phrase only.  Outside of NI web pages I've never heard of the term, nor can I find it regarding anything other than NI's DAQ series in a web search.  I initially assumed all DIO would be able to run off some kind of a definable clock.  If a DIO line is not correlated, does that mean it is static only in that I can only read either a 1 or 0 by making a single DIO Read, but I cannot read at any defined rate? 

Now I understand that NI has two kinds of DIO, regular and correlated with correlated being a subset of regular.  They probably could have come up with terminology that would have been a little more clear, maybe "static" and "dynamic" or something along those lines.  "Correlated" isn't very intuitive in my opinion.

-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 9 of 11
(4,617 Views)
To your question:  Yes, if a DIO line on a Multifunction DAQ device is not correlated, then it can not be hardware timed.  Depending on your speed requirements, you could have software-determinable read/write to those lines.  But with that, you are at the mercy of your OS, of course. 
 
Again, I agree with you that the choice of terminology might not be perfect, but I believe the reason NI choose to use the word "correlated" was to reinforce the restriction that the timing signal must be provided by a different sub-system or external clock.  That might be why NI didn't just use static and dyanmic.....just my guess.  Anyway, I usually try to explain the term when applicable (as in my first post in this thread) in the hopes that it will catch on and people will become more comfortable with it.  I appreciate your opinion, and hopefully this thread will be helpful to others with the same types of questions. 
 
I hope this clears everything up!  Thanks for your input 🙂
 
-Alan A.
Message 10 of 11
(4,613 Views)