LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing default cursor settings

Hi,

 

I need to change the default cursor settings on an xy graph.  Currently the cursor positions itself at the beginning of each data set.  See attached.  You should be able to see the cursor displayed in bright yellow.  How do I change the default conditions for displaying the cursor at the beginning of each data set from say: 04:19:38 PM, 09/28/12, (as in the attached example) to say: 04:19:38 PM, 09/28/11.  I just changed the two digit year - to keep it simple!  Thank you.  John

0 Kudos
Message 1 of 11
(3,110 Views)

Oh, sorry... I will need the changes to take effect each time a plot is generated.  In this example, one year prior to the current data set displaying is sufficient.  Thank you.

0 Kudos
Message 2 of 11
(3,105 Views)

Hi John,

 

You can programmaticallly control the position of the cursor using property nodes. You can create these by right clicking on your XY Graph > Create > Property Node > Cursor, etc.

 

cursorposition.png

 

Simply wire the desired values into the inputs for Cursor X and Y position.

Joey S.
Senior Product Manager, Software
National Instruments
0 Kudos
Message 3 of 11
(3,081 Views)

Yeah, but that just sounds too easy!  🙂  Lol.

0 Kudos
Message 4 of 11
(3,055 Views)

Hi again,

 

Actually, the problem I am having IS somewhat more complicated.  The cursor is being updated from within a case structure and from a specific epoch.  I have updated the attachment to include both the epoch and some of the case structure logic.  The program itself is just processing data after the fact - in otherwords, this is NOT a real-time data acquisition system.  The program simply processes the data and displays it.  When the program executable is running the operator/customer can adjust cursor value by changing the date from within the 'Cursors:' box at the top of each xy graph.  My job is to find a way to do this programmatically - per customer request.

 

Thank you for any assistance you can provide.

0 Kudos
Message 5 of 11
(3,035 Views)

If you have a problem opening this attachment please let me know - thank you.

0 Kudos
Message 6 of 11
(3,033 Views)

Hi John,

 

It sounds like you may not have your VI updating to show changes to controls when they are changed. I would recommend using an event structure in a while loop to poll for changes to the cursor and update them on the graph. I attached an example I wrote (opens in LabVIEW 2010 and more recent) to show you what I am talking about.

 

It is hard for me to understand what you are talking about with the small snippets of your code I am seeing. If you have further questions, please post an entire VI (or a smaller example VI that reproduces the issue) so it will be easier to help you.

Joey S.
Senior Product Manager, Software
National Instruments
0 Kudos
Message 7 of 11
(3,015 Views)

Thank you for the example and suggestions.  How did you get the dbl precision 'time' control to display and recognize a time/date stamp??  The code I am updating unfortunately has few comments and is not my design.  To understand and model the existing code (for a smaller example) would require more time than I have been alloted. 

0 Kudos
Message 8 of 11
(3,009 Views)

...I have tried to recreate property nodes from the xy-graph but right-clicking an input to create a control doesn't give me an editable or recognizable time/date stamp dbl precision control. 😞

0 Kudos
Message 9 of 11
(3,006 Views)

Right click on a numeric control/indicator and select 'Display Format'. You can choose Absolute time.

0 Kudos
Message 10 of 11
(2,998 Views)