Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

ddk daqmx compatibility

I need to set the gain of a PCI-6030E to 1 when it is used with a SCXI 1141 and DAQmx. I can do this with the "Traditional" drivers but DAQmx 8.3.1 will not allow this. DAQmx 8.3.1 defaults the PCI-6030E to a gain of 2 during SCXI 1141 configuration which limits the range to ±5 rather than a possible ±6.2 when using a PCI-6030E with a gain of 1. It appears that with XP I must use some type of driver to write to the gain register and it would seem that the National DDK would be the choice. I only want to use the DDK to change the gain and allow DAQmx to do everything else. I have read of many problems where XP will not allow 2 drivers to access the same device. Is this true with the National DDS and DAQmx? Is there any way to write directly to a device within DAQmx to bypass its well intentioned but in some cases undesirable defaults? Any advice on how to accomplish this using VB6 would be helpful.
 
0 Kudos
Message 1 of 5
(8,128 Views)
Hi RDonaldson-
 
The MIO DAQ device will be set to a gain of 1x regardless of which input range you choose on the SCXI-1141 module.  This is true for both NI-DAQmx and Traditional NI-DAQ.  The reason you're seeing readings that are capped at +-5V is likely because your DAQmx Virtual Channels are set to a +-5V input range.  Further explanation is necessary...
 
I spoke with the applications engineer who you have been discussing this with and noticed in your code that you are using Scan_Start() to initiate sampling in your Traditional NI-DAQ code.  This function actually initiates scanning directly from the DAQ card and not from the context of an SCXI physical channel.  You end up with an input limit of +-10V and all is well.  In NI-DAQmx, my guess is that you're creating Virtual Channels of the form "SCxMody/aiz".  This will scan the channels in their SCXI physical channel context and a limit of +-5V will be imposed on the data that is returned (as this is the spec'd input limit of the module itself). 
 
As you have noticed, the SCXI hardware will physically respond to and is capable of driving values to the DAQ card outside of this range but neither driver (NI-DAQ or NI-DAQmx) will report values outside of the spec'd range of the hardware..  In order to achieve equivalent operation in NI-DAQmx you will need to scan channels of the form "Devx/aiz" from the DAQ card directly and set the Virtual Channel input limits to +-10V. 
 
Hopefully this helps-
Tom W
National Instruments
0 Kudos
Message 2 of 5
(8,121 Views)

I previously tried your suggestion of using the PCI-6030E device id and I can get the ±6.2v range from the SCXI 1141 but I can only get it from one SCXI 1141 module. In many cases I am using more than one SCXI-1141 module and the only DAQmx function I see for setting up the scan between multiple SCXI 1141 modules is DAQmxCreateAIVoltageChan() using "SC1Modn" as the Device ID argument. When the DAQmx function sees "SC1modn" as the device name the output is limited to ±5. Before and after setting up the SCXI scan I have tried using DAQmxSetAIMin() / DAQmxSetAIMax() and DAQmxAIRngHigh() to force the PCI-6030E to the ±10v range but there is no change in behavior and no error is raised. When I look at the raw samples coming back the 5v values are at the 32768 signed integer limit as they would be if the gain was set at 2 but calling DAQmxGetDevAIGains() returns ±10v. Is there a way in DAQmx to set the SCXI scan list in a similar manner as the traditional to get the ±6.2 volt range?

Note that SCXI 1141 modules have offsets as high as 10mv and no way to internally compensate for those offsets (gain yes, offsets no). The offsets must be removed in your application after they are returned by the DAQ driver. As a result if the driver limits the output to ±5 you cannot get the full ±5v range.

 

0 Kudos
Message 3 of 5
(8,112 Views)

Hi RDonaldson-

Thanks for the clarification- I did not realize you were planning to scan from multiple SCXI-1141 devices.  In that case, you will indeed need to take the extra step to adjust the DAQ board manually.  You mention the DAQmxSetAIRngHigh() function, but it's not clear where you actually employ it.  I have modified the Acq-Int Clk DAQmx shipping example to include proper sequencing of setting the low and high range values.  With this setup, I was able to measure a 7V input on two seperate 1141 modules.  Please take a look and let me know if this does not work for you.

Message Edited by Tom W [DE] on 02-15-2007 04:33 PM

Tom W
National Instruments
0 Kudos
Message 4 of 5
(8,105 Views)

Your example works! Thank you very much! I thought that I needed to create a new handle for the PCI-6030E and then force the range with DAQmxSetAIRngHigh() and DAQmxSetAIRngLow() using the PCI-6030E handle. What is required is to use the same handle used for the SCXI 1141 modules to set the PCI-6030E range with DAQmxSetAIRngHigh() and DAQmxSetAIRngLow(). What was confusing for me is that I thought the handle used to configure the SCXI modules would only work with the SCXI modules.

0 Kudos
Message 5 of 5
(8,097 Views)