From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-01-2018 08:39 AM - edited 06-01-2018 08:40 AM
Hey,
I'm new to labview and am currently working on making an interface for a scanner. This scanner will at every xy coordinate, obtain a z values and I would like to put these three values into an intensity graph. I have successfully done this up to 101x101 values but at big scanned areas like 201x201 values, the intensity graph will show suddenly show a blank graph halfway thorugh the scan.
For my setup, I used an initialized array where I placed a 2D array and connect it to a replace array subset in a for loop. I connected the XY coordinates into the indexes and connected the z values into the new element / subset. I then connect the output array into the intensity graph.
Can anyone help me with this? Is this a problem due to insufficient memory?
06-01-2018 08:59 AM - edited 06-01-2018 09:02 AM
No, you must be doing something wrong, but it is hard to tell without seeing code.
(An intensity graph is never "blank". What if you also place a 2D array indicator (with scrollbars) next to it to see how the data actually looks like? Do you autoscale the Z axis? Maybe there is a point that is way off scale, drowning out all other points? What is the datatype of the graph? What does the z data represent (U8 greysscale? U32 RGB? DBL?)
When the graph turns "blank", can you stop the VI, right-click the graph and "data operations...make current value default", save the VI under a new name, and attach it here?
06-01-2018 09:43 AM
Thank you for your reply
An intensity graph is never "blank".
I thought of that to be impossible also until I saw it with my very own eyes. You will see attached a picture of the intensity graph where it is now blank. The X and Y indicator in the top right conner represents the current X and Y axis and you can see that the intensity graph is currently blank eventhough there was an intensity graph just moments ago.
What if you also place a 2D array indicator (with scrollbars) next to it to see how the data actually looks like?
In the picture, the data array represents the data that is sent to the intensity graph and when the intensity graph is blank, there is no data being sent to the intensity graph.
Do you autoscale the Z axis? Maybe there is a point that is way off scale, drowning out all other points?
The z scale is autoscaled and I dont think that they are any abnormal points in these data.
What is the datatype of the graph? What does the z data represent (U8 greysscale? U32 RGB? DBL?)
The z values actually represent around 100 values of data that it receives, each value being a distance of a layer that the scanner detects in reference to the scanner. So for each xy coordinate, it will receive a number of z values. In the intensity graph, only the last value of this z array will be used.
When the graph turns "blank", can you stop the VI, right-click the graph and "data operations...make current value default", save the VI under a new name, and attach it here?
I will save a VI of all the important components as the whole VI is a bit complicated. In this VI, I have done as you have said, making the current values the default. I am sorry that I cannot attach the whole program here but please do not hesitate to ask if there are things that you od not understand in the program.
06-01-2018 10:15 AM - edited 06-01-2018 05:37 PM
There is a difference between "blank" and black".
So let's first look at the code:
Sorry, it is completely unclear what you are doing, but it does not look right at all. All you need is a feedback node globally initialized with the full sized array, they you would do a replacement for each xyz set. No need for local variables.
Maybe this recent post can give you some ideas.
06-01-2018 10:27 AM
I am very sorry if I was not clear. I called the intensity graph blank as it gave me the same intensity graph before starting the program and thus I called it blank.
There is a program which will change the X and Y values every time for each element in a certain order in accordance to the mpvement of the scanner. I placed the local variables as the actual varaibles are actually very far apart from this part of the program and connecting them by a line would make the whole program very messy and confusing.
The X and Y units are in mm.
Does this help? I will take a look at the link that placed!
06-01-2018 10:37 AM
I actually did the same things that you have posted in the link with the shift registers but changed it as someone recommended that I use a local variable so I changed my program. It still gave me the same result when dealing with big values.
06-01-2018 05:42 PM
@jellybean324 wrote:The X and Y units are in mm.
So you need to convert mm to "array index", depending how many points per mm you acquire and where the origin is.