LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filling in an XYZ graph on the fly

I have an XY table I control with LabView 2011.  I use a graph's cursors to control the position of the table.  To scan, I have an array of generated XY values. 

 

I have X,Y and a sensor reading (RND in the example) and would like to plot it REAL TIME - as the cursor on the "control" graph moves thru the scan, dots/boxes/etc appear in the plot in real time.  I have tried several things, but with the scanning (repeated Y plane movements) makes thing hard.

 

In the example attached I was trying to update an intensity graph, but sometimes the size of the iGraph (I have to think in terms of # "cells") doesn't match the # XY values in the XY array, throwing things off.  The "sweeping pattern" of the scan "breaks" all other types I have tried 😞

 

I can't find a basic XY graph that I can pre-configure (make the scales match, etc.) based ob the generated array of XY values (I already know the # points I will take and all the XY values!) and just write to it using "replace array" to make a dot appear ( I ssume I can change the color based on input range). Am I missing some basic graph fundamentals?? 😛

 

 

 

Thanks!

Steve

 

 

0 Kudos
Message 1 of 4
(2,708 Views)

Please re-attach your VI having a useful default value for "resolution" as well as for they XY ramp (make current value default before saving).

 

(You also have way too much garbage code: The sequence structure has no purpose. Replace "set matrix elements" with "replace array subset". No need to deal with matrices. Index array is resizeable, so you only need one instance. You probably want to autoindex on the xy ramp. Also mind your datatypes. You are e.g. converting a DBL to U64, displaying it in a I64 indicator, and wire ot to a FOR loop that expects I32. Way too many coercions!)

0 Kudos
Message 2 of 4
(2,700 Views)

Hopefully I got the defaults set!  I know the code is very convuluted, but I am learning the basics as I take the CORE classes. After many years of coding in C/C++ for embedded devices and using VB6 to build user interfaces I am trying to relate how I did things before to labVIEW 🙂

 

 I used the Matrix for a couple reasons:

1 - Couldn't "see" inside the Intensity graph to examine what the all the values were - the matrix lets me see the XY and Z vaules as they are updated.

2 - Using "Replace Array Subset" only let me do X OR Y, not both - according to help it looks like that functions on a row or column, not an individual XY "cell" (?). I could loop through say filling the Y values, but couldn't figure out how to increment X and start over 😛

 

It does work, but I cannot find a way to use the array functions to replace one value @ X,Y in the intensity chart - is there way to do this without using the matrix?

 

Thanks!

Steve

0 Kudos
Message 3 of 4
(2,676 Views)

Well, all you need to do is translate the values back to index positions. Here's a slightly cleaned-up version.

 

(Also, your scale ranges and resolution setting did not correspond to the values in the array data. I fixed that too. See if this gives you some ideas.)

Message 4 of 4
(2,662 Views)