LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to draw straight line between two points on intensity graph? (LV 7.1)

I have taken the time to extend this technology to be able to draw other objects on the intensity graph such as boxes or ellipses (thanks Christian).  The ramifications of this are that one might now be able to extract regions from intensity graphs using the cursors and leaving a visual reminder of the extraction on the original intensity graph. This gives the pre-LabVIEW 8.0 user one way to draw on intensity graphs directly using cursors in a similar fashion to what one can do with the mouse on a picture control. I have not experimented yet with the intensity graph draw capabilities in LabVIEW 8.0 + but that will be the next thing to explore.

Sincerely,

Don
0 Kudos
Message 11 of 16
(3,617 Views)
And in fact maybe there is a reason to extend this method to LabVIEW 8 and above (see attached).  Because with the intensity graph "new" 'cursor move event', you can watch the object being drawn as you move the cursors.  In LabVIEW 7.1, I used the intensity graph 'mouse up' event because the 'cursor move event' was not implemented with the ramifications being that the object was drawn only after the mouse button was up (finishing with moving the cursor).

Sincerely,

Don
0 Kudos
Message 12 of 16
(3,600 Views)
Having a moment of spare time, I decided to start to explore the 'PlotImages' property on the various graphs. One has to use the appropriate picture function and feed its output into the 'PlotImages' property. My first test was to try to draw a line between two cursors.  Could not see how this was possible using the 'Draw Line' picture function since if not using the pen, the line draw starts at 0,0 (I could not find any way to change the start point after digging into the subVIs of this fx).  Seems the best approach is to use 'Draw Multiple Lines' fx which plays connect the dots (you give it the coordinates of the dots).

This example is in LabVIEW 8.2.

Sincerely,

Don
0 Kudos
Message 13 of 16
(3,553 Views)


@DonRoth wrote:
...I could not find any way to change the start point after digging into the subVIs of this fx...
Don,
 
Just use "move pen" first. See attached (LabVIEW 8.0). (Of course this assumes there are only two cursors).
Christian
0 Kudos
Message 14 of 16
(3,547 Views)
Thanks Christian, it helps to know that is possible!
 
I did a timing test to see what might be most efficient (see attached).  They are pretty much equal, overall, the 'draw multiple lines' approach came in at about 1 msec faster on average.
 
 
Sincerely,
 
Don
0 Kudos
Message 15 of 16
(3,523 Views)
ps. I'm not sure that last LLB came thru with all the last changes and I reduced to just one main VI + 1 subVI, so probably better to try this one.....Don
0 Kudos
Message 16 of 16
(3,520 Views)