pearu / pylibnidaqmx

a Python wrapper to libnidaqmx library
Other
10 stars 9 forks source link

DigitalInputTask #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
from nidaqmx import AnalogInputTask
from nidaqmx import DigitalInputTask
import numpy as np
task = AnalogInputTask()
task.create_voltage_channel('Dev1/ai0', terminal = 'rse', min_val=-10.0, 
max_val=10.0)
task.configure_timing_sample_clock(rate = 1000.0)
task.start()
data = task.read(2000, fill_mode='group_by_channel')
del task
ditask = DigitalInputTask() 
ditask.create_channel('Dev1/port0/line0', name= 'line06' )
ditask.configure_timing_sample_clock(rate = 1000.0)
didata = task.read(2000, fill_mode='group_by_channel')
del ditask
from pylab import plot, show
plot (didata)
show ()

What is the expected output? What do you see instead?
Receive the Data Input data.

What version of the product are you using? On what operating system?
I am using the the lastest verison on the Windows 7 OS.

Please provide any additional information below.
i recieve this 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_SampTimingType Requested Value: DAQmx_Val_SampClk You Can Select:
  DAQmx_Val_OnDemand  Task Name: _unnamedTask<2>  Status Code: -200077
"""

Original issue reported on code.google.com by theknigh...@gmail.com on 14 Jul 2014 at 6:47

GoogleCodeExporter commented 9 years ago
Which device is that? Seems like it cannot use a sample clock when acquiring 
digital data.

Original comment by richard.hoechenberger on 1 Aug 2014 at 8:40