08-31-2011 02:14 PM
Hi SnowMule,
Please see this document on reading the value of analog or digital output channels.
Cheers,
Lisa
08-31-2011 02:49 PM
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.
09-01-2011 10:59 AM
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
09-01-2011 12:19 PM
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
09-01-2011 12:26 PM - edited 09-01-2011 12:30 PM
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.