LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Graph

i want to input a number from a numeric control. So that when I type in a number for the phase shift (y) from the smooth graph the coressponding grey level (x) wll show in a numeric indicator. How do I implement it?

0 Kudos
Message 1 of 10
(3,547 Views)

hi,

 

Firstly, I cannot run this code as it requires a text file. How does the phase shift corresponds to the grey level? I saw there is a for loop which runs 12 iterations but the output is not used. Maybe you need to attach the text file and explain what you will like to do  with the text file.

 

 

0 Kudos
Message 2 of 10
(3,453 Views)

I've attached the text file and i've attached another file to show what i actually wanted to do.

 

Thanks

Download All
0 Kudos
Message 3 of 10
(3,437 Views)

Hi enriquez,

 

show the cursor legend for the "smooth graph". Create a cursor attached to plot 0.

Move the cursor and you will see both X and Y value in the legend: gray level vs. "Amplitude":

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(3,418 Views)

hi,

 

You can use GerdW's method of using cursor which is very straightforward. I have another method which is to use the threshold 1D array vi. Using your vi as an example, this is how the code looks like.  Look at the attachment.

0 Kudos
Message 5 of 10
(3,372 Views)

Hi Rando,

 

I didn't mention 1DThresholdArray because there's a drawback: it only works correctly with sorted arrays!

The data provided by the OP isn't sorted so you will get wrong results sooner or later...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(3,354 Views)

hi GerdW,

 

You are right. I checked the threshold function again and certain areas do not work properly for enriquez case. If the phase shift is below 0, the threshold1d array does not function properly. Well, I learned something new about threshold1d array today. Thanks

 

 

Rando

0 Kudos
Message 7 of 10
(3,331 Views)

Hi,

 

I wanted to swap the phase shift value to grey level value. Right now if i enter the grey level it will give me the phase shift value, so is there any way that when i enter phase shift value it will give me a grey level value?

 

I need it urgently, THANKS A LOT!:)

0 Kudos
Message 8 of 10
(3,304 Views)

Hi enriquez,

 

swap X and Y values and you're done...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(3,300 Views)

Thanks:)

0 Kudos
Message 10 of 10
(3,293 Views)