PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Function DAQmxWriteAnalogF64

I have defined my analog channels as shown below:
 
const char *Analog_WriteParameters = \
  "ROLL_POS, ROLL_NEG, NAV_DEV_LOG_POS, VNAV_POS, VNAV_NEG, GS_DEV_POS, GS_DEV_NEG, CRS_DEC_2, CRS_DEC_3 \
   AIRSPEED, ALTITUDE, RADIO_ALT_POS, RADIO_ALT_NEG, NORMAL_ACCEL, PITCH_POS, PITCH_NEG, ALT_RATE_1, ALT_RATE_2";
 
When I attemp to Write these parameters with:
   // Write new values of analogs
   if(DAQmxWriteAnalogF64 (FDS_ReadAnalog, 1, 0, 10.0, DAQmx_Val_GroupByChannel, \
    Analogs, &SamplesPerChnnl, 0) < 0)
   {
    MessagePopup("Cannot Write FDS Analogs", errorBuf);
    return -1;       
   }
 
I get a NON-FATAL RUN-TIME ERROR
 
Function DAQmxWriteAnalogF64 {return valude == -200459[0xfffcf0f5].
Write failed, because there are no output channels iin this task to
which data can be written.
Task Name: _unnamedTask<2>
 
Status Code: -200459
 
Don't know quite where to go with this????
 
0 Kudos
Message 1 of 2
(3,493 Views)

Hello Joal,

What device are you using?  It seems that the driver is confused with what channels you are trying to write to.  Normally you would name the channels that you are using like this: “Dev1/ao1”.  What other basic functions are you using to generate data on these channels?  There is a great reference for using the DAQmx functions.  (Start >> All Programs >> National Instruments >> NI-DAQ >> NI-DAQmx C Reference Help)

I would suggest running a shipping example or test panel in MAX to make sure that the card is working correctly.  A test panel in Measurement & Automation Explorer (MAX) is a great way to verify that the card is behaving as expected.  Shipping examples are installed on to your computer when you installed the driver.  (C:\Program Files\National Instruments\NI-DAQ\Examples)



Respectfully,

Rob F
Test Engineer
Condition Measurements
National Instruments
0 Kudos
Message 2 of 2
(3,479 Views)