From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

PXI 4461 generate voltage update

Solved!
Go to solution

Hi

 

When trying to run the Daqmx example VI "Gen Voltage Update.vi" with a NI PXI-4461 I receive the following error:

 

Error 200758:

"Sample Timing type is set to on demand which is not supported for analog output on this device"

 

What does this mean?

Is there another way to generate a constant DC signal with the 4461?

 

Also - for the next time we consider to buy a new card - where can I find information about the DAQmx properties (such as this one) that are supported for each device?

 

Thanks,

 

Ran

 

0 Kudos
Message 1 of 10
(4,002 Views)
Solution
Accepted by rvardimon

Hi Ran,

 

The NI 4461 doesn't support single-point AI/AO because it is based on delta-sigma ADCs/DACs, which require a free-running clock with a constant rate.

 

There are two ways to output a DC signal with an NI 4461 (or NI 4431):

  1. Continuously generate a DC waveform (containing multiple repeated values).
  2. Set DAQmx Channel >> AO.IdleOutputBehavior to "Maintain Existing Value" and then generate multiple updates.

The LabVIEW Help has a "NI PXI-4461 Supported Properties" page, but it doesn't list all of the supported values for each property for each device. The NI-DAQmx Help has a page called "Timing Considerations for DSA Devices" that talks about this:

 

"

Timing Considerations for DSA Devices

Supported Sampling Rates

Unlike some other DAQmx devices, DSA devices have both a maximum and a minimum sampling rate. Refer to the specifications for your device to determine the sampling rate range.

Other DSA Timing Considerations

DSA devices do not support the on-demand timing type. All DSA acquisitions and generations require hardware timing from a steady clock.

DSA devices do not support external clocking from arbitrary external signal sources such as encoders and tachometers. The PFI lines on DSA devices cannot accept external clocks. You can program a DSA device to use an external clock only when it is a slave in multi-device synchronized system. Refer to DSA Synchronization for more details.

"

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 2 of 10
(3,999 Views)

Hi ,

 

I am using labview to generate a DC voltage on the 4461 as indicated, however the example in the DAQ mx drivers won't work and I tried the fix described in the reply above but the DC voltage doesn't seem to update even though i get no errors. Has anyone got a screen shot of labview used to generate a DC voltage for this device. This has been driving me mad for the day! Please see attached photo of the block diagram

 

Many thanks,

 

Charlie

0 Kudos
Message 3 of 10
(3,832 Views)

Hi Charlie,

 

I think the problem is that you're writing 1 sample to the task, but the NI 4461 AO requires writing multiple samples. Try writing a waveform/array containing multiple repeated DC values. This community example demonstrates how to do that: Output a DC Voltage with a DSA Card (NI 4461)

 

This condition should generate an error. Did you start this VI by modifying a DAQmx example VI? Many of the older DAQmx examples (pre-9.5.5) had automatic error handling disabled.

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 10
(3,815 Views)

I came across this thread by searching for the same error message.  I'm using a PCI-4461 board under CentOS 6.2, using the NI-DAQmx 8.0.2 drivers and their C interfaces.

 

What I need to do is to simply output a 5V signal precisely when an event occurs, and then output a 0V signal when the event ends.  But I'm running into great difficulty trying to perform this simple task.

 

It seems that I cannot use the DAQmxWriteAnalogScalarF64 function, because I get the same error message "DAQmx Error: Sample Timing Type is set to On Demand which is not supported for analog output on this device"  Otherwise I would keep the task running, and just write +5.0 or 0.0 as needed.

 

I'm looking at  calling DAQmxCfgSampClkTiming and DAQmxWriteAnalogF64 with my output data buffer set to the same value (all +5.0).  I "preload" the write buffer with all +5.0 values, and then when the event occurs I call DAQmxStartTask to start the 5V signal.  When the event ends I call DAQmxStopTask which returns the output to 0V.  I then repeat as necessary.

 

Because I'm also using both analog input channels at a sample rate of 32000, it seems that I must also write my output signals at 32000 Hz (otherwise I get an error about using different sample rates).

 

The problem I'm seeing is that it takes a whopping 17 milliseconds from the time I call DAQmxStartTask to the time the signal actually starts.  I need this to be less than 1 millisecond.

 

Any suggestions on how to make this work?

0 Kudos
Message 5 of 10
(3,683 Views)

Hello ksteege,

 

Getting your delay down to less than a millisecond would require hardware timed generation with the PXI-4461. You may be encountering the filter delay of the module. Take a look at page 2-15 of the DSA manual to see a table talking about the different delay times you will experience in relation to the sample rate you specify.

 

http://www.ni.com/pdf/manuals/371235h.pdf

 

Regards,

 

-Travis E

National Instruments
Product Marketer
0 Kudos
Message 6 of 10
(3,656 Views)

Thanks Travis -

 

   Is there any documentation describing hardware timed generation with the 4461?  Can you tell me which C functions are used to do this?

Thanks,
Kevin.

0 Kudos
Message 7 of 10
(3,641 Views)

Hello ksteege,

 

The code used for generation with the 4461 is the same as generation with any device with the DAQmx API. There is an ANSI C DAQmx Example folder located along this directory National Instruments>>NI-DAQ>>Text Based Support. Take a look at the Analog out examples used there. I hope this is useful!

 

Regards,

 

-Travis E

National Instruments
Product Marketer
0 Kudos
Message 8 of 10
(3,626 Views)

Thanks Travis, but I'm not sure I understand your answer.  You mentioned earlier that in order to avoid the 17 ms delay, I should use "hardware timed generation".  I was following the examples I found in /usr/local/natinst/nidaqmx/examples/ansi_c/AnalogOut/GenerateVoltage - all of those use the functions I mentioned earlier - DAQmxCfgSampClkTiming, DAQmxWriteAnalogF64, and DAQmxWriteAnalogF64, which at a sample rate of 32000 have a 17 ms delay before they start generating data.  Is there a different set of functions to use for hardware timed generation?  

 

Thanks,
Kevin.

0 Kudos
Message 9 of 10
(3,617 Views)

Hi Kevin,

Those are the functions for the hardware timing setup, however I do not believe you will benefit greatly from using them. As Travis previously mentioned there is an additional filter delay for DSA devices such as the PXI-4461 which varies based upon the sampling rate of the device. So you will not be able to get a lower response time to output from this particular device directly after initiating the output.

 

-Jake B.

0 Kudos
Message 10 of 10
(3,595 Views)