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

Hi SnowMule,

 

Please see this document on reading the value of analog or digital output channels.

 

Cheers,

 

Lisa

Applications Engineer
National Instruments
Message 11 of 15
(1,685 Views)

Lisa,

 

This is a VI that checks to see if a pump is turned on by checkin to see if DO0 of my 9472 is high or low.

Jim

LV 2020
0 Kudos
Message 12 of 15
(1,678 Views)

Imtis,

On an output task, you will not be able to use the DAQmx Read VI, because they are different logical directions. Also, you're not Starting this task, so your Read won't operate correctly.  Part of the reason you're seeing error 50103 is likely because you're using this specific digital line on multiple tasks at the same time -- one to output your signal, and one attempting to read from this output.

At this point, I would recommend that you start with any of our shipping examples using DAQmx calls, since these programs are already built to do accomplish your basic goals.

 

From any LabVIEW window, you can go to Help >> Find Examples.  From the list that populates, Hardware Input and Output >> DAQmx will have a variety of Analog and Digital Measurement VIs that can be used with analog/digital input modules or multifunction cards.

 

Let me know if you have more questions.

Lisa

Applications Engineer
National Instruments
0 Kudos
Message 13 of 15
(1,655 Views)

Hello Imtis,

 

I have a correction to make to my last post, and I apologize for my error.  It is possible to Read from a Digital Output, and it does read the value output from the buffer rather than the value input into the buffer.  Keep in mind that reading on an Output task is only available on digital tasks.  The Read will autostart if there is no explicit DAQmx Start.

 

Sorry about that mistake.

 

Lisa

 

 

Applications Engineer
National Instruments
Message 14 of 15
(1,633 Views)

Actually that VI works fine now.  I was getting the error because I have two parallel loops.  One is the main production sequence, and the other is an event structure.  I needed to add a semaphore to control access to the DAQ module.  If I start the application with the pump already running, it never prompts to turn the pump on.  I would therefore have to say that it can somehow read that the port is set high.

Jim

LV 2020
0 Kudos
Message 15 of 15
(1,630 Views)