03-05-2025 11:53 PM
Hi Guys,
I am using XYGraph with X-axis (absolute time). When the Monitoring Start button is pressed, I need to put a cursor on the present time and Y value. I have created a property node for cursor position. How do I control the cursor position?
Thx
Solved! Go to Solution.
03-06-2025 07:28 AM
Have you tried the Timing function "Get Date/Time in Seconds"? [I tend to use Relative Time on my Graphs and Charts, since I usually deal with data that is collected "now", or "seconds since I started this program, which I saved as a TimeStamp "Start of Program", as opposed to "number of seconds since some time more than a century ago".]
Bob Schor
03-07-2025 02:58 AM
Hi Bob,
My customer agreed to use sampling number as time instead of current time. Hence I switch to Waveform Graph instead of XYGraph.The cursors can be control and position.
But the cursor behave differently when I put Active Cursor as constant value. It works perfectly when I use it as Control.
When I put the 2 cursors as constant value of 0 and 1 respectively, both cursor is called and placed together. Why is it so?
03-08-2025 09:16 AM
Unfortunately, I'm using LabVIEW 2021 and cannot open LabVIEW 2024 VIs. Also, your picture doesn't even show the X Axis, which makes it difficult to understand why cursor positions of 0 and 1, where your X Axis is sample number, are spread so many "samples" apart. Also, why are you using a Graph instead of a Chart?
I have a colleague who has called on me to help figure out why his VI doesn't do what he wants it to do (I tell him it does what he told it to do). He then starts telling me how he "did it", and I say "Stop -- don't tell me how you did it, tell me what you want to do".
I apologize for not going back and re-reading this entire thread, because maybe you answered the "What" already, but I suspect you need to go back and think about the "What" again.
From the "Cursors as Control" picture, I'm guessing something like the following:
Bob Schor
P.S. -- If you want to attach a VI, you would reach far more "long-time LabVIEW Users" by clicking "File", choosing "Save for Previous Version", and choosing something like LabVIEW 2019 or 2021. It will create a folder for you with lots of stuff from the LabVIEW support libraries, but if you dive into the nested folders, you'll eventually find your VI, which you can drag out to your desktop and from there attaching it to your response. If you open it with LabVIEW 2024 (which seems to be what you are using) and right-click its Icon (upper right-hand corner) to look at "Properties", you should see the version of LabVIEW that it has been "saved for", such as LabVIEW 2019. Close it without saving it, and attach it for us to see.
03-09-2025 05:50 AM
Sorry on the pictures as my focus is on the cursors and I have save my VI to a lower version (think is V13 and V14).
My application is to monitor pressure stability for a certain duration. I need to put 2 cursors on the graph to show start and stop pressure. Waveform Chart don't support cursor and so I use Waveform Graph as XYGraph is not necessary (customer agreed not to use relative or absolute time).
My issue is when I use the program the cursor as control, I can position the cursors on the plot. But if I were to program the cursor as constant, both cursors are called together.
Thanks for your advice.
03-09-2025 08:26 PM
i think these 2 VIs are saved as LV 2019.
not sure the previous one I save it correctly.
03-10-2025 04:07 AM - edited 03-10-2025 04:11 AM
Hi wan,
@indcon_wan wrote:
My issue is when I use the program the cursor as control, I can position the cursors on the plot. But if I were to program the cursor as constant, both cursors are called together.
You need to set the ActiveCursor FIRST, then set its position:
(You could use two independent property nodes, if you would enforce DATAFLOW by using error wires…)
And one more important item:
When you use ValueChange events on those buttons then you should set them to "latching when released" instead of "switching until released". That switching behaviour creates two events!
03-10-2025 04:54 AM
Hi Gerd,
Thanks for the 2 pointers
1. To set ActiveCursor FIRST
2. And use "latching when released"
The program is working now. Cheers and have a nice day.
03-10-2025 06:20 AM
Hi wan,
Attached is an example of using relative time for Xscale (LV2020).
Don't forget to check the graph properties, it may ignore the waveform timestamp if you don't disable the option below :
03-10-2025 09:03 AM
thanks for your advice.