LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I simulate a trigger from a cam/crank gear with 60 minus 2 teeth

Hi All:

 

    I am new to Labview and message board, so let me apologize ahead of time for the novice questions.  I am trying to simulate a cam/crank gear with 60 minus 2 teeth using LabView (v. 7.1) for a project we are working on.  I would also like to vary the frequency on the fly to simulate acceleration/deceleration.  I am thinking this would be easier than actually setting up hardware for the simulation.  I think this should be straight-forward, but I can not think of a good way to implement this.  Does anyone have suggestions as to how to do this, or maybe even a VI?  Thanks for any help you can offer.

 

Regards,

 

John Honnold

0 Kudos
Message 1 of 7
(5,941 Views)

What is the significance of saying 60 minus 2 teeth? How is that different from saying 58 teeth?

 

In general you would use a square wave generator to simulate the encoder output. Check the signal generation palette/examples.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(5,921 Views)

On most cars there are gear teeth that are used to determine timing.  Since the crank shaft turns 720 for an engine cycle you need to know which half of the 720 degree cycle you are on (i.e. ignition or exhaust).  The term 60 minus 2 means that there are 60 evenly spaced teeth, but 2 are missing for timing (i.e. top dead center for cylinder 1, or cam intake).  So, what I need to do to implement this simulation is to have a pulse train of 60 evenly spaced pulses, but 2 pulse in the cycle will not have its output toggle.  The pulse train would look something like 1-0-1-0-1-0-1-0-1-0-0-0-0-0-1-0-1-0, etc., where 1 represents the peak of a gear and a 0 represents the valley of the gear.  Hope this makes it more clear.

 

John

0 Kudos
Message 3 of 7
(5,912 Views)

Here is one way to simulate a pulse train, that goes to zero for two pulses after generating 58. Take a look at it and let me know if you have any questions. It was written in 8.0, and saved down to 7.1 let me know if you have any problems running the program, and I can try to get another version uploaded.

 

 

Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
0 Kudos
Message 4 of 7
(5,864 Views)

Richard:

 

    I received an error when I tried to open your VI.  I have attached a copy of the error.  Let me know if I am doing something wrong.  Thanks again.

 

John Honnold

 

 

0 Kudos
Message 5 of 7
(5,852 Views)

You should try downloading it again in case it somehow got corrupted during the download.  I was able to open it with no problem

 

Also, please post things like the error message as a .png file or a .bmp instead of embedded in a Word document.

0 Kudos
Message 6 of 7
(5,844 Views)
Here is the file again, I was able to test it in 7.1, let me know if you still can't open this one. Also i added in another VI that I wrote for another task, but you may be able to use it for this purpose, you give it an x(voltage) array and a y(relative time) array and it generates (roughly) the signal that would correspond to the two arrays. This is not a simple task so make sure you test any VI extensively and verify that it meets your needs. You may need to tweak the VIs to get the exact performance you desire. Let me know how your project turns out!!!
Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
Download All
0 Kudos
Message 7 of 7
(5,825 Views)