ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

nidaqmx python example error message

Hi,

I'm trying to run the nidaqmx example shown bellow, using the NI USB-6008:

I've installed the python nidaqmx package and the NIDAQmx Runtime eviroment 18.10 under windows 10.

The examples are:

https://github.com/ni/nidaqmx-python/blob/master/nidaqmx_examples/ao_voltage_hw_timed.py

and

https://github.com/ni/nidaqmx-python/blob/master/nidaqmx_examples/ao_voltage_sw_timed.py

 

But I get the error message:

 

 

Traceback (most recent call last):
  File "ao_voltage_hw_timed.py", line 7, in <module>
    task.timing.cfg_samp_clk_timing(1000)
  File "C:\Users\LocalAdmin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nidaqmx\_task_modules\timing.py", line 3007, in cfg_samp_clk_timing
    check_for_error(error_code)
  File "C:\Users\LocalAdmin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nidaqmx\errors.py", line 127, in check_for_error
    raise DaqError(error_buffer.value.decode("utf-8"), error_code)
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_SampTimingType
Requested Value: DAQmx_Val_SampClk
Possible Values: DAQmx_Val_OnDemand

Task Name: _unnamedTask<0>

Status Code: -200077

Any ideas why I get this message?

 

-Olli

 

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

Hello,

 

With USB-600x there is no hardware timing available. You need to run "sw_timed" example.

Best Regards,
TK
Certified LabVIEW Architect (CLA)

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

Hello,

 

sorry it does not solve the problem. I have the exact same problem and I get the same error message by running the 'sw timed' example at nidaqmx-python/ao_voltage_sw_timed.py at master · ni/nidaqmx-python · GitHub

 

Do you have an idea how to solve/debug this?

 

 

error message:

 

1 Channel 1 Sample Write:
Traceback (most recent call last):
File "ao_voltage_sw_timed.py", line 8, in <module>
print(task.write(1.0))
File "C:\Users\od_19\AppData\Local\Programs\Python\Python38\lib\site-packages\nidaqmx-0.5.7-py3.8.egg\nidaqmx\task.py", line 1169, in write
channels_to_write = self.channels
File "C:\Users\od_19\AppData\Local\Programs\Python\Python38\lib\site-packages\nidaqmx-0.5.7-py3.8.egg\nidaqmx\task.py", line 167, in channels
return Channel._factory(
File "C:\Users\od_19\AppData\Local\Programs\Python\Python38\lib\site-packages\nidaqmx-0.5.7-py3.8.egg\nidaqmx\_task_modules\channels\channel.py", line 118, in _factory
check_for_error(error_code)
File "C:\Users\od_19\AppData\Local\Programs\Python\Python38\lib\site-packages\nidaqmx-0.5.7-py3.8.egg\nidaqmx\errors.py", line 127, in check_for_error
raise DaqError(error_buffer.value.decode("utf-8"), error_code)
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

 

 

0 Kudos
Message 3 of 4
(3,373 Views)

It states it clearly

Requested Value: 10.0
Maximum Value: 5.0
Minimum Value: 0.0

 

So try 5 volt

greetings from the Netherlands
0 Kudos
Message 4 of 4
(3,367 Views)