07-17-2008 09:42 AM
07-17-2008 10:09 AM
How about a PrintCtrl() call, inside an EVENT_RIGHT_CLICK callback trap for the stripchart control?
JR
07-17-2008 11:12 AM
07-17-2008 11:44 AM
07-17-2008 01:49 PM
03-08-2017 10:36 AM
How did your prototype work out? Anything you can share with the forum? I have an interest in something similar too.
03-08-2017 10:44 AM
9 years later... Yes, it worked very well and is use in an in-house test fixture. It was done as described: Save all strip-charted data to an array on the fly. When the operator clicks the print button, blocks of the array are plotted to a different strip chart control, hidden, with all the proper chart control formatting, and then the control is printed. That repeats until all data in the array has been printed. In use, this might produce 10 or 20 pages of strip chart plots.
03-08-2017 10:51 AM
Thanks. The bit I'm not clear on is the data collection. I'm not seeing a strip chart function that pulls data from the strip chart. So I assume that it's up to me to simply retain all the data that I plot to my strip chart for later possible saving.
Now if I'm plotting to mine only a single data point at a time (array size 2), then I need to dynamically grow some master array for plotting to a hidden chart later. How did you avoid buffer overrun? Dynamically resizing?
03-08-2017 04:35 PM
Yes, you have to save the data points on the fly. As you process your data into a data point to send to the strip chart, also send it to an array.
Since the stuff I create is either delivered or has to stand alone and just work for long periods of time, I avoid a number of things in my programming. One of those is dynamic memory allocation. For my hours to days strip charting, I know what the rate is, and create a static array larger than necessary. RAM is cheap in this day and age -- if you create a 1 mega-double array (8 MBytes) or larger, no big deal.
I suppose if you want to do it dynamically, you might malloc the arrays one strip chart screen at a time. Keep track of them with pointers. That way there is not much possibility of running out of memory. Then when somebody clicks print, you access those malloc'd blocks one at a time, send to the hidden control, and print it.