LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add values to array by clicking

Solved!
Go to solution
Try moving the property node and associated logic, along with the O2 boolean into the "mouse down" event case.
Message Edited by a_carollo on 10-10-2008 04:03 PM
0 Kudos
Message 11 of 23
(4,076 Views)
In LabVIEW 7.1 you have to do things a little differently. Yes, that method is not available in 7.1. I'm not sure what you're doing in your VI since I can't see the front panel to see what those buttons are. Normally if you have buttons you respond to the Value Change event and have the button in the event case so the event structure can read the value and update the control. If you post your VI I will be glad to take a look at it. I have 7.1 on a virtual machine.
0 Kudos
Message 12 of 23
(4,074 Views)

I moved the buttons inside their respective events, but to no avail.

I attached my (or shall I say mostly smercurio's) vi if anyone would like to take a look.

Cory K
0 Kudos
Message 13 of 23
(4,070 Views)

Where are the O2 and N2 buttons? Also, what does your datafile look like? I'm trying to wrap my head around your array gymnastics. Smiley Wink

I'm guessing you're trying to peel off one column for X and another column for Y. You can use Index Array to do this directly in one operation instead of using 4 different array functions for each column.

 

Message Edited by smercurio_fc on 10-10-2008 04:23 PM
0 Kudos
Message 14 of 23
(4,057 Views)

My data looks basically like a sine curve.

All the maximum peaks signify O2, and minimums N2.

 

The buttons should be right on the front panel. In the block diagram, they are inside the event structure.

As far as getting the x and y values into arrays.....don't worry about it, I taught myself LabVIEW so my methods are a little unorthodox 😉

I'll use your method next time.

 

I'll attach my updated VI and a sample file so you can run this bad boy.

Cory K
0 Kudos
Message 15 of 23
(4,053 Views)

You know what, I attached the incorrect VI, sorry.

Give me a minute to attach the correct one

Cory K
0 Kudos
Message 16 of 23
(4,041 Views)
OK here is my current VI
Message Edited by Cory K on 10-10-2008 04:58 PM
Cory K
0 Kudos
Message 17 of 23
(4,036 Views)
Ah, so this actually has to do with this question. Have you tried simply using the Peak Detector function to get your peaks and valleys?
0 Kudos
Message 18 of 23
(4,015 Views)

Well I don't want the absolute relative peak (if that makes any sense at all) because the noise makes the peak slightly higher than it should be. This is why I would like to go through and pick out the peak myself.
That is the point of the VI (whenever I finally get it working).

 

I have the VI so each time I click, the value of the cursor will change, however it does not append to the table,

it just replaces the first value over and over. 
Any thoughts as to why that is?

Cory K
0 Kudos
Message 19 of 23
(3,981 Views)
Solution
Accepted by Cory_K

Hi Cory,

 

I have slightly modified your VI, please let me know if this solves your problem.

Regards,
Claire Reid
National Instruments
Message 20 of 23
(3,975 Views)