Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

register signal event not supported? #42

Closed
holzi-x opened this issue Dec 6, 2017 · 0 comments
Closed

register signal event not supported? #42

holzi-x opened this issue Dec 6, 2017 · 0 comments
Assignees

Comments

@holzi-x
Copy link

holzi-x commented Dec 6, 2017

Hi all,
I have troubles registering a change detection event. The following code

import nidaqmx.system

def getDaqDcPowerVoltage(task_handle=0, every_n_samples_event_type=0, number_of_samples=0, callback_data=0):
   result = None
   print('this is the digital change detection callback function.')
   print(callback_data)                                            
   return 0                                                        
   
DaqMxSystem = nidaqmx.system.System.local()                         
task = nidaqmx.Task()                                               
task.di_channels.add_di_chan('PXI1Slot2/port0/line0')               
task.timing.cfg_samp_clk_timing(1000)                               
task.Buffer = 10                                                    
task.output_buf_size = 10                                           
task.read_all_avail_samp = True                                     
task.register_signal_event(nidaqmx.constants.Signal.CHANGE_DETECTION_EVENT, getDaqDcPowerVoltage(callback_data = 0))
task.start()

ends in this error:

 cfunc = lib_importer.daqlib.DAQmxRegisterSignalEvent
 AttributeError: 'DaqLibImporter' object has no attribute 'daqlib'

I saw, that the DaqLibImporter class in _lib.py is truely missing the daqlib property. Is this something that is not supported in the current nidaqmx-python implementation or am I doing something wrong?

BR Andreas

@holzi-x holzi-x mentioned this issue Dec 6, 2017
Wondernutz added a commit that referenced this issue Dec 14, 2017
<rev> Fix issue 40: is_task_done() cannot be used.
#40

<rev> Fix issue 42: register signal event not supported?
#42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants