Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send a digital pulse from Labview to an external I/O device

Ok...here I go again 🙂 (sorry for my unclear words...)

 

I have two digial pulses ( TDC and CAD) from the engine. Every revolution ( one complete combustion cycle of the engine), there are 360 CAD pulses and 1 TDC pulse, and I am talking about a two-stroke engine here. And as you know the time it takes to complete the combustion cycle depends on the engine speed. So I am assuming the worst case scenario of 20K RPM ( which is 3 miliseconds per revolution). So in those 3 miliseconds I'd have 360 CAD pulses and 1 TDC pulse. And for a CAD resolution of 0.05 I'd need a sampling rate of at least 2.4MHz. 

 

Moreover, I want to know if I could count the edges of the CAD by triggering the count with the positive flank for the TDC pulse? Is this a possible thing to do? If yes I like to know how. And if I am able to count the edges of the CAD that means that when the user inputs two CAD values to define the starting and ending edges of the digital pulse to be generated, I can then write to a digital line a HIGH value during this time. For example the user inputs 40 and 140 for CAD1 and CAD2 respectively. And when the CAD edge count reaches 40 and up to when the edge count reaches 140, I want to be able to write a HIGH output to a desired digital line on my PXIe-6361 ( or the corresponding pin on the SCB-68 I/O box). 

 

Let me know if this is more clearer. 

 

 

0 Kudos
Message 21 of 24
(2,768 Views)

Hi Henok, hope you had a good weekend. Sorry for the late reply.

 

Ok, so the CAD can be considered a pulse here? And when the user inputs CAD1 and CAD2 values, then you want to send a corresponding digital pulse to your SCB-68 connector pin, from your DAQ?

 

Also, is TDC another pulse that will be fed into your system by the user? or by you?

 

What I can tell you now is what what I did on my last post and that is that it seems like a frequency related problem, possibly on one of yopur counters.

 

 

0 Kudos
Message 22 of 24
(2,759 Views)

Hi RedAG,

Thank you and yes I had a good weekend and hope you did too. 

 

The application/LabVIEW program I am working on will consume different signals (up to 8 channels of data) from the DAQ device ( PXIe-6361) among which the first two channels are TDC and CAD signals coming in from the engine under test/measurement. The TDC pulse comes once per one combustion cycle (full revolution) for a two-stroke engine and twice in a full combustion cycle for a four-stroke engine. And specific to the test bench engine I work on the CAD pulses are 360 per revolution (depends on the number of grooves you have on the flywheel). So these CAD and TDC pulses are constantly being fed in to the program. And what I mean by the CAD1 and CAD2 here is that, there is a user interface where the user can set in at which CAD values ( starting and ending CAD values) should a digital pulse shall be generated and sent out to the digital I/O box (SCB-68).

 

So the pulse ( or the DIGITAL PULSE I am after) is supposed to have a width defined by the time it takes to cover CAD values ( CAD2 - CAD1) which as you clearly can imagine depends on the engine speed. And this digital pulse shall be generated once in between two consecutive TDC pulses (which means once in a combustion cycle)

 

I hope I clear your doubts. 

 

So my question remains, how could I synchronously count the TDC and CAD pulses rising edges and generate a pulse as per the CAD1 and CAD2 values. So if I say the CAD count goes from 0 to 360 for full cycle, CAD1 and CAD2 will be in this range with CAD2 greater than CAD1. So my pulse will be 0 (LOW) from CAD count 0 up to CAD1 and it will have 1 (HIGH) from CAD count CAD1 up to CAD2. and the pulse again will be 0 (LOW) from CAD2 to 360.

 

Let me know if there is more info you are not clear with. 

 

Regards,

0 Kudos
Message 23 of 24
(2,756 Views)

Well Henok, I assume you have used loops or case structures for the TDC and CAD. What you should do is try and find out if these loops are compatible or rather their iteration and the time and frequency at which they work. As I understand both the CAD and TDC have to be fed in simultaneously so that you can then generate a pulse based on their TDC and CAD values.

 

It looks like that is the only thing that you may need to do now, getting those loop times and frequencies sorted.

 

Now, to synchrosnously count these values or feed them in, you need to find the optimal working values for both. Perhaps you can do this manually until your output is OK or you can post this specific question as another post and I am sure people more knowledgable than me will help you out.

 

I very sorry thats all I can help with and I hope you find a solution to your issues and complete your project. 

 

Hope to converse with you in the future on LabVIEW!

0 Kudos
Message 24 of 24
(2,753 Views)