Fix axes in intensity graph with cursor
Hi all,
I try to use the intensity graph as an xy-input device. The user should be allowed to drag the cursor to enter the value. However, the user can always move the cursor outside the plot area, which causes the corresponding axis to rescale. I want to have strictly fixed upper and lower limits. Is there any way to achieve this? One possible solution would be to reset the min/max values every time the cursor was moved (and coerce the cursor position back into the range). A simpler approach would be appreciated!
Regards,
Matthias
> I try to use the intensity graph as an xy-input device. The user
> should be allowed to drag the cursor to enter the value. However, the
> user can always move the cursor outside the plot area, which causes
> the corresponding axis to rescale. I want to have strictly fixed upper
> and lower limits. Is there any way to achieve this? One possible
> solution would be to reset the min/max values every time the cursor
> was moved (and coerce the cursor position back into the range). A
> simpler approach would be appreciated!
>
You don't say what version of LV you are using, but if it is relatively
recent, right click on the graph and go to Advanced and uncheck the
option to have Cursors Scroll Graph. The user can still drag and
release the cursor und
er the edge of the graph, but this will not change
the scales. You can pretty easily filter cursor points that are out of
range and even write back to the cursor value if you need to. I believe
that if there is data in the plot and the cursor is set to lock to the
plot, then it cannot be dragged outside the data either, and that is
another solution.
Greg McKaskle
Similar Messages
-
Intensity graph Z cursor value
Greetings!
I am creating a scanning XY stage program using an intensity graph. I have a cursor to drag around that moves the XY stepper motor stages; zooms, adjusts Z colors & "contrast", etc. I have the data showing up fine.
However I can't figure out how to get the Z value (so I don't have to show the big cursor legend). As you know in the cursor legend as you move a cursor the X Y and Z values are shown.
Can't find a property node for the Z value... This must be simple
Thanks!
Steve
Solved!
Go to Solution.Unless you use custom axis offsets and increments, it is just the value of the 2D array and the indices of the cursor positions, so index array should get what you want. If you use custom axis scaling, you need to apply the linear transform between cursor x, y values and corresponding array indices.
In a better world, the cursor index property should give both indices of the 2D array and the method would directly work also for cases where the axis scaling is custom. This is the reason for my old idea here, so please vote for it!
LabVIEW Champion . Do more with less code and in less time . -
Xcontrol Cursor (XY Graph) with cursor release
I try to build a Xcontrol who give the values of a cursor. The only data I send to the Xcontrol is the reference of a XY Graph. It is working fine when using the boolean left and right (see drawing). When I try to to utilize the "cursor release event" (in the Xcontrol) it is not working and the cursor freezes, any idea?
Jean-Marc
Jean-Marc
LV2009 and LV2013
Free PDF Report with iTextSharp
Attachments:
Xcontrol image.jpg 50 KB
Curseurs XY.zip 97 KBJon S. wrote:
Hello J-M,
I think I figured out what was causing the hang in LabVIEW when you moved the cursor. You need to put an Unregister for Events at the output of your Event Structure in the Facade of your Xcontrol. After I did this LabVIEW didn't hang. The values didn't update in your cluster but the hang didn't occur. You might need to do some more coding the case for "Mouse Up".
This actually is bad advice.
What it does is unregister the event refnum every time the VI is run, this means that the event only is registered during execution of the XControl.
The fact that the FP gets locked means that there is a valid registration that has the 'Lock FP during processing'==True.
For dynamic events you need to right click on the registration node and deselect that option.
What might work is setting the timeout of the event node to -1 and not stop the while loop. However I am not sure what happens in these cases.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
Saving "Waveform graph" with cursors, set of different colors, in an image file
Hello:
I'm trying to save to a file, a waveform of a "waveform graph" that has cursors, which have different colors. When opening the file I can see that the waves are plotted defined color, but the grids and cursors are colored black.
Someone can tell me what to do, so that the file is saved with the original colors of the "waveform graph"?
Best RegardsProbably this is happening because you are using the Invoke node Image Export, which captures an image with less information. However, if your application allows, using the Invoke Node Get Image, which captures your control, displays all the colors of your waveform, include cursors and grids colors.
In this link bellow, you can see how use this Invoke Node:
http://digital.ni.com/public.nsf/allkb/5AE4ADCBB65A6D8F86256FBF007A1AC1?OpenDocument
I hope this helped you. Success in your application.
Regards.
Wesley Rocha
Applications Engineer
National Instruments Brazil
www.ni.com/suporte
Wesley Rocha
Application Engineer
National Instruments Brazil
Visite a nossa comunidade em PORTUGUÊS!!! -
Bonjour,
J'aimerais savoir si il est possible de commander l'échelle de l'axe X via une commande sur face avant (afin de simuler un oscilloscope).
C'est principalement pour pouvoir voir plus précisement une période d'un signal.
Hello,
I'm asking if it is possible to command the X scale of a graphic with a face-up command to simulate a oscilloscope.
It's mainly for to see with accuracy a period of a signal.
Software : Labview 2012 Student Edition.
Meilleures Salutations,
Best Regards,
Hellgheast
PS :
En pièce jointe mon VI sur lequel j'aimerais faire la commande.
In attached file my VI on which i will to the command.
Attachments:
Exercice_5.vi 151 KBHi,
ah ok you're talking about the graph appearance and scaling. Yes you can customize and scale the X-Axis on your LabVIEW Graph... programmatically or manually -
Cursor Misalignme​nt in Intensity Graph (LV6.1)
Howdy.
I have an Intensity Graph, with a 2D array of data (about 300x300) and a cursor. The cursor is locked to the plot, which for intensity graphs, means that the cursor is drawn at the lower left corner of the pixel that is being addressed.
Most of the time this works fine. However, sometimes, the cursor is drawn as being located at one pixel, but the values reported for the cursor are in fact a neighbor (usually the one to the right). The zoom level of the graph is such that a given pixel is larger than a screen pixel (about 3-5 times), so I wouldn't think that it was an aliasing problem, but the problem does go away if I zoom in a little further.
Has anyone else seen this? Does anyone have a fix?I don't have a repeatable set of conditions that lead to this problem, so I don't have a demo vi that exhibits it.
As to unlocking the cursor, I think that in an intensity plot that is more confusing; the location and value reported for a cursor position are shifted half a pixel down and half left with respect to the way the plot is filled in. In other words, say we have a 10x10 plot shown in 100x100 pixel window. Each intensity value is 10 pixels wide. The axis values line up on the boundaries of these pixels. When the cursor is within half a unit (5 pixels) of the crossing point of these axes, that is, near the intersection of boundaries of four adjacent pixels, the value reported is the pixel location and value in the upper right of these four pixels. This means that with an unlocked cursor, I can be positioning it over (visually) the lower left pixel, but selecting the upper right. In fact 3/4 of any given pixel's visual representation is actually going to select some other pixel. So I've locked the cursor to remove that uncertainty; now it is supposed to be always in the lower left corner of the pixel selected. -
Programmatically disabling/enabling cursor in intensity graph
Hello all,
I am building a LV interface (LV2011) for a stepper XY stage. The system "scans" a surface, displaying it on the graph. I set up to cursors to zoom into a region of interest (ROI). Pressing a button resizes the scales to the ROI (zooming in on the area). Sections of code move the XY stage, and read a device. When done I want to zoom into a ROI and use a THIRD cursor to manually move the XY stage. I have this working with TWO graphs, based on the "region of interest.vi" I found in the dev zone.
What I would like to do is have a boolean toggle controlling ONE GRAPH between setting min/max (cursors 0 and 1) and manual stepper position (cursor 2). If cursor 2 is visible I want cursors 0 & 1 not showing and visa versa. Can I do this?
I attached the example - bascially what I did was add a cursor to the 2nd graph, grabbing the XY vales and sending to the stepper controllers. Works great! I am trying to "combine the two" by resizing the orig graph with a button click (works fine) and then click another button to show the XY stage cursor (and hiding the min/max cursors) - thats the brick wall
On a seond note - controlling a XY stage using the intensity graph's cursor is really nice; however it would be great if I can control the cursor similar to a slider's "coerce" - has anyone done this? I assume I have to write a routine in the event that performs some modulo function. Just curious!
Thanks,
Steve
Solved!
Go to Solution.
Attachments:
roi.llb 40 KBYour exmaple works perfect. Howver I am having probs with Val(sngl) on the XY graph. On the example you gave, lets say I move the cursor with the mouse - event fires, everyone is happy. If I move the cursor with CODE - nada. I even read the "Value" of the graph and wrote it to "Val(sngl)" to try to fire the event. How does one force a trigger on an XY chart when you move a cursor (say cursor idx2) using code?
Better yet - why when I read the Val and write to Val(sngl) does the event not fire??? I have been searching for a basic XY table with sensor -type project but havent found one yet. Everyting works great - draginng the cursor moves the XY stage. Now I need to do the auto-scan part Use code to place the cursor - trigger the even that moves the stage.
Thanks
Steve
Attachments:
XY_Stage_Rev8.vi 53 KB -
Open 32-bit jpeg & convert to intensity graph form (LV8.5 & Vision 8.5)
I will cross-post this in the Machine Vision forum as
well. I have an LLB to open images with IMAQ vision utilities, and
then attempt to convert to intensity graph format. I obtain the color
table of the image from a Vision utility, and subsequently apply to the
intensity graph in hopes of duplicating the vision container contents.
I am unsuccessful in converting 32-bit jpeg and was hoping for some
help. Please let me know if this in fact is even possible to do.
Attached is an example jpeg image file.
Sincerely,
Don
Attachments:
open_image_file_and_convert_to_intensity_graph1.llb 207 KB
Photo_111107_0021.jpg 240 KBDonRoth wrote:
Hi George:
Yes - I understand I am getting only one color plane.
With LabVIEW / Vision only, can this jpeg image be displayed in an intensity graph with the proper (original) color information? You say the LabVIEW Read Jpeg File.vi reads this image fine - but how do you display the output of this fx in an intensity graph with the original / proper color information (again using only LabVIEW / Vision, or maybe your toolkit)?
Unless it is an 8 bit color image already you can always down sample it to 8 bit. I think the IMAQ Cast function should do that, otherwise there is for sure some function to change color depth. Colors will of course change slightly as it is very unlikely that a 24bit image especially if it is a photo, has only 256 unique colors used.
Once you converted your IMAQ image into an 8 bit image extracting the bitmap and color dtable is easy and then applying it to an intensity graph of course too. Remains the question why you wouldn't want to use the IMAQ control. If it is about IMAQ license costs then of course you won't be able to use other IMAQ functions either so this advice won't help then.
Rolf Kalbemratter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
I have a 2d array of temperature vs time. I would like to have an indicator whose color is proportional to temperature that changes with time. Any suggestions?
If you just want to display the current 2D temperature array, use an intensity graph with an appropriate color ramp. For an example, open the example finder and search for "heat eqaution". It will show a simulation of the heating of a 2D plate starting with certain boundary conditions..
LabVIEW Champion . Do more with less code and in less time . -
Hello, LV 8.2.1 notes indicates the following bug fix:
43SAIR2A Fixed an issue where LabVIEW crashes when you run a VI that contains a mixed signal graph with a multi-plot cursor.
I am running this version, and still have this behavior. Is there anything I may be missing, and/or certain circumstances that may still be causing this?
thanks in advance,
DarrenDarren:
I looked at the CAR ID that you mentioned and the issue has been resolved in LabVIEW 8.2.1. To verify something similar, I ran the attached VI and things worked just fine. Please feel free to send me the steps to follow to reproduce the issue you are running into in 8.2.1.
Regards,
Rudi N.
Attachments:
MixedGraphs.vi 15 KB -
Programmin​g intensity graph cursor to move automatica​lly
Hi Everyone!
I want to program the 2 cursors(horizontal and vertical) in the intensity graph(Bright spot.png) to move to the bright spot in the middle of the intensity graph(live video feed from a CCD camera) automatically without dragging the cursor manually to the bright spot, is it possible?
I've attached part of my block diagram which involves the graph but i'm unable to attach the whole VI because it has some hardware dll in it.(you guys can ignore the formula part of the block diagram, it's not important)
Attachments:
Bright spot.png 118 KB
block diagram.png 45 KBUse "Array Max&Min" to find the peak coordinates, translate them to x and y values, and change your cursor position property node to write and write these values.
I am actually not sure why you have two cursors. A single cursor with a horizontal and vertical line seems sufficient.
LabVIEW Champion . Do more with less code and in less time . -
Cursor/Window for Zooming in Intensity Graph
Does anybody know how to create a non-rectangular window (any shape
connected by mouse clicks) for zooming (or for data retrieval) if a
particular area in the graph is of interest in a intensity graph?
Wouldn't it be really cool if we can select edges in a graph and
retrieve the information (or data) from the graph?
The other question of mine is: is there a way that when we're using
intensity graphs, we can create the custom menu with right mouse button
click, instead of the standard set of menu items? Any help is greatly
appreciated. Thanks.
Sent via Deja.com http://www.deja.com/
Before you buy.[email protected] wrote:
> Does anybody know how to create a non-rectangular window (any shape
> connected by mouse clicks) for zooming (or for data retrieval) if a
> particular area in the graph is of interest in a intensity graph?
> Wouldn't it be really cool if we can select edges in a graph and
> retrieve the information (or data) from the graph?
In my pre-NI days, I had a lot of fun trying to coax image-manipulation and
-analysis behavior out of LabVIEW intensity graphs. You can do a fair
amount by making use of cursors and hotkeys and creating pseudo-overlays by
setting image coordinates to certain colors to create visual cues in
response to user inputs.
That being said, I never considered trying to get complex ROI (region of
interest) info from a user wi
th an intensity graph, and I'll bet it's a
pretty tough GUI trick unless you're using IMAQ Vision. If you find
yourself trying to build features like this into your application, or doing
a lot of image manipulation in general, you might save yourself time in the
long run by getting the IMAQ Vision toolkit from NI.
> The other question of mine is: is there a way that when we're using
> intensity graphs, we can create the custom menu with right mouse button
> click, instead of the standard set of menu items? Any help is greatly
> appreciated. Thanks.
I'm not aware of a way to suppress the built-in context-sensitive popup
menus. Sorry!
Regards,
John Lum
National Instruments -
Creating a report with multiple Y-axes on one graph
I currently have a script that will create a report with either 1, 2, or 3 graphs and has the ability to have four graphs per plot. I would like to add functionality to this script by making the Y-axis on the graphs have multiple Y-axes. How can I programmatically create a graph with multiple Y-axes?
To create an new axis system use the command GraphObjNew, eg:
Call GraphObjNew("2D-Axis","2DAxis1")
Call GraphObjOpen("2DAxis1")
D2AxisBackColor = "blue"
Call GraphObjClose("2DAxis1")
Call PicUpdate
If you have DIAdem Version 10 you can also create a new y-axis using GraphObjYAxisNew. This command is not available in versions 9.1:
Call GraphObjOpen("2DAxis1")
AxisNo = GraphObjYAxisNew("left")
If AxisNo>0 Then
Call GraphObjOpen(D2AxisYObj(AxisNo))
D2AXISYTXT ="My new axis"
D2AXISYTXTFONT ="Arial"
D2AXISYTXTCOLOR ="red"
Call GraphObjClose(D2AxisYObj(AxisNo))
End If
Call GraphObjClose("2DAxis1")
Winfried
Message Edited by winner on 03-23-2006 03:48 PM -
XY graph with N axes and translate it into a picture
Hello - The VI has two windows diagrams (lower, narrow) is possible to unite them in one picture? - The VI (top left window graphics) have a common axis, but its hard to see the first graph "PLOT0" because he has little value compared with the values of graphics "PLOT1", to avoid this problem, adding even more axis "X and Y '(top right graph window), now both graphs are visible, but they overlap each other, how to spread these graphs relative to each other. (In the diagram where one axis is obtained by adding a factor to make a Slider and Slider1), and the graph with 2 separate axes do not get how to be? - Is it possible to programmatically make up the axes of the "Duplicate Scale"? Thank you.
Attachments:
Ex.vi 21 KBnow both graphs are visible, but they overlap each other, how to spread these graphs relative to each other.
You can move the secondary axes to the other side of the graph by right clicking on it and selecting "Swap Sides."
Is it possible to programmatically make up the axes of the "Duplicate Scale"?
I don't understand this question. Do you want to programmatically set the Max and Min of the axis? Please clarify the question.
Nathan S.
Applications Engineer
National Instruments -
Currently, an intensity graph cursor can be dragged outside the graph bounds, and the cursor position continues to change as if the graph had no bounds.
You can maintain the cursor (and the graph scales...) between defined boundaries programmatically, using an attribute node. Not a very elegant solution, since there is some quivering. See the example.vi.
Of course, if the user need to modify the scales (zoom in/out...), there will be some additional work ! :-)
Hope this help.
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left...
Attachments:
Bound_cursor.vi 51 KB
Maybe you are looking for
-
Fingerprint reader on DV6t no longer works on windows logon
For some reason the fingerprint reader on my Pavilion Dv6t, LM720AV, does not work on windows logon anymore I get the usual lock screen where I have to enter my password. The fingerprint option no longer appears I have tried rebooting, powering off,
-
Why can't I download Tumblr on my iPod 4 anymore??
I can't download the app anymore! I had to delete the app from my ipod touch gen. 4 in order to make space for an update, so now I'm trying to get it back. But when I attempt to download it, it says that I need iOS 7 or something like that in order t
-
List of table Name and Descrition
Hi Experts Can u send me list of standard tables with description
-
Distributed Transaction Sample works fine on 9i but not on 10g
See my previous two posts about the dll error.
-
My iphone 3gs brings error message 1602 when trying to restore
My iphone 3gs brings error message 1602 when trying to restore factory default