Center the cursor on the Waveform Graph?
I have a waveform graph where the user can adjust the scale on both the X and Y axes. The "problem" that I am having is that if the scale's range is set too far from where the cursor is at, the cursor will be off screen and not selectable. So, I am trying to center the cursor to the scale when the scale is changed or via a button. Here is the code that I have written for one of the Cursor plots:
Select Case setBlueCursor
Case 1
blueCursorPt.Plot = plotInlineTorque
inlineTorqueMax = yAxisInlineTorque.Range.Maximum
inlineTorqueMin = yAxisInlineTorque.Range.Minimum
blueCursorStartY = (inlineTorqueMax + inlineTorqueMin) / 2
blueCursorStartX = (XAxis.Range.Maximum + XAxis.Range.Minimum) / 2
blueCursorPt.YPosition = blueCursorStartY
blueCursorPt.XPosition = blueCursorStartX
This code will center the cursor like I want but then I can't move the cursor after that as it is "stuck" at the position that I have coded it. The problem appears to be with the last two lines of code here. I do not know of any other way to do this though. I have tried the "moveCursor" method but the end result ends the same way, with the cursor stuck in the center and can't move. Any help on a solution? Is there a better, easier way to do this? I'm new to Measurement Studio and .NET.
Thank you
This code works. It appears that I was calling the subroutine that this code is located in over and over in another part of my program.
Similar Messages
-
Dear support,
dear LV users,
selecting "bring to center" for a free cursor in a XY graph does not
bring the cursor into the center of the graph, but instead the command brings it to the
mean/average value. This is not an issue for a linear mapping
of the axis [due to the fact that the center of the axis is equal to
the middle/average value of the end points on the axis]. But when
mapping of the axis is logarithmic, the cursor ends up on the top of
the screen. That is because the average value of the end points
(min(y_axis)+max(y_axis))/2) is not equal to the center of the axis.
Is that a wished behavior, please?
Example: For an y_axis = [1..100], the awaited center position would be at
10 and not at 50.5. The center position for the logarithmic mapping
should be calculated as (log(min(y_axis))+log(max(y_axis)))/2, IMHO.
Kind regards,
Solved!
Go to Solution.You are right, LabVIEW chooses this form (min(y_axis)+max(y_axis))/2).
You can go to "idea exchange".
Link:
http://forums.ni.com/t5/ideas/v2/ideaexchangepage/blog-id/labviewideas
here you can see how many people like your idea.
Perhaps it will be considered in the next version of LabVIEW. -
I want to control cursors in a waveform graph programmatically. I've tried using the "Cursor list" property, modifying the cursor clusters and writing the results back to the cursor list property, but this only works sporadically. Modifying the cursors by ref number works well, but you have to get the refnumbers from an event structure during a cursor event. Is there any way to get cursor reference numbers aside from through an event structure?
Thanks!Hi barryinbo,
On the controls pallette, go to refnums> Control refnum>Control. Then right click the refnum and point to select vi server class>Generic > and you will see a cursor there. This will be a "loose typed refnum" but you can right click the refnum to include data type. An alternative is to drag a cursor to the refnum, this will make it strict typed.
Hope this helps
Chris Co. -
Looking up the values in a waveform graph with a mouse click
Hi,
Does anyone know how to look up the values in a waveform graph with a mouse
click but... without the cursor legend on, if i press in the waveform graph
nothing happens, i must search my cursors and only then i can see the values
of my signal data?! Isn't there any other way?
Best regards,
Thijs BoeréeDear Chad,
I know of the function "bring cursor to center". I also figured out that
when i use a property node of the cursor array of clusters, that i can see
that some values change when i move the cursor (i can see the X and Y scale
value change of the graph and also the values of the mouse pointer (in
points due to screen resolution)) But in this cluster i can't set the mouse
position. I allready made a VI where i can see the bounds of my
waveformgraph and I have the Xscale (min and max) and the Yscale (min and
max), with a linear fit i can translate my mouse position to X an Y scale
values and when i click on my waveform graph the cursor go's to that
position (property node of the cursor position), only disadvantage is that i
only have the bounds of my plot area and not the position, i do have the
position of my waveform graph but the plot area isn't allways in the center,
if i could extract the position of the plot area i may find a solution to
solve this problem.
And to file a product question:
I would like to see the function that with a mouse click a little menu
appears and that there are options to for example set a marker on that data
and when you right click on it, that there are options to remove it or to
add comment, a 2D array could make a list of the different channels with
it's markers (time stamps and comments).
Best regards,
And thank you for your help.
Thijs Boer�e
"Chad AE" schreef in bericht
news:[email protected]...
> Dear Thijs,
>
> Thank you for contacting National Instruments.
>
> To address your question, there is no direct VI, command, or property
> node that will allow the cursor snap-to-mouse functionality.
>
> I notice a problem you may be occuring is trying to find where the
> cursor is on the graph. If this is an issue, you can select Bring to
> Center from the Formatting Ring on the Cursor Legend to move the
> cursor to the center of the graph.
>
> Let me know if you have any further questions or if this does not
> resolve your issue, as I would be happy to file a product suggestion
> so that LabVIEW is improved in future versions.
>
> Thanks again and have a great day!
>
> Chad AE
> Applications Engineer - National Instruments -
How i can fixup the cursor in the center of plot at any time?
i need the cursor show the data of the points in plot,but i found after the plot zoomin,the cursor can not show .how i can fixeup the cursor at any time?
thanks a lot.Hi Longsan,
So I tried to reproduce the issue you were seeing and I believe I know what is going on. If you zoomin and the max and min of the axes are smaller than the cursor position, the cursor will no longer be in the viewing area of the graph. Therefore, you would want to reposition the cursor after you zoom in. For example, in Visual Basic you could use the command
CWGraph1.Cursors(1).XPosition to change the position. I thiss out and it seems to work correctly. Let me know if try this and you are still having trouble.
Thanks,
Caroline
National Intruments
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments -
I have following problem when I control the cursor via an attribute note, it is neccersary to free the cursor, but then it is not possible to read the y-Value of the cursor position. I want to control the cursor via keyboard and buttons, but with the funtionality of attribute setting "cursor fixed to plot".
You know the X position so just read the Y value by reading it straight from the Y array instead of from a property node...
Alternatively unlock the cursor if the position control has changed...and lock it again if it is constant for n milliseconds; to produce the Y value from the Y property.
MTO -
Transition measurement vi cursors displayed in waveform graph are moving outside of scale
Using a waveform graph to display pressure over time. I wanted to be able to calculate the fall time of the pressure over time so I'm using the Transition Measurement vi. I copied exactly what was in the example for transition measurement inside help and it is correctly determining the falling transition time but I am having a problem with the cursors on the waveform graph. I should be seeing a set of green vertical cursors marking out the fall start time and fall end time like in the picture I've attached (capture2) like in the example. The problem is they both always start at 3.43 (capture1) and after each sample period they increment by one (4.34, 5.34, 6.34) The come right out of the bundle from the transition measurement output as those numbers. The period of the signal I'm interested in is always less than 2 seconds, so I never see the vertical cursors.
I've tried substituting my daq signal with a sine wave generator and it does the same thing.
The block diagram is in the first capture
also I would be interested in finding out exactly how the numbers wired to the active cursor property of the property node for a waveform graph relate back to the actual cursors on the graph. Are they just automatically numbered starting with 0 from the top-down?
Wayland
Solved!
Go to Solution.
Attachments:
Capture.PNG 44 KB
Capture1.PNG 7 KB
Capture2.PNG 29 KBHi Wayland,
The reason the cursors are always apparent in the example VI for the Transition Measurement.vi, is because the signal being generated is always resetting. So, the signal resets to a 'new' signal for the cursors to go over and therefore always remain in the somewhat same location. The Waveform Graph is also configured in such a way that it will not move or continue to show new data coming in, the data cursors have moved onto. So in your case, you will want to right click the graph and make sure "Ignore Time Stamp" is not checked/selected. This will make it so the graph keeps up with your incoming data and the cursors. You can check this in the example file by removing the True Constant going to the waveform generator and changing the time stamp option previously mentioned.
In order to view the available cursors and their numbered position, you can right click on the Waveform Graph and select properties. In the properties window there is a Cursors tab, inside this tab at the top is a drop down menu that lists all of available cursors, indexed starting with 0 at the top.
-Jake B. -
Set the cursor in the middle in XYGraph
hi how to set the cursor in the midde programmatically?
need help plz?
for labview 8.0Here's a simple example (LV 8.0) showing how you can center the cursor with a button press.
Message Edited by altenbach on 06-18-2008 11:35 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
CenterCursor.png 13 KB
CenterCursor.vi 22 KB -
PS CS5 Extended on Windows
When trying to use the clone stamp and/or healing brush as soon as I move the cursor from the toolbar over to the image I get an exact copy of the existing layer that moves around the window with the movement of the clone stamp/healing brush. This just started tonight. What's causing this weird behaviour?What are the settings in Window > Clone Source?
-
How can I replace the cursor in the below query?
I have this below query which calls a stored procedure that takes only 1 item's attributes at a time. But because of performance problems we are
required to remove the cursor. How can I replace the below cursor logic with set operations or CTE? Please advice.
DECLARE db_cursor_ava CURSOR
FOR
SELECT t.[agent-id],
t.[start-date],
t.[end-date],
t.[monitor-days],
t.[monitor-start],
t.[monitor-end],
t.[timezone-offset]
FROM @tmpAgentPeriodTimeRange t
OPEN db_cursor_ava
FETCH NEXT FROM db_cursor_ava INTO @agentID_ava,
@stDateTime_ava,
@endDateTime_ava,
@monDays_ava,
@monSt_ava,
@monEnd_ava,
@offset_ava
WHILE @@FETCH_STATUS = 0
BEGIN
DELETE
FROM @tmpMonitorPeriod
DELETE
FROM @tmpFinalResult
SET @runID = 1
IF(@endDateTime_ava>DATEADD(MI,@offset_ava, GETUTCDATE()))
BEGIN
SET @endDateTime_ava=DATEADD(MI,@offset_ava, GETUTCDATE())
END
INSERT INTO @tmpMonitorPeriod
EXEC core.usp_GetMonitoringPeriod
@startDate = @stDateTime_ava,
@endDate = @endDateTime_ava,
@monitoringDays = @monDays_ava,
@monitoringStart = @monSt_ava,
@monitoringEnd = @monEnd_ava
SELECT @maxID = MAX(tm.id)
FROM @tmpMonitorPeriod tm
FETCH NEXT FROM db_cursor_ava INTO @agentID_ava,
@stDateTime_ava,
@endDateTime_ava,
@monDays_ava,
@monSt_ava,
@monEnd_ava,
@offset_ava
END
CLOSE db_cursor_ava
DEALLOCATE db_cursor_ava
mayooran99You've been down this path before - and the response is exactly the same.
how to replace cursor logic
And I'll suggest that you post the entire code - since you repeatedly delete 2 table variables but only populate one. The setting of @maxID also seems to have no purpose. And perhaps the issue here isn't the cursor but the general approach. Who knows
- but it appears you may have prematurely assumed that the cursor is the problem. -
Since downloading Firefox 4, I am having problems archiving gmail conversations from my inbox view (either one or several conversations) as it says "No Conversations Selected" when I have selected one or several. Also, when I go to enter a new event in google calendar, I have to click the cursor in the box to type the event (it used to let me just start typing) or else it flips out and starts jumping to day view or another month. Does anyone know how to fix either of these?
I have had this problem; but while trying to fix another problem, I reset my preferences for Firefox and it fixed this problem as well. To reset preferences, follow this link: http://support.mozilla.com/en-US/kb/Resetting%20preferences
-
Recently my mail program has changed itself and I can no longer see the red, yellow and green dots allowing me to close minimize and enlarge. To get out of mail I have to put the cursor on the top edge of the toolbar expanding to another toolbar that will allow me to quit mail. This is a real pain right where my mother never kissed me. How do I get the dots back?
Move the mouse to the far upper right corner of the screen. You should see a blue box with two arrows pointing inwards. Click that blue icon. Sounds like you put the Application into whats called Fullscreen Mode.
-
I imported my i photo library into aperture.
I can see the i photo events in aperture library as events with the number of photos in each event.
When you click events in the aperture library no photos appear although if you roll the cursor over the event icon it show the photos. If you click on the event either on the event icon or in the library no photos appear.
HelpCheck, if you have any filters set. The search fields in the Insector panel and the browser should be showing "All items" or "Showing All".
The Browser search field could be set for each project and album individually, so you have to check it for each project.
Regards
Léonie
For example: The projects count shows "20 items", but the browser is empty, because the project's filter is set to show only rejected items. -
How to position the cursor at the end of the text with EDIT_TEXT?
Hello, it wanted to ask to them if somebody could make work the module of function EDIT_TEXT so that it positions the cursor at the end of the text that is visualizing in the text editor. In the documentation it says that passing a ' X' to him in the field scrollend of the parameter Control is obtained that operation. Nevertheless, I did this and the cursor continues appearing at the beginning of the text that visualizes.
Somebody could help me please?
Regards,
Gabriel
PD: The code that I use is the following one:
FORM f_ingresar_comentarios.
DATA: l_action,
l_result LIKE itcer,
l_pedido LIKE thead-tdname,
li_coment_save LIKE i_comentarios OCCURS 0,
li_coment_aux LIKE i_comentarios OCCURS 0 WITH HEADER LINE,
l_lines TYPE i,
l_lines_save TYPE i,
l_lines_insert TYPE i,
l_index TYPE i,
l_index_aux TYPE i,
l_insert,
lwa_control LIKE itced.
CLEAR: l_action.
CLEAR i_comentarios.
REFRESH: i_comentarios,
li_coment_save,
li_coment_aux.
l_pedido = v_pedido.
Leemos el texto si es que existe
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = v_id_text
language = sy-langu
name = l_pedido
object = c_ekko
IMPORTING
header = wa_cabecera
TABLES
lines = i_comentarios "Lineas de texto leídas
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
Armamos la cabecera por primer comentario para el pedido
CLEAR wa_cabecera.
wa_cabecera-tdobject = c_ekko. "Objeto en tabla TTXID
wa_cabecera-tdname = v_pedido. "Nro de pedido
wa_cabecera-tdid = v_id_text. "ID en tabla TTXID
wa_cabecera-tdspras = sy-langu. "Lenguaje
wa_cabecera-tdlinesize = 70.
ENDIF.
Salva comentarios originales
li_coment_save[] = i_comentarios[].
lwa_control-scrollend = c_x. " c_x = 'X'
Abre el editor de texto
CALL FUNCTION 'EDIT_TEXT'
EXPORTING
header = wa_cabecera
save = space
control = lwa_control
IMPORTING
newheader = wa_cabecera
function = l_action
RESULT = l_result
TABLES
lines = i_comentarios
EXCEPTIONS
object = 1
id = 2
language = 3
name = 4
linesize = 5.
Si cambio los comentarios, actualiza comentarios
CASE l_action.
WHEN c_unchanged.
WHEN c_delete.
WHEN c_update OR
c_insert.
Obtiene cantidad de lineas de comentarios originales y modificados
DESCRIBE TABLE li_coment_save LINES l_lines_save.
DESCRIBE TABLE i_comentarios LINES l_lines.
Si se insertaron lineas...
IF l_lines > l_lines_save.
Calcula cantidad de lineas a insertar para luego calcular valor de
indice a partir del cual insertar los nuevos comentarios
l_lines_insert = l_lines - l_lines_save.
l_index = ( l_lines - l_lines_insert ) + 1.
Controla que al menos una de las lineas insertadas sea diferente de
blanco
l_index_aux = l_lines.
l_insert = c_n.
DO l_lines_insert TIMES.
READ TABLE i_comentarios INDEX l_index_aux.
IF sy-subrc = 0 AND
i_comentarios-tdline <> space.
l_insert = c_s.
EXIT.
ENDIF.
l_index_aux = l_index_aux - 1.
ENDDO.
IF l_insert = c_s.
Carga comentarios originales y agrega lineas insertadas
li_coment_aux[] = li_coment_save[].
APPEND LINES OF i_comentarios
FROM l_index
TO l_lines
TO li_coment_aux.
Setea variable para indicar actualizacion de comentarios.
v_comentario = 'S'.
Agrega usuario y fecha del comentario
CONCATENATE sy-uname
sy-datum
INTO li_coment_aux-tdline
SEPARATED BY space.
li_coment_aux-tdformat = '*'.
APPEND li_coment_aux.
Grabamos el texto
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = wa_cabecera
savemode_direct = c_x
IMPORTING
newheader = wa_cabecera
TABLES
lines = li_coment_aux
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDIF.
ENDCASE.
ENDFORM. " f_ingresar_comentarios
In addition, I made another program simpler that it uses the same functions and also have the same problem:
*& Report Y_GVA_TEXT *
REPORT y_gva_text .
DATA: wa_cabecera LIKE thead,
i_comentarios LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: l_action,
v_comentario,
l_result LIKE itcer,
v_pedido LIKE thead-tdname VALUE '3',
l_pedido LIKE thead-tdname,
c_a05 LIKE thead-tdid VALUE 'A05',
c_ekko LIKE stxh-tdobject VALUE 'EKKO',
l_lines LIKE sy-tabix,
lwa_control LIKE itced.
CONSTANTS: c_x VALUE 'X',
update VALUE 'U', "Langtext verändert
insert VALUE 'I', "Langtext eingefügt
delete VALUE 'D', "Langtext gelöscht
modify VALUE 'M', "Kein Langtext, Inlinezeile veränd.
unchanged VALUE ' '.
CLEAR: l_action.
CLEAR i_comentarios.
REFRESH i_comentarios.
Leemos el texto si es que existe
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = c_a05
language = sy-langu
name = v_pedido
object = c_ekko
IMPORTING
header = wa_cabecera
TABLES
lines = i_comentarios "Lineas de texto leídas
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
Armamos las cabecera para mostrar los comentarios
CLEAR wa_cabecera.
wa_cabecera-tdobject = c_ekko. "Objeto en tabla TTXID
wa_cabecera-tdname = v_pedido. "Nro de pedido
wa_cabecera-tdid = c_a05. "ID en tabla TTXID
wa_cabecera-tdspras = sy-langu. "Lenguaje
wa_cabecera-tdlinesize = 70.
ENDIF.
lwa_control-noendlines = c_x.
lwa_control-scrollend = c_x.
Abre el editor de texto
CALL FUNCTION 'EDIT_TEXT'
EXPORTING
header = wa_cabecera
save = space
control = lwa_control
IMPORTING
newheader = wa_cabecera
function = l_action
RESULT = l_result
TABLES
lines = i_comentarios
EXCEPTIONS
object = 1
id = 2
language = 3
name = 4
linesize = 5.
Si cambio los comentarios, actualiza comentarios
CASE l_action.
WHEN unchanged.
WHEN delete.
WHEN update OR
insert.
Agrega usuario y fecha del comentario
CONCATENATE sy-uname
sy-datum
INTO i_comentarios-tdline
SEPARATED BY space.
i_comentarios-tdformat = '*'.
APPEND i_comentarios.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = wa_cabecera
IMPORTING
newheader = wa_cabecera
TABLES
lines = i_comentarios.
ENDCASE.Murugesh,
I believe that you have mis-read Gabriel's problem.
Gabriel,
The cursor is not positioning at the base of the editor as you have cited.
In order to get this functionality to work, you must set the LINE_EDITOR import paramter to 'X'.
data: hdr like THEAD.
data: l_itced like itced.
hdr-tdobject = 'VBBP'.
hdr-tdname = '4000029521000030'.
hdr-tdid = 'Z005'.
hdr-tdspras = 'E'.
hdr-TDLINESIZE = '100'.
hdr-TDTXTLINES = '3'.
l_itced-SCROLLEND = 'X'.
CALL FUNCTION 'EDIT_TEXT'
EXPORTING
DISPLAY = ' '
EDITOR_TITLE = ' '
HEADER = hdr
PAGE = ' '
WINDOW = ' '
SAVE = 'X'
LINE_EDITOR = 'X' " here !!!
CONTROL = l_itced
PROGRAM = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
RESULT =
TABLES
LINES = lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
LINESIZE = 3
NAME = 4
OBJECT = 5
TEXTFORMAT = 6
COMMUNICATION = 7
OTHERS = 8
Don't forget those points !! -
I can't see the cursor on the logon screen with my MBP when using it in bright sunlight.
I have a 15 inch MacBook Pro with an anti glare screen. I am running Lion 10.7.3.
It is being used in bright sunlight in southern greece very sucessfully apart from the fact I cant see the cursor on the logon screen to select the user I want to log in as. .
Setting the cursor to a larger size using the universal access options works really well once I have logged in but at the moment I have to dash for the nearest shade to be able to see the screen to log in.
Any suggestions? A key sequence to swap between users on the logon screen would do (there are only two)If you're using it in bright light, you may be getting sunlight through the back of the machine which can wash out the display. The Apple logo on the back of the lid is actually a cut-out that uses the systems back light to make it glow. Bright light (especially sunlight) can actually shine through the back. As the users in the login are typically in the middle of the display, this is the area most likely to be washed out as that is where the Apple logo is. You can try just putting your hand over the Apple logo on the back to block the sunlight when trying to log in.
Maybe you are looking for
-
Dump in calling the BAPI_PO_GETDETAIL
Hi I am getting a dump while CALLING the BAPI_PO_GETDETAIL.. The dump as follows: In the function module interface, you can specify only fields of a specific type and length under "PO_HEADER". Although the currently specified field "IT_HEADER" is
-
Hi, I want to know if someone has ever used or parametered sales analysis using the data ownership authorizations or exceptions. I have parametered data ownership authorisations for each sales rep and I need them to have a look to the sales analysis
-
Skype doesn't login on my i phone 4
Hi i needed skype for i phone4 when i was trying to download the i phone app rejected and shows to update ios from 4.0 to update the latest one i updated to ios6.0 but still skype doesn't work. i removed the app as shown on Apple website reinstall a
-
Is the jsp:plugin tag supported in Weblogic 5.1?
I am running Weblogic 5.1 and I can't get the <jsp:pluging> tag to work. The server is not even translating the tag to anything usefull. When I do a 'View Source' in the browser, the tag is exactly as I wrote it in the page.
-
DNG conversion fail and Photoshop will not open my NEF files (Newbie question)
Two part question. First, I just recently installed photoshop CS4 to my (windows vista) computer and I go to upload NEF photos to bridge and I check the box that says "Convert to DNG" and when it finishs uploading it says "Files successfully copied,