Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate pulse trains with different frequencies with NI-9475

Hello DIO expert,

I am trying to use two different channels of the NI-9475 to generate two complementary pulse trains (phase inverted) to create a differential pulse output.  What is the best way for me to approach this with LabVIEW?

Thank you,

0 Kudos
Message 1 of 7
(2,896 Views)

First of all, which hardware CompactDAQ or CompactRIO are you going to use?

There are some limitations at CompactDAQ as below

but you can generate two different pulse train using CO feature.

How Many Different Tasks Can Concurrently Run on a CompactDAQ Chassis Gen II?

 

I recommend to use FPGA in CompactRIO. It can generate various pulse but
a little complex programming compared to CompactDAQ are required.

Generate pulse train in LabVIEW FPGA

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 2 of 7
(2,887 Views)

Thanks for your answer.  I am using the cDAQ-9174 and NI-9475.  That is actually my constraint since that is what I have in the system.

I am not familiar with NI-9475 yet.  Can it do Counter task?

I am also wondering if I can go with software-timed task since it is not limited to 1 DO task per chassis.

Thanks,

0 Kudos
Message 3 of 7
(2,837 Views)

I don't do a whole lot of stuff with cDAQ, but it's generally pretty common to configure the chassis' internal counters for the tasks while using a DIO module to route the signal between chassis and real world.

 

Beyond that, I'm not clear what the overall need is.  In the subject you mention "different frequencies", but in the message you seem to be looking for 2 pulses with the same frequency but inverted polarity.

 

If you want both at once (inverted polarity pulse trains with frequency changes on-the-fly), you'll probably be better off with an external logic inverter chip than a 2nd counter task.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 7
(2,833 Views)

Hi Kevin,

I mistyped my thread subject.  I agree that implementing an inverting stage with hardware is very nice and clean.  However, I am trying to re-use the same hardware (both the cDAQ and the fixture) for two different applications without fixture PCBA re-spin.  I need to generate Pulse Outputs in both differential and single-ended settings.  In some tests, I need to generate single-ended pulses at two different frequencies.  Also, the pulses are not at TTL level.  They are varied depending on the test requirement, sometimes can go as high as 50VDC.  That's the reason why the NI-9475 with an external power supply are utilized.

I am thinking about using one daqmx task for both NI-9475 channels.  Hope to learn from all of the cDAQ experts out there.

 

0 Kudos
Message 5 of 7
(2,829 Views)

According to this article, you can use onboard counter with NI-9475 and the voltage level is up to 60V.

cDAQ Module Support for Accessing On-​board Counters

 

You can find pin layout.

C Series Signal Connections for Counters

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 6 of 7
(2,810 Views)

I still don't have a full and clear understanding of what you'll need, and I have much less knowledge and experience around cDAQ hardware as compared to desktop DAQ boards.

 

Having said that, here's an attempt to help:

 

1. For 2 pulse trains that are the same freq and fully in sync, just inverted from one another, you'll want to configure them with opposite polarity for "idle state", but the same frequency and duty cycle.  You'll also need them to start simultaneously.

   This is for sure possible if you make them 2 separate tasks that both look at the same Start Trigger, and which are both started before the triggering signal happens. 

    I know that cDAQ systems allow putting multiple counter output channels into 1 task, but I do *not* know for sure whether their start times are truly sync'ed at the hardware level.  (It might be an API convenience where, under the hood, the counters are started by consecutive software calls).  I suppose that if you also configured for a Start Trigger, then the 2 channels in 1 task method ought to work either way.

 

2. For 2 pulse trains at different frequencies, you'll want 2 separate tasks.  I'd guess you may not need the start times sync'ed by hardware trigger, but you could if you want to.

 

 

-Kevin P

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 7 of 7
(2,799 Views)