LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cursor's to be added (not manually) while plotting graph when each input is added

hello,
i have a problem in plotting a graph of X array v/s Y array.
where each point plotted must correspond to separate cursor .
if there are 5 elements in arrays, then 5 cursors can be added to graph manually.
but the input tht i' ll b taking can have n number of elements ..
so as i add each input array i want a cursor to be created.
is there any way by which n number of cursor's could be added simultaneously
but not manually .
waiting in anticipation...
0 Kudos
Message 1 of 10
(4,152 Views)

Hi Yogan,

On the block diagram, right click the XY graph control and select "Create -> Property Node -> Cursor List"  Then right click on the property node and select "Change to Write"  Then add a constant and fill in the details for the cursors you wish to add.  This will be for 1 cusor, to do it for every element will require extra programming, however that would be the way to do it.

Craig

LabVIEW 2012
0 Kudos
Message 2 of 10
(4,145 Views)
hi,
thanx a lot for your help . i also wanted to know if there is any limit for the number of cursors that should be used in a graph...
if yes then what's the max number of cursors that can b used in a graph.
&  also if in the formula node we can create function's as in c programming  .
& wht all things can be done in formula node
loops do work ... i feel..
wht more things can b used inside formula node ...
 
0 Kudos
Message 3 of 10
(4,120 Views)

Hi Yogan,

Not sure on the amount of cursors you can add.  I guess it is a lot but they may have a performance hit on your program.  Personally i have never gone above about 4 or 5.

For loops, While loops, if statements etc are probably better off programmed in native Labview.  I have not personally tried for / while conditions in a formula node.  If you want more functionality from a node try a mathscript node, whereby you can use most of the functions associated with MatLab (Including for and while etc).

However i only use Mathscript when i cant do it in LabVIEW.  The mathscript node interprets the syntax in the node and runs it through a bunch of LabVIEW anyway so it is more efficient to do it in native LabVIEW.

Craig



Message Edited by craigc on 12-11-2007 10:44 AM
LabVIEW 2012
0 Kudos
Message 4 of 10
(4,113 Views)
Hello Sir,
I wanted to know if we could lock all cursor position so that the cursors cannot be moved initially , until a "move " button is pressed.
After pressing button unlock the cursors so as to move the cursor to any position by draging cursor .....  
if it is possible .. how can that be done ?
Labview version 8.
 
waiting for your response.
thanx.
 
yogan
0 Kudos
Message 5 of 10
(4,092 Views)

Hi Yogan,

Sorry for the late reply, got a dose of the Flu!

There is no easy way i know of of locking the cursors into a fixed position.  The way i could recommend would be to write a constant value to the cursors position property node (Right click on graphs terminal on block diagram select "Create->Property node->Cursor->Cursor Position->All Elements").  This property node defines where the cursor is set to.

So prgrammatically you could use this property first to read where the cursor is and then to write that value consistently while your cursor is in the locked state.  Then when in the unlocked state you no longer write values to the property node and let the front panel do it for you.  Then to lock into new state, read the property node then write it again.  If someone tries to move a cursor while it is in the locked state they will be unable to do so as the constant value is continually being written to it on the block diagram.

This is probably a bit of a hack and could get messy with lots of cursors, but with some nice wire working could do quite nicely.

Craig

LabVIEW 2012
0 Kudos
Message 6 of 10
(4,065 Views)

Cursors are often abused in labview as an easy method of marking up a graph.  Cursors have alot of functionality.  There are a few methods of marking a graph that dont require cursors and are great to know about. 

 

1.  Making additional graphs for replacing horidontal cursors.  A second plot can act as a read only horisontal cursor.

2.  Annotations.

3.  Front picture property.

 

Method 3 is somethong I have been using instead to cursors because you can do so much with it.

 

paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 10
(4,054 Views)
Hello Sir,
I wanted to get some information regarding  how to create a PPP communication over RS-232......
If you do have some reference or sample code to understand it ... or if you have any reference material to understand it plz send me.... 
Labview version 8.
 
waiting for your response.
thanx.
 
yogan
0 Kudos
Message 8 of 10
(3,988 Views)
Hello Sir,
I wanted to get some information regarding  how to create a PPP communication over RS-232......
If you do have some reference or sample code to understand it ... or if you have any reference material to understand it plz send me.... 
Labview version 8.
 
waiting for your response.
thanx.
 
yogan
0 Kudos
Message 9 of 10
(3,968 Views)
Hi yogan,

why not create a new thread when changing the topic that much?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(3,962 Views)