LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring digital frequency

Solved!
Go to solution

Dear,

 

I am working on a test stand that will be used for fatigue tests for a suspension, chassis etc. De vehicle components will be charged by hydraulic cylinders. These hydraulic cylinders are controlled by an AO and DO module (NI9263 & NI9401). Feedback is given by load cells. These load cells are connected with AI module (NI9201). When a cylinder reaches a certain force (certain amplitude load cell NI9201) the cylinders stops pulling and will make an outward movement. This signal is 0 when outgoing and 1 when certain force is reached. A green led starts to burn (signal is 1) when the force is reached. Now I want to count the amount of times that the signal is 1 so that I can make a security system that will limit the amount of ingoing and outgoing movements of the cylinders. Can you help me?

 

Kind regards,

 

Michael Tielemans

0 Kudos
Message 1 of 8
(3,572 Views)

Michael,

 

Have you tried searching the ni site for help on this.  There is a lot of info and examples on performing operations of the sort you are looking for.  Try the CRIO developers guide, for one.  This can be found here: http://decibel.ni.com/content/docs/DOC-8793

 

The chapter on FPGA programming has examples on creating counters.

 

You can use boolean logic and a shift register to capture rising/falling edges (low to high and high to low).  Each time an edge is found, increment the counter and store it another shift register.  Reset the counter as necessary.

 

Dan

0 Kudos
Message 2 of 8
(3,535 Views)

Hi Michael,

 

If you just want to count edges from a boolean value in software, you can use attached vi. If you want to calculate the frequency, you have to tell more about your hardware setup and whether you need hardware or software timing.

 

Regards,

Bas van Dijke

NI Netherlands Support

0 Kudos
Message 3 of 8
(3,510 Views)

Thanx for the reply guys. I think I will be able to solve my problem now. If I fail to solve the problem, I will give you more detailed information.

 

Regards,

 

Michael

0 Kudos
Message 4 of 8
(3,503 Views)

Dear,

 

I am still unable to count the digital frequency. The signal from the load cells (0 or 1) can not be added to the digital frequency block diagram that was sented by Bas van Dijke. Which wires do I have to connect? I also have tried to manipulate the signal from the load cell, but this didn't work either. Can you look at the attached VI?

0 Kudos
Message 5 of 8
(3,496 Views)
Solution
Accepted by topic author T_Mike

Hi Michael,

 

Attached you find the example (in a project).

 

Regards,

Bas

0 Kudos
Message 6 of 8
(3,492 Views)

Hi Bas,

 

Thanks a lot! It's working just fine now. I suppose you're Dutch (your name), so again in Dutch: hartstikke bedankt!

 

Regards,

 

Michael  

0 Kudos
Message 7 of 8
(3,483 Views)

Graag gedaan.

0 Kudos
Message 8 of 8
(3,472 Views)