Write trace to Citadel

I'm trying to take spreadsheet data and write it to individual traces inside DSC2012 to a Citadel 5 database. I keep getting an error -1967386570 Data has Back in time timestamp.
Searching the NI website, back in 2006 there was a way to do this with a vi server.
http://www.ni.com/white-paper/3485/en
Is this still possible with the current DSC version?
From the 2012 DSC help file.
Writing a Value to a Citadel Trace (DSC Module)
You can use the Write Trace VI to append a data point to a Citadel trace. Complete the following steps to write a value:
Add the Write Trace VI on the block diagram.
 Add  Find
Wire the trace reference output of the Open Trace VI to the trace referenceinput of the Write Trace VI.
Wire the value and timestamp inputs of the Write Trace VI. Leave the timestamp input unwired to use the current time. The Write Trace VI fails if the timestamp input is earlier than the timestamp of the last point written to the trace. You can determine the timestamp of the last point in the trace using the Get Trace Info VI.
So, is it no longer possible to write old data into Citadel traces?
I also saw some posts about a registry key for Citadel 5 about server timestamps, but I don't see a registry key where that note says it should be located.
Logging Back-in-Time
Most data logging systems generate ever-increasing time stamps. However, if you manually set the system clock back-in-time, or if an automatic time synchronization service resets the system clock during logging, a back-in-time data point might be logged. Citadel handles this case in two ways.
When a point is logged back-in-time, Citadel checks to see if the difference between the point time stamp and the last time stamp in the trace is less than the larger of the global back-in-time tolerance and the time precision of the subtrace. If the time is within the tolerance, Citadel ignores the difference and logs the point using the last time stamp in the trace. For example, the Shared Variable Engine in LabVIEW 8.0 and later uses a tolerance level of 10 seconds. Thus, if the system clock is set backwards up to ten seconds from the previous time stamp, a value is logged in the database on a data change, but the time stamp is set equal to the previous logged point. If the time is set backwards farther than 10 seconds, Citadel creates a new subtrace and begins logging from that time stamp.
Beginning with LabVIEW DSC 8.0, you can define a global back-in-time tolerance in the system registry. Earlier versions of DSC or Lookout always log back-in-time points. Use the backInTimeToleranceMS key located in the HKLM\SOFTWARE\National Instruments\Citadel\5.0 directory. Specify this value in milliseconds. The default value is 0, which indicates no global tolerance.
This key doesn't exist on my system.
This link from July 2012 seems to mention that it is still possible to use custom timestamps.
http://www.ni.com/white-paper/6579/en
Citadel Writing API
The DSC Module 8.0 and later include an API for writing data directly to a Citadel trace. This API is useful to perform the following operations:
· Implement a data redundancy system for LabVIEW Real-Time targets.
· Record data in a Citadel trace faster than can be achieved with a shared variable.
· Write trace data using custom time stamps.
The Citadel writing API inserts trace data point-by-point with either user-specified or server-generated time stamps.
Is there some more documentation out there that explains this process a bit better?

Hi unclebump,
I have been trying to determine what the best course of action would be and I think you need to move the data to a new trace. What I am thinking is for you to open a reference to the trace as it currently exists. Then you will need to read in all the data of that trace. While you read that trace you should also be reading in the data from your file. Once you have both sets of data you will need to iterate over all the data and merge the two sets of data based off their timestamps. The VIs to accomplish this should all exist in the DSC Palette >> Historical or DSC >> Historical >> Database Writing. There is a writing example in the example finder that is called Database Direct Write Demo that would probably be worth looking at. The write trace help says, "
This VI returns an error if you try to write a point with a timestamp that is earlier than the timestamp of the last point written to the trace." which means that if your data is merged and written in order you should not get this error.
Hope this helps and let me know if you have any questions.
Patrick H | National Instruments | Software Engineer

Similar Messages

  • Enable to have the Write File to Citadel Example working

    Did somebody already run the Write File to Citadel Example with success ?
    This exemple aims at Importing Spreadsheet Data to the Citadel Database, and is given in the NI developer Zone --> Development Library --> Labview --> DSC --> Data Logging.
    I can run the exemple as described without any visible problem. But when I look at Citadel (through MAX), I can't find any trace of the data I imported (sine_wave_one for instance). According to the SampleSpreadsheet.csv I used for import, I should find a trace in the database around the 21st of march 2002...
    But I found nothing.
    Any help?
    Thanks,
    Hélène.

    I am not sure how savvy LabVIEW programmer you are, but if you feel confident you can go ahead and try to debug the code.
    The VI based servers are running on the background. You can however make the front panel visible during the execution - not the diagram. The debugging means you have to create a few indicators on the panel that will show what is going on on the diagram.
    These are the steps the enable the front panel during the execution:
    1) Open the Write File to Citadel Server VI
    2) File>>VI properties; select Window Appearance
    3) Click Customize and check the Show FP when called and Show FP when loaded
    4) Save it and relaunch the engine!
    When you start the engine again, you should get th
    e server front panel. Once you'll have some indicators on the FP you'll be able to learn more about what is going on in the VI.
    I have noticed that sometimes the example pops up with a File dialog box. I found out this was related to a race condition in the example. I am not sure if that's what you see.
    Let me know.
    Also if the example executes you should see the tag values changing - for example the string tags starts with "Row 0", "Row 1" ...
    Is that what you see?
    Dr.Tag

  • DSC - Write Trace - Bit Array or Logical

    Hi,
    we are trying to write digital signals to a citadel database. The polymorphic function "Write Trace.vi" has the types logical and bit array.
    First of all I have created a new database and tried to write 10 digital signals of type boolean to the database. Unfortunately I get an error: "SPW_WriteBool.vi:2". I only can write the data into the citadel database if I convert the boolean to 0 and 1 values and write them via the numeric type. But this causes an overhead of factor 32.
    Is there a sample vi of using the "Write Trace.vi" function of type Logical or Bit Array. I've noticed that the trace which I have created is a analog one of type double. In another database of our company I've found a discrete trace of type double. Is this the problem?
    Kind Regards
    Joachim

    Many thanks for your help. MAX would be a nice and easy way to view the data, by the way, I try to view them with the Mixed Signal Graph. I am very new to LabVIEW and I am fighting now in correct reading of my data. I have 32 digital channels - each value of them is packed in an U32. When making a loop of my example 2 times for each channel should contain 2 values. But how can I program that the first boolean of the U32 is part of digital channel 1 - second boolean is part of digital channel 2 and so on? I've read that I can only transpose 2D arrays. Enclosed I've programmed the visualization of 2 digital channels containing 32 datapoints. But the result should be 32 channels with 2 datapoints.
    Kind Regards,
    Joachim
    Attachments:
    read from citadel - bit array.png ‏8 KB

  • [Bug] Writing to the same trace in Citadel from two Sources at the same time

    Howdy
    I am experiencing an issue and am looking to get some NI support:
    I have two distributed applications that can write to a Citadel database at the same time.
    And I am investigating the possibility of what would occur if both of them were writing to the same variable at the same time, with possibly the same timestamp data.
    I did this in the attached VI by using the same timestamps with a constant for the data (either #1 or #2).
    This generates an error, as expected, stating you cannot have two references open at the same time.
    The data file, dumped from Citadel, contains 1000pts with all data from only one of the arrays (in this case #2) and everything looks fine:
    However, what appears to be happening randomly tho, is that the same portion of code can also returns no error.
    When the data is dumped from Citadel this file contains 2001pts - 1000pts from each array and one separator (or break) point:
    You cannot write an older timestamp to Citadel without it throwing an error, but from further testing it seems you can write the same timestamp repeatably. So I am guessing what is happening above is race condition that is somehow allowing two references to be opened to Citadel which should throw an error but it does not and this is somehow allowing both sets of data to be written by both loops??
    The data, IMO, is now corrupted.
    Is being able to write to the same timestamp a desirable feature?
    Or is this a known issue or a bug?
    What about acquiring two references - bug?
    Is there a workaround to protect the data from multiple distributed-application writes?
    Cheers
    -JG
    Attached VI was coded and tested using LabVIEW 2009 SP1, DSC 9.0.1, MAX 4.6.2f1
    Certified LabVIEW Architect * LabVIEW Champion
    Attachments:
    dual_databaseWrite.vi ‏21 KB

    Ben S wrote:
    The race condition of opening the refererence in two places at once should still apply to two different VIs running at the sametime.
    Will a CAR be lodged for this?
    Ben S wrote:
    If you open up the code and save it as a .vit, you don't get any missing VIs. Only when you change the extension without the aid of LabVIEW.
    No VI should have missing members by simply renaming its extension outside of LabVIEW???
    I think there is an issue with the VI.
    Can you replicate the following and verify what I am seeing?
    Attached is a Project with Main VI (contains a call to the Open Trace.vi polymorphic only), a Class and a Build Spec
    If you Build the spec with the Main VI outside of the Class it works
    If you place the VI in the Class, save then Build, the Spec fails with the error:
    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:
    Error 1003 occurred at AB_Application.lvclasspen_Top_Level_VIs.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Engine_Build.vi -> AB_Build_Invoke.vi -> AB_Build_Invoke.vi.ProxyCaller
    Possible reason(s):
    LabVIEW:  The VI is not executable. Most likely the VI is broken or one of its subVIs cannot be located. Select File>>Open to open the VI and then verify that you are able to run it.
    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:
    Error 1003 occurred at AB_Application.lvclass:Open_Top_Level_VIs.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Engine_Build.vi -> AB_Build_Invoke.vi -> AB_Build_Invoke.vi.ProxyCaller
    Possible reason(s):
    LabVIEW: The VI is not executable. Most likely the VI is broken or one of its subVIs cannot be located. Select File>>Open to open the VI and then verify that you are able to run it.
    Next place a disabled structure around the Polymorphic VI (as Class Member or not, it doesn't matter)
    Save the VI
    Close the VI
    Open the VI - the Open Trace.vi polymorphic is "missing"
    Cheers
    -JG
    Code in LV2009
    Certified LabVIEW Architect * LabVIEW Champion
    Attachments:
    DSC.zip ‏341 KB

  • Write traces to spreadsheet file mis-wiring

    I want to extract the data from the DSC database based on a user- or program- defined time range and write that data to a text file. I have the first stages of that set up here, but there is a broken wire (cluster type) that I don't understand what about it is broken.
    According to the help dialog for "Write Traces to Spreadsheet File", the trace information cluster shown in the vi should be correct. But it is not and is marked as a false connection. What is wrong???
    Attachments:
    extract_data_from_database_-_sent_to_NI.vi ‏52 KB

    Change the order of the objects inside your cluster. Disconnect the cluster wire from the write traces to spreadsheet file vi. Right click on the terminal and select create constant. Turn on the context help window and move the cursor to both wires and note the order of the items in the datatype of the wire.

  • Write File to Citadel Example works or not depending on the Win200 session

    I've run the Write File to Citadel Example. It works fine in one of my win2000 sessions but doesn't run in another different sessions in the same computer. Both sessions with administrator privileges. I've tryed to run it in a different computer but with no success.

    Is your Win2000 computer running the NTFS file system? If so, one user may have different file read/write permissions for the affected files.

  • Error "Event Queue Overflowed​" with the "Write file to Citadel Server"

    Hello,
    I can import data from a file and I can see the data
    in the historical database without troubling.
    But I always have this error "Event Queue Overflowed", that don't perturb my data and my application (I have just this boring message).
    I have tried many things :
    - increasing the size of my input buffer (-> 1.000.000, no change) : I don't think so that it's important because I've tried with a value of 100 and anyway sometimes my application works with this small value of 100.
    - increasing the File_location tag size (-> 260). No change.
    - My write to Citadel.cfg is in the LabVIEW folder.
    Can you help me ?
    Thank you.

    Hi,
    What version of LabVIEW DSC are you using? if it is 6.1, have you applied fixes linked below.
    http://digital.ni.com/softlib.nsf/websearch/513AA4​A0BB60D10086256B48006D44B5?opendocument
    I have seen a similar issue at the link below.
    http://exchange.ni.com/servlet/ProcessRequest?RHIV​EID=101&RNAME=ViewQuestion&HOID=506500000008000000​8C640000&ECategory=LabVIEW.Datalogging+and+Supervi​sory+Control
    Please let me know if you have read it through?
    Best Regards,
    Remzi A.

  • Unable to write trace files in Background dump destination in oracle 10g

    Hi All,
    OS version : RHEL 5.7
    DB version : 10.2.0.4
    cluster : 2 node RAC database
    Today I faced a strange behaviour for one of our production database. Its a 2-node rac database. On the first node there is no auto generation of trace files in the BAckground dump destination. I am able to see trace files of second in its background dump dest. But the strange behaviour occurs on the first node. I see only Alert log file in the background dump dest . Inspite of getting an error which shows trace file generated but no file occurs in the bdump. The following is the error but physically there no trace file generated:
    Errors in file /oracle/db/admin/<sid>/bdump/<sid>j0011558.trc:
    ORA-12012: error on auto execute of job 94377
    ORA-12008: error in materialized view refresh pathCan anyone have any idea for this strange behaviour. There are no maintenance script for removal of trace files.
    Regards,
    Imran Khan

    ORA-00980:synonym translation is no longer valid
    Cause:The synonym used is based on a table, view, or synonym that no longer exists.
    Action:Replace the synonym with the name of the object it references or re-create the synonym so that it refers to a valid table, view, or synonym.
    Check the following :
    From User Number 1 : Osama1
    create table osama_table as select empname from scott.emp;
    create public synonym osama_tbl for osama_table ;
    grant select on osama_tbl  to user_b;
    From User Number 2 : Osama2
    select 1 from osama_tbl;
    SMITH
    ALLEN
    JONES
    MARTIN
    From User Number 1 : Osama1
    drop table osama_table;
    From User Number 2  : Osama2
    select 1 from  osama_tbl;
    ORA-00980: synonym translation is no longer valid

  • How I can forced close the Citadel Trace References

    On my application I write data to Citadel traces using "Database Writing
    VIs" (Open Trace.vi .. Write Trace.vi ... Close Trace.vi).
    Sometimes if my application "crash" the Close Trace.vi is not executed and that's why the "trace references"
    are NOT closed.
    When start my application again I get error: "There is already an open writer for the selected trace."
    This is natural because the references are not closed when application crash.
    My question: How can I solve problem like this?
    Is there any function on the Citadel Engine what I can use to "force"
    close all writer references, reboot engine etc, get references already opened?
    An attachments there is example VI and EXE.
    Attachments:
    CitadelTest-LV2011.zip ‏531 KB

    Hello Mikko!
    I can see that we have Services as NI Citadel 4 Service and NI Citadel 5 from Services in Administration tools. Can you try to restart them and see if the effect is something that you need. From then maybe we could try something out.
    BR,
    Make Nguyen
    NI Finland Technical support.
    Attachments:
    citadel.png ‏151 KB

  • Write to Citadel database from LabVIEW?

    Hi. I'm a newbie when it comes to Lookout and the Citadel database... so here's my question for you all:
    We have various labview applications that log data from instruments. We would like to be able to take this data and store it as "tags" in a Citadel database.
    What do you think is the best way to do this?
    There are ODBC drivers for the Citadel database, but they appear to only allow you to query the database to retrieve values... you can't write data to the database (so its read-only).
    Are they any "Lookout VIs" or Citadel VIs that can write to the Citadel DB from LabVIEW? Or a DLL or something?
    Any ideas?
    regards,
    John Paul

    Very nice question John Paul. I take it you already have Lookout and LabVIEW. In this case, with the latest versions of either, simply use the LabVIEW datasocket to publish the items on your front panel. Lookout then can subscribe to these once you register the LabVIEW computer. Once you have subscribed to them in Lookout, you are then able to set up logging. You may need to create an expression object to route the data to citadel.
    If you just want to use LabVIEW and the Citadel database, you might try VI Logger. This works in our configuration utility - MAX, and also comes with a set of VIs for LabVIEW. One caveot, the Citadel database in VI logger is newer (and faster) than the Citadel database in Lookout. I believe NI is working to synchronize
    the version in the future, and its hard to say when. So till then, you would not be able to merge data in the dislike citadel databases. However, you can always use and ODBC call set to extract from both and store in a more permanent SQL database such as access, oracle, ms back office, etc.
    Good Luck,
    Preston Johnson
    Business Development Manager
    Industrial Applications
    National Instruments
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • I want to write Spreadsheet Data to Citadel 4 (and Citadel 5)

    I use the example "Write file to citadel".
    http://zone.ni.com/devzone/conceptd.nsf/webmain/5A921A403438390F86256B9700809A53?opendocument
    If I run the example, only the Row_String is running, the other tags at the front panel keep zero.
    In the Database I can find Row_String Data, but they do have the actual date !
    What's wrong ?
    New test.:
    I write my own csv-file.
    Make a new Registration.
    Only one Tag, 10 rows, Timestamps from 1 to 10 (which means 1.1.1904 12:00:01 and so on)
    What do I get in citadel? The actual date!
    What's wrong?
    Will there be a better ore more elegant way to write data to Citadel?
    How about Citadel5 and LabVIEW 7 ???
    Thank you for your help
    PS: I did read the dis
    cussion : "Enable to have the Write File to Citadel Example working" It didn't help.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=5065000000080000008C640000&ECategory=LabVIEW.Datalogging+and+Supervisory+Control

    I saw your problem and probably you've solved it already... but here I found an interessting KB which directs to the problem... VI-based servers serving own timestamps or will be ignored with a specific DSCEngine.ini setting: UseServerTimestamps=false which is default set to false to avoid race conditions in the DSCEngine and to avoid back in time problems... see more How Do I Avoid Out-of-Synch (a.k.a. Back-In-Time) Timestamps in the Citadel Database?
    I agree with you, writing VI-based server to log timestamped values is not really convinient. We just can hope that NI will come up in the near future with a logger VI similar to Lookout's logg
    er object.
    Hope this helps
    Roland

  • Hypertrend problem adding trace from block diagram

    Hello,
    does anybody know the propper way to add a trace/traces to Hypertrend. To be more exact, I have multiple traces in Citadel databes that I want to extract programmaticly do some manipulations and them show the trace on hypertrend. When I try to replicate the solution from Examples (Trend Viewing Options and simnilar) the result is following : 
    I tried everything but I can't get to write to the field "Trace Path" (shown on picture above) instead by writing to URL property it writes to "Name:" field. 
    EDIT: I use LabView ver 7.1

    jliles wrote:
    Have you had a chance to look at this example? Would it provide you with the functionality you are looking for?
    Community Example
    Hello jliles,
    I've tried the mentioned example but with no joy. I've switched to LV 2010 but still cannot programmaticly add traces from library. Here is the current version that I'm trying to make work.
    The main reason thaht I'm trying to use HyperTrend is the issue that is coming up when using XY Graph with Citadel database. Under some conditions the XY Graph sets the begining of time to year 1904 when reading a trace. The HyperTrend doesnt have that problem, but the problem is how to add traces programmatically the same way I do it with XY Graph.
    Thank You for Your time.

  • Writing trace to ABAP proxy

    Hi Friends,
    is there any way to write trace message in ABAP proxy (server proxy).
    I have a case where during processing of the inbound proxy i want to populate some information messages as trace, which can then be seen from SXMB_MONI-trace of the message.
    I saw that only fault messages can be raised. But how to write a normal trace .
    Any help will be useful  -& rewarded with points.
    thanks
    PSD

    Hi Prabhu,
    just as in message mapping we can write a trace in udf , i want to do the same for ABAP inbound proxy message.
    So when user logs on to the SAP R/3 system & sees the  message trace (in SXMB_MONI), he should be able to see the information messages triggered from within the inbound proxy method (EXECUTE_ASYNCHRONOUS) .
    My business requirement is , i am creating a Handling unit using the data in the proxy msg .
    So  i want to log all the HUs created during the processing of the inbound proxy message in R/3.
    So trace in SXMB_MONI should be as follows :
    " HU <1> created"
    "HU <2> created "
    ...& so on.
    This way the user can see the message trace & figure out all the data that was processed & what was the end result.

  • Writing Trace Info to and Opening an Excel File on command

    I am currently using a Read Traces (numeric) vi to collect values from Tags and output them to a XY Graph. Alongside the graph on my front panel, I would like a boolean control to command (when true) LV to write the data to a spreadsheet and open that spreadsheet so it appears on screen, ready for the user to view and then save the excel file where he/she would like.
    Is this possible? I am a little unsure what File I/O functions I need in order to achieve this? I have tried using the "Write Traces to Spreadsheet vi" available in the DSC module, but haven’t had much success. I have attached my code to show you how far I have got.
    Any help with this problem will be very much appreciated.
    Thanks,
    Stuart Wilson
    Attachments:
    Writing Trace Info to Excel File.vi ‏77 KB

    Hi Stuart,
    I have written an example piece of code for you which has the basic functionaliy that you want.
    The example plots random data to a chart. When the boolean is pressed this data is written to a spread sheet file and Excel is opened to display this data.
    As it is a generic solution you need to replace certain items when you incorporate the structure into your code: Instead of writting the history data of a chart you can use the "write traces to spreadsheet.vi" to write the data. The automation of excel can then be used in the same way as in the example.
    There is also an example available in the "LabVIEW Example finder" called "Write Table to XL.vi". This example takes the data from a table and cell by cell inserts it into an excel speadsheet. Which the operator can then save from within excel. However, this method is not the most efficient way to get data into Excel.
    I hope this is helpful.
    Emma R
    NIUK & Ireland
    Attachments:
    SR_300720_Example.vi ‏68 KB

  • Separated trace file which I can read with the log viewer

    Hi All,
    I 'd like to write trace infomation.
    I know I can use the default trace.
    But I 'm looking for a way to write my application information in a separated file,
    which I can read with the log viewer.
    Can someone help me with this
    Thnaks
    Steve

    Hi epexpert,
    thaks for your reply.
    I tried it with the Filelog.
    The Problem is that it logs to the file (its not problematically) but also to the defaulttrace
    and thats not my preferred solution.
    Do you have any other ideas?
    Bye Steve

Maybe you are looking for

  • Just had replacement iPhone 4S but my music won't download?

    Just had replacement iPhone 4S but my music won't download? All my purchased albums are showing on iTunes Store and my iPad but won't download onto new iphone. I just bought another album on my phone and that won't download either. My phone is on IOS

  • Application Server File Status

    Hi, I'm trying to read a file from AL11 which is written by a standard program. I want to ensure that file is completely written on Appl. server by the standard program before I start reading that file from my Custom Program. Kindly Tell me the metho

  • Keep the order in a file to sql transfert

    Hi Is there any mean to have records in a target table in the same order as they appear in a source flat file ? the file contains only one data per line thanks

  • Switch Management

    Hey Folks, There seems to be two schools of thought when it comes to switch management. From what I've read, two different approaches seem to be recommended. The first is to create a switch management VLAN, and trunk it to all the switches. The secon

  • Libary

    hi just wondered as a new user best way to store photos i have at the moment all my photos in iphoto. is it best to just share the libary with aperture or dublicate it from i photo and have 2 indentical. if i share it if i edit in aperture does it au