04-19-2017 11:16 AM
My x axis and y axis are moving all over the place. I would like them to be fixed. I would like the Y axis (force) to start at -100 and go to 100 with 0 being in the middle. For my x axis (linear displacement) I would like that to go from -1.5 to 1.5 with 0 in the middle.
Also, my current graph doesn't actually plot anything. All that happens is that my x and y axis values keep moving all over the place.
How do I plot a certain number over values over a certain amount of time with a fixed x and y axis?
This is an example of how I would like my plot to look;
This is how my plot looks;
This is an example of how my plot looks when the x and y values change;
'
Here is my block diagram;
Any feedback would be highly appreciated.
Thanks
04-19-2017 11:22 AM
To fix your axes' scales, you can disable auto-scaling and set the range. To do this, right click on the graph and select Properties. Go to the Scales tab and uncheck the 'Autoscale' box, and set appropriate Minimum and Maximum values. You'll want to do this for both of your axes (the dropdown box at the top allows you to change which axis you're modifying the properties of).
If you want to do it programmatically, to set specific (but varying) axes (you don't at the moment, but might in the future) then you can use a Property Node. Right clicking on the graph and going to Create > Property Node > X Scale (or Y Scale) > Range will show your options.
04-19-2017 11:36 AM
Thank you cbutcher,
I know have a scaled x and y axis. My graph now shows a white dot moving around in relation to the x and y values.
How do you suggest I go about actually plotting these points? I am so close!
04-19-2017 12:04 PM
Check on your Build XY graph by double clicking it.
I'd bet you have the checkbox checked that clears data on each call. Uncheck it.
Or you could wire a False constant to the Reset input of that Express VI.
04-19-2017 02:58 PM
Hi RavensFan,
I tried what you said but I couldn't get it to work. A resource I reached out to recommended moving the build XY graph and the graph outside the loop but now I am running into an issue where I cant connect the two different types of wires. I tried looking this up but cant seem to find a solid solution. This is what the error looks like.
04-19-2017 03:08 PM
Build XY graph is meant to be inside the loop. It is basically internally concatenating the data to build a history. I don't know what resource told you to move it outside, but don't listen to them.
I don't know why you couldn't get it to work. If you attached your actual VI and not just shown a picture, I could have confirmed what the problem was and the solution before I posted it. I would have been able to see how each of your Express VI's are actually configured. I am still about 90% I gave you the solution. But I can't tell you what is going wrong without seeing the VI.
04-20-2017 09:37 AM
Hi RavensFan,
You were right. My problem lied in the DAQassistant settings. I had to change the samples to continuous.
At the moment I am having trouble selecting the right kind of frequency and the number of samples to take. It seems to be laggy and wont take as many plots as I would like in a second for example.