Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labview to set gains on the SCXI 1520 board

I'm trying to set the gains on a SCXI 1520 board in LabView. I do not want to use the high/low limits; I want to set the gains directly. I found an example on how to do this using a Call Library Function Node. After setting the desired gains, I check the settings using AI Parameter VI which returns the proper gain values. But once I start my continuous acquisition, the gains are reset back to the values specified by MAX. Why does this occur? Is there a way to keep the gains I set? Thanks,

Martin
0 Kudos
Message 1 of 4
(2,786 Views)
Martin,

Please see page 2-24 (Figure 2-10: Using AI Parameter to Set Up the SCXI-1520) in the SCXI-1520 User Manual. This shows you how you can place AI Parameter after the AI Config and before the AI Start VIs. Pass AI Parameter the operation Set and the Parameter Name SCXI Gain.

User Manuals can be found on http://www.ni.com/manuals.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,786 Views)
Justin,

That was the first way that I tried to adjust the gain. I also tried AI Hardware Config VI's alternate input limits settings. I have consulted with other labview users that I work with, and they haven't been able to find a way to directly set the gains either.

I've tried several things with the AI Parameter VI. If you provide it with a channel string, it gives you Error -10003, the value of a numeric parameter is invalid. If you don't, then it does not give you an error, but it does not change the gain setting either. I'm pretty certain that I'm setting the gains to allowable values since I've used values specified on page A-1 of the 1520 user manual. Also, since I have a single chassis, I tried changing the gain with and without the "o
b0!" specifier in the channel string, based on the note on page 2-19.

As I mentioned in my earlier posting, I found how to get around this using a Call Library Function Node, but the gains are reset to the values in MAX when you start acquisition. Thanks for your help.

Martin
0 Kudos
Message 3 of 4
(2,786 Views)
Martin,

There is no way to directly set the gain for this, or any other, SCXI module or DAQ board. The only way to set the gains is indirectly by using the input limits. When you specify the high and low input limits the closest gain which matches the specified range will be used. This is the procedure for all of our data acquisition hardware when programming with LabVIEW.

If the input limit parameter is left blank, or set to high level 0 and low level 0, then the gain specified in MAX will be used.

If you have configured a Virtual Channel in MAX, then this virtual channel will have range settings. The gain for this channel will be automatically set and based on the limits you set up for range in the virtual channel properties.


Much of this information is detailed in the following Knowledge Base article on our web site.

How Do I Set the Gain for My Analog Input Channels in LabVIEW?
http://digital.ni.com/public.nsf/websearch/CBA83550AB782D1C862566210061BEB9?OpenDocument

Regards,
Justin
0 Kudos
Message 4 of 4
(2,786 Views)