Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

generation of digital pulse using counter intermittent

Using a M-series 6251 DAQ board.
 
I created the attached vi from the 'Gen Dig Pulse.vi' example, I have changed it to
generate the pulse according to ticks rather than frequency and I have
added the trigger.
 
The source of ticks is a digital pulse from an optical encoder that is sending
out 360 pulse per revolution of an engine crankshaft, the trigger is from the
same optical encoder, but it one pulse per revolution. I require the
output to be of the same frequency as the trigger and delayed by a
configurable number of ticks.
 
The output is ok for up to about 400 revs per minute, but after that the output
is intermittent and some pulses are lost.
If anyone can take a look at the vi and advise me on this I would be grateful.
 
I have tried leaving only the 'wait until done task' in the loop, but this gave
no output, I also tried adding an implicit 'timing' task, but this gave to many
outputs,
 
regards,
Sandra
0 Kudos
Message 1 of 5
(3,433 Views)

My network pc is not near my LV system so I can't look at your vi 'til later.  I'm willing to take a guess though and will follow up after I have a chance to look closer.

Your reference to a simple example and the 'Wait Until Done' makes me suspect that you're configured in a way that requires you to restart or reconfigure your pulse task after finishing your pulse but before the next once-per-rev trigger comes around.

There's a different way to configure your counter so that this stuff all happens in the counter hardware on the DAQ board and there'll be no need for restarting / reprogramming.  In hw mode, you could handle a million RPMS if your engine could keep up!

The mode is known as 'Retriggerable Single Pulse Generation.'   You should be able to find out more by searching here on ni.com or in the LV help or shipping examples.  You may also find useful info with terms like "delayed pulse".    Meanwhile, here's a brief overview:

You should wire in 'Ticks' as the units input in the DAQmx Create Virtual Channel.

While configuring the task, you'll need to insert a DAQmx Trigger property node.  One of the trigger properties will let you specify that the task should be retriggerable. 

If I recall correctly, it's the next part that gets more tricky and un-intuitive.  You need to specify that your 360 line/rev encoder should act as the timing source for generating your pulse.  It would seem natural to specify that with your call to DAQmx Timing.  However, it isn't quite that simple.  (As I recall, probably from DAQmx 7.4 or so).  You need to pull down the 'Implicit (Couner)' version of DAQmx Timing and when you do, you lose the input terminal that allows you to specify the source of the timing clock.  Instead, there's another property node you need to use.  I *think* it's found as one of the DAQmx Channel property node items.

Hope this helps get you started,

-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 2 of 5
(3,429 Views)

Tried to take a look at your vi, but it's in LV 8.0 and I'm still running LV 7.1.  Can you save back to version 7.1?

-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 3 of 5
(3,394 Views)

Hi,  it won't let me save to previous version, I think it's because I started of with version 8.

Anyway, if you look at the thread I have managed to get moved on a little by using the

example 'Generate digital pulse retriggerable' which is much the same as what you

had suggested, excpet it does not have a Timing node. This example works at high speeds.

My problem now is how to cause the pulse to be delayed all the time, not just initially ?

If you have any ideas they would be appreciated,

Sandra

0 Kudos
Message 4 of 5
(3,381 Views)

sorry, the use of the example comes from a reply on a slightly different thread:

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=186971

 

thanks for your help so far,

Sandra

0 Kudos
Message 5 of 5
(3,379 Views)