alsterane / pylibnidaqmx

Automatically exported from code.google.com/p/pylibnidaqmx
Other
0 stars 0 forks source link

Problems Performing Digital Input and Output Tasks #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

from nidaqmx import DigitalInputTask
import numpy as np
task = DigitalInputTask
task.create_channel('Dev1/port0/line0:7', name='', grouping = 'per_line')
task.configure_timing_sample_clock(rate = 1000.0)
data = task.read(2000, fill_mode='group_by_channel')
del task
from pylab import plot, show
plot (data)
show ()

What is the expected output? What do you see instead?

I want to read/write Digital Signal and I receive this error for the reading:
"""
TypeError: unbound method create_channel() must be called with DigitalInputTask 
instance as first argument (got str instance instead) 
What version of the product are you using? On what operating system?
I am using the latest version
"""

Please provide any additional information below.

Original issue reported on code.google.com by theknigh...@gmail.com on 9 Jul 2014 at 3:23

GoogleCodeExporter commented 9 years ago
Use
  task = DigitalInputTask()
instead of
  task = DigitalInputTask

Original comment by pearu.peterson on 10 Jul 2014 at 5:31

GoogleCodeExporter commented 9 years ago
Thank you, that did seem to fix the problem. Are the  Analog Codes for the
Examples, comparative to the Digital Codes or completely different? Because
i am assuming I can you the same code and just change some of the vales.
Please tell me if this is an error to assume.

Original comment by theknigh...@gmail.com on 10 Jul 2014 at 2:43