Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What if the analog output exceeds the +-10v range?

Solved!
Go to solution

I'm using usb-6211 DAQ board for my application. Sometimes, there will be cases when the analog output would exceed the +10 volt range. What would happen in this case for a DAQmx? Would the task just write +10 volt? Or keep the last value wrote to the analog outpot port? Is there any harm in doing this(giving an out-of-range value to the AO port)?

 

If needed, what would be the best way of amplifying the AO voltage signal of the DAQ board to have an output higher than 10 volt?

 

Thank you,

 

Lucy

0 Kudos
Message 1 of 6
(4,694 Views)

Hi Lucy,

 

Unfortunately, the DAQmx drivers will not let you set any output voltage exceeding the -10V to 10V specifications of your USB-6211 and any attempt to do so will result in a DAQmx error message. If you need to exceed the maximum voltage rating, your only option is to feed your AO to a discrete OP-AMP component and adjust your output level and voltage gain to obtain the wanted voltage level. There are many OP-AMP configurations you could refer to in any basic circuit textbook to build your implementation. Your choice of circuit topology will depend on the type of application and your needs.

 

I hope this helps,.

S_Hong
National Instruments
Applications Engineer
Message 2 of 6
(4,668 Views)

Hi S_Hong,

 

Thank you very much for your reply. The wierd thing of my VI is that I didn't get any error message from the DAQmx. My application writes a sequence of control signal to the motor input. The voltage sometimes runs over 10 volt and then comes back into the +-10v range. I didn't get any error message when I run the program even when the attempted AO exceeds +10v. I don't know what the DAQmx really does under this situation.

 

To make sure what the voltage is at the AO port, can I wire this signal back into an AI port of the DAQ board and measure this signal explicitly? Will there be any interference between the AO and AI ports when I try to do this? Thank you!

 

-Lucy

0 Kudos
Message 3 of 6
(4,653 Views)

Hi Lucy,

 

That is certainly strange as when I tried feeding in a value for my AO outside the specs of the board, DAQmx actually returned me an error. Have you implemented proper error handling in your code? What version of the DAQmx drivers are you using? Could you perhaps post a snippet of your code so we can have a look?

 

As for trying to feedback AO into AI, you can definitely give that a try. To makes things easier, simply run the Acq&Graph Cont Voltage - Int Clk.vi from your Example Finder under Hardware Input and Output » DAQmx » Analog Measurement » Voltage. You can run our code in parallel with this one to monitor the voltage output.

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 4 of 6
(4,638 Views)

Hi,

 

Here's a snippet of my program's AO part. The input to the formula node is sometimes larger than 10volt. I also attached the whole VI file. I suspect there's something wrong with the VI too. But I haven't been able to find it yet. Thank you very much for your help.

 

-Lucy

 

Download All
0 Kudos
Message 5 of 6
(4,635 Views)
Solution
Accepted by topic author LucyXF

Hi Lucy,

 

From looking at the code, I noticed that an error will occur whenever the output voltage data exceeds ±10V. Now the reason why you were unable to see this error is because you had forgotten to place a general error handler at the end of the error wire. Without any error handler VI, you will be unable to view any of the errors from that particular error line.  

Also, I would like to add that whenever using DAQmx VIs in a loop, you should constantly check for errors and terminate the loop if an error does occur. To do this, you will have to check the error status on the wire and include it as part of the loop control logic. 

 

 

 

With all this in place, you should now get error -200561, which essentially tells you that you have exceeded the limits of your Max and Min Voltage settings. Now when this error occurs, the loop will terminate. However, if you wish, you can modify the code to continue executing the loop and simply ignore -200561 should it occur. To do this, I constantly check the error code from the wire and use a Clear Error VI if that particular error occurs. Now you may be asking what happens to your output voltage and get this error code. When this error occurs, the DAQmx Write VI simply ignores the data and your output voltage will retain the last good voltage. If this does not bode too well with your application, I recommend preconditioning the data prior to feeding it in to the Write function. One example of this might be to simply coerce the data to the upper or lower limit whenever the data falls outside these bounds.

 

 

I hope this all makes sense. Please let me know if you have any questions.

Message Edited by S_Hong on 11-20-2008 09:47 AM
Message Edited by S_Hong on 11-20-2008 09:54 AM
S_Hong
National Instruments
Applications Engineer
Download All
Message 6 of 6
(4,618 Views)