Jump to content

Graphing Point-by-Point


Recommended Posts

Hi, I basically want to create a model of a 3D surface, with a 2D graph. I have the xy placement and I represent the height of any given point by its colour (maybe white is the lowest point, gradually going up to red, the highest point on the actual surface).

So I want the graph to look like a bunch of points (a probe is going to pass along the surface and take these height measurements), where a bump on the surface would be indicated by the points gradually changing colour and gradually changing back as the probe moves off the bump.

I've looked at all the packaged graphing examples included with LabVIEW and nothing seems close enough to help.

Any other suggestions as to a BETTER way of representing this data are very welcome as well.

I am at the stage where I can put the points wherever I want, but I have no clue how to change the colour.

Thanks to all in advance,

Adam

EDIT: I am very new to LabVIEW, just to clarify.

EDIT AGAIN: I'm looking into intensity graphs now...maybe I should have looked at them harder before, sorry guys.

Link to comment

Alright, now I have a slightly new problem. I have an intensity graph, and I want to dynamically change the "Amplitude" or "Z Axis" or "Height" scaling. To be more clear, I want to be able to ignore all data points above a certain height for example (which I can figure out on my own) according to say a slider, and as the slider moves it also adjusts the intensity graph's "Amplitude" scaling so that the remaining data points appear in good contrast with each other.

This was my idea for how to "zoom in" and isolate the areas that don't have as large bumps...any better way of doing this, and if not, how would you guys approach this?

Thanks,

Adam

Link to comment
Alright, now I have a slightly new problem. I have an intensity graph, and I want to dynamically change the "Amplitude" or "Z Axis" or "Height" scaling. To be more clear, I want to be able to ignore all data points above a certain height for example (which I can figure out on my own) according to say a slider, and as the slider moves it also adjusts the intensity graph's "Amplitude" scaling so that the remaining data points appear in good contrast with each other.

This was my idea for how to "zoom in" and isolate the areas that don't have as large bumps...any better way of doing this, and if not, how would you guys approach this?

Thanks,

Adam

Create a Property Node by right-clicking your Intensity Graph on the block diagram. Select Z Scale -> Range -> Maximum. (You can enlarge the Node to two lines and add Minimum as the next property too, if you want.)

What this does is color all points at or above your Maximum as white. I figure and hope that's what you wanted.

Link to comment
Create a Property Node by right-clicking your Intensity Graph on the block diagram. Select Z Scale -> Range -> Maximum. (You can enlarge the Node to two lines and add Minimum as the next property too, if you want.)

What this does is color all points at or above your Maximum as white. I figure and hope that's what you wanted.

Thanks, this works - I thought it wasn't possible at first but all I had to do was right click and change the property node to a Write one. I feel smart. Thanks again for the help.

Link to comment

OK another question, this one is probably also really easy to answer, but for some reason I can't figure it out.

In the picture below you can see that i'm getting data from the serial port and building an array with said data. I want to do other things with this array (I have another case structure connected to a different button, that I want to write this array to an Excel file with). But since the array "exists" within the True case of the structure below, as soon as the button goes off again we're in the False case where i'm forced to wire an empty array, which the rest of the program effectively sees all the time.

How do I fix this? Thanks.

post-5323-1150814125.jpg?width=400

EDIT: Creating a Local Variable in the False case linked to the array in the True case and wiring it to the output, works. Is there a better/more widely accepted practice?

Link to comment
OK another question, this one is probably also really easy to answer, but for some reason I can't figure it out.

In the picture below you can see that i'm getting data from the serial port and building an array with said data. I want to do other things with this array (I have another case structure connected to a different button, that I want to write this array to an Excel file with). But since the array "exists" within the True case of the structure below, as soon as the button goes off again we're in the False case where i'm forced to wire an empty array, which the rest of the program effectively sees all the time.

How do I fix this? Thanks.

post-5323-1150814125.jpg?width=400

EDIT: Creating a Local Variable in the False case linked to the array in the True case and wiring it to the output, works. Is there a better/more widely accepted practice?

Avoid using Local variables with arrays. Every local variable forms a copy of the data, and large arrays means lots of copies, and lots of calls to the Memory manager which can slow things down.

You can also get race conditions if you have locals littered all over the code with multiple reads and writes occuring in different loops.

Use a shift register that is intialized to an empty array to carry your data from the true case through the false case.

Neville.

Link to comment
Avoid using Local variables with arrays. Every local variable forms a copy of the data, and large arrays means lots of copies, and lots of calls to the Memory manager which can slow things down.

You can also get race conditions if you have locals littered all over the code with multiple reads and writes occuring in different loops.

Use a shift register that is intialized to an empty array to carry your data from the true case through the false case.

Neville.

Got that working, it's a much better way of doing it, thanks very much! (why didn't I think of this myself :unsure: )

Adam

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.