stefan789 / pylibnidaqmx

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

Status Code: -200479 During First Example #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm running the first example to troubleshoot why my more complex 
AnalogOutputTask isn't running correctly. Here's the example:

from nidaqmx import AnalogOutputTask
import numpy as np

data = 9.95*np.sin(np.arange(1000, dtype=np.float64)*2*np.pi/1000)
task = AnalogOutputTask()
task.create_voltage_channel('Dev1/ao2', min_val=-10.0, max_val=10.0)
task.configure_timing_sample_clock(rate = 1000.0)
task.write(data)
task.start()
raw_input('Generating voltage continuously. Press Enter to interrupt..')
task.stop()
del task

What steps will reproduce the problem?
1. Running the first example in IPython.

What is the expected output? What do you see instead?
I would expect the AnalogOutputTask to produce a sine wave.

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

NidaqMX 9.8 and PyLibNidaqMX 0.2.0 (I think)

Please provide any additional information below.
Any help in understanding this issue would be appreciated! I know the 
AnalogOutputTask works in other context, so there must be something about this 
simple task that breaks a deeper issue I'm having with calling AnalogOutputTask.

Thanks,
Andrew

Original issue reported on code.google.com by andmmcki...@gmail.com on 18 Aug 2014 at 3:53

GoogleCodeExporter commented 9 years ago
Sorry I missed linking the error:

NIDAQmxRuntimeError: DAQmxStartTask(AnaloOutputTask('unnamedTask(0)'),):
Specified operation cannot be performed while the task is runing. Task Name:
_unnamedTask(0) Status Code: -200479

Original comment by andmmcki...@gmail.com on 18 Aug 2014 at 3:55

GoogleCodeExporter commented 9 years ago
Ran on Windows 7.

Original comment by andmmcki...@gmail.com on 18 Aug 2014 at 4:21