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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6009 with nidaqmx & PyDAQmx Analog output error code -200077

Hello everyone

 

I want to use pydaqmx or nidaqmx to control USB-6009 DAQ to output some square wave. I follow the installation instructions(nidaqmx in anaconda 3 and PyDAQmx in pycharm), and python version 2.7.12 and 3.5 are used. 

 

If I try nidaqmx input examples, no error happens. But if I try nidaqmx output example, error happens.\ The same problem happens on PyDAQmx&pycharm environment. I believe it's not the problem about nidaqmx or PyDAQmx. And USB-6009 can output voltage between from 0 to 5 volts from test panel in NI MAX. I change the input value in the program from integral to float between 0 to 5 volts. But the error always display that my requested value is 10.0 V. How to solve the problem? 

DAQError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_AO_Max
Requested Value:  10.0
Maximum Value:  5.0
Minimum Value:  0.0
Channel Name: Dev1/ao0

Task Name: _unnamedTask<1>

Status Code: -200077
 in function DAQmxStartTask

 

Thanks,

Fanglin

0 Kudos
Message 1 of 14
(7,504 Views)

Hello everyone

 

I want to use pydaqmx or nidaqmx to control USB-6009 DAQ to output some square wave. I follow the installation instructions(nidaqmx in anaconda 3 and PyDAQmx in pycharm), and python version 2.7.12 and 3.5 are used. 

 

If I try nidaqmx input examples, no error happens. But if I try nidaqmx output example, error happens.\ The same problem happens on PyDAQmx&pycharm environment. I believe it's not the problem about nidaqmx or PyDAQmx. And USB-6009 can output voltage between from 0 to 5 volts from test panel in NI MAX. How to solve the problem? 

 

Thanks,

Fanglin

 

 

DAQError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_AO_Max
Requested Value:  10.0
Maximum Value:  5.0
Minimum Value:  0.0
Channel Name: Dev1/ao0

Task Name: _unnamedTask<1>

Status Code: -200077
 in function DAQmxStartTask

 

 

0 Kudos
Message 2 of 14
(7,504 Views)

Can you attach your code? 

Ian
LabVIEW since 2012
0 Kudos
Message 3 of 14
(7,467 Views)

Hello skycrazy00:

 

As far as I understand the issue you want to develop an input and an output task, but when you run the program you receive the error message. 

 

According to this error message, you are requesting a higher value than the possible limit to the hardware. Also, you are aware of the physical limits of the maximum and minimum amplitude.

 

Did you modify the example you provide as a reference?

 

Can you share the code you are currently working with?

 

0 Kudos
Message 4 of 14
(7,449 Views)

Sure! I just use the example in nidaqmx doc to test the device and lib.

import nidaqmx
with nidaqmx.Task() as task:
    task.ao_channels.add_ao_voltage_chan('Dev1/ao0')
    print('1 Channel 1 Sample Write: ')
    print(task.write(1.0))
    task.stop()

nidaqmx example.

from PyDAQmx import Task
import numpy as np
value = 1.3
task = Task()
task.CreateAOVoltageChan("/Dev1/ao0","",-10.0,10.0,PyDAQmx.DAQmx_Val_Volts,None)
task.StartTask()
task.WriteAnalogScalarF64(1,10.0,value,None)
task.StopTask()

 Thanks for reply.

PyDAQmx example.

0 Kudos
Message 5 of 14
(7,444 Views)

Sure! The same thing as in nidaqmx doc.

import nidaqmx
with nidaqmx.Task() as task:
    task.ao_channels.add_ao_voltage_chan('Dev1/ao0')
    print('1 Channel 1 Sample Write: ')
    print(task.write(1.0))
    task.stop()

nidaqmx example

from PyDAQmx import Task
import numpy as np
value = 1.3
task = Task()
task.CreateAOVoltageChan("/Dev1/ao0","",-10.0,10.0,PyDAQmx.DAQmx_Val_Volts,None)
task.StartTask()
task.WriteAnalogScalarF64(1,10.0,value,None)
task.StopTask()

PyDAQmx example.

 

Two lib get the same error. I think it's not the problem of nidaqmx python lib and pyDAQmx lib.

 

Thanks for the reply!

0 Kudos
Message 6 of 14
(7,440 Views)

Hi! I just want to generate a square function with accurate frequency. I tried digital output just now and it works, but the time delay is controlled by python in computer. I check the doc about the USB-6009 and I find there is a counter in the chip. Can I use the counter to set accurate time delay with square wave output by digital output?

 

Thanks,

Fanglin

0 Kudos
Message 7 of 14
(7,432 Views)

Hi

 

JKarma also mentioned this, but that error means that you are requesting something from the hardware that is not a valid option. Please check this:

 

http://digital.ni.com/public.nsf/allkb/440EB533229211CD8625711C007E61B3

0 Kudos
Message 8 of 14
(7,422 Views)

Thanks for the reply! I know the limitation voltage output of USB-6009 is between 0 to 5 volts, and actually all the voltages I write in the program is between 0-5 V. And that problem happens all the time.

 

So I give up using USB-6009! I find a USB-6351 as the generator.

 

There are function generator inside USB-6351 and I can output impulse sequences through test panel in NI Panel. But when I want to program it in Python, there are problem happens.

DaqError: Specified operation did not complete, because the specified timeout expired.
Task Name: _unnamedTask<34>

Status Code: -200474

And my code below

import nidaqmx
from nidaqmx.types import CtrTime
with nidaqmx.Task() as task:
    task.co_channels.add_co_pulse_chan_time("Dev2/ctr0")
    sample = CtrTime(high_time = 0.001, low_time = 0.001)
    task.write(sample)

Thanks! 

0 Kudos
Message 9 of 14
(7,395 Views)

Hi,

 

I am using NI-USB 6008 and have exact the same problem. So for the begining I just want a simple program where I can give as input 1 and analog output would give out 1V (or 2V or 3V). I am new in python programming so I used an general online code:

import nidaqmx

with nidaqmx.Task() as task:

ask.ao_channels.add_ao_voltage_chan('Dev1/ao0')

task.write(1.0)

task.stop()

So with this I want that on my analog output is 1V. But insted I get an error massege as number of peopel before me.

Error massege is:

nidaqmx.errors.DaqError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_AO_Max
Requested Value:  10.0
Maximum Value:  5.0
Minimum Value:  0.0
Channel Name: Dev1/ao0

Task Name: _unnamedTask<0>

Status Code: -200077

Process finished with exit code 1

 

This problem was discussed already on forums before, but I could not find a solution. Can someone explain what is wrong with the code?

Thanks

NNovak

0 Kudos
Message 10 of 14
(6,076 Views)