LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace "AI read.vi" with "DAQmx Read"?

Hi,

 

I'm trying to replace AI read.vi with a newer VI from DAQmx such as DAQmx read.vi. Could you give me some clue?

 

untitled.JPG

0 Kudos
Message 1 of 6
(4,867 Views)
Not knowing what kind of clue you're looking for, I would suggest starting here: Transition from Traditional NI-DAQ to NI-DAQmx in LabVIEW.
Message 2 of 6
(4,864 Views)

What I was asking for is following: In the traditional AI read.vi is taking 'the number of scan to read' and 'task ID in' and returning 'scaled data', 'binary data', 'scan backlog', some of which the DAQmx read.vi doesn't have in it. So, I was wondering how to convert the old one to the new one.

 

Thanks,

Jay   

0 Kudos
Message 3 of 6
(4,852 Views)

The first question to ask is if you really need the data that the DAQmx output may not be supply such as binary data and scan backlog.    I really doubt you need those other outputs and should be just fine using the data that comes out which is the scaled data.

 

Changing from traditional DAQ to DAQmx is a good time to clean up other portions of the code besides just replacing one function for another.  A good start would be eliminating those stacked sequence structures.  Replace them with a flat sequence structure.  Once you do that, you may find out that you don't need any sequence structure at all.

Message 4 of 6
(4,829 Views)

Thank you so much. I have one more question. If I just convert the scaled data into binary data, is it going to be same as the one got from the AI Read.VI?

 

Best,

Jay

0 Kudos
Message 5 of 6
(4,802 Views)

Jay,

I think the function that you are looking for is the DAQmx Read Raw Data function.  This gives the data before it has been scaled or calibrated.  For more information about the raw data in DAQmx, you can check out this KB

 

-Christina

Message 6 of 6
(4,771 Views)