From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Deactivate the automatic interpolation of data in DIAdem

Bonjour!

Nous sommes intéressés à désactiver l'interpolation que DIAdem fait automatiquement des données manquantes d'une base de données MySQL. En fait nous voudrions fixer une valeur de plage manquante à partir de laquelle l'interpolation des données ne se ferait  plus.  Par exemple: si les données sont absentes sur moins de 30 minutes, interpoler, si les données sont absentes sur plus de 30 minutes, ne pas interpoler. Est-ce possible de donner ce paramètre à DIAdem? Merci!


0 Kudos
Message 1 of 5
(3,714 Views)

Salut Frpic76,

Bienvenu au forum de National Instruments. DIAdem ne fait pas l’interpolation automatique, il va seulement vous montrer les valeurs qui sont dans la base de données. Si vous faites une interpolation manuelle, pourriez-vous me spécifier la fonction que vous utilisez?  Cela nous permettra de vous aider plus facilement.

Alors, l’interpolation est généralement déterminée par le nombre de points (N) que vous voulez entre les valeurs que vous avez. Veuillez svp noter que le delta temps des données (échantillons peut-être) est constant, et l’interpolation est linéaire (c’est-à-dire N divisions égales).

Gerardo O.
RF SW Engineering R&D
National Instruments
0 Kudos
Message 2 of 5
(3,684 Views)

Hi frpic76,

Let me repeat back to you in English what I think you're asking and then give you a few thoughts-- unfortunately my ability to write French is even worse than my ability to read it.  It sounds like you want to apply interpolation to your aquired data only when the region of missing data is within a certain minimum amount, but if you have data missing for much longer intervals (say, between tests run in different months) you do not want any interpolation.  This sounds reasonable enough.  You also mention that you are storing the data in a MySQL data base, so I'm surprised that you can not query out only the data you want (which presumably all falls into the category of needing interpolation).

I'm also unclear what you mean by interpolation.  Normally I would understand that to mean imposing an expected timebase on data that was acquired at larger time intervals or at irregular time intervals, wherby you determine the interpolated Y values based on weighted linear extrapolation from the closest adjacent acquired values.  But DIAdem does not do this automatically, as you seem to suggest.  What DIAdem does do is plot all isolated XY cartesian pairs on a VIEW or REPORT graph, but here DIAdem just connects each individual graphed data point to the next data point with a straight line-- the intervening values are neither calculated nor regular.  Still, if this is what you mean, then there are two easy solutions.  First, you can insert a NoValue after the end of the values from the first data set and before the values of the second data set-- graphs in VIEW and REPORT will not plot a line to a NoValue.  Alternatively, you could change your SQL query to only read into DIAdem the data from one measurement at a time.

Feel free to ask follow-up questions in English or French,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 5
(3,683 Views)

Thank you Brad and Geraldo fro answering so quickly to my question. The problem, as Brad stated, is that the missing data have to be shown on the graph only when they are within a certain interval. The data are piling each 30 sec within the MySQL database. But because of communication problems between the PLC and MySQL, data might be missing for 5 min, 10 min or even 1 hour. On the graph, we don't want interpolation on a time gap greater than 15 minutes.

Where do you put the No Value statement in the code and is it possible to interpolate on the graph with a different method than the linear interpolation (ie mobile average?)

Thank you!

 

 

 

 

0 Kudos
Message 4 of 5
(3,622 Views)

Hi frpic76,

OK, now I think I understand your situation and what you want.  Let me start by telling you how DIAdem behaves by default.  A DIAdem graph can show a marker for each measured data point and/or a line connecting each measured data point.  There is also a display method in REPORT for each individual curve which will connect measured data points with a "smoothed" line-- I believe it uses a spline fit to do so.  Also in REPORT and for each individual curve you can specify whether the displayed line connects across NoValues or shows a gap where each NoValue is.  So in your case, you want to use the default behavior that does not connect the line across NoValues, and you therefore also need to insert a NoValue halfway between any two measurement points that span longer than 15 minutes, since you don't have the NoValues in your data base.

This will require a VBScript to insert these NoValues, but it won't be too hard.  If you are willing to send me a data file of representative data queried from your SQL data base, I would be willing to send you back a VBScript subroutine you can add to the end of your VBScript that queries the data out of the data base and imports it into DIAdem channels.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 5 of 5
(3,598 Views)