04-26-2018 09:05 AM
Hi all,
I am trying to plot power level in function of location. I have some cursors in the graphes for better understanding. The thing is that cursors keep flashing. It could be acceptable in 80s not in 2018 :smileywink.
Also, I tried to plot the same thing but point by point, and it looks like the graph is not remembering previous reading (as in graph 1). which results in absence of graph
see attached VI
Any help is appreciated
by the way, part of the vi generates data continuously and saves them in a file, the other part reads the updating data and plots them. you will understand when you see
Solved! Go to Solution.
04-27-2018 04:50 AM
Hi Abo,
It could be acceptable in 80s not in 2018
Well, in the 80s you could maybe create code set to ran as fast as it could.
In 2018 you should handle UI updates in a better way! 😉
Why is there no delay in your loop?
Why do you need to refresh the graph as fast as the computer allows?
On your VIs:
- Why are labels of terminals hidden in the block diagram?
- Why do you create race conditions instead of using more wire?
04-27-2018 05:52 AM
Hi Gerw,
Many thanks for you response.
The thing is that the file I am reading is updated every 1 ms. I put a delay of 1 ms in the while loop, that did not solve the problem. Increase the delay, which is inconvenient for my purpose, decreases the frequency of flashing and does not end flashing at all. It flashes even worse in my general VI. May it is because it read all the data at once.
The ideal solution for me is to plot the signals point by point (just like waveform graph does) as I tried to do for the graph1 but it is not plotting correctly . And I don't know if there is a way to make XY graph behaves like waveform graphs.
Also,ploting all existed data at once as i did in graph 2 is not cool, because I have to show all the location range (x axis) in the graph. It would be nice to show a smaller range of location in the graph and makes it scrolls with the scrolling of the signals like in waveform graphs. Should you have any idea how to do that, please tell me or makes your modification for the vi.
thanks again
04-27-2018 07:19 AM
Hi Abo,
Increase the delay, which is inconvenient for my purpose
It doesn't make sense to update a graph at 1kHz when the display (typically) only updates at ~20Hz. Additionally the human eye can recognize data at about ~10Hz…
All you do is (unneeded) data shuffling!
The thing is that the file I am reading is updated every 1 ms.
Do you really think you will read the whole file again at 1kHz update rate?
Why do you even need to read the full file? Why do you even need a file for data transfer at all?
The ideal solution for me is to plot the signals point by point (just like waveform graph does)
XY graph behaves the same as the waveform graph.
Maybe you want a "XY chart"?
It would be nice to show a smaller range of location in the graph and makes it scrolls with the scrolling of the signals like in waveform graphs.
You can show a smaller range: either set the x axis as needed or do some data analysis before plotting on the graph.
Graphs don't scroll, only charts have this scrolling built in!
04-27-2018 09:18 AM
Hi GerdW
Maybe you want a "XY chart"?
I suppose it is the right thing to plot point by point but I didn't know that there are XY charts. Where to find it?
You can show a smaller range: either set the x axis as needed or do some data analysis before plotting on the graph.
Can you be more kind to show me how to do it for the XY chart?
Thanks a lot