Timestamp surprise on cRIO

Hi all,
I'm having trouble with timestamp formating on my cRIO.
I saw in MAX that cRIO doesn't support DST, I assume that why I get 1h difference between the time stamp and the string formated value, right?
What can I do to have the string match the timestamp display?
Cheers
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
Solved!
Go to Solution.

Hi TiTou,
I didn't found your function, but there are also another ones that might be usefull for you, for example you have the:
Or there is another that is more direct. The next image shows you both functions to see if there is one that fits to your project.
If your question is specifically because you need to use that function, can you tell me the name so I can search it in a better way?
Regards.

Similar Messages

  • Changer les fractions de secondes sur cRIO 9104

    Bonjour,
    Voilà mon problème, je cherche actuellement à changer les millisecondes du timestamp de mon cRIO 9104. J'ai vu qu'il était possible de le faire via une dll sur les 901x targets mais bien sur cette méthode ne fonctionne pas sur le 9104. De plus je ne comprends pas pourquoi il est possible de lire les millisecondes sans pouvoir les modifier...
    Connaitriez vous une méthode pour faire ceci sur cette cible ?
    Merci
    Romain

    Bonjour Romain,
    Le TimeStamp est une information relative à la réference de temps de votre contrôleur, situé au niveau de votre cible cRIO (chassis+contrôleur). Le 9104 est un chassis et non un contrôleur.
    Quelle est la réference du contrôleur utilisé?
    Quelle est la nécessité concernant cette modification du timeStamp (faire du calcul, synchroniser...)?
    Cordialement,
    Rémi D.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Les rencontres techniques de NI - Mesures et acquisition de données : de la théorie à la mise en ...

  • Logging Bound IO Variable (Hosted on RT) Issue

    Is there a way to get a IO Variable that is hosted on a RT target and bound to a localhost Variable to log in Citadel?
    As per the video, the Variable stops logging when it is bound and starts logging when it is not.
    (Note: the localhost Variable it is bound to a Variable on the RT which acts as an interface for that target. That variable is actually bound to an IO Variable, this was a design decision so that the target could be reconfigured whilst maintaining an interface).
    The current value is always displayed in the DSM though.
    I can't find the link at the moment but I remember reading an NI KB that said Enable Timestamp has to be ticked.which it is, but its not working.
    (It is greyed out because of the above - it is bound to an IO Variable).
    Is this a bug?
    Cheers
    -JG
    Unable to display content. Adobe Flash is required.
    Certified LabVIEW Architect * LabVIEW Champion

    sachsm wrote:
    One thing you might keep in mind is that when you bind a PC hosted NSV to a cRIO NSV you will inherit the timestamp of the cRIO.  Unless you are running 1588 PTP then the cRIO system time will most likely not be sync'd to the PC clock.  The DSM x axis is driven by the windows system time and if your incoming data has timestamp outside of the x axis window then you will not see it on the historical chart.
    http://forums.ni.com/t5/Real-Time-Measurement-and/​Why-is-the-DSM-Hypertrend-graph-x-axis-is-tied-to-​...
    Thanks for the reply and link sachsm (interesting read).
    However, the above is not the issue in this case as no-data is being logged.
    This can be proved by if I export the data to a text file - the text file is empty.
    Cheers
    -JG
    Certified LabVIEW Architect * LabVIEW Champion

  • CRIO-9068 time synchronization and data timestamping - the Big Picture

    I'm working with a number of cRIO-9068 chassis that are distributed over a large physical area. I wish to timestamp data acquired be these chassis with microsecond resolution and relative accuracy. The various documents that I've run across hint at how this might be accomplished but none of them really describe the overall architecture for synchronization of chassis clocks over a network and acquisition of the local clocks for the purpose of data timestamping. Is there a document that addresses this topic?

    http://www.ni.com/pdf/manuals/376007a.pdf:
    Using the Internal Real-Time Clock
    The system clock of the cRIO-9068 is synchronized with the internal high-precision real-time clock at startup. This synchronization provides timestamp data to the controller. You can also use the internal real-time clock to correct drift of the system clock. Refer to the Internal Real-Time Clock specification in the Specifications section for the accuracy specifications of the real-time clock.
    What are the "system clock" and "real-time clock"? How are they related? How does the synchronization provide timestamp data to the cRIO-9068 controller? How does the internal real-time clock correct drift of the system clock?
    http://www.ni.com/pdf/manuals/373185a.pdf:
    No theory of operation whatsoever.
    Note: https://forums.ni.com/t5/LabVIEW/cRIO-9068-amp-NI-TimeSync/td-p/2838178 suggests that NI-TimeSync may not be available for the cRIO-9068:
    Currently NI-TimeSync 1.3 is not supported on Linux RT. This is something that's in the works but there is no ETA.

  • How to get system time from cRIO?

    Hello,
    I have an NI cRIO-9076 chassis with an NI-9467 GPS module and an NI-9234 module.
    I've downloaded the FPGA Timekeeper application which synchronises the FPGA clock to the 1PPS GPS, this works well.  What I want to do is create a trigger that at a pre-defined HH:MMS the system will start to acquire and log data from the Accelerometers connected to the NI-9234 module.
    I have added the controls for the entry of the HH:MMS and calculated the time in seconds.  I would like to compare the system clock once it is locked to the entered timestamp and then trigger.
    As I only have a value that represents seconds in the day I need to calculate the offset from EPOCH to compare against the GPS time reference.  I have read that the NI system clock runs from 01/01/1904 instead of the EPOCH 01/01/1970.
    The question is how do I get the current system time so that I can compare it against the entered time?  I only need seconds in the day = (HH * 3600) + (MM * 60) + (SS)
    Thank you,
    Kind Regards,
    Simon

    You should use the Get Date/Time in Seconds VI which will return a timestamp. You can then format this timestamp using the Format Date/Time String to give you exactly the time format that you need. Then you can extract the numbers you need and do your math.
    www.movimed.com - Custom Imaging Solutions
    Attachments:
    Get Seconds in Day.vi ‏9 KB

  • How to spool file with a timestamp/seq_number in the file name

    Hi I try to write a test script that will have some kind of timestamp or seq_number in the spool output file's filename itself.
    so e.g.
    test_abc_20120425161616.txt
    I can do it on shell but is there a way I can do it all in sqlplus.
    I recall I see something similar in statpack long time ago..

    vxwo0owxv wrote:
    Hi I try to write a test script that will have some kind of timestamp or seq_number in the spool output file's filename itself.
    so e.g.
    test_abc_20120425161616.txt
    I can do it on shell but is there a way I can do it all in sqlplus.
    I recall I see something similar in statpack long time ago..
    >Hi I try to write a test script that will have some kind of timestamp or seq_number in the spool output file's filename itself.
    so e.g.
    test_abc_20120425161616.txt
    I can do it on shell but is there a way I can do it all in sqlplus.
    I recall I see something similar in statpack long time ago..
    set termout off
    col dt new_value dt
    select to_char(sysdate,'YYYYMMDDHH24MISS') dt from dual;
    set termout on
    spool file_&dt
    -- place your SQL here
    spool off
    Handle:     vxwo0owxv
    Status Level:     Newbie
    Registered:     Mar 14, 2011
    Total Posts:     142
    Total Questions:     79 (59 unresolved)
    WHY am I NOT surprised?
    Edited by: sb92075 on Apr 24, 2012 4:37 PM

  • Shared variable, missing data, the same timestamp for two consecutiv​ely data

    hello
    I have a problem with missing data when I read from a network published shared variable.
    Host VI:
    In a host VI on my Laptop (HP with WinXP Prof.) i'm writing data to the shared Variable "data". Between two consecutively write operations is a minimum of Milliseconds waiting time. I use that because I want to be sure that the timestamp for each new data value is different then the preview one (resolution shared variables is 1 ms)
    Target VI:
    the Target VI on a cRIO-9012 realtime device is reading only new data in the way that it compares the timestamp of a new value with the timestamp from the last value.
    Problem:
    rarely, I'm missing a datapoint (sometimes everything works fine for several hours, transferring thousands of data correctly before suddenly the failure happens). With some workaround I'm able to catch the missing data. I've discovered that the missing data has the exactly same timestamp then the last readed datapoint, therefore is ignored in my "legal" data.
    To sum up, the missed value is written to the shared variable in the host, but the target ignores him because his timestamp is wrong, respectively the same as the last value has, despite the host waits every time for a minimum of 10 milliseconds before writing a new value.
    Note:
    The shared Variable is hosted on the Laptop and configured using buffering.
    The example is simplified only to show the principle function, in real I use also a handshaking and I secure that there is no over- and underflow.
    Simplified Example:
    Question:
    Has someone an idea why two consecutively data can have the same timestamp ?
    Where is the (wrong) timestamp finally coming from (system?) ?
    What would be a possible solution (at the moment with shared Variables) ?
    -> I tried a workaround with clusters where each data gets a  unique ID. It works but it is slower than comparing timestamps and I could get performance problems.
    Would it change something when I host the shared Variable on the RT-System ?
    Thanks for your help
    Regards
    Reto
    Solved!
    Go to Solution.

    Hi Reto,
    I had a look on your modified Example.
    Because the Shared Variables didn`t work like Queues or Notifiers (No Event or Interrupt when a new value has been written. And for sure the´re not possible over a network) you will see the issue, that the code is reading the values more often with the same timestamp (Polling Problematic) if the reader is faster then the writer. And because the timestamp is written with the value you´re able to program like you do. Filter out whats duplicated when you have the same timestamp.
    Everything is described in here:
    http://zone.ni.com/devzone/cda/tut/p/id/4679#toc1
    Laurent talked about a second depth of buffer. Please have also a look at the link. Somewhere in the middle of the tutorial you see the explanations of Buffer and RT-Buffer.
    Regarding your question: Would it change something when I host the shared Variable on the RT-System? --> No
    In my experiences, you should consider to place the Shared Variable Engine after asking some questions regarding the application.
    You will find the Answers to this 3 Questions also in the link:
    Does the application require datalogging and supervisory functionality?
    Does the computing device have adequate processor and memory resources?
    Which system is always online?
    And you`re right the smalles time interval you can see in the timestamp is 1ms.!
    What you also can do is working with an enabled "timed out". This might be more performance efficient than reading the timestamp.
    What I don`t know and not find up to now, is if LabVIEW or the OS adds the timestamp. It´s taken from the system time, this looks like LabVIEW is taking the value and adds it. 
    I hope this helps
    Alex
    NI Switzerland

  • How to get timestamp to start at zero hours?

    Hi.
    I'm building a software that logs values to excel.
    The user can enter how long the test should run for, and the time elapsed should be set as a string in [hh:mm:ss]
    The only problem is that the TimeStamp starts at 01:00:00 (beacuase of the 1904-issue i guess). How can I get the counter to start at 00:00:00, or maybe subtract the one hour in the begining so it starts at zero.
    If you run the VI you'll understand what I mean.
    Thanks!
    Is my avatar the dog from the fraggle rock?
    Solved!
    Go to Solution.
    Attachments:
    forum_program1.vi ‏26 KB

    Hi auto,
    you have to use relative time instead of absolute time - see attachment...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    forum_program1.vi ‏27 KB

  • Overloading a DATE function with TIMESTAMP to avoid "too many declarations"

    CREATE OR REPLACE PACKAGE util
    AS
      FUNCTION yn (bool IN BOOLEAN)
        RETURN CHAR;
      FUNCTION is_same(a varchar2, b varchar2)
        RETURN BOOLEAN;
      FUNCTION is_same(a date, b date)
        RETURN BOOLEAN;
      /* Oracle's documentation says that you cannot overload subprograms
       * that have the same type family for the arguments.  But,
       * apparently timestamp and date are in different type families,
       * even though Oracle's documentation says they are in the same one.
       * If we don't create a specific overloaded function for timestamp,
       * and for timestamp with time zone, we get "too many declarations
       * of is_same match" when we try to call is_same for timestamps.
      FUNCTION is_same(a timestamp, b timestamp)
        RETURN BOOLEAN;
      FUNCTION is_same(a timestamp with time zone, b timestamp with time zone)
        RETURN BOOLEAN;
      /* These two do indeed cause problems, although there are no errors when we compile the package.  Why no errors here? */
      FUNCTION is_same(a integer, b integer) return boolean;
      FUNCTION is_same(a real, b real) return boolean;
    END util;
    CREATE OR REPLACE PACKAGE BODY util
    AS
         NAME: yn
         PURPOSE: pass in a boolean, get back a Y or N
      FUNCTION yn (bool IN BOOLEAN)
        RETURN CHAR
      IS
      BEGIN
        IF bool
        THEN
          RETURN 'Y';
        END IF;
        RETURN 'N';
      END yn;
         NAME: is_same
         PURPOSE: pass in two values, get back a boolean indicating whether they are
                  the same.  Two nulls = true with this function.
      FUNCTION is_same(a in varchar2, b in varchar2)
        RETURN BOOLEAN
      IS
        bool boolean := false;
      BEGIN
        IF a IS NULL and b IS NULL THEN bool := true;
        -- explicitly set this to false if exactly one arg is null
        ELSIF a is NULL or b IS NULL then bool := false;
        ELSE bool := a = b;
        END IF;
        RETURN bool;
      END is_same;
      FUNCTION is_same(a in date, b in date)
        RETURN BOOLEAN
      IS
        bool boolean := false;
      BEGIN
        IF a IS NULL and b IS NULL THEN bool := true;
        -- explicitly set this to false if exactly one arg is null
        ELSIF a is NULL or b IS NULL then bool := false;
        ELSE bool := a = b;
        END IF;
        RETURN bool;
      END is_same;
      FUNCTION is_same(a in timestamp, b in timestamp)
        RETURN BOOLEAN
      IS
        bool boolean := false;
      BEGIN
        IF a IS NULL and b IS NULL THEN bool := true;
        -- explicitly set this to false if exactly one arg is null
        ELSIF a is NULL or b IS NULL then bool := false;
        ELSE bool := a = b;
        END IF;
        RETURN bool;
      END is_same;
      FUNCTION is_same(a in timestamp with time zone, b in timestamp with time zone)
        RETURN BOOLEAN
      IS
        bool boolean := false;
      BEGIN
        IF a IS NULL and b IS NULL THEN bool := true;
        -- explicitly set this to false if exactly one arg is null
        ELSIF a is NULL or b IS NULL then bool := false;
        ELSE bool := a = b;
        END IF;
        RETURN bool;
      END is_same;
      /* Don't bother to fully implement these two, as they'll just cause errors at run time anyway */
      FUNCTION is_same(a integer, b integer) return boolean is begin return false; end;
      FUNCTION is_same(a real, b real) return boolean is begin return false; end;
    END util;
    declare
    d1 date := timestamp '2011-02-15 13:14:15';
    d2 date;
    t timestamp := timestamp '2011-02-15 13:14:15';
    t2 timestamp;
    a varchar2(10);
    n real := 1;
    n2 real;
    begin
    dbms_output.put_line('dates');
    dbms_output.put_line(util.yn(util.is_same(d2,d2) ));
    dbms_output.put_line(util.yn(util.is_same(d1,d2) ));
    dbms_output.put_line('timestamps'); -- why don't these throw exception?
    dbms_output.put_line(util.yn(util.is_same(t2,t2) ));
    dbms_output.put_line(util.yn(util.is_same(t,t2) ));
    dbms_output.put_line('varchars');
    dbms_output.put_line(util.yn(util.is_same(a,a)));
    dbms_output.put_line(util.yn(util.is_same(a,'a')));
    dbms_output.put_line('numbers');
    -- dbms_output.put_line(util.yn(util.is_same(n,n2))); -- this would throw an exception
    end;
    /Originally, I had just the one function with VARCHAR2 arguments. This failed to work properly because when dates were passed in, the automatic conversion to VARCHAR2 was dropping the timestamp. So, I added a 2nd function with DATE arguments. Then I started getting "too many declarations of is_same exist" error when passing TIMESTAMPs. This made no sense to me, so even though Oracle's documentation says you cannot do it, I created a 3rd version of the function, to handle TIMESTAMPS explicitly. Surprisingly, it works fine. But then I noticed it didn't work with TIMESTAMP with TIME ZONEs. Hence, the fourth version of the function. Oracle's docs say that if your arguments are of the same type family, you cannot create an overloaded function, but as the example above shows, this is very wrong.
    Lastly, just for grins, I created the two number functions, one with NUMBER, the other with REAL, and even these are allowed - they compile. But then at run time, it fails. I'm really confused.
    Here is the apparently incorrect Oracle documentation on the matter: http://docs.oracle.com/cd/B12037_01/appdev.101/b10807/08_subs.htm (see overloading subprogram names), and here are the various types and their families: http://docs.oracle.com/cd/E11882_01/appdev.112/e17126/predefined.htm.
    Edited by: hotwater on Jan 9, 2013 3:38 PM
    Edited by: hotwater on Jan 9, 2013 3:46 PM

    >
    So, I added a 2nd function with DATE arguments. Then I started getting "too many declarations of is_same exist" error when passing TIMESTAMPs. This made no sense to me
    >
    That is because when you pass a TIMESTAMP Oracle cannot determine whether to implicitly convert it to VARCHAR2 and use your first function or implicitly convert it to DATE and use your second function. Hence the 'too many declarations' exist error.
    >
    , so even though Oracle's documentation says you cannot do it, I created a 3rd version of the function, to handle TIMESTAMPS explicitly. Surprisingly, it works fine. But then I noticed it didn't work with TIMESTAMP with TIME ZONEs.
    >
    Possibly because of another 'too many declarations' error? Because now there would be THREE possible implicit conversions that could be done.
    >
    Hence, the fourth version of the function. Oracle's docs say that if your arguments are of the same type family, you cannot create an overloaded function, but as the example above shows, this is very wrong.
    >
    I think the documentation, for the 'date' family, is wrong as you suggest. For INTEGER and REAL the issue is that those are ANSI data types and are really the same Oracle datatype; they are more like 'aliases' than different datatypes.
    See the SQL Language doc
    >
    ANSI, DB2, and SQL/DS Datatypes
    SQL statements that create tables and clusters can also use ANSI datatypes and datatypes from the IBM products SQL/DS and DB2. Oracle recognizes the ANSI or IBM datatype name that differs from the Oracle Database datatype name. It converts the datatype to the equivalent Oracle datatype, records the Oracle datatype as the name of the column datatype, and stores the column data in the Oracle datatype based on the conversions shown in the tables that follow.
    INTEGER
    INT
    SMALLINT
    NUMBER(38)
    FLOAT (Note b)
    DOUBLE PRECISION (Note c)
    REAL (Note d)
    FLOAT(126)
    FLOAT(126)
    FLOAT(63)

  • SSDT tries to alter timestamp column in TFS build

    We're trying to perform an upgrade test against a copy (backup/restore) of our customer database as target. There are some tables with  timestamp column in the database. The way we do this is by having a database project with a publish profile targeting
    that copy of customer database and then with TFS build server is used to build the database but only to generate a publish script (/p:UpdateDatabase=False) set in the build definition - msbuild argument.
    Example of table definition:
    CREATE TABLE dbo.CodeTable1
    (ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY
    ,Code CHAR(6)
    ,[Timestamp] TIMESTAMP NULL);
    We would like to have the "Code" column to have CHAR(7), so in the project we modify the table definition:
    CREATE TABLE dbo.CodeTable1
    (ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY
    ,Code CHAR(7)
    ,[Timestamp] TIMESTAMP NULL);
    Expecting SSDT build will generate alter script:
    ALTER TABLE dbo.CodeTable1 ALTER COLUMN Code CHAR(7);
    To our surprise the generated script was:
    ALTER TABLE dbo.CodeTable1 ALTER COLUMN Code CHAR(7);
    ALTER TABLE dbo.CodeTable1 ALTER COLUMN [Timestamp] TIMESTAMP NULL;
    Which will cause error when the script is executed: "Cannot alter column 'TIMESTAMP' to be data type timestamp."
    Why is SSDT generating the change script for that timestamp column??
    We then try a local build in VS, the issue is not happening, SSDT correctly generates alter script only for the "Code" column to CHAR(7);
    Both local machine and TFS Build server are having VS 2013 Update 4- SSDT 12.0.50318.0 installed.
    As we tried to troubleshoot further, we found out that it seems it only happens on a restored database from a backup copy of our customer database. It doesn't happen for databases created by SSDT build from scratch or that we manually created. We've tried make
    sure all database properties are the same as the database that correctly built. But still if the target database is the one we restored from a customer's copy, SSDT always tries to alter timestamp column (on server build).
    Anyone have same experience?
    I have posted a bug in ms connect: https://connect.microsoft.com/SQLServer/feedback/details/1266051
    Thanks!

    Thanks Paul!
    However, it doesn't happen when I build the database project locally or if the target database was created by SSDT (or manually for that matter). The issue happens when I change the target database to the one we restored from a backup copy of our customer's
    database and run the build through our TFS build server.
    So I thought there must be something different with the restored database (which causes SSDT to alter timestamp column) as opposed to the one SSDT/manually created (which doesn't alter the timestamp column). Maybe there is difference on database property/settings?
    Whatever it is, I just couldn't find it.
    The only thing we will do now as workaround is to get db schema creation script from that of customer's database and run that script to re-create the database from scratch and use that as target database instead, as luck would have it, the issue would be
    gone.
    Still, why the heck SSDT tries to alter timestamp column in that specific case and not in other case as described above??
    Elvin

  • Xy -Graph with timestamp

    Hi forum,
    i need help again. I have a .csv file from labview where the first row is a timestamp:
    08/10/201423:45:53.871
     the other rows are floating data.
    I would like to read this data and plot it with timestamp on the x-Axis. How i could do this in labview.
    Thanks and best
    Martin
    Attachments:
    Capture.PNG ‏22 KB

     Hi Martin,
    sorry for delay, but next time you should save your VI in LV2011…
    See this:
    - read in the text file and convert to array of strings
    - get columns (instead of rows!) and convert each column depending on its datatype to timestamp and float
    - plot data on XY graph
    You went wrong on
    - the format specifier for SpreadsheetStringToArray
    - indexing rows instead of columns
    - the whole process of data conversion: after converting to float you convert back to string to finally (trying) to convert back to timestamp…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Fetching timestamp to datepicker form element

    With the page creation wizard i create a "Form on a Table" or "Form on a Table with Report" and i have problems with timestamp columns of the table: no form element gets created for them. I add manually a Date Picker element, and it works fine for writing on DB (both editing a row or creating a new one); but it doesn't work for fetching, the Date Picker is initially blank when i edit an existing row.
    The Source of the element is defined as:
    Source Used = Always
    Source Type = DB column
    Maintain session state = per session
    Source value or expression = (name of column)
    Post Calculation Computation = blank
    Format Mask = same as Date Picker, also tried blank
    Thanks for any help

    Hello,
    >> The Automatic DML process doesn't work anyway for reading timestamps, so it's not a problem.
    Let’s use the proper terms, so we will not get confused. Automatic Row Processing or Automatic DML refers to after submit processes, while Automated Row Fetch (ARF) refers to the pre-rendering phase. As far as I understand, your problem is with the ARF process, which can’t fetch timestamp. From your first post it seems that the Automatic DML process do write your timestamp into the database table. However, this will only work for items with source type of “Database column”.
    >> I already tried Post Calculation Computation too, but even if the computation generates no error, the element is not changed.
    Did you change the “Source Used” of the item to “Only …”
    >> I think it is always overridden by NLS_DATE_FORMAT, i haven't tried changing it cause i don't have an admin password right now.
    At least for the later versions this is not true. The “Post Calculation Computation” has the final saying about the content (and format) of the field, provided that the “Source Used” of the item is set to “Only …” .
    >> Are you sure Automatic DML process is fully supported for timestamps?
    Yes, I’m pretty sure. As I said, timestamp support was introduced in version 2.2, so it’s not surprising that it’s not being mentioned in the what’s new of version 3.1. Anyway, don’t take my word for it. You can test it yourself on apex.oracle.com (which runs 3.1.2).
    Regards,
    Arie.

  • Shared Variable Timestamp fixed on TPC-2012

    My code running on a TPC-2012 reads from a shared variable that is hosted on a CRio.  Reading the timestamp of the shared variable gives me the same 5AM time in 1903.
    If I read that same shared variable using software running on a PC vs the TPC, I get a timestamp that corresponds to the correct time on the CRio. Therefore, the CRio is publishing and updating the variable as required.
    What is up with the TPC?  I am guessing that reading the timestamp is not supported on the TPC?  Yes/No?
    Solved!
    Go to Solution.

    Hi dbtestcon,
    This was reported to R&D (#162395) for further investigation.  Thank you for posting your workaround. 
    Jennifer R.
    National Instruments
    Applications Engineer

  • DSC alarm API Timestamp

    Hi,
    We are currently building an application for electrical systems using cRIO and DSC HMI features. Our intention is to generate alarm condition in cRIO and display the alarms on HMI-PC using the DSC alarm API. We are looking for a very precise timing on alarms down to less than 10 milliseconds. Our current setup is configured as follows:
    cRIO has a Boolean shared variable to trigger an alarm condition via calculations in cRIO.
    HMI PC also has a Boolean shared variable aliased (PSP-URL) with the cRIO variable. We do this in order to enable Alarms on the PC  variable and use the alarming API functionality.
    From our understanding, DSC alarms API display PC-system timestamp whenever an alarm condition is triggered from cRIO. Apparently, the shared variable engine (SVE) on cRIO communicates to the SVE in the PC and passes information about alarm condition and timestamp. However the SVE in the PC only passes on information about alarm trigger to the DSC alarm API; it doesn’t take the timestamp and generates it using system (i.e. HMI PC) time.
     We were wondering if we could get the cRIO timestamp on the DSC alarms list "set time"? This is the best desirable situation. 
    Do we have to write the cRIO timestamp to the citadel database becasue DSC alarms API just reads alarms from citadel? Once alarms are acknowledge, it wrties back the information to the database. So, there is something editing the database which is not transparent.
    Any feedback on this to enlighten our understanding will be greatly appreciated.

    Hi, 
    If I'm not mistaken that you want the timestamp data from the cRIO to be transfered to the PC, there is a setting at the cRIO shared variable (you'll need to set it at the Project Explorer where you create the time stamp) which you can have the shared variable to give out time stamp: http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/sv_using_nodes/
    Alternatively, you could set the shared variable to transfer data of cluster data type which consists of timestamp and the datatype that represents your alarm trigger information: http://digital.ni.com/public.nsf/allkb/DDEB4D9BC34705C086257242000FF7DB
    If you are using RT programming, you can place a timestamp related functions like Elapsed Time Express VI or Get time in seconds (which you need to convert using )  and bundle it with the alarm information using Bundle.vi or Bundle by Name.vi and write to the shared variable 
    Or you could give a screenshot of the program an explain using the screenshot on what you are planning to do. 
    As for your alarm acknowledgement thing, if your PC is connected with your cRIO always, you can just create some sort of hand shaking tools and use one or two shared variables specially for acknowledgement purpose. Something like a 2 way handshaking operations in a TCP/IP protocol. 
    Hope that helps
    Warmest regards,
    Lennard.C
    Learning new things everyday...

  • Accuracy of the get timestamp function accuracy +/- 16 ms??

      I'm using the "Get Timestamp Function" in my vi to mark time in my file roughly every 30 seconds.  The problem I am seeing is that it seems sometimes it is 16 ms off.  Sooner rather than later.  Do I need to mix this with the get time in seconds function?  I would like consistant values in my file.
    Thanks,
    Chris
    Message Edited by caunchman on 12-09-2008 03:28 PM
    Attachments:
    Cont Acq&Graph Voltage - Write Data to Spreadsheet File (CSV).zip ‏74 KB

    Hi Chris,
    this function is based on Windows timing functions and those only update each 16ms... So you cannot use this function to measure time in higher resolution than 16ms!
    Some more thoughts:
    - You have a deviation of 16ms after your mentioned 30s interval: that's an error of only ~0.05%. How accurate is the timing of your PC? How accurate (in terms of exact timing) are other processing steps of your program?
    - Maybe Wiebes vi may help you...
    Message Edited by GerdW on 12-09-2008 10:42 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • TS1702 what do i do if the "app store" app is not responding?

    i tried downloading an app from the app store and it gives me the confirmation message of app such and such is downlaoding now ok? and the ok button doesnt work meanwhile the rest of the store is frozen and i cant use the store

  • Need to Apex App user login last login details

    Hi All. how will get the Apex App user login details ? is it have any table or please suggest me on this...

  • VI not a resource file. Not a valid labview file

    I had the computer freeze while working on the VI.  Actually, it occurred when I wanted to back up the source code. The project opens up,. but I get the message in the attached image (below) when trying to open the VI. How do I recover this file?  Is

  • SAP Script Phase out

    Hi Does SAP phasing out SAP Scripts if yes when and where can i get the information regarding this??? i need this information plz help

  • Ipod 30gb Video all screwed up

    My ipod has been acting up as of late, problems sometimes with not recognizing it, but I would try it again and it would work. NOW, it wont recognize it at all and EVERYTHING is gone from my ipod. It shows 27g capacity, but only 17g avail. I had over