Open xakni1 opened 10 years ago
I think it is just ReadDigitalU32 ~m
On Tue, Jul 22, 2014 at 9:50 AM, xakni1 notifications@github.com wrote:
When trying to perform Digital Input I get this issue: "AttributeError: Task instance has no attribute 'ReadDigitalLinesU32'"
Code used: from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalLinesU32(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None) print "Acquired %d points"%read.value
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
I still get this error when using the resolution you said:
"ArgumentError: argument 4: <type 'exceptions.TypeError'>: wrong type"
On Tue, Jul 22, 2014 at 3:57 PM, codedragon notifications@github.com wrote:
I think it is just ReadDigitalU32 ~m
On Tue, Jul 22, 2014 at 9:50 AM, xakni1 notifications@github.com wrote:
When trying to perform Digital Input I get this issue: "AttributeError: Task instance has no attribute 'ReadDigitalLinesU32'"
Code used: from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalLinesU32(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None)
print "Acquired %d points"%read.value
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49792038.
Try this:
digital_input.ReadDigitalU32(1, 1, 10.0, DAQmx_Val_GroupByChannel, data, byref(read), None)
Note you are only asking for one sample.
On Tue, Jul 22, 2014 at 1:23 PM, xakni1 notifications@github.com wrote:
I still get this error when using the resolution you said:
"ArgumentError: argument 4: <type 'exceptions.TypeError'>: wrong type"
On Tue, Jul 22, 2014 at 3:57 PM, codedragon notifications@github.com wrote:
I think it is just ReadDigitalU32 ~m
On Tue, Jul 22, 2014 at 9:50 AM, xakni1 notifications@github.com wrote:
When trying to perform Digital Input I get this issue: "AttributeError: Task instance has no attribute 'ReadDigitalLinesU32'"
Code used: from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalLinesU32(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None)
print "Acquired %d points"%read.value
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49792038.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49795218.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
Ok i used that example when referencing from the example on the homepage of the PyDAQmx website, but I came across this error of:
"""
DAQError: Requested operation could not be performed, because the specified digital lines are either reserved or the device is not present in NI-DAQmx.
It is possible that these lines are reserved by another task, the device is being used through the Traditional NI-DAQ interface, or the device is being reset. You might also get the error if the specified resource is currently in use by LabVIEW network variables bound to the DAQ Channel, or if the DAQ Channel is being used in any OPC Client software.
If you are using these lines with another task, wait for the task to complete. If you are using the device through the Traditional NI-DAQ interface, and you want to use it with NI-DAQmx, reset (initialize) the device using the Traditional NI-DAQ interface. If you are resetting the device, wait for the reset to finish. Device: Dev1
Task Name: _unnamedTask<1>
Status Code: -200587 in function DAQmxStartTask
""" Where both my DI/O are having the same problem. I looked manually at the DAQ to see if the lines and channels lined up and also ran a function that outputs the internal ports and lines, yet both agree saying that I am using the correct ports and lines. Have any ideas why this is happening? I am not quite sure this wrapper is supportive of the DI/O
On Tue, Jul 22, 2014 at 5:36 PM, codedragon notifications@github.com wrote:
Try this:
digital_input.ReadDigitalU32(1, 1, 10.0, DAQmx_Val_GroupByChannel, data, byref(read), None)
Note you are only asking for one sample.
On Tue, Jul 22, 2014 at 1:23 PM, xakni1 notifications@github.com wrote:
I still get this error when using the resolution you said:
"ArgumentError: argument 4: <type 'exceptions.TypeError'>: wrong type"
On Tue, Jul 22, 2014 at 3:57 PM, codedragon notifications@github.com wrote:
I think it is just ReadDigitalU32 ~m
On Tue, Jul 22, 2014 at 9:50 AM, xakni1 notifications@github.com wrote:
When trying to perform Digital Input I get this issue: "AttributeError: Task instance has no attribute 'ReadDigitalLinesU32'"
Code used: from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalLinesU32(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None)
print "Acquired %d points"%read.value
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49792038.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49795218.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49804673.
What device are you using? Did you install the National Instrument drivers? Can the National Instrument software see/use the board?
~m
On Wed, Jul 23, 2014 at 10:35 AM, xakni1 notifications@github.com wrote:
Ok i used that example when referencing from the example on the homepage of the PyDAQmx website, but I came across this error of:
"""
DAQError: Requested operation could not be performed, because the specified digital lines are either reserved or the device is not present in NI-DAQmx.
It is possible that these lines are reserved by another task, the device is being used through the Traditional NI-DAQ interface, or the device is being reset. You might also get the error if the specified resource is currently in use by LabVIEW network variables bound to the DAQ Channel, or if the DAQ Channel is being used in any OPC Client software.
If you are using these lines with another task, wait for the task to complete. If you are using the device through the Traditional NI-DAQ interface, and you want to use it with NI-DAQmx, reset (initialize) the device using the Traditional NI-DAQ interface. If you are resetting the device, wait for the reset to finish. Device: Dev1
Task Name: _unnamedTask<1>
Status Code: -200587 in function DAQmxStartTask
""" Where both my DI/O are having the same problem. I looked manually at the DAQ to see if the lines and channels lined up and also ran a function that outputs the internal ports and lines, yet both agree saying that I am using the correct ports and lines. Have any ideas why this is happening? I am not quite sure this wrapper is supportive of the DI/O
On Tue, Jul 22, 2014 at 5:36 PM, codedragon notifications@github.com wrote:
Try this:
digital_input.ReadDigitalU32(1, 1, 10.0, DAQmx_Val_GroupByChannel, data, byref(read), None)
Note you are only asking for one sample.
On Tue, Jul 22, 2014 at 1:23 PM, xakni1 notifications@github.com wrote:
I still get this error when using the resolution you said:
"ArgumentError: argument 4: <type 'exceptions.TypeError'>: wrong type"
On Tue, Jul 22, 2014 at 3:57 PM, codedragon notifications@github.com
wrote:
I think it is just ReadDigitalU32 ~m
On Tue, Jul 22, 2014 at 9:50 AM, xakni1 notifications@github.com wrote:
When trying to perform Digital Input I get this issue: "AttributeError: Task instance has no attribute 'ReadDigitalLinesU32'"
Code used: from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalLinesU32(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None)
print "Acquired %d points"%read.value
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49792038.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49795218.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49804673.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49907919.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
I am using the NIDAQmx and I have installed all the drivers. It can also see and use the board because I ran the analog inputs and outputs test fine.
On Wed, Jul 23, 2014 at 2:01 PM, codedragon notifications@github.com wrote:
What device are you using? Did you install the National Instrument drivers? Can the National Instrument software see/use the board?
~m
On Wed, Jul 23, 2014 at 10:35 AM, xakni1 notifications@github.com wrote:
Ok i used that example when referencing from the example on the homepage of the PyDAQmx website, but I came across this error of:
"""
DAQError: Requested operation could not be performed, because the specified digital lines are either reserved or the device is not present in NI-DAQmx.
It is possible that these lines are reserved by another task, the device is being used through the Traditional NI-DAQ interface, or the device is being reset. You might also get the error if the specified resource is currently in use by LabVIEW network variables bound to the DAQ Channel, or if the DAQ Channel is being used in any OPC Client software.
If you are using these lines with another task, wait for the task to complete. If you are using the device through the Traditional NI-DAQ interface, and you want to use it with NI-DAQmx, reset (initialize) the device using the Traditional NI-DAQ interface. If you are resetting the device, wait for the reset to finish. Device: Dev1
Task Name: _unnamedTask<1>
Status Code: -200587 in function DAQmxStartTask
""" Where both my DI/O are having the same problem. I looked manually at the DAQ to see if the lines and channels lined up and also ran a function that outputs the internal ports and lines, yet both agree saying that I am using the correct ports and lines. Have any ideas why this is happening? I am not quite sure this wrapper is supportive of the DI/O
On Tue, Jul 22, 2014 at 5:36 PM, codedragon notifications@github.com wrote:
Try this:
digital_input.ReadDigitalU32(1, 1, 10.0, DAQmx_Val_GroupByChannel, data, byref(read), None)
Note you are only asking for one sample.
On Tue, Jul 22, 2014 at 1:23 PM, xakni1 notifications@github.com wrote:
I still get this error when using the resolution you said:
"ArgumentError: argument 4: <type 'exceptions.TypeError'>: wrong type"
On Tue, Jul 22, 2014 at 3:57 PM, codedragon < notifications@github.com>
wrote:
I think it is just ReadDigitalU32 ~m
On Tue, Jul 22, 2014 at 9:50 AM, xakni1 notifications@github.com
wrote:
When trying to perform Digital Input I get this issue: "AttributeError: Task instance has no attribute 'ReadDigitalLinesU32'"
Code used: from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalLinesU32(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None)
print "Acquired %d points"%read.value
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub < https://github.com/codedragon/pydaq/issues/1#issuecomment-49792038>.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49795218.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49804673.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49907919.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49911370.
I have successfully used the Digital Output for National Instruments card PCI-622. I will try to help you, but this is hardware troubleshooting at this point, so I may ask you some dumb questions, cause I can't see what you've done/not done.
The error message you are getting suggests that maybe the card is being used by another process. I assume you aren't trying to read/write to the card simultaneously from your computer on the same lines? How is your digital signal getting on to the board? Are you reading the NI mapping correctly to get the correct lines/ports (this can be a bit of a nightmare, I find the NI documentation to be pretty lame)? Are you also running LabView or other software that may be trying to use these lines?
~maria
On Wed, Jul 23, 2014 at 11:05 AM, xakni1 notifications@github.com wrote:
I am using the NIDAQmx and I have installed all the drivers. It can also see and use the board because I ran the analog inputs and outputs test fine.
On Wed, Jul 23, 2014 at 2:01 PM, codedragon notifications@github.com wrote:
What device are you using? Did you install the National Instrument drivers? Can the National Instrument software see/use the board?
~m
On Wed, Jul 23, 2014 at 10:35 AM, xakni1 notifications@github.com wrote:
Ok i used that example when referencing from the example on the homepage of the PyDAQmx website, but I came across this error of:
"""
DAQError: Requested operation could not be performed, because the specified digital lines are either reserved or the device is not present in NI-DAQmx.
It is possible that these lines are reserved by another task, the device is being used through the Traditional NI-DAQ interface, or the device is being reset. You might also get the error if the specified resource is currently in use by LabVIEW network variables bound to the DAQ Channel, or if the DAQ Channel is being used in any OPC Client software.
If you are using these lines with another task, wait for the task to complete. If you are using the device through the Traditional NI-DAQ interface, and you want to use it with NI-DAQmx, reset (initialize) the device using the Traditional NI-DAQ interface. If you are resetting the device, wait for the reset to finish. Device: Dev1
Task Name: _unnamedTask<1>
Status Code: -200587 in function DAQmxStartTask
""" Where both my DI/O are having the same problem. I looked manually at the DAQ to see if the lines and channels lined up and also ran a function that outputs the internal ports and lines, yet both agree saying that I am using the correct ports and lines. Have any ideas why this is happening? I am not quite sure this wrapper is supportive of the DI/O
On Tue, Jul 22, 2014 at 5:36 PM, codedragon notifications@github.com
wrote:
Try this:
digital_input.ReadDigitalU32(1, 1, 10.0, DAQmx_Val_GroupByChannel, data, byref(read), None)
Note you are only asking for one sample.
On Tue, Jul 22, 2014 at 1:23 PM, xakni1 notifications@github.com wrote:
I still get this error when using the resolution you said:
"ArgumentError: argument 4: <type 'exceptions.TypeError'>: wrong type"
On Tue, Jul 22, 2014 at 3:57 PM, codedragon < notifications@github.com>
wrote:
I think it is just ReadDigitalU32 ~m
On Tue, Jul 22, 2014 at 9:50 AM, xakni1 < notifications@github.com>
wrote:
When trying to perform Digital Input I get this issue: "AttributeError: Task instance has no attribute 'ReadDigitalLinesU32'"
Code used: from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalLinesU32(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None)
print "Acquired %d points"%read.value
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub < https://github.com/codedragon/pydaq/issues/1#issuecomment-49792038>.
— Reply to this email directly or view it on GitHub < https://github.com/codedragon/pydaq/issues/1#issuecomment-49795218>.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49804673.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49907919.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49911370.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49911849.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
Thank you so much for your assistance and I have no problem providing you with this information. Yes you are correct that I am trying to read/write on the card with the same lines separately. I am not providing a digital signal at this time, I am just trying to get through the process of reading it just for now. I have read the NI mapping correctly aswell to verify that I am using the correct lines/ports. Labview, LabWindows CVI, and ANSI C are all not running. My code for both are as follows:
"" from PyDAQmx import * import numpy
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
digital_input.ReadDigitalU32(1, 1, 10.0, DAQmx_Val_GroupByChannel, data, byref(read), None) print "Acquired %d points"%read.value """ """ from PyDAQmx import * import numpy
digital_output = Task() write = int8() data = numpy.zeros((4,), dtype = numpy.float64)
digital_output.CreateDOChan("Dev1/port1/line0:3","",DAQmx_Val_ChanForAllLines)
digital_output.StartTask()
digital_output.WriteDigitalLines(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None)
print "Acquired %d points"%write.value ""
On Wed, Jul 23, 2014 at 2:27 PM, codedragon notifications@github.com wrote:
I have successfully used the Digital Output for National Instruments card PCI-622. I will try to help you, but this is hardware troubleshooting at this point, so I may ask you some dumb questions, cause I can't see what you've done/not done.
The error message you are getting suggests that maybe the card is being used by another process. I assume you aren't trying to read/write to the card simultaneously from your computer on the same lines? How is your digital signal getting on to the board? Are you reading the NI mapping correctly to get the correct lines/ports (this can be a bit of a nightmare, I find the NI documentation to be pretty lame)? Are you also running LabView or other software that may be trying to use these lines?
~maria
On Wed, Jul 23, 2014 at 11:05 AM, xakni1 notifications@github.com wrote:
I am using the NIDAQmx and I have installed all the drivers. It can also see and use the board because I ran the analog inputs and outputs test fine.
On Wed, Jul 23, 2014 at 2:01 PM, codedragon notifications@github.com wrote:
What device are you using? Did you install the National Instrument drivers? Can the National Instrument software see/use the board?
~m
On Wed, Jul 23, 2014 at 10:35 AM, xakni1 notifications@github.com wrote:
Ok i used that example when referencing from the example on the homepage of the PyDAQmx website, but I came across this error of:
"""
DAQError: Requested operation could not be performed, because the specified digital lines are either reserved or the device is not present in NI-DAQmx.
It is possible that these lines are reserved by another task, the device is being used through the Traditional NI-DAQ interface, or the device is being reset. You might also get the error if the specified resource is currently in use by LabVIEW network variables bound to the DAQ Channel, or if the DAQ Channel is being used in any OPC Client software.
If you are using these lines with another task, wait for the task to complete. If you are using the device through the Traditional NI-DAQ interface, and you want to use it with NI-DAQmx, reset (initialize) the device using the Traditional NI-DAQ interface. If you are resetting the device, wait for the reset to finish. Device: Dev1
Task Name: _unnamedTask<1>
Status Code: -200587 in function DAQmxStartTask
""" Where both my DI/O are having the same problem. I looked manually at the DAQ to see if the lines and channels lined up and also ran a function that outputs the internal ports and lines, yet both agree saying that I am using the correct ports and lines. Have any ideas why this is happening? I am not quite sure this wrapper is supportive of the DI/O
On Tue, Jul 22, 2014 at 5:36 PM, codedragon < notifications@github.com>
wrote:
Try this:
digital_input.ReadDigitalU32(1, 1, 10.0, DAQmx_Val_GroupByChannel, data, byref(read), None)
Note you are only asking for one sample.
On Tue, Jul 22, 2014 at 1:23 PM, xakni1 notifications@github.com
wrote:
I still get this error when using the resolution you said:
"ArgumentError: argument 4: <type 'exceptions.TypeError'>: wrong type"
On Tue, Jul 22, 2014 at 3:57 PM, codedragon < notifications@github.com>
wrote:
I think it is just ReadDigitalU32 ~m
On Tue, Jul 22, 2014 at 9:50 AM, xakni1 < notifications@github.com>
wrote:
When trying to perform Digital Input I get this issue: "AttributeError: Task instance has no attribute 'ReadDigitalLinesU32'"
Code used: from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalLinesU32(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None)
print "Acquired %d points"%read.value
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub < https://github.com/codedragon/pydaq/issues/1#issuecomment-49792038>.
— Reply to this email directly or view it on GitHub < https://github.com/codedragon/pydaq/issues/1#issuecomment-49795218>.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub < https://github.com/codedragon/pydaq/issues/1#issuecomment-49804673>.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49907919.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49911370.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49911849.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49914759.
Confusing NI documentation! Try this (it worked successfully on my setup):
from PyDAQmx import * import numpy
digital_input = Task() read = int32() data = numpy.zeros(10, dtype=numpy.uint32)
digital_input.CreateDIChan("Dev1/port1/line1","",DAQmx_Val_ChanForAllLines)
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
digital_input.ReadDigitalU32(-1, 1, DAQmx_Val_GroupByChannel, data, 1000, byref(read), None) print "Acquired %d points"%read.value
Yes this does work! Thank you and would I also be able to send over my sample code for a setup I am trying to do with DO?
On Wed, Jul 23, 2014 at 3:57 PM, codedragon notifications@github.com wrote:
Confusing NI documentation! Try this (it worked successfully on my setup):
from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros(10, dtype=numpy.uint32)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port1/line1","",DAQmx_Val_ChanForAllLines)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalU32(-1, 1, DAQmx_Val_GroupByChannel, data, 1000, byref(read), None)
print "Acquired %d points"%read.value
—
Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49926473.
If you can't get it working. Take a look at OutputEvents in my code here, as this is a working example of Digital Output:
https://github.com/codedragon/pydaq/blob/master/pydaq.py
Not sure if your setup requires a strobe or not, but here is the code in action
https://github.com/codedragon/pydaq/blob/master/test_digital.py
Keep in mind that you are limited in the signal you send by how many ports you are using. I was using 16 lines, so could send pretty big numbers.
On Wed, Jul 23, 2014 at 1:16 PM, xakni1 notifications@github.com wrote:
Yes this does work! Thank you and would I also be able to send over my sample code for a setup I am trying to do with DO?
On Wed, Jul 23, 2014 at 3:57 PM, codedragon notifications@github.com wrote:
Confusing NI documentation! Try this (it worked successfully on my setup):
from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros(10, dtype=numpy.uint32)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port1/line1","",DAQmx_Val_ChanForAllLines)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalU32(-1, 1, DAQmx_Val_GroupByChannel, data, 1000, byref(read), None)
print "Acquired %d points"%read.value
—
Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49926473.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49928845.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
Thank you and I am still facing some problems. I have seen your work and it is great for the setup. I am however trying to create an active low reset that I have a default state, predefined duration, and goes back to a high state. I am still relatively new to this library and just want to see how the mechanics for this library are different from the pylibnidaqmx wrapper.
On Wed, Jul 23, 2014 at 5:08 PM, codedragon notifications@github.com wrote:
If you can't get it working. Take a look at OutputEvents in my code here, as this is a working example of Digital Output:
https://github.com/codedragon/pydaq/blob/master/pydaq.py
Not sure if your setup requires a strobe or not, but here is the code in action
https://github.com/codedragon/pydaq/blob/master/test_digital.py
Keep in mind that you are limited in the signal you send by how many ports you are using. I was using 16 lines, so could send pretty big numbers.
On Wed, Jul 23, 2014 at 1:16 PM, xakni1 notifications@github.com wrote:
Yes this does work! Thank you and would I also be able to send over my sample code for a setup I am trying to do with DO?
On Wed, Jul 23, 2014 at 3:57 PM, codedragon notifications@github.com wrote:
Confusing NI documentation! Try this (it worked successfully on my setup):
from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros(10, dtype=numpy.uint32)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port1/line1","",DAQmx_Val_ChanForAllLines)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalU32(-1, 1, DAQmx_Val_GroupByChannel, data, 1000, byref(read), None)
print "Acquired %d points"%read.value
—
Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49926473.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49928845.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
—
Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49935939.
That should be pretty easy to do in python. Have fun.
On Thu, Jul 24, 2014 at 8:23 AM, xakni1 notifications@github.com wrote:
Thank you and I am still facing some problems. I have seen your work and it is great for the setup. I am however trying to create an active low reset that I have a default state, predefined duration, and goes back to a high state. I am still relatively new to this library and just want to see how the mechanics for this library are different from the pylibnidaqmx wrapper.
On Wed, Jul 23, 2014 at 5:08 PM, codedragon notifications@github.com wrote:
If you can't get it working. Take a look at OutputEvents in my code here, as this is a working example of Digital Output:
https://github.com/codedragon/pydaq/blob/master/pydaq.py
Not sure if your setup requires a strobe or not, but here is the code in action
https://github.com/codedragon/pydaq/blob/master/test_digital.py
Keep in mind that you are limited in the signal you send by how many ports you are using. I was using 16 lines, so could send pretty big numbers.
On Wed, Jul 23, 2014 at 1:16 PM, xakni1 notifications@github.com wrote:
Yes this does work! Thank you and would I also be able to send over my sample code for a setup I am trying to do with DO?
On Wed, Jul 23, 2014 at 3:57 PM, codedragon notifications@github.com
wrote:
Confusing NI documentation! Try this (it worked successfully on my setup):
from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros(10, dtype=numpy.uint32)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port1/line1","",DAQmx_Val_ChanForAllLines)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalU32(-1, 1, DAQmx_Val_GroupByChannel, data, 1000, byref(read), None)
print "Acquired %d points"%read.value
—
Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49926473.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49928845.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
—
Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-49935939.
— Reply to this email directly or view it on GitHub https://github.com/codedragon/pydaq/issues/1#issuecomment-50033121.
Maria Mckinley Software Developer with Bonus SysAdmin Experience www.mariakathryn.net www.linkedin.com/in/mariamckinley
NOTICE: Due to Presidential Executive Orders still not rescinded by President Obama, the National Security Agency may have read this email without warning, warrant, or notice, and certainly without probable cause. They may do this without any judicial or legislative oversight. Click here to learn more about current US laws and your rights http://www.aclu.org/national-security/surveillance-privacy.
When trying to perform Digital Input I get this issue: "AttributeError: Task instance has no attribute 'ReadDigitalLinesU32'"
Code used: from PyDAQmx import * import numpy
Declaration of variable passed by reference
digital_input = Task() read = int32() data = numpy.zeros((1000,), dtype=numpy.float64)
DAQ Configuration Code
digital_input.CreateDIChan("Dev1/port0/line0","",DAQmx_Val_ChanPerLine)
DAQmx Start Code
digital_input.StartTask() print "Acquiring samples continuously. Press Ctrl+C to interrupt\n"
DAQmx Read Code
digital_input.ReadDigitalLinesU32(1,1,10.0,DAQmx_Val_GroupByChannel,data,None,None) print "Acquired %d points"%read.value