DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Import from Citadel to Diadem gets bad time values

Solved!
Go to solution

I have setup a data store and pulled in storage variables from a Citadel 5 database. 99% of the data is fine. I wrote the data into the Citadel database from a Labview program with the write trace vi. Now everywhere data stopped and started there is a 0 value for the gage, and the timestamp reads "??/??/???? ??:??:??.????." I tried to remove this bad data with the remove "No Values" function, but it was unsuccessful.

 

The dataset is of 4e6 rows long, so it is unreasonable to do it by hand. Any suggestions?

0 Kudos
Message 1 of 6
(4,457 Views)

Hello,

 

This forum gives some tips on how to search/replace the values in a channel using a vbs script. This would be the easiest way to get this done for you.

 

Are you looking to remove these entries completely? You think you can post a small skippet of your data with this bad data entry? Maybe even just a screenshot? Thanks!

---

Peter Flores
Applications Engineer
Message 2 of 6
(4,423 Views)

pflores, thanks, this looks promising. I will try this out. In regards to your request, here is a small screenshot. I am currently of the belief that the entries need to removed completely, as my impression is that Diadem is fouled by this bad data item in H10G4_lvdt.time, and the data cannot be used as the x-values until then.

 

niDiademTS.gif

0 Kudos
Message 3 of 6
(4,414 Views)

Hi gpburdell,

 

I don't know why you're getting those odd date/time values from Citadel, but when DIAdem displays ????s in a date/time channel, it usually means that the numeric values behind the date/time are negative.  You can change the display of the date/time channel from "Time" to "Numeric" in its Data Portal property table to view the exact double values imported to the date/time channel.  It could be that there is a logical way to shift these date/time values numerically from the current negative value to the correct positive value, or you could just convert any negative value to NoValues and remove each row from all channels where the date/time channel has a NoValue.

 

What version of DIAdem are you using?

Brad Turpin

DIAdem Product Support Engineer
National Instruments

Message 4 of 6
(4,403 Views)

So, indeed it is a negative number is the Time is converted to a number.

 

I am using version 11.1. In easy ways to convert the negative nuumber to NaN, or am I still looking at vbscript?

 

niDiademTS2.gif

0 Kudos
Message 5 of 6
(4,396 Views)
Solution
Accepted by topic author gpburdell

Hey gpburdel,

 

Yeah, you'll need to run a VBScript, but at least it's a simple VBScript:

 

L1 = CNo("H10G4_lvdt.time")

Call FormulaCalc("Ch(L1):= Ch(L1) + NoValue*(Ch(L1)<0)")

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 6 of 6
(4,389 Views)