09-25-2008 08:25 AM
I am going to label my issues for ease (even though they are all inter-related), so that if you choose to only answer one part, just place the number next to your response. Thanks!
(1) I am uploading the newest version of program. I still have the property nodes of X-min, and X-max inside the loop, but they are attached to controls which allows the user to adjust them as they see fit. I placed the history property node outside the while loop, but I'm not sure if I hooked it up properly, because I would like the graph to not delete points as it keeps running (ie- I want the user to be able to zoom in and out of the waveforms on the screen and still be able to look back more than 1000 points ago). If I understand correctly the history node should be able to help the graph continue to run the the data and display beyond the 1000 points, is this correct?
(2) I am still having an issue with the program taking data beyond a certain point. The program will take the data from a short while, and then it keeps displaying the same thing over and over again. I am not sure how to fix this. (Am I not explaining this problem well enough?)
(3)Also, if you look to the right side of the graph on my front panel, I have placed a reset button which ends the "session," but starts a new one. It makes the file you were saving end, and prompts you to begin saving a new file, or you can hit cancel if you wish to run the program without saving. When this button is pressed, I would like the graph to clear, so that all the user sees is the data that has been taken since the new "session" has begun. (this may already be the case, but because of my 2nd issue, the graph appears to only be displaying the limited amount of data over and over again. by solving issue 2 this problem may not even be an issue.)
Thanks again!
🙂
09-25-2008 08:26 AM
I forgot to post my updated code...
so here it is!
09-25-2008 09:01 AM
09-25-2008 09:31 AM
09-25-2008 12:17 PM
The reason I am not placing the min and max values outside the loop, is because when I do I can't change the values, I want to be able to control the window size by just typing in a number. When its on the outside, you can only control the starting values for the frame size. I see how on your program you have control over the window frame size, yet it is constantly increasing, while I do want that. I also want the data to be scrolling across the screen (like on a real oscilloscope).
So far the only way that I can get the data to actually fill the screen is by increasing the buffer size, sample size, and samples to read to astronomical levels that it causes the program to run very slowly. Do you understand what I am explaining?
09-25-2008 12:30 PM
You either place the property node outside the window or you place it inside an event structure like my example. Placing it inside a case statement would work as well. For the last time, YOU CANNOT WRITE TO IT EVERY ITERATION.
My example does NOT have an ever increasing size. It is fixed and equal to whatever duration is set. Old data scrolls off to the left and new data is appended on the right. That is how a chart works.
09-25-2008 02:35 PM
I do understand what you are telling me as far writing for every single iteration, but I have tried placing case structures around it, and the program no longer runs at all. I just get a blank display on the graph. Yes, the scale on the X axis looks pretty (ex- from 0 to 10), but there is nothing being displayed.
09-25-2008 02:50 PM
How dennis wrote his program, the xscale will be set once, and it will stay like that for the rest of the run.
- If that is OK for you, use that.
- If you wanted the scale to grow as you collected more data,
you would have to put the property write function inside an event structure, that was inside the while loop
For example, everytime the time is a multiple of 10 seconds (ie 10, 20, 30, etc) write to the property node again to update your scale.
Or something like that, I am just giving you ideas.
However, Dennis is correct. You can not just put the property node inside the while loop by itself, it cannot write to the node every iteration.