Programmatically Creating a Cursor for a Graph in LabVIEW

Updated May 3, 2018

Reported In

Software

  • LabVIEW Full
  • LabVIEW Base
  • LabVIEW Professional

Issue Details

  • Usually when I need to create a cursor for a graph in LabVIEW, I must edit the properties of the graph or display the cursor legend and make modifications from there.
  • How can I programmatically create a cursor for a graph in LabVIEW?

Solution

In order to programmatically create a cursor, you must add values to the Cursor List property for a Graph Property Node.  The following steps explain how to do this:
  1. Create a graph on the front panel.
  2. On the block diagram, right-click on the graph and select Create»Property Node.
  3. Select Cursor List as the property for the node, right-click on the property node and select Change to Write
  4. Right-click the input and select Create»Constant.  The constant will automatically appear as an uninitialized array of clusters, as shown in the diagram below:
 
  1. Initialize and set values for the elements in the cluster according to the desired cursor properties.  For information on what each element in the cluster corresponds to, take a look at the LabVIEW Help information provided for the Cursor List Property.
  2. To create multiple cursors, drag down the bottom edge of the Cursor List constant to expand your array.

Additional Information

You can easily view information about the elements in the cluster by activating the Context Help window.  The following information is displayed in the window when you view Context Help for the Cursor List Property:

WAS THIS ARTICLE HELPFUL?

Not Helpful