Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200077 on NI PCIe-6259

Hi,

 

When I try to output different voltages from two different output channels on the card, I end up getting Error -200077 errorInvalidAttributeValue for the second channel I try to output to. The result is no output. To intialize the channels ("Dev1/ao0" and "Dev1/ao1"), I run the DAQmxCreateAOVoltageChan function assigning 0 and 1 as the task handle. At this point, no errors have been thrown yet. I suspect the error gets thrown when I run DAQmxWriteAnalogF64 to write the voltage to the channel. This problem only happens to the second channel I try to write to. There is no error when I only initialize and run a single channel.

 

Does anybody know what exactly the error means? What really stumps me is that I swapped the hardware into this computer from another, and it all worked when I tested it on the earlier computer.

 

If any more information is needed, I can provide it.

0 Kudos
Message 1 of 4
(4,906 Views)

I got some additional information that might help. I am not sure what it means.

 

 

DAQmx Error: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.

Property: DAQmx_SampQuant_SampPerChan

Requested Value: 1

Valid Values Begin with: 2

Valid Values End with: 18446744065119617024


Task Name: _unnamedTask<1>

Status Code: -200077

 

 

The closest thing I can see to the property is the second parameter of DAQmxWriteAnalogF64, called numSampsPerChan. Currently it is set to 1 because I am sending only a single voltage. If I try and set the parameter to 2, the computer will try to access a non-existent element of an array and there is another error. Where can I access this property?

0 Kudos
Message 2 of 4
(4,893 Views)

Hi dluu,

 

Try using DAQmxSetSampQuantSampPerChan() to change that setting to something within the appropriate range. Is this the only you are getting? If so, hopefully setting this will help fix your issue.

 

Paul C

Paul C
0 Kudos
Message 3 of 4
(4,888 Views)

Hi,

 

Thanks for the reply. That is the only error that I am getting. I tried the function that you suggested, but now there is a new problem of:

 

DAQmx Error: Generation cannot be started, because the selected buffer size is too small.

Increase the buffer size.
Selected Buffer Size: 1
Minimum Required Buffer Size: 2

Task Name: _unnamedTask<1>
Status Code: -200609

Again, this problem only arises on the second channel that I initalized.

 

 

Can you tell me if I did this correctly? This is what I did on both channels:

DAQmxCreateTask("",&taskHandle);
DAQmxCreateAOVoltageChan(taskHandle,channel,"",0,10,DAQmx_Val_Volts,NULL)   DAQmxCfgSampClkTiming(taskHandle,"",mFreqSampling,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,mSampleNumber);
DAQmxSetSampQuantSampPerChan( taskHandle , 5 );
DAQmxStartTask(taskHandle);

//This is where the error pops up.
DAQmxErrChk(
        DAQmxWriteAnalogF64(taskHandle,
        data_length,                    ///length of input data
        1,                                //auto start
        time_out,
        DAQmx_Val_GroupByChannel,
        in_data_arr,                     //input data
        number_of_data_writen,        //See above current function (this is an array of zeros)
        NULL)
        );

 

0 Kudos
Message 4 of 4
(4,884 Views)