Showing results for 
Search instead for 
Did you mean: 

two counter outputs with 90deg phaseshift

I have NI PXI-1042 chassis and two NI PXI-6513 digital output cards in it.
Task is to create two pulses with 90degrees phaseshift.
Is there function in labview 7.1 which generates pulses descriped above. I`m meaning that if I tell function to count up, signal A is ahead signal B and if A is 90 degrees behind B it means counting down?
Is there way to do this by connecting 3 (signal A, signal B and GND) counter wires all in one counter and controlling only one counter to "count output down" or "Count output up"? 
- Santtu
0 Kudos
Message 1 of 6

Hi, again.

I have also two PXI-6025E Multifunction I/O -cards which would maybe more useful with counter outputs.

- Santtu

0 Kudos
Message 2 of 6
Hi Santtu,

It sounds a lot like you are trying to do something similar to measuring a Quadrature Encoder.  When you use a quadrature encoder you actually do something quite similar where you have one signal gate the other signal.  What this ultimately means is that you can count the directions that your counts are going in.

Below I've found a few KnowledgeBases and Tutorials that I think might prove helpful.  You can always search for more by going to and using the search field.

Tutorial: Quadrature Encoder / Position Measurement
KnowledgeBase: How Do I Use a Quadrature Encoder with My Data Acquisition Board?

I've also attached an image that shows how to write an application that reads a quadrature encoder or similar object.

Hope this helps you out,
0 Kudos
Message 3 of 6
thanks for your answer.
I´m not doing Quadrature Encoder (and I´m familiar with that). I need to generate timing signals, not read input signals. But beside that, functions is similar, meaning Quadrature Encoder backwards.
0 Kudos
Message 4 of 6

Hi Santtu,

I think I understand what you are trying to do.  Essentially you have two counters, but you want to be able to control their phase relationship to one another.  This is definitely possible to do; however, there are not many examples dealing with it.

I did find one Traditional DAQ Example (non- M-Series) that might help you out with this: Twin Pulse Train Generation with Variable Phase Shift Control
Traditional DAQ uses an older API, so I would recommend you look at the attached example over this example.  Just wanted to give you more than one option.

As far as it 'counting' up or down, that really would have to be done by a counter input task.  Since the input would be the same as that for a quadrature encoder, then you would use the methods described in my previous post.  As the output it will simply look like two different counters.

For the best solution though, I went ahead and created an example for you.  It shows how to generate 2 different counter pulses that are out of phase with one another by a specified amount of time. 

Hope this helps,

0 Kudos
Message 5 of 6
This example for M-series is just what I need. The pins I want to output the two signals on are not the default pins. I know how to use the channel property node to re-route the output for a single counter, but I don't see how to do it for both counters. How do I reference the property node to a particular counter?

0 Kudos
Message 6 of 6