Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How to output 0 to DAQ before stopping continuous analog output ?

Hi, there,
I continuously output a waveform to PXI-6259 using a buffer as bellow:
DAQmxErrChk DAQmxWriteAnalogF64(AOTaskhandle, numSampsPerChannel, False, 10#, _
        DAQmx_Val_GroupByScanNumber, dataBufferOutput(0), sampsPerChanWritten, ByVal 0)
 
It works fine, but I need to set to "0" before stopping the outputting. Does someone know how to output 0? I mean the last data should always output 0 to the DAQ. Thanks in advance.
 
Yingmai
0 Kudos
Message 1 of 7
(8,109 Views)

Hi Yingmai,

 

Thank you for posting to the NI forums.  You can set your analog output to write zero volts using the DAQmxSetAOIdleOutputBehavior function with the DAQmx_Val_ZeroVolts parameter.  This will write zero volts to your channel after your continuous output is finished.

 

I hope this helps.  Please post back if you have any further questions.

 

Ed W.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 7
(8,100 Views)

Hi, Ed W,

Thanks very much for your help, but it doesn't work. The error is "Run-time error '-200452(fffcf0fc)': specified property is not supported by the device or is not applicable to the task."  My code is:

DAQmxErrChk (DAQmxSetAOIdleOutputBehavior(AOTaskhandle, "Dev1/ao0", DAQmx_Val_AOIdleOutputBehavior_ZeroVolts))

I'm using PXI-6259.

 

Thanks in advance,

 

Yingmai

0 Kudos
Message 3 of 7
(8,093 Views)

Hi Yingmai,

 

When you currently stop your analog output, what is the last data value?  It should be 0 V. 

 

There is a different function that could work for your program.  Try using the DAQmxSetAODACRefConnToGnd DAQmx property.  By setting a TRUE to the data parameter, it should output 0 V to your analog channel, and then you can stop your output loop.

 

Ed W.

Applications Engineer

National Instruments

0 Kudos
Message 4 of 7
(8,077 Views)

Is DAQmxSetAOIdleOutputBehavior available for LabVIEW (for an M Series card) ?  If so, where (what property) ?  I could not find a DAQmx property for this.

Steve

Message Edited by SteveP on 03-07-2007 10:21 AM

0 Kudos
Message 5 of 7
(8,047 Views)

Hi Steve,

 

You can find this property in the DAQmx Channel property nodes.

 

 

 

This property may not be available for your device.  But make sure to select the correct property filter by right-clicking on the property node and clicking “Select Filer…”. 

 

Ed W.

Applications Engineer

National Instruments

Message Edited by Ed W on 03-08-2007 03:41 PM

Message Edited by Ed W on 03-08-2007 03:41 PM

0 Kudos
Message 6 of 7
(8,024 Views)
Sorry - the attachment didn't work last time.
 
Ed W.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(8,002 Views)