08-15-2011 08:03 PM
I have an X 1D array and a Y 1D array for the XY Graph.
I want to move the graph along the x-axis. I want it to act as if I am grabbing the plotted values and moving them.
The easiest way I thought would be to add a slider value to each of the X 1D array elements. The value keeps adding when I move the slider is positive and subtracting when the slider is negative. I want the graph to move left or right as the slider moves.
Any ideas?
Thanks!
Solved! Go to Solution.
08-15-2011 08:29 PM
Here is an example I cooked up.
08-17-2011 02:40 PM
Greetings ADrexelDragon.
You were definitely on the right track with your example. While this isn't something that my group normally does, I was fascinated by the problem and did a little work with your code. My modifications to your example are far from perfect / clean but I think it may be closer to the exact behavior you are in search for. Below is a summary of some of the modifications I made.
The last two bullet points handle the fact that when moving the slider quickly, the value changed event is not triggered quickly enough to truly update the data for the plots in "real time".
I hope these modifications help. Let me know if you have any questions.
(Saved in LabVIEW 2010 SP1)
08-17-2011 02:54 PM
Hey Michael G.
Thanks for the response and example! It has displayed what I am trying to. That being said, I am now trying to have the plots stay in their "slid" position; therefore, I can align more than one at a time. With your example the plots are reverted to the origional on the movement of a different slider. I will use your code and work from there.
Thank you,
Nick
08-17-2011 04:19 PM
I stand corrected. The vi is now working fine. Thank you for your help.
08-17-2011 06:31 PM - edited 08-17-2011 06:34 PM
Michael G.
For some reason the vi has gone back to reverting to the origional plots when I switch sliders. Do you know why this happens? I can't seem to find where it does that. It only happens the first time the vi is loaded. I click the stop button and re-run it and it works fine. The issue only occurs when the vi is run the first time.
Thanks,
Nick
08-22-2011 04:04 PM
Michael,
Here is what I found works. It is a lot simpler than what you suggested but there may be some errors that could arise due to immproper programming. I am not sure.