LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

suggestions for making a chart recorder?

Solved!
Go to solution

Hi -

 

I need to add a Y-vs-T chart recorder to my app. It needs to represent 200 time points, and 60 values on the Y axis. No zooming, scrolling or anything fancy is needed.

 

Should I just use PlotXY with a shifted buffer every time I want to plot a new point, or is there some slicker way to do this? I don't think the program will have trouble keeping up with the changing data, so I'm mostly concerned with coding efficiency and elegance here.

0 Kudos
Message 1 of 11
(4,019 Views)
Solution
Accepted by topic author mzimmers

The magic word is strip chart...

0 Kudos
Message 2 of 11
(4,021 Views)

I looked at the help entries for strip charts -- that looks like exactly what I need. I don't find a way to create one from the UI building tool, though. Do I just create a regular graph, and then plot to it with the strip chart control functions?

0 Kudos
Message 3 of 11
(4,018 Views)

in the edit / graph menu of the UI editor there are three entries, I'd suggest the second one Smiley Wink

0 Kudos
Message 4 of 11
(4,016 Views)

Excellent. Thanks, Wolfgang. A couple of questions:

 

1. is there no way to change the color of the trace when in VAL_CONTINUOUS scroll mode?

2. I want my plot to be 200 pixels wide. I see how to set the size of the entire graph, but how do I change just the plot area?

 

Thanks...that's a very nice feature.

0 Kudos
Message 5 of 11
(4,003 Views)

1) Did you try ATTR_TRACE_COLOR?

2) The frame width automatically adjusts to axes labels (number of digits...) etc. So the only way (I am aware of) to have a given plot area is to minimize the frame, i.e. no ticks etc.

 

0 Kudos
Message 6 of 11
(3,998 Views)

Have you tried with ATTR_PLOT_AREA_TOP, _LEFT, _HEIGHT, and _WIDTH attributes of SetCtrlAttribute? I have not tried them with strip chart but the online help applies those attributes to that control too. They work well with graphs.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 7 of 11
(3,992 Views)

Ha, Roberto, thank you for reminding me! Smiley Very Happy

0 Kudos
Message 8 of 11
(3,987 Views)

Thanks for the replies, guys. the SetTraceAttribute command didn't seem to work, though it didn't return an error code, either. (I made an assumption that my trace number was 1...it's the only trace on this graph.) 

 

I played with the various size attributes and got the plot area looking better. It takes a little experimenting with the overall graph size vs. the plot size to get things right. But, I think it's reasonable now. I'd greatly appreciate any and all feedback on how this looks overall...

 

plot

0 Kudos
Message 9 of 11
(3,970 Views)

Are you saying that SetTraceAttribute (panel_handle, control_id, 1, ATTR_TRACE_COLOR, VAL_RED); didn't work? It should! It does for me...

 

Message 10 of 11
(3,967 Views)