LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to temporarily disable interpolation to see multiple curves on the same XY graph

Hi All!
I need an help with the XY Graph component.
Let me explain my problem.
I have a VI that replicate on an XY graph the reading from a small touchscreen.

Basically, what is draw on the touchscreen appear on my VI.
I was able to do it by combining the X and Y readings into a single graph by means og a "Build XY Graph Express VI".
Also, through the enable pin of the Express VI, I can allow the XY graph to update only when a control signal for the touchscreen (think of it as
a sort of pen detect) is active.

Since everithing is done in a while loop,  I used a linea interpolation for the graph.

Here it comes my issue: after plotting one curve on the graph, starting point of the next one is automatically connected to the last of the previous one by an interpolation line.

Is there some way to temporarily disable the interpolation, maybe just for one point?
I already tried
- using single point without interpolation, but the result is lousy since I see dicrete points that correspond to timed reading from the touchscreen.
- using property node to change the interpolation method depending on the pen detect signal. This does not solve since the previous plot disappear when the detect is 0 but
  it reappers together with the next one when the detect is high again.

I hope I was clear enough..

any suggestion is really appreciated since this, apparently, simple problem is driving me crazy.

Thanks!!

Francesco

0 Kudos
Message 1 of 7
(3,301 Views)
Come up with a method to build a data point of NaN numeric constant into your XY graph array.
0 Kudos
Message 2 of 7
(3,297 Views)

Sorry but I don't understand..

let's try: do you mean that there is the chance that NaN values are entering the graph?

Well, I guess that when the Build XY graph is not active, there are no data entering the graph.

 

Francesco

0 Kudos
Message 3 of 7
(3,291 Views)

fradep wrote:

...

Here it comes my issue: after plotting one curve on the graph, starting point of the next one is automatically connected to the last of the previous one by an interpolation line.

...


Expanding on Ravens Fan suggestion.

 

Append one additional value to the end of each of your plots that contians the value "NaN". A "NaN" can not be plotted (since its not a number) so the plotting code will "left the pen" for lines assocated with that value.

 

Just trying to help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 7
(3,289 Views)

fradep wrote:

Sorry but I don't understand..

let's try: do you mean that there is the chance that NaN values are entering the graph?

Well, I guess that when the Build XY graph is not active, there are no data entering the graph.

 

Francesco


No.

 

You should add a "NaN" to the end of each plot to froce the graph to lift the pen.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 7
(3,287 Views)

Hi Ben,

sorry my misunderstanding..

I am going to try as soon as my collegues will release the PC 😄 and I'll let you know..

 

thanks a lot

 

Francesco

0 Kudos
Message 6 of 7
(3,279 Views)

Hi Ben!

I tried your suggestion, but it did not work.

I have made a conditioning on the pen_detect signal and when "true" I just pass the read value (it means that the pen was not raised up) while when "false" I pass a NaN constant to the Build Graph Express VI (both for X and Y values). Did I make something wrong??

thanks for the help

 

Francesco

0 Kudos
Message 7 of 7
(3,242 Views)