LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to show simultaneously two different channels on two different indicators using DAQ

Hi.

I'd like to create a voltage acquisition on two different channels, i.e. channel 0 and 1.

For this purpose I've cretated this:

mforbiz_0-1697441758228.png

Then, I've used this on the block diagram:

mforbiz_1-1697441877976.pngthe

Anyway, I don't know on how to send the two differents channel's signal on two different numeric indicator so that the first, the gauge, shows CH0 values and the second, the meter, shows the CH1 values.

May you help me?

Thanks in advance.

0 Kudos
Message 1 of 16
(1,257 Views)

Don't use DAQ assistant. Use DAQmx API. See Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

You can get examples from Help >> Find Examples >> Hardware Input and Output >> DAQmx

Read the data as double array and use Index Array to separate into two different indicators.

 

-------------------------------------------------------
Applications Engineer | TME Systems
0 Kudos
Message 2 of 16
(1,228 Views)

Hi ZYOng.

Thanks for your reply.

I've tried this:

mforbiz_0-1697709258974.png

But , when I run it, I receive this error:

mforbiz_1-1697709309118.png

Where I'm going wrong ?

0 Kudos
Message 3 of 16
(1,180 Views)

Hi.

If I build this VI, I can acquire and show two different AI voltage signal ad visualize they as a waveform.

mforbiz_0-1698389777931.png

But if I don't know how to show the two signal in two different indicators (not waveform) .

Anything like this:

mforbiz_1-1698390567937.png

 

Any idea?

Thanks in advance

 

0 Kudos
Message 4 of 16
(1,173 Views)

Hi mforbiz,

 


@mforbiz wrote:

If I build this VI, I can acquire and show two different AI voltage signal ad visualize they as a waveform.


This is just an ExpressVI with an indicator - but if it is sufficient for you then it is ok...

 


@mforbiz wrote:

But if I don't know how to show the two signal in two different indicators (not waveform) .

 

Any idea?


Right-click the chart and show the digital display...

 

Generic suggestions:

  • Learn to use DAQmx functions as explained in the DAQmx example VIs and here. (It will be much more clear how to get data of two channels.)
  • When sticking with ExpressVIs you should use more ExpressVIs like Splitsignal...

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 16
(1,161 Views)

Hi GerdW, thanks for your reply.


  • When sticking with ExpressVIs you should use more ExpressVIs like Splitsignal...

 


If I use , i.e., two EspressVi in the same block diagram, I receive an error:

mforbiz_0-1698393056467.png

 

0 Kudos
Message 6 of 16
(1,149 Views)

Hi mforbiz,

 


@mforbiz wrote:

Hi GerdW, thanks for your reply.


  • When sticking with ExpressVIs you should use more ExpressVIs like Splitsignal...

If I use , i.e., two EspressVi in the same block diagram, I receive an error:


Because you didn't read (carefully) what I was writing!

I recommended named SplitSignal as additional ExpressVI...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 16
(1,143 Views)

Hi mforbiz,

 


@mforbiz wrote:

Hi ZYOng.

Thanks for your reply.

I've tried this:

mforbiz_0-1697709258974.png

But , when I run it, I receive this error:

 

Where I'm going wrong ?


You went wrong:

  • starting a new thread for the same problem
  • using ExpressVIs instead of plain DAQmx functions
  • creating two tasks for a device with only one (shared) ADC

Solution: create a DAQmx task containing two channels!

See the DAQmx example VIs for details...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 16
(1,136 Views)

Hi gerdW.

 

  1. I've started a new thread because the first was not answered with a solution that solve my issue for many days.
  2. I've read many times any kind of documentation on DAQ mx but it has non solved my issue.

On other forum/community that I attend (Home Assistant, Arduino, Electrical Engineer stack excange, ecc...), usually people with more experience helps less experienced people with pratical examples (like, in this case, a modified VI that solve the issue attached to the reply).

For this reason rather than say:


Solution: create a DAQmx task containing two channels!

 


I would have expected an attached VI with the solution.

 

Anyway I've understood that this is not this type of Community.

I'm an italian engineer and High School teacher.

I'm evaluting the use of LAbView in our labs but, if is so difficult to receive free support on the official communty I'll be forced to don't suggest the use of this very interesting software in our classes and labs.

Kind regards.

 

 

0 Kudos
Message 9 of 16
(1,127 Views)

Hi mforbiz,

 


@mforbiz wrote:

Hi gerdW.

 

  1. I've started a new thread because the first was not answered with a solution that solve my issue for many days.
  2. I've read many times any kind of documentation on DAQ mx but it has non solved my issue.

On other forum/community that I attend (Home Assistant, Arduino, Electrical Engineer stack excange, ecc...), usually people with more experience helps less experienced people with pratical examples (like, in this case, a modified VI that solve the issue attached to the reply).


  1. What's the problem to ask again in your older thread instead of creating a new one?
  2. The example VIs show how to add more than one channel to a DAQmx task...
  3. I cannot open our VI because you use a rather recent LabVIEW version. Many "older" forum participants didn't update LabVIEW since two years because of changed license schemes. When you want to reach a broader audience you should attach a downconverted version of your VI. I recommend LV2019 as target version...

@mforbiz wrote:

I would have expected an attached VI with the solution.


As explained before: I cannot open the VI you attached - and in other messages you only attached images. We cannot edit/debug/run images in LabVIEW...

Btw. often students are asking for "VI with the solution" attached - and the many seasoned forum members try not to "solve homework for free". As a teacher you will see the good intention behind this specific behaviour, I guess...

 


@mforbiz wrote:

Anyway I've understood that this is not this type of Community.

I'm an italian engineer and High School teacher.

I'm evaluting the use of LAbView in our labs but, if is so difficult to receive free support on the official communty I'll be forced to don't suggest the use of this very interesting software in our classes and labs.


I provided as much help as possible, see reasons above.

There was a hint to the digital display of charts and I named a specific ExpressVI function...

 

Two ways to add two channels to a task:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 16
(1,117 Views)