LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to move one plot upward or downward in a graph?

Dear All,
There are some buttons in my vi. Press it can move one plot upward or downward. I have thought one way, but it use too much memory. I have tried to move the variety of graph out of the event structure, but after that there is no plot display in the graph, I don't know why.
Is there any good way?
Thank you!
 

帖子被hugoliang在08-14-2006 05:55 AM时编辑过了

0 Kudos
Message 1 of 10
(3,838 Views)
Well...

You linked as input an empty 2D array to the graph terminal.

When you clic on the boolean, you add 100 to nothing because there is no data in your graph - place a probe just after the read local variable and see that you have an empty array - so you add 100 to nothing, the result is... nothing !
If there were data in you graph it would work 😉




We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 10
(3,829 Views)

Hi,

Thank you for your reply!

I see I have linked an empty 2D array to the graph. Making this picture is only to make you understand me. In my vi, I have use a non-empty 2D array which is obtained from a DAQ card.

I see the way showed in the picture can do the thing, but there are two varieties of graph in one event case. And I have used 32 such buttons. It will use 64 varieties and use a lot of memory. I mean is there other better way to do the things?

 

Thanks again!

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

Hi,

Thank you for your reply!

I see I have linked an empty 2D array to the graph. Making this vi is to make you understand me. In my vi, I have linked a non-empty 2D array which is obtained from a DAQ card.

And I know the way showed in the picture can do the things, but there are two varieties of the graph in one event case. And I have used 32 such buttons, It will use 64 such varieties, use a lot of memory. I want to know is there any other better way can do the same thing.

 

Thank you again.

0 Kudos
Message 4 of 10
(3,821 Views)

Hi,

Thank you for your reply!

I see I have linked an empty 2D array to the graph. Making this vi is to make you understand me. In my vi, I have linked a non-empty 2D array which is obtained from a DAQ card.

And I know the way showed in the picture can do the things, but there are two varieties of the graph in one event case. And I have used 32 such buttons, It will use 64 such varieties, use a lot of memory. I want to know is there any other better way can do the same thing.

 

Thank you again.

0 Kudos
Message 5 of 10
(3,821 Views)
Ok, then the way I would investigate is not to duplicate the code.

You can for instance have an array of 32 buttons, on value change, compare old value and new value to know the index of the button that was clicked and the use this index to select the correct plot.
You can also have a numeric control called "plot to modify" and only modify the plot you want.

If you want to be able to modify several plots at the same time, you can also have an array of 32 switch boolean (or tick boxes) and then modify the corresponding plots when you click a button "modify".

I think the way of modifying the plot(s) is easy, and now you have to decide to select.

Hope this helps 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 6 of 10
(3,813 Views)
Hi,
I am sorry.
Because of the bad net, I have replied so much times.
I am interested in your first way, but I don't know how to do it. And after making an array of buttons, can I see them?
I have already designed the front panel, there are 32 buttons, I am not willing to change it.
The best way I think is to share the varieties between them, but when I move the variety out of event case, the graph will display nothing. I don't know why.
 
Thank you for your reply.
0 Kudos
Message 7 of 10
(3,806 Views)
Ok, here is a small example.

Hope this helps you 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 8 of 10
(3,800 Views)

I agree with Titou that 32 buttons don't make a great UI. Suddenly one would need a pilots license to operate it ;). Please consider changing your interface. A good programmer should always be willing to change features if they improve the design and usablility.

I would definitely also suggest to select the active plot with a control and only have one up button. In any case, here are two simple examples in LabVIEW 7.0. The first uses an index selector and the second an array of booleans.

Maybe these can give you some ideas. Modify as needed.

Download All
Message 9 of 10
(3,783 Views)

TiTou, Altenbach,Thank you for your reply!

Good wishes!

 

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