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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Independently manipulate a cursor on a graph

Bonjour à toutes et à tous,

 

Dans le cadre d'un projet, je veux créer un curseur sur un graphique qui puisse suivre une sinusoïde. Il devra être manipulé pour rester entre les deux sinusoïdes que j'ai définies. J'ai déjà réussi à créer un graphe déroulant et les deux sinusoïdes dans lesquelles mon curseur doit rester. Cependant, je n'arrive pas à créer un curseur sur ce graphique. Je suis sur la version LabVIEW 2013 SP1 (32 bits), et je n'ai pas de fenêtre curseur comme sur les différents tutos existants. N'ayant pas réussi à créer de curseur, j'ai essayé de trouver une autre solution.

J'arrive à manipuler un bouton rotatif et une glissière, mais je voudrais réussir à ce qu'il y ait un "délai" entre la sinusoïde que je crée et la valeur du bouton rotatif et de la glissière ce qui n'est pas le cas pour le moment. Hélas, j'ai bien l'impression que les deux sont liés et que je ne peux donc pas les manipuler indépendamment.

Auriez-vous une idée ou une solution alternative pour manipuler un curseur sur un graphe déroulant ?

Voilà, j'espère avoir été à peu près clair, et si ce n'est pas le cas n'hésitez pas à me demander de préciser.

Merci d'avance

Clément

 

English below

Good morning to all of you,


For a project, I want to create a cursor on a graph that can follow a sinusoid. It will have to be manipulated to stay between the two sinusoids I have defined. I have already succeeded in creating a scrolling graph and the two sinusoids in which my cursor should stay. However, I can't create a cursor on this graph. I'm on LabVIEW 2013 SP1 (32 bits), and I don't have a cursor window like on the different existing tutorials. Not having been able to create a cursor, I tried to find another solution.

I can manipulate a rotary knob and slider, but I would like to make sure that there is a "delay" between the sinusoid I create and the value of the rotary knob and slider which is not the case in my project. Alas, I have the impression that the two are linked and that I can't manipulate them independently.

Do you have an idea or an alternative solution to manipulate a slider on a scrolling graph?

Well, I hope I've made myself pretty clear, and if not, please don't hesitate to ask me for more details.

Thanks in advance

Clément

Download All
0 Kudos
Message 1 of 5
(901 Views)

Hi Clement,

 

please take the Beginner tutorials to learn LabVIEW - as it seems you don't know the difference between charts and graphs in LabVIEW!

Charts don't offer cursors (among other limitations) in contrast to graphs…

 

And please don't label the chart as "Graph", this is quite misleading!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(899 Views)

@clemsou13 wrote:

 

I can manipulate a rotary knob and slider, but I would like to make sure that there is a "delay" between the sinusoid I create and the value of the rotary knob and slider which is not the case in my project. Alas, I have the impression that the two are linked and that I can't manipulate them independently.

 


OK, let's figure out what your knobs and sliders have to do with the cursor question. Can you explain? Are these supposed to be substitutes for the cursor you can't have on a chart?

 

Of course you can simulate a chart using a graph by maintaining a buffer yourself. Still, what is the point of having cursors. Is "manipulated" a user interaction? Should they be forced into a certain range and position? How should it all look like in the end? How should the user interact with it?

 

What kind of "delay" are you talking about? nanoseconds? years? Delay between what and what? How should the chart look like (e.g. compare with and without "delay")?

 

Let's first simplify your code.

 

  • You simulate two otherwise identical curves, just differing in offset. It would be sufficient to simulate one of them and add a relative offset to create the second, right? Half the work!
  • If you attach a VI, make sure all controls have reasonable default values so we can run it immediately and see something interesting. It is not interesting if all controls are zero and if we enter values, they might not be reasonable because we don't know the specifics of the situation
  • You should avoid overlapping controls. They can lead to performance issues.
  • It might be cleaner to avoid express VIs and dynamic data and do a ptbypt generation instead of graphing ~10% of the chart history with each iteration of the loop.
  • etc.

 

Message 3 of 5
(863 Views)

Hi GerdW,

 

Sorry for the misleading label. In the French version I use, both are labelled as graphs so I did not think about the english version. I just changed the object to chart.

 

Thank you for your response

Clément

0 Kudos
Message 4 of 5
(827 Views)

Hi,

 

The knobs and sliders will not take place in the final setup, but I wanted to try to manipulate it first and then to manipulate a cursor. I thought that maybe if I was not able to manipulate the cursor, I would use these, but it is not really possible in the end.

 

For my test, I will have the subject to accelerate and decelerate with a motorcycle handle. I will have an encoder that will give me data and my aim is to get the data from this encoder and get back the position of the cursor on the chart. The user will be responsible for the cursor movement, this is why I spoke about “manipulating” the cursor.

 

About the delay, I thought that I could hold the cursor signal for 2 or 3 seconds so that the sine wave begins and then the subject can follow the curve. Another solution might be to fix the abscissa of the cursor so that the subject only manipulates the amplitude of his movement. I do not want the cursor to move horizontally if possible.  

 

 

Thank you for helping me clarify the situation

Clément

0 Kudos
Message 5 of 5
(824 Views)