02-28-2011 12:51 PM
I am trying to take dbl precison array of data values and graph them and scale a 2nd y-scale on the right side of an xy graph that matches the example graph I have. The scale goes from 0-0.1 where the ticks are every .01 thousandth, then once it is past 0.1, the ticks go to every .04 thousandths until it reaches 0.5.
The scale values to be set to, to get the proper spacing of what we want for the customer, is 0-10.
I went into the comparison pallet on LV 2010, put in the "Select" where you have an x, y, and a boolean input with one output, the triangle. On the true side I multiply by 50 to get the values to fall into 0-5 that are less than or equal to .1 for everything above .1, I multiply by 20. All of this inside a for loop.
What I am finding, is that where that transition of .1 (scaled by every .01 thousandth) jumps to be scaled to .14, there is something screwy going on with the curve on the xy graph. Like sharp points in the data, not smooth like in the example graph I have.
After explaining all of that, I want to scale it differently between .1 and .14 Multiply it by a different number.
I was thinking something like 0.1 < x < .14
Is there away to do a range of values like that in Labview?
Any ideas?
02-28-2011 01:00 PM
EDIT:
I should have said .14< x < .1, I think. I want to take any number that falls in that range and scale it different than I have in what I explained in my first post.
02-28-2011 06:11 PM
Post your VI so we can see what you are doing. It would be a lot easier to help you in that case than trying to decode what you are trying to say in words.
03-01-2011 04:36 PM
Hey M Boat,
If I'm correctly interpreting what you're saying, you want to check if your data is within a certain range (between 0.1 and 0.14) and then perform different operations based on whether it is over, under, or within that range.
A relatively simple (and probably the best) way of doing this would be to use nested case structures. A great example of this can be found here: http://decibel.ni.com/content/docs/DOC-3507 (Nesting Case Structures). This example seems to be almost exactly what you want to do, with the first case structure checking whether a number is less than a certain value and the second checks if those numbers that are less than the initial cutoff value are greater than a second cutoff value.
If you are very keen on using the Select Function (mentioned above), it may be possible to complete this task using three Select Functions in series. This could only be an effective method if the operations you are performing on the data are relatively simple. An example of how this might look is shown below.
I hope that helps!
-Matt
03-02-2011 09:14 AM
My boss and I worked it out over the phone. Here is what we came up with: