07-16-2010 06:57 AM
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
Solved! Go to Solution.
07-21-2010 12:29 PM
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
07-22-2010 04:16 AM
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
07-22-2010 06:05 AM
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
07-22-2010 07:11 AM
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?
07-22-2010 07:22 AM
Hi Michael,
Attached you find the example (in a project).
Regards,
Bas
07-22-2010 07:40 AM
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
07-22-2010 07:49 AM
Graag gedaan.