alsterane / pylibnidaqmx

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

USB 6509 - Setting a Digital Output Task #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
QUERY: 

I am interested in setting up a Digital Output Task on NI-USB 6509 using the 
libnidaqmx library. Following are the simple lines of code I have written:

from libnidaqmx import System
from libnidaqmx import Device
import numpy as np

from libnidaqmx import DigitalOutputTask

system = System()

print 'libnidaqmx version:', system.version
print 'NI-DAQ devices:', system.devices
dev1 = system.devices[0]
print 'Product Type:', dev1.get_product_type()
print 'Product Number:',dev1.get_product_number()
print 'Product Serial:', dev1.get_serial_number()
print 'Bus Type:', dev1.get_bus()

task = DigitalOutputTask()
task.create_channel('Dev1/Port2/Line7',grouping='per_line');   
task.configure_timing_sample_clock()

I get an error saying that the property value is invalid because it conflicts 
with another property. The detailed error warning is attached below.

I am guessing it might be because this board does not have an on-board clock 
which is the default parameter in the above function. If that is the case could 
associating this function with the system clock could be a solution ? 

This library has been tested on PCI cards on Linux platform, so can it be used 
on other cards on Windows platform ?

I am setting up this board for using this library for running small 
experiments, so any suggestions regarding the feasibility of doing this would 
be really helpful.

Thanks.

What steps will reproduce the problem?
1.
2.
3.

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

I see this : 
Traceback (most recent call last):
  File "<pyshell#1>", line 5, in <module>
    samples_per_channel = 1000)
  File "C:\Users\anupam\Documents\Project\nidaqmx\libnidaqmx.py", line 1296, in configure_timing_sample_clock
    uInt64(samples_per_channel))
  File "C:\Users\anupam\Documents\Project\nidaqmx\libnidaqmx.py", line 187, in CALL
    r = CHK(r, funcname, *new_args)
  File "C:\Users\anupam\Documents\Project\nidaqmx\libnidaqmx.py", line 168, in CHK
    raise RuntimeError('%s%s:%s' % (funcname,args, text))
RuntimeError: DAQmxCfgSampClkTiming(DigitalOutputTask('_unnamedTask<0>'), 
'OnboardClock', c_double(1.0), 10280, 10123, c_ulonglong(1000L)):
  Requested value is not a supported value for this property. The property value
  may be invalid because it conflicts with another property.

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

NI - USB 6509, Windows 7

Please provide any additional information below.

Original issue reported on code.google.com by anupamgo...@gmail.com on 5 Jul 2011 at 9:29

GoogleCodeExporter commented 9 years ago
This issue has been resolved. Thanks.

Original comment by anupamgo...@gmail.com on 26 Jul 2011 at 6:27

GoogleCodeExporter commented 9 years ago

Original comment by pearu.peterson on 12 Aug 2011 at 6:50