Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Two pulses with a delay lower than 1ms between them

I've been trying to setup a couple of programmes that will operate a fuel injector and a ccd camera for a university project.

 

Firstly, I need a programme that will generate two pulses of different width (I should be able to control the width) and a delay between them, ideally 1ms long.Both of the pulses will be generated by the same counter.I tried the simple solution of copying the existing vi I had for a single pulse (where I could control width and frequency of the pulse) and adding a wait function in between but I couldn't get the delay to go under 20ms.I have attached this attempt below (it's the ''Double Injection'' case).

 

Secondly, I need to create another programme -that I reckon will be very similar to the previous one- where I will generate two pulses (one for the injection and one for the camera), from two different counters,  but the delay needs to be even lower, around 70 microseconds and very accurate. I don't know the specific specs of the computer, other than that the OS is W7. The DAQ card is a NI PCI 6071E connected to a terminal which in turn triggers a solenoid box that sends the voltage to the injector.

 

I should note that in order to measure the delay I used an oscilloscope. Thanks in advance for any ideas and suggestions.

0 Kudos
Message 1 of 4
(5,640 Views)

@LOLKEK wrote:

 

Firstly, I need a programme that will generate two pulses of different width (I should be able to control the width) and a delay between them, ideally 1ms long.Both of the pulses will be generated by the same counter.

 

...

 

The DAQ card is a NI PCI 6071E


While you can't get exactly what you are asking for this first app, any one of the following compromises might suit your needs:

 

Use a software-timed delay between pulses (with the right programming you should be able to get on the order of a couple ms or so, however the actual delay will vary considerably due to software non-determinism)

 

Use pulses that are the same length as each other

 

Use two counters and OR the outputs together with external hardware (assuming you want the pulses on the same line)

 

Use a DAQ card with buffered counter outputs (X Series)

 

Use a DAQ card with hardware-timed digital output lines (given the choice, go with buffered counter output instead)

 

 


@LOLKEK wrote:

 

Secondly, I need to create another programme -that I reckon will be very similar to the previous one- where I will generate two pulses (one for the injection and one for the camera), from two different counters,


Configure the 2nd counter to use the internal output of the 1st counter as a start trigger with the appropriate initial delay on the 2nd counter.  Start the 2nd counter in software after the first.

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 4
(5,579 Views)

Firstly, John thanks a lot for your input. As far as the second point you addressed goes, I managed to solve it with another solution but I will keep your suggestion in mind for later use. Going back to the first issue I might  not need to do it so I wouldn't stress it that much.

 

One thing I would like to ask in regard to your suggestions though; I used a V-connector to connect two channels (so two counters)  into one, since I couldn't do exactly what I wanted (as you mentioned). While this seems to work great as far as timing goes I am obviously having the problem of voltage dropping to half. Do you know if there is a way to manipulate the voltage magnitude on the daqmx CO pulse generation function?

 

Again, thanks a tonne for your time.

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

There is not a way to change the output voltage of the digital lines of the DAQ card.

 

Right now you have two digital sources connected directly to each other--the outputs are current limited which should prevent damage, but "double-driving" the output isn't really a desirable situation to be in regardless (for one thing, the voltage output is no longer binary and depends on the current limiting circuit of the DAQ card).

 

 

Best Regards,

John Passiak
0 Kudos
Message 4 of 4
(5,566 Views)