LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up a cycle counter for a fatigue tester that is run by Labview

I have a Labview VI that was built by someone else to run our fatigue testers. The program generates several independant sine waves that are used as signals to drive several pnuematic cylinders. I would like to put a counter into the program to count the number of cycles of the tester, but I don't want to have to put a physical counter onto the machine, I would like to keep the counter fully within the program. I have tried to tap into the signal and count the number of times that the peak on the sine wave passes, but I have not been able to make it work. If anyone has any information on how I could accomplish this please let me know. Attached is a copy of the VI, I would like to put the counter into "Machine A, Right cylinder". The lower portion of the VI is set up to read strain gages, which doesn't have to do with what I am asking.
0 Kudos
Message 1 of 3
(3,509 Views)
David,

One way is to detect the positive going zero crossings and count those. See the attached example in which I extracted your sine generator and added the counter. Note that it adds a cycle as soon as the zero crossing is detected (beginning of cycle), not when the cycle is completed. You can modify it to meet your needs. Depending on initial phase it may also add a count at the half cycle point.

Also, many experienced LV programmers try to keep their diagrams to one screen size. It makes it much easier to see what is going on in the VI.

Lynn
0 Kudos
Message 2 of 3
(3,500 Views)
Thank you for the comments...but it doesn't work. I need it to count. Every time that the sine wave max passes or as it goes through a point or whatever, it should increment the counter, and I can't get it to work. The one that you attached doesn't count either. Maybe it just doesn't count when I put it on my computer, I don't know. Any ideas? 
0 Kudos
Message 3 of 3
(3,483 Views)