Output analog, the USB-6009 case - can I use DAQmxWriteAnalogScalarF64?

I just got a NI USB-6009 and I try to use the outputs analog simple.

I'm running on a Mac, so I'll try to use the API OR-DAQmx Base 3.2 C (downloaded from here: http://joule.ni.com/nidu/cds/view/p/id/1078/lang/en).  This is the most recent version of NOR-DAQmxBase, I could find.

I try to do continuous analog output on the 6009, which does not have a built-in clock.   I was hoping to do the sync software and just new output values when I want to.

I can't get an output of database to work.  Other messages and the example of Windows files, (e.g., National Instruments/NOR-DAQmx Base/examples/ao/MultVoltUpates-SWTimed.c) it seems that the best thing to do would be to use the DAQmxWriteAnalogScalarF64 function.

However, this is not in the Mac version of the C API of NIDAQmxBase.  There is actually an entry for this in the NIDAQmxBase.h file, but it is commented out.  Anyone know why?  Is it possible to use this function for the analog output on request on Mac?

Thank you.

Clement

I have NEITHER-DAQmx Base installed 3.2 on a 10.4.11 system.  One of the examples files 'genVoltage.c' calls DAQmxBaseWriteAnalogF64.  I was able to compile and run this example with a USB-6009.

The DAQmxBaseWriteAnalogF64 function would work for you?

My guess is that, since you can write a scalar value with DAQmxBaseWriteAnalogF64, DAQmxBaseWriteAnalogScalarF64 becomes superfluous.  The example provided with the installation shows how to write a unique value (i.e. scalar.).  I pasted the code of OR below.

int main (int argc, char * argv [])

{

Task settings

Int32 error = 0;

TaskHandle taskHandle = 0;

char errBuff [2048] = {'\0'};

Channel settings

Char [] = "Dev1/ao0" chan

float64 min = 0.0;

float64 max = 5.0;

Sync settings

uInt64 samplesPerChan = 1;

Writing data parameters

float64 data = 3.25;

pointsWritten of Int32;

float64 timeout = 10.0;

DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));

DAQmxErrChk (DAQmxBaseCreateAOVoltageChan(taskHandle,chan,"",min,max,DAQmx_Val_Volts,));

DAQmxErrChk (DAQmxBaseStartTask (taskHandle));

DAQmxErrChk (DAQmxBaseWriteAnalogF64(taskHandle,samplesPerChan,0,timeout,DAQmx_Val_GroupByChannel,&data,&pointsWritten,));

Error:

If (DAQmxFailed (error))

DAQmxBaseGetExtendedErrorInfo (errBuff, 2048);

If (taskHandle! = 0) {}

DAQmxBaseStopTask (taskHandle);

DAQmxBaseClearTask (taskHandle);

}

If (DAQmxFailed (error))

printf ("error in DAQmxBase: %s\n",errBuff); ")

return 0;

}

Hope this helps!

Tags: NI Hardware

Similar Questions

Maybe you are looking for

  • Drive necessary recovery for Qosmio F20

    I lost my recovery disc for my laptop Qosmio F20-104 (I don't remember if he even came with any!). How do I restore my laptop to zero?I have the disk utilities and tools, but unfortunately, that's all... Help! Thank you Gee

  • Satellite M40x-149 and atheros ar5005gs

    I recently bought a laptop, a few weeks previously and recently I tried to connect it to a work already wireless network in the home and found that the laptop could not see the network and then connect to it. I know that the network is working with t

  • DSP stacked filters

    I want to "stack" a DSP filter on a LabVIEW waveform. 'Stack', I mean just run twice, but with different cut-off frequencies of; I'm trying to simulate the actual hardware. I use a basic built-in LabVIEW DSP filter: \vi.lib\Analysis\3filter.llb\Butte

  • I get errors from 2100... How and where should I go to clean. \ ?

    Security check has shown that my computer has 2100 clear... running slow... How can I fix it?

  • laptop redesigned; now, Vista Home Basic Upgrade to Vista Home Premium is disabled.

    3.27.10 I looked at in the previous questions and nothing precisely meets my situation. My laptop was bought with Home Basic. Later, I bought Anytime Upgrade Pack from the microsoft site. It installed fine. THEN my cell phone got reimagee when the se