12-10-2007 05:02 AM
12-10-2007 05:48 AM
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
12-11-2007 06:44 AM
12-11-2007 10:42 AM - edited 12-11-2007 10:44 AM
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
12-17-2007 12:04 AM
12-19-2007 10:42 AM
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
12-19-2007 01:14 PM
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
01-03-2008 10:40 PM
01-04-2008 03:13 AM
01-04-2008 04:02 AM