LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx vi to a numerical indicator

Solved!
Go to solution

Hello all,

 

I am trying to use DAQmx VI to get a certain channel/pin from a module and read that channel connected to a battery to a numerical value as a voltage. How would I got about this? 

Say I have 3 batteries and are connect to a different channel in a module and I want to get the reading from each of those 3 channels voltage. 

Thank you all. 

0 Kudos
Message 1 of 7
(2,687 Views)

Hi B,

 

DAQmxRead, followed by IndexArray:

check.png

 

This is pretty basic LabVIEW stuff: did you notice the "Training resources" offered in the header of the LabVIEW board?

Best regards,
GerdW


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

Great! Thanks!

I didn't see the training part.

If I wanted to check the battery connected to my ni drive how would I go about it? I don't want to measure the data such as rate or samples but just battery check. Say I have 9 voltage connected and I want to see if labview knows that I have 9 connected. 

0 Kudos
Message 3 of 7
(2,589 Views)

What is a "ni drive"???

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 4 of 7
(2,576 Views)

I am sorry. I mean Ni Chassis. 

0 Kudos
Message 5 of 7
(2,556 Views)
Solution
Accepted by topic author BArtzon

It depends on what kind of modules you have in the chassis.  Let us know what the model numbers are...

 

In any case, you would use the same DAQmx VIs if you are trying to read an analog voltage.  The easiest way to start is open up one of the examples and modify it to suit your specific needs.

 

I would go with Help > Find Examples… Hardware IO > DAQmx > Analog In > Voltage - Finite Input.vi

 

EDIT:  You can cut a lot of the example out and it will still work but even though you said you only needed a 1 point measurement it's good to learn what DAQmx can do.  The example will collect 100 samples at 1KHz/Sec (so a tenth of a second) and you will have a waveform of points on your graph.  This will show you a quick snapshot of the signal quality (noise, AC harmonics, etc.) so it's nice have even if you really only needed the voltage.  To get one value simply un-bundle the waveform with Get Waveform Components.vi and take the mean (average) of the Y array in there.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 6 of 7
(2,552 Views)

This is great! Much appreciated your feedback! 

0 Kudos
Message 7 of 7
(2,527 Views)