LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving acquired data in a new channel or sheet (TDMS) automatically after trigger cycle

This code should help you get just the peak portion of the waveform (which is apparently the only part you care about.

EDIT: if you do use this snippet, I just realized I wired the waveform straight through in the FALSE case.  It should be an empty waveform constant wired up to the output tunnel.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 11 of 16
(1,492 Views)

Hey Guys,

 

I don't really understand why we have to change the code that much? Logging only the data I'm interested in is already working, or am I doing it wrong?

 

Palanivel is your suggestion for automatically changing the group name not nearly the same as the one from crossrulz before? I think that will lead to the same problem. The name will be change every time a true value comes in, which happens with every value that is higher then the limit and not just once when the signal passes the limit.

0 Kudos
Message 12 of 16
(1,484 Views)

You are absloutely right, i have did slight modification in the code which crossruls suggested. Based on Crossruls earlier code the Name will be incremeneted for every true value. but in the later post i suggested in such a way that the name will be incremented only when the sine wave reacjh its peak which is your requirement.

Later Crossruls posted a code to find the peak. Just Try to Combine the Logics by which you can also explore much and the solution also will be arrived.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 13 of 16
(1,480 Views)

Okay know I understand it, thank you.

 

The problem is that I am just using the sine wave to test my VI. The real signal comes from a cutting process and will not have a defined peak. I just want to acquire all data points from the signal that are above a defined limit. I have not imagined that this will make a difference. I am very sorry for not writing this before :(.

Maybe this sketch will make the task more clear.

 

Picture1.png

0 Kudos
Message 14 of 16
(1,476 Views)

@ZMK16 wrote:

I just want to acquire all data points from the signal that are above a defined limit.


What my last piece of code that I posted does.  I was just to get the portion of the waveform that was above your limits.  So then you just log those.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 16
(1,454 Views)
Hi ZMK16
You just need to put some extra effort to make this work done by yourself.

If you want the answer right back , more people are here who can complete the task, but only if you try and find you will be satisfied by self and even make you feel comfortable for next time.

Just check with crossruls logic for taking peak and also the logic I shared to generate Group name.

In Boolean pallets you will find a function called implies just try to explore what it does and based on that provide the Boolean input for the logic I shared.

Just take a paper pencil and make a pseudo code on how it has to work based on all the above comments.
----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 16 of 16
(1,448 Views)