LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

log an analog shared variable

Hi,I wrote a message on this same subject 17 Sept 2007 on DSC Board without answer... (Writing tags forcefully - graph of historical data). My post was not read by anyone, so I am writing here...

The question is concerned with the old problem on logging an analog shared variable (...previously a tag) without regard to deadband specification. The question is relevant for the following reasons:
1) an analog value can change as a step non frequently (in my case is an analog set-point, read via OPC from a PLC); in that case there is not a recording in the database when the value stay constant and only a new value is "stamped" at new changes. This is correct, but, when I look to recent historical data, the (possibly very) old previous value (recording) change is not "in the window" (maybe could be various day old...).
2) when I graph in LabView (DSC) the hystorical trend I can only see (if the time interval is large enough...) a line connecting  the very old point to the new one; also if I KNOW that the change is "as a step" I can not show it as a step in a graph...
A possible solution for graph exist inside Measurement Explorer Hypertrends, that allows the so called YX and XY changes behaviour in the lines graph, but .... what about graphing in LabView ?!
A possible solution could be a force-writing in the database, that is the possibility to "stamp" a value in the database "for future reference", ignoring deadband setting, just to fix reference values at defined times from LabView .
In an old post (2003 !) something similar was promised in future versions of DSC, but now we deal with shared variables: how can we do the same thing ?! I have not found a solution!

Best Regard
Luca
0 Kudos
Message 1 of 5
(5,625 Views)
Hi Luca,
I had a similar problem some months ago. My solution was to build the database tables myself, polling on the related shared variables and detecting changes in their value. I used a few vi's: Create Database, Open Trace, Write Trace, Close Trace.
The advantage is that you have under full control when and why to write. You may also simulate a step-like behaviour by writing two times for each change (old value+current value, of course at slightly different timestamps). The drawback is that archiving is not free: you need to learn a bit more about Citadel databases and write some code (not very complicated code, anyway).
I should mention that I used LV 8.0.1 (with DSC), and I'm not aware of any possible improvement in subsequent versions.
Hope this helps.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 5
(5,608 Views)
Dear Paolo (italian like me, I guess...),
I understand your solution but, I should do  the same with all the variables I am logging ( to have all in the same database...). Or not?
Luca
0 Kudos
Message 3 of 5
(5,337 Views)
Ciao Luca, good question. To archive by code a variable, you need a reference to a single trace, not to the whole database, so my guess is that you can mix automatic and manual writing to the db. I didn't try, however, so you need to experiment yourself.

Questo DSC ha caratteristiche un po' differenti da quelle che mi figuravo prima di cominciare a lavorarci, però, una volta capito come gira il fumo, non dovrebbe essere difficile venirne a capo. Buon lavoro!

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 5
(5,333 Views)
Paolo se vuoi scrivimi. Lascio per poco il mio mail nel mio profilo.
Saluti
Luca
0 Kudos
Message 5 of 5
(5,318 Views)