LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding cursor from front pannel

Hi 

My problem is in building UI. I want to analyse my spectra and calculate area under the peak. For a single peak this was easy. I was able to make a small program, but the problem is, I need to calculate almost 8-10 peak per files and files. But the number of peak nor the position of peak is constant, in the file aEg.txt , I wanted to analyse only one peak but in another file I need 3 peak data. Is there any way to put some control on front panel which will create cursor in my spectrum plot, so that depending on my need I will add cursor to spectra for peak area calculation.

Arnab

Download All
0 Kudos
Message 1 of 6
(2,942 Views)
No. You cannot create cursors on the fly.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(2,933 Views)

couldn't you do somethink like this using the XY-Graph's property nodes:

2015-03-25_cursor-on-the-fly.png

0 Kudos
Message 3 of 6
(2,904 Views)
To tell the truth I hanen't tried this in a couple versions, but I believe that you will get an error if you write more cursors thxn what already exist.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 6
(2,899 Views)

No, I'm pretty sure the CursorList property is the way to go here. It works as suggested at least as far back as LabVIEW 2011.

 

EDIT: you WILL get an error if you try to set "ActiveCursor" to an index higher than the number of existing cursors.

 

So you could configure the number of cursors manually as shown, and set the XY coordinates for each cursor from your peak-detection VI.

Message 5 of 6
(2,873 Views)
Excellent! It has been a while since I last tried it.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 6
(2,865 Views)