Digital I/O

Showing results for 
Search instead for 
Did you mean: 

PXIe-6535 generate pulse signal

Hi Folks,


I'm trying to figure out how to create pulses on a digital output line on my PXIe-6535.  I'm painfully new to this sort of thing.  I'm trying to figure out how to do this programmatically via python using ni-daqmx.  I need to be able to control the frequency of the pulse to within a msec... 


Can someone point me in the right direction?



0 Kudos
Message 1 of 7

Hi sidrew,


Are you new to the PXIe-6535 hardware, programming NI hardware with Python, or both?


I recommend you check out this White Paper: Python Resources for NI Hardware and Software. This includes some great getting started videos and information on how you prefer to program Python into your application. Otherwise, the NI Digital Waveform Generator/Analyzer Help will give you more insight on the device itself, including fundamentals for high speed digital I/O, programming, features, etc. 


If you haven't already found this additional resource, here is the download and GitHub page for NI-DAQmx Python Documentation also linked within the first article above. 


0 Kudos
Message 2 of 7

Thanks for the response... I'm painfully new to both, sadly.  I've dabbled in some basic digital line control via python, but, I'm tasked with putting together something a little more advanced that necessarily needs to involve the clock on the PXIe-6535, I think.


I appreciate the docs... I've already read some of these, but will dig through the docs for the waveform generator.  I'm not an EE... so I have a bit of learning to do, methinks.

0 Kudos
Message 3 of 7

Specifically, I think I need to create a task that sends a "pulse" ... that is... it sets a digital line high for a certain length of time... then low again... and I need to be able to finely control the periodicity of the pulse... which, I can try to do just via python... but, I get the impression the resolution/precision of the leading edge can't be controlled reliably just in software.  So... I'm trying to figure out how this is done via the hardware.

0 Kudos
Message 4 of 7

Hi sidrew, 


If you're looking to manipulate the timing, you can do that a few different ways. There are different clocking sources to choose from based on your timing & sync needs. This includes sample clock, reference clock, and static timing. The NI-HSDIO driver includes functions that can be called to configure this timing. Choosing one of these clocks, you can trigger the pulse to start based on the chosen clock.


More details on timing & sync can be found here: HSDIO Generation and Acquisition Synchronization and here: Synchronization Explained


Hope this helps!

0 Kudos
Message 5 of 7

I'm thinking I might be missing something more basic.  Since I'm trying to do all of this via python... I'm curious to know if creating such a task is even possible via the python API... or do I need to create a virtual instrument in something like LabView... I'm trying to understand the very basic workflow.

0 Kudos
Message 6 of 7

Hi Sidrew,


The basic programming flow for using DAQmx with the NI 6535 can be referenced below.


Programming with NI-DAQmx:


Along with this, the NI-DAQmx Python Documentation has the procedure for installing DAQmx for use with python, as well as some examples of creating tasks and configuring them. I have posted this below as well. 


NI-DAQmx Python Documentation:


This also contains links to the different API references you can call with DAQmx in Python. Following the program flow in the first link and using the appropriate API calls in the second link should provide a good starting point!


0 Kudos
Message 7 of 7