LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read an AI and DI channel simultaneously in Daqmx?

I'm trying to do something very simple: read a single AI channel and a single DI channel with Daqmx and display them on a waveform chart. It's not working. I'm doing something wrong and none of the sample codes available in the Knowledge base cover an analog input and a digital input. I'm trying to read continuously at 250 samples per second, align the timestamps and display the result on a waveform chart. The analog data shows up twenty seconds later than the digital data when I get anything at all. Please take a look at my diagram and tell me what is wrong. The device is a USB-6218 running on a laptop running Windows XP and LabVIEW 8.2.
0 Kudos
Message 1 of 4
(2,750 Views)

Could you provide some actual values for sample rate and number of samples instead of those silly globals? Also, you have nothing to configure the digital timing.

 

I also don't understand your comment about not being able to find an example. There's one called Multi-Function-Synch AI-Read Dig Chan. It's under Hardware Input and Output>DAQmx>Synchronization>Multi-Function. Try that.

0 Kudos
Message 2 of 4
(2,739 Views)
In the example you pointed me to there is a function "Get Terminal Name With Device Prefix.vi" that does not work with my hardware. I this an essential feature to make data acquisition work and what work around is there for a USB-6218 device.
0 Kudos
Message 3 of 4
(2,729 Views)

Sorry, I did not look at the spec details until now. I assumed it was a regular M series device but it's a USB one and I don't see a way to do hardware timed digital input. Since that is the case, you would get a single digital sample for each of the multiple samples with the analog read. So, going back to your original VI, all of my assumptions were incorrect. I'll to prlay around with it some more.

0 Kudos
Message 4 of 4
(2,727 Views)