LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Channel AI/AO/DI/DO with DAQ

Hi,

 

 

Can I ask a question?

 

I am pretty new to the scene but I was wondering why you do not use your DAQ assistant wizard ?

 

Here is an example of what I made earlier this year.

 

 

 

0 Kudos
Message 11 of 32
(2,329 Views)

Please send your program in LV 2009 as I am unable to open the same.

But I have some restriction is in using the DAQ wizard or DAQ express. I need to use the basic DAQ icons like start, create channel etc.

Looking at my program can you just tell me why the analog set value 1, analog set value 2 does not appear same as seen ..it just by default take only one value in both analog numeric indicator? Its simple I cannot find where is the problem.

Secondly is there anyway to show the data  without arrays in front panel, but I want to use, Nsample N channel.

 

0 Kudos
Message 12 of 32
(2,310 Views)

Please se the VI attached:

When we run the VI and set different values for two channles in Set data 2: doesnt match the dat2 Column(indicator). It just take the value of the second element for both, data 2 rows?

What is the reason?

0 Kudos
Message 13 of 32
(2,307 Views)

Maybe You'd better go

 

Help  >>> Find Examples >>> HW Input & Output >>> DAQmx Smiley Happy

 

Regards.

0 Kudos
Message 14 of 32
(2,300 Views)

If you want multiple channels you need to create your channels in a loop that indexes an array of the physical channels you want to use. 

multichanDAQ.PNG

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 15 of 32
(2,291 Views)

Thank you for your program and advice.

But still my question is very simple.

0 Kudos
Message 16 of 32
(2,275 Views)

Thank you for the VI and pic file where I learnt a new way of introducing the channels. Can you modify my VI that will be more useful.

1. But my question is very simple, in the program I posted before, Analog I/O set value is not matching with the indicator value.

2. How can I avoid the array format in front panel? I tried a bit. Please see the attached.

 

0 Kudos
Message 17 of 32
(2,275 Views)

You are asking why the analog out readings don't match the analog in settings? Do you have them physically connected? You haven't mentioned that before.

0 Kudos
Message 18 of 32
(2,268 Views)

Yes! Analog and digital are physically connected with the assigned channels in hardware NI6251.

Actually the VI I made is working well when I use one channel and set value array (row 1) is well matched with the data 2 value but when I use the 2 channel with 2 array elements..it by default take only one value. Please see the pic below

If I set 1 , 3, it takes only 3, 3 in both...actually it should be 1, 3. The corresponding VI is posted in last to last reply

Other point is there a possibility to avoid array format from front panel? I tried but I am uanble to format for indicators and boleans as posted in last post.

0 Kudos
Message 19 of 32
(2,264 Views)

Look at the definition of your physical channels.

 

For analog input, you have it going from ai2:1.  I'm not sure if you can number them in reverse order, but for the sake of argument, let's say you can.

 

Now look at analog output.  You have it as ao1:1.  Again, an odd definition.  Assuming it doesn't throw an error, it seems like you are writing different values to the same channel, which means probably only the last value written is the one that is going to stick.

Message 20 of 32
(2,249 Views)