LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart History Length

Hello!

We have a chart and want to be able to control the "Chart History Length" via a numeric control. We need to use the chart, we can not use the graph in our case.

We do not want to change it during run-time, but one should be able to change this before one writes the values in the chart.

Is there any settings one can do in the property node for the chart or is there something else we can do to obtain this?
Thank you and best regards.
0 Kudos
Message 1 of 6
(3,360 Views)


@Ex-jobb wrote:
Hello!

We have a chart and want to be able to control the "Chart History Length" via a numeric control. We need to use the chart, we can not use the graph in our case.

We do not want to change it during run-time, but one should be able to change this before one writes the values in the chart.

Is there any settings one can do in the property node for the chart or is there something else we can do to obtain this?
Thank you and best regards.




Salutations,
Interesting question, I'm not sure I follow it exactly, but lets give it a whirl anyways.

You have something along the lines of....

0 1 2
3 4 5
6 7 8
9 0 0

And, you just want to take a certain amount of this chart and write it to a file? Like [3, 4, 5; 6, 7, 8]
I trust, you're going to view this chart prior to writing it, so why not just do something along the lines of an Array subset?
Just make a control so that when the user inputs values it'll the information you desire.

So you wire in your 2-D array (or however many dimensions) and row index 1, with a length of 2. That should give you the [3,4,5;6,7,8] setup.

You can put this inside a while loop with an event structure and button that links to the front panel, so when they press the button it'll take the information they desire and write it to a file.

I hope this helps you out, Sorry if I misunderstood your question. If I did, please try to reword it for me, and I'll see if I can give it another whirl.

Sincerely,
ElSmitho
0 Kudos
Message 2 of 6
(3,344 Views)
Just on a small additional note, I forgot to mention that Array Subset allows an index and length for every dimension.
So you can get rather picky and choosey about the data you're interested in.

Also, consider using the Search 1-D array to get the necessary indices you desire.
Chop up your matrix to make it one D, remember certain indices, all that jazz.

Sorry about the failure to completely specify.

ElSmitho
0 Kudos
Message 3 of 6
(3,341 Views)
Hi

I'm not sure, but I think you can't set the Chart History Length as you would like to.

If you are developing the vi, you can set it by right-clicking the control and select Chart History Length in the context menu.

My explanation for why you can not change this value is the following:

If you start the vi, memory is allocated for the chart data, which means there is some memory available for the data of the chart-control.
If you write a property node, the vi is in run mode. This means that there should be a memory re-allocation for the chart-control. It may be possible that this could cause problems, which is why there is no property to set the History Length.

But maybe someone else knows better...

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 4 of 6
(3,334 Views)
Hello 'Ex-jobb'!

Thomas answered your question but you might want to have some more information regarding this, or even better a workaround.

Please read through this KB that has an example program, even though I have a feeling this is not what you want to achieve:

http://digital.ni.com/public.nsf/websearch/E9784F413A2269E086256F3A0064C8BB?OpenDocument

Also you can use XY-graph and programmatically set how many elements it should contain, in other words mimic the behavior of a chart. See the example program you can find in this discussion thread:

http://forums.ni.com/ni/board/message?board.id=170&message.id=38092&requireLogin=False

Regards,
Jimmie A.
Applications Engineer, National Instruments
Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 5 of 6
(3,309 Views)
You can use a cicular graph if the data to be displayed in not very large and does not require very fast update rate.

You can also use the the picture plots under the "Graph & Sound" pallette.

-Joe
0 Kudos
Message 6 of 6
(3,304 Views)