LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Pen-up and Pen-down option in X-Y graph ?

Solved!
Go to solution

Hi,

 

I would like to create a basic digital version of XY plotter. I sorted out everything (scales, offsets, ranges, printing) except for Pen-up and Pen-down option. This application will be use to take multiple plots one after another. I need to print them on the same sheet. Basically when I run the test I plot one "line", then I take pen up, move it (with offset), put the pen down and draw another "line". Up to probably 6-8 "lines". My problem is that when I put the pen up and then down it connects old "line" withe the one that I just started to draw. (I assume that use of shift registers and a buffer needs to be involved??)

 

I'm new to Labview and I would appreciate any help.

 

Thx.

0 Kudos
Message 1 of 11
(4,169 Views)
Solution
Accepted by topic author franerr

Insert one dummy point containing NaN as value between traces.

0 Kudos
Message 2 of 11
(4,150 Views)

I can think of two solutions right off the top of my head.

 

1) Set each independent X-Y "line" to be it's own plot.

    Each "Pen Up/Pen Down" pair would create new index in a multiplot X-Y graph

 

2) Add an "NaN" value between each segment of the line in which you want to see a Pen Up and Pen Down operation

0 Kudos
Message 3 of 11
(4,134 Views)
Hey Gyus ! Thanks for help. It worked. Attached is the print screen of practise vi which I created to see if I could do it. Is there a way to do it better?
0 Kudos
Message 4 of 11
(4,107 Views)
Sorry! No attachement before. Here is the link: http://img137.imageshack.us/img137/7365/plottervi.jpg
Message 5 of 11
(4,100 Views)

The NAN option creates a problem if you want to read the data from the graph later on.

 

Consider ending one plot and starting another when you want to do PEN UP or PEN DOWN.

 

Set the color to TRANSPARENT if the pen is up and something visible if the pen goes down.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 11
(4,090 Views)

Hello again.

 

Thx for all the replays. It works great.

 

I would like to add another function to the plotter. The guy who is using it wants to write on the plot - I mean he draws a line and then he needs to mark it as A, then he draws another line and he wans to mark it as B, C and D. Then also he is reading some values from digital displays and he wants to be able to write it down on the plot while the plotter is running (then he prints it out).

 

I think the only way to do that would be to use cursor name. Set as many cursors as I want (for now I would need 8), place them in the corner (for a start, so I wouldnt see them on the printput, only the name) and drag their name to wherever I want. 

 

I wanted to do that but...I have a bit of a problem. When I'm setting property nodes for cursors (name visible, cursor visible, allow dragging, cursor name, cursor position) I'm only able to do that for one cursor. How can I create another one and set properties of that one?  Also is there a possibility of having a transparent cursor and a colored cursor name??

 

 

frannerr

0 Kudos
Message 7 of 11
(4,005 Views)

When I'm setting property nodes for cursors (name visible, cursor visible, allow dragging, cursor name, cursor position) I'm only able to do that for one cursor. How can I create another one and set properties of that one?

 

There is a property called "Active Cursor" - set that to 0, and further cursor properties affect cursor #0.  Set it to 1, and further cursor properties affect cursor #1, and so on.

 

Beware - if you operate on cursors 0 and 1, then the next time you address a cursor property, it will still be #1 you act on.  If you're going to use ACTIVE CURSOR, use it EVERY TIME, for safety.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 11
(3,995 Views)

Hi,

 

Does anyone know if there is a way to change the size of the the cursor name on the xy chart??  There is no property node responsible for that and the person who is using my plotter and the cursors, simply doesn't see the name of the cursor properly because the letters are quite small.

 

0 Kudos
Message 9 of 11
(3,713 Views)

can u send me ur vi .... pls


@franerr wrote:

Hi,

 

I would like to create a basic digital version of XY plotter. I sorted out everything (scales, offsets, ranges, printing) except for Pen-up and Pen-down option. This application will be use to take multiple plots one after another. I need to print them on the same sheet. Basically when I run the test I plot one "line", then I take pen up, move it (with offset), put the pen down and draw another "line". Up to probably 6-8 "lines". My problem is that when I put the pen up and then down it connects old "line" withe the one that I just started to draw. (I assume that use of shift registers and a buffer needs to be involved??)

 

I'm new to Labview and I would appreciate any help.

 

Thx.


 

0 Kudos
Message 10 of 11
(2,883 Views)