LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

adding a scroll bar to a strip chart???

Hi,
 
Is there any way at all to add a horizontal scroll bar to a strip chart?
Or is there any other way to "scroll" or "view" the data in a strip chart?
 
Thanks in advance
Ruan
0 Kudos
Message 1 of 6
(4,600 Views)
Hi,

you can set the ATTR_HISTORY_BUFFER of a stripchart and then if you set
ATTR_STRIP_CHART_PAUSED a horizontal scroll bar appears.
So, what i do is first init the strip chart:

SetCtrlAttribute (stripchartPanel, POWER_STRIPCHART,
ATTR_HISTORY_BUFFER_SIZE, 86400);

and on the stripchart panel i create a checkbox. If it is marked i set:

SetCtrlAttribute (stripchartPanel, POWER_STRIPCHART,
ATTR_STRIP_CHART_PAUSED, 1);

the scroll bar appears and you can view history data. Remove the check mark
and set:

SetCtrlAttribute (stripchartPanel, POWER_STRIPCHART,
ATTR_STRIP_CHART_PAUSED, 0);

to get actual data plot.

Greetings from Bremerhaven, Germany
Norbert Rieper


"Ruan B" <x@no.email> schrieb im Newsbeitrag
news:1208349614652-690470@exchange.ni.com...
> Hi,
> &nbsp;
> Is there any way at all to add a horizontal scroll bar to a strip chart?
> Or is there any other way to "scroll" or "view" the data in a strip chart?
> &nbsp;
> Thanks in advance
> Ruan


0 Kudos
Message 2 of 6
(4,586 Views)

Thanks for the reply,

but im not quite following with the ATTR_HISTORY_BUFFER, is there an library that i should add to my project?
Is it possible for you to post an example of this or give me a link to a site or page where i can download an example?

Thanks in advance
Ruan

0 Kudos
Message 3 of 6
(4,566 Views)
Hi,

insert

#include <userint.h>

at the beginning of your code.

Search in the HELP for ATTR_HISTORY_BUFFER_SIZE

Description: The size of the history buffer for the strip chart. This
value determines how much previously plotted data is available when you
enable ATTR_STRIP_CHART_PAUSED. Pass a value that is at least as large as
ATTR_POINTS_PER_SCREEN.

ATTR_STRIP_CHART_PAUSED

Description: Enable this attribute to pause plotting on the strip
chart. When you pause plotting, LabWindows/CVI displays a scroll bar on the
strip chart, which allows the user to view previously plotted data. Specify
how many points are available to view with the ATTR_HISTORY_BUFFER_SIZE.
Only valid when the scroll mode is set to continuous.




Norbert




"Ruan B" <x@no.email> schrieb im Newsbeitrag
news:1208416213847-691043@exchange.ni.com...
> Thanks for the reply,
> but im not quite following with the ATTR_HISTORY_BUFFER, is there an
> library that i should add to my project? Is it possible&nbsp;for
> you&nbsp;to post an example of this or give me a link to a site or page
> where i can download an example?
> Thanks in advanceRuan


0 Kudos
Message 4 of 6
(4,543 Views)
These attributes were added to the stripchart in CVI 8.5. They are not available if you are using an older version.

Mert A.
National Instruments
0 Kudos
Message 5 of 6
(4,539 Views)
Hi,
 
Thanks for the replies!
I have came up with an other solution by using the idea of a buffer and had to add a scrollbar, this is working fine since i can't really upgrade LabWindows at the momentSmiley Sad
 
Thanks again
Ruan
0 Kudos
Message 6 of 6
(4,510 Views)