alsterane / pylibnidaqmx

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

Problem with DigitalOutputTask.write() when `grouping=for_all_lines` #46

Open GoogleCodeExporter opened 9 years ago

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

>>> from nidaqmx import DigitalOutputTask
>>> do = DigitalOutputTask()
>>> do.create_channel('Dev1/port0/line0:7', grouping='for_all_lines')
CreateDOChan argument  is unicode
True
>>> do.write(1)

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

The sample(s) should be written and a positive integer returned. Instead, I get:
Traceback (most recent call last):
  File "<ipython-input-5-e7e16794d5a3>", line 1, in <module>
    do.write(1)
  File "d:\development\pylibnidaqmx\nidaqmx\libnidaqmx.py", line 3645, in write
    data.ctypes.data, ctypes.byref(samples_written), None)
  File "d:\development\pylibnidaqmx\nidaqmx\libnidaqmx.py", line 268, in CALL
    r = CHK(r, funcname, *new_args)
  File "d:\development\pylibnidaqmx\nidaqmx\libnidaqmx.py", line 246, in CHK
    raise NIDAQmxRuntimeError('%s%s:%s' % (funcname,args, text))
NIDAQmxRuntimeError: DAQmxWriteDigitalLines(DigitalOutputTask('_unnamedTask<0>')
, 1, c_ulong(1L), c_double(10.0), 0, 116675480, <cparam 'P' (06DD4F08)>, None):
  Attempted writing digital data that is not supported. Data: 250 Supported
  Values: 0, 1  Task Name: _unnamedTask<0>  Status Code: -200562
  ----------

What version of the product are you using? On what operating system?

Latest trunk.

I don't know if I'm doing something wrong or have found a bug. Any help would 
be greatly appreciated.

Richard

Original issue reported on code.google.com by richard.hoechenberger on 2 Dec 2014 at 11:58