LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an array of data only upon demand

Hi everyone,
My program displays smith charts and the value of the impedance when you scroll over the chart. What I would like to do is build an array of data when you click on a specific point. So basically, when the mouse button is pressed, the value of the point is inserted into an array. One problem I also thought about is that I should wait for the mouse button to be released before the data is inserted into the array or else the array will continuously grow if you keep the button pressed. I hope I am clear as to what my problem is and I hope someone could help me out.

Thanks
0 Kudos
Message 1 of 7
(3,075 Views)
you can use an event structure and trap the mouse events on your smith chart(s) to decide when to add the data points to your array.. if you need an example i can wire something up for you...

Dan
0 Kudos
Message 2 of 7
(3,072 Views)


@dan bookwalter wrote:
you can use an event structure and trap the mouse events on your smith chart(s) to decide when to add the data points to your array.. if you need an example i can wire something up for you...

Dan





Hi dan,
thanks for the help... I'm not very familiar with event structures and all my attemps to use these have been without succes. If you can give me an example I would greatly appreciate it.

Thanks
0 Kudos
Message 3 of 7
(3,065 Views)
here is a basic example using the event structure and a mouse down event on an indicator....
0 Kudos
Message 4 of 7
(3,050 Views)
hmmm... I currently only have the 7.0 evaluation version and cannot read your example... is there a way to go aroung this???
0 Kudos
Message 5 of 7
(3,048 Views)
Hi Naho,

Here is the example down-converted for LabVIEW 7.0.

Hope this helps,
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 6 of 7
(3,022 Views)
thank you very much for the help
I finally was able to do what I wanted but by using case structures... nonetheless, the example helped me alot to understand event structures!
thanks again
0 Kudos
Message 7 of 7
(3,014 Views)