LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to count peaks??

Solved!
Go to solution

Hello everyone,

I'm a new user of LabVIEW and I'm gonna ask you about a problem that surely many of you will find quite boring.

I'm developing a software for a test machine gestione that uses an alternate bending, by a revolution counter that generates a rectangular analog output signal in volts, from 0V to 8V. As far I have thi signal in a waveform graph.

My aim is to be able to count the number of cycles of the machine and being able to count the voltage peaks and subsequently to be able to work on the machine with regard to the number of turns to make. the ultimate goal is to be able to tell the machine how many turns/cycles to do and the voltage to apply on the load cell.

would you be able to give me some useful advices about it? Especially about counting and memorizing the number of turns.

if necessary I could send a screenshot of the program.

I tried to use a threshold peak detector but I'm still inexperienced, that's why I'm asking for your help.

can anyone help me?

thanks in advance.

 

 

greetings

 

LV  

0 Kudos
Message 1 of 8
(4,918 Views)
Solution
Accepted by topic author lucavilla

Look at peak detection VI and examples (Help->Find Examples).

It should be pretty easy to understand and implement Smiley Wink

0 Kudos
Message 2 of 8
(4,907 Views)

@lucavilla wrote:

Hello everyone,

I'm a new user of LabVIEW and I'm gonna ask you about a problem that surely many of you will find quite boring.

I'm developing a software for a test machine gestione that uses an alternate bending, by a revolution counter that generates a rectangular analog output signal in volts, from 0V to 8V. As far I have thi signal in a waveform graph.

My aim is to be able to count the number of cycles of the machine and being able to count the voltage peaks and subsequently to be able to work on the machine with regard to the number of turns to make. the ultimate goal is to be able to tell the machine how many turns/cycles to do and the voltage to apply on the load cell.

would you be able to give me some useful advices about it? Especially about counting and memorizing the number of turns.

if necessary I could send a screenshot of the program.

I tried to use a threshold peak detector but I'm still inexperienced, that's why I'm asking for your help.

can anyone help me?

thanks in advance.

 

 

greetings

 

LV  


Could you post a snapshot of your data or your data itself so we can help better?




Kudos are the best way to say thanks 🙂
0 Kudos
Message 3 of 8
(4,900 Views)

Thanks for your answers!

those are 2 screenshots.

should I use a Shift Register to memorize the number of turns made?

hope you can solve my problem.

thanks in advance.

greetings

 

LV

Download All
0 Kudos
Message 4 of 8
(4,863 Views)

Hey lucavilla! I think you are getting there 🙂

 

"Memorize the number of turns" could mean different things, please be more specific. Also, I do not see "turns" anywhere in your block diagram.

 

 

Your code does not follow the "best practices" therefore it is a little difficult to understand and tell what is going on.

There are lots of material to look at (see a few links below). I personally prefer to learn from examples (Help->Find Examples) but it is up to you.

 

A few hints:

- Make sure it is readable and well organized

- use error the error wires to create data flow

- Most people like to see bloack diagrams as icons, try that.

 

 

https://forums.ni.com/t5/Example-Code/Error-Handling-Techniques-Using-LabVIEW/ta-p/3518806

 

https://www.ni.com/docs/en-US/bundle/labview/page/block-diagram-objects.html

 

https://forums.ni.com/t5/Developer-Center-Resources/Technical-Guides-LabVIEW-Dev-Center/ta-p/3522946

 

https://forums.ni.com/t5/LabVIEW-Development-Best/2011-Developer-Days-Presentations/ta-p/3506492

 

https://forums.ni.com/t5/User-Group-Resource-Center/Creating-and-Managing-Reusable-Code-in-LabVIEW/t...

 

https://www.ni.com/en/support/documentation/supplemental/22/design-considerations-in-labview-.html

 

https://forums.ni.com/t5/LabVIEW-Development-Best/Tips-and-Tricks-to-Speed-LabVIEW-Performance/ta-p/...

 

https://forums.ni.com/t5/LabVIEW-Development-Best/LabVIEW-UI-Tips-and-Tricks-PartII/ta-p/3507655

 

 

0 Kudos
Message 5 of 8
(4,824 Views)

mjochinsen thanks for your answer!
I'm really new to LabVIEW so it's not easy for me to be clear and understandable. Maybe I was wrong. What I want to do is to count all the rectangular waves output from my inductive counter. It gives me a rectangular waves with a minimum to 0V and maximum to 8.2V. a wave on the graph corresponds to one revolution of the spindle. I would like to count the total number of these waves which corresponds to the total number of revolutions of the mandrel. considered that the spindle rotates at 2800rpm.
I tried with the solution that I send attached. it runs but unfortunately only when the speed of rotation of the spindle is very low. it is possible that with a high rpm the system is not able to count the revolutions of the spindle?
thanks in advance

LV

0 Kudos
Message 6 of 8
(4,801 Views)
0 Kudos
Message 7 of 8
(4,800 Views)

lucavilla, I would like to help you when you encounter a specific problem.

 

But I can't do the work for you 🙂

 

And you have to do your homework first! Meaning...

- clean up/organize your code.

- understand some basic Labview best practices

- learn about Data Acquisition concepts 

 

Your question about counting the revolutions depends on the data acquisition device and sensor on the spindle. Then you have to properly program labview to work with your data acquisition device.

 

Here a link to with some Data acquisition information.

 

https://www.ni.com/en/forms/instrument-fundamentals-complete-guide.html

 

 

0 Kudos
Message 8 of 8
(4,754 Views)