From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read the current voltage output of an analog output channel

Solved!
Go to solution

In DAQmx if you are unsure of the status of a digital output port, you can perform a read on it.  When I try this on an analog output, I get an error.  Is it possible to query the output status of an analog output?  I realize that I could track the status with a variable, but a direct read sure would be convenient.

Jim

LV 2020
Message 1 of 15
(5,160 Views)

When reading the state of a digital line after you have written to it, you are exploiting the bi-directional nature of digital lines (in some equipment).

 

Do you have an Analog Input card?

Richard






0 Kudos
Message 2 of 15
(5,145 Views)

I guess that would be an important piece of information wouldn't it? DOH!  I am using an NI cDAQ-9178 chassis with an NI 9263 AO module.

Jim

LV 2020
0 Kudos
Message 3 of 15
(5,141 Views)

@lmtis wrote:

I guess that would be an important piece of information wouldn't it? DOH!  I am using an NI cDAQ-9178 chassis with an NI 9263 AO module.


That's purely an AO. You'll need some type of AI to read your AO, OK?

Richard






0 Kudos
Message 4 of 15
(5,137 Views)

I think there's a property node that'll let you read the value when the task is configured as a write. ... well, after looking, everything that might work just comes out with an error.

 

Thinking that your best bet is to wire in a loopback and read an AI voltage channel.  It can be single-ended since the AO lines are ground-referenced.

0 Kudos
Message 5 of 15
(5,129 Views)

Actually I was hoping I could read the setpoint.  I am also using a NI-9472 which is strictly a DO module, and I can read the value of the output lines.  I was just hoping that I could read from the DAQ chassis what the setpoint on the AO lines was.  I can get by with storing the setpoint whenever I change it.

Jim

LV 2020
0 Kudos
Message 6 of 15
(5,128 Views)
Solution
Accepted by topic author lmtis

Hello Imis,

 

There is no way to read the output in AO modules without physically wiring the signal to an AI module.  You are able to use a variable to read the current output value, like you previously mentioned.

 

AO channels on multifunction boards, however, can be read through input tasks by internally rounting the channel to read ao vs aoground.

 

Lisa

Applications Engineer
National Instruments
Message 7 of 15
(5,098 Views)

Thank you Lisa.  Just out of curiosity, when I read the value of the DO module is it actually measuring the output, or simply returning the status of an internal buffer?

Jim

LV 2020
0 Kudos
Message 8 of 15
(5,094 Views)

Hi again,

 

Can you post a screenshot of the DAQmx code you're using to do this?  (Just so I don't end up giving you wrong information.)

 

Thanks,

 

Lisa

Applications Engineer
National Instruments
0 Kudos
Message 9 of 15
(5,090 Views)

@Lisa J wrote:

AO channels on multifunction boards, however, can be read through input tasks by internally rounting the channel to read ao vs aoground.


How exactly do you do this?

 

If I understand you right, this does not require a wire between the AO and AI terminal on the device?

Message 10 of 15
(5,087 Views)