LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

counting simulated wave pulses

Solved!
Go to solution

Hello,

I am trying to count the wave edges, or just if a square wave goes from 0 to 1. However, I do NOT want to use the built in counter for the DAQ. I want this to be purely software counting without using the DAQ. When I try to detect the edges with a subVI i am using, it will work until the frequency goes high enough and it will not detect the edges. Im not sure how to count the edges from there. I tried using a case function and having the true part increment when it was 1, however it would continously as long as the signal was high.

 

Thank you

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

Hi Desick,

 

I tried using a case function and having the true part increment when it was 1, however it would continously as long as the signal was high.

When you want to count edges of a digital signal you should detect them first. There is a function called "Point by point boolean crossing", it will help you a lot for this matter!

 

When I try to detect the edges with a subVI i am using, it will work until the frequency goes high enough and it will not detect the edges

Are you in any case violating rules of Shannon-Nyquist?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(3,036 Views)

Not helpful in the slightest. I did detect the edges. didn't work.

 

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

If you are having problems with your code, it really helps to attach the code (attach something that we can open in LabVIEW, like an actual VI, a Zip file containing one or more VIs, or a Snippet).  This has several benefits to you -- it helps identify people who really have questions (other than "Can you please do my homework for me?"), it helps us identify key concepts you might be missing and explain them to you so that you can figure it out (which helps you learn and remember it), and saves a lot of time as we don't have to "guess" what you are doing and can suggest things that might actually work in your context (so you don't have to keep coming back and saying "No, that didn't work ...").

 

Bob Schor

Message 4 of 8
(3,023 Views)
Solution
Accepted by topic author Desick

I figured it out without your help. Thanks for nothing!

Have a great day!

0 Kudos
Message 5 of 8
(3,019 Views)

Hi Desick,

 

it seems to me you don't know how such a forum works: someone asks a question and provides as much information as possible to allow other people to answer the question or provide help. When a solution is found this solution is shared so others having the same question might get an idea how to solve their own problems…

 

You instead ask a question without providing a lot of information, that's why I commented and asked for more work on your side.

You marked a message as "solution" which contains no details on this solution at all…

 

Having said this: Have a great day too…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(2,969 Views)

Im well aware of how a forum works. I asked a question. Then you came in and didn't even try to help, but rather accused me of just trying to finish a homework assignment. Rather rude.

 

 

0 Kudos
Message 7 of 8
(2,955 Views)

Hi Desick,

 

didn't even try to help

On your specific problem of counting rising edges in a digital signal I named a specific LabVIEW function you can use very well for that matter. When you don't even count this as help…

 

but rather accused me of just trying to finish a homework assignment.

Where did I do this?

 

Rather rude.

What's rude in forwarding you to a specific LabVIEW function very useful for your task?

What's rude in interpreting your 2nd sentence as violation of the Nyquist criteria? (Because YOU didn't include enough information I only could interpret/guess…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(2,950 Views)