Time differences in VISUAL wiper display

Hello,
I noticed the following appearance in a DIAdem VISUAL wiper display:
When it’s fed with a simulated data signal (given at 1 Hz) and the floating average of this signal (average about last 5 values) then the average signal is displayed 5 seconds in the future.
In the attached screenshot the red curve is the original signal and the black curve is the floating mean value of it.
How can that be?
Regards, Eric
Attachments:
Zeitversatz_in_Wischerdiagramm.jpg ‏16 KB

A screenshot of a DAC scheme that creates the problem is attached.
But I already solved the problem. The simulated signal block (in this case the stopwatch) and the floating mean value block need to be connected to the same clock. Then there is noch more time delay in the wiper display.
Attachments:
Zeitversatz_DAC.gif ‏29 KB

Similar Messages

  • How to display time difference in a single cell separately.

    Hi All,
    I have an issue where you have to calculate the Start time and End Time , Start Date and End Date for a particular Work item number
    For eg ;
    WI_ID            WI_CD                WI_CT
    000001312610        02/09/2009      09:48:4     02/09/2009      09:48:9 
    000001312610        02/09/2009      09:54:4   02/09/2009        09:54:9
    000001312610        02/09/2009      09:54:5     02/09/2009      09:54:9
    000001312610        02/09/2009      10:07:0  02/09/2009         10:07:9
    000001312610        02/09/2009      10:07:0     02/09/2009      10:07:9
    000001312610        02/09/2009       10:16:5     02/09/2009       10:16:9
    000001312610        02/09/2009     10:16:7       02/09/2009     10:16:9
    Similarly I get the Endtime and ENd dayfrom other table for same work item.so my output should have the result as ,So my requirement here is
    in the it should show the display in a single cell .as, 5secs, 5 secs,4 secs,9secs,4 secs,2 secs
    for each work item.
    Can any body help me on this issue.
    Any pionters for this are much helpful forme.
    Thanks
    Rohini

    Hi Kewin,
    Its not the question of concatenation, that can be handled later.
    But my issue is how to calculate time difference for each single step

  • Stopping a while loop using the time difference of two tick counts

    Hi Guys,
    I'm currently writing a code which test how long does it take for a formula node to perform its operation. The program uses a while loop to perform the calculation, and the program stops after calculating when tick count has reached 10 seconds. The program then displays the number of iterations it does in 10 seconds. 
    So initially I created 2 frames of sequence structure. In my first frame I have my initial tick count, and in my second frame I have my final tick count and the while loop. I used the subtract function and divide the output by 1000 to get the time difference. Then using the comparison function, I set if output > 10 then the program should stop, to do this I linked the output of the comparison function to the stop button inside the while loop. 
    However, when I tried to run the code, the program just didn't run. Hence I created a similar program which puts the last tick count in new frame sequence. When I ran this code, the program never stopped. 
    Do you guys have any idea what went wrong with my codes.
    Thank you!
    Erry
    Solved!
    Go to Solution.
    Attachments:
    1. Tick Count.vi ‏27 KB
    tickcoun2.vi ‏27 KB

    Dataflow!
    In both VI's the stop terminal of the while loop is controlled by a boolean whose source is ouside of the while loop.  So that loop will either run once, or run forever, depending on the value of the boolean that is calculated before the loop starts and shows up at the tunnel going into the loop.
    I would recommend looking at the online LabVIEW tutorials
    LabVIEW Introduction Course - Three Hours
    LabVIEW Introduction Course - Six Hours

  • Time differences between camera and iMovie

    Hi,
    When I import footage from my Mini-DV camera into iMovie I am seeing a difference between the time displayed on the tape and time displayed in iMovie. The camera says 48 seconds while iMovie says 44 seconds. I thought that it might be related to the framerate of the video in iMovie, but I have changed this to 25 fps which matches the video camera and am still seeing a different time. The framerate needs to be perfect as the footage is going to be shown side-by-side with a animated graph which builds with time.
    Does anyone have any idea what could cause this time difference?
    Thanks

    < scratching head > we had something about a NTSC/PAL issue.. hmm.. ?
    if possible, open an existing PAL project (window titles says DV-PAL), save it under a diff. name, import into that project, delete the not wanted parts..
    another option is, quit iMovie, delete ~/Library/Preferences any com.apple.iMovie.plist file.. relaunch iM.. that 'resets' iM... sometimes, it starts to stumble..

  • Time difference by date by time range - a better way?

    Someone suggested this is a better place for my question:
    Hi
    I need to display the difference in time - every day for different time ranges,
    Example 1-2 pm, 4-5 pm, 7-8 pm. And I need the time difference in 2 dates in the past week for each of these ranges everyday.
    example
    Date Diff Range
    01/01/2007 00:01 1-2pm
    01/02/2007 00:03
    01/03/2007 00:10
    01/04/2007 00:05
    01/05/2007 00:23
    01/01/2007 00:10 4-5pm
    01/02/2007 00:13
    01/03/2007 00:11
    01/04/2007 00:15
    01/05/2007 00:23
    01/01/2007 01:10 7-8pm
    01/02/2007 00:13
    01/03/2007 00:10
    01/04/2007 00:11
    01/05/2007 00:21
    One way to achieve this is to have multiple unions for each day and each time range.
    Example:
    select
    from
    where dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 13:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 14:00','mm/dd/yyyy hh24:mi:ss')
    union
    select
    from
    where dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 16:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 17:00','mm/dd/yyyy hh24:mi:ss')
    union
    select
    from
    where dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 19:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 20:00','mm/dd/yyyy hh24:mi:ss')
    This will give me the required information for only one day - and that is for sysdate-5.
    I will have same nyumber of unions for each day.
    Is there a better way to accomplish the same?
    Any help appreciated.
    Thx!

    Hi
    Sorry for the late response but better late than never:::
    I have gotten the answer of getting data for previous 5 days. I have changed the time between statement and is given below(*).
    Here is a reply to all the questions you had asked in response to my questions.
    What data you have? What parameters are you going to input?
    I have already given sample data in my post.
    There are no input parameters.
    You are talking about the difference - between what is this difference?
    Difference is the difference between 2 timestamp datatypes in 2 different tables (as you may see in the query)
    The field diff - is it varchar2 like '1-2 pm' or what?
    I didnt understand your question. What do you get when you subtract two timestamp datatypes - that should be the datatype - if I have understood your question. Not sure if thats what you asked.
    But IMHO it's impossible to get such a result, of course, if dt_tm in the query is the same as Date in the result!
    The time components in the queries are different. If you see:
    1st Query:...
    where dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 13:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 14:00','mm/dd/yyyy hh24:mi:ss')
    2nd Query:....
    where dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 16:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 17:00','mm/dd/yyyy hh24:mi:ss')
    3rd Query:
    where dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 19:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 20:00','mm/dd/yyyy hh24:mi:ss')
    First should be between 1 and 2 pm for sysdate-5.
    I need starting previous 5 days till sysdate.
    Second is between 4 and 5 pm again for sysdate-5.
    I need starting previous 5 days till sysdate.
    Same with 3rd.
    My final query is something like this:
    select t1.dt_tm, count(t1.id), '1 - 3 am' as period
    from table1 t1, table2 t2
    where t1.id = t2.id
    and dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 13:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 14:00','mm/dd/yyyy hh24:mi:ss')
    group by t1.dt_tm
    union
    select t1.dt_tm, count(t1.id), '4 - 5 pm' as period
    from table1 t1, table2 t2
    where t1.id = t2.id
    and dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 16:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 17:00','mm/dd/yyyy hh24:mi:ss')
    group by t1.dt_tm
    union
    select t1.dt_tm, count(t1.id), '7 -8 pm' as period
    from table1 t1, table2 t2
    where t1.id = t2.id
    and dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 19:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 20:00','mm/dd/yyyy hh24:mi:ss')
    group by t1.dt_tm
    I need for the last 5 days and what i can think of is have 5 different queries for past 5 days and 3 queries per day for the 3 different time periods. This would mean 15 queries. Was wondering if there is a better way to achieve the same?
    Any help appreciated.
    Thx!

  • Confusion in tracking time difference in APEX

    Hi,
    I am using the following code to track the the time difference in APEX:
    <code>
    select nvl(decode(trunc(max(end_time)-min(start_time)),0,'',null,'',trunc(max(end_time)-min(start_time))||' Days ') ||
    decode(trunc(mod((max(end_time)-min(start_time))*24,24)),0,'',null,'',trunc(mod((max(end_time)-min(start_time))*24,24))||' Hours ')||
    decode(trunc(mod((max(end_time)-min(start_time))*24*60,60)),0,'',null,'',trunc(mod((max(end_time)-min(start_time))*24*60,60))||' Minutes'),'No End Time') as time
    from xyz
    where page_num between 200 and 207
    and id = :APP_USER;
    </code>
    The above code works fine in DB 11.1 version, when I migrated the project to DB 11.2, the above code doesn't give me the exact values.
    Suppose if the actual time taken was 4 minutes, it is displayed as 2 hours 16 mins in DB 11.2 version.
    Can someone help me to fix this?

    >
    Please update your forum profile with a real handle instead of "935799".
    I am using the following code to track the the time difference in APEX:
    &lt;code&gt;It's <tt>\</tt> not <tt>&lt;code&gt;</tt>:select nvl(decode(trunc(max(end_time)-min(start_time)),0,'',null,'',trunc(max(end_time)-min(start_time))||' Days ') ||
    decode(trunc(mod((max(end_time)-min(start_time))*24,24)),0,'',null,'',trunc(mod((max(end_time)-min(start_time))*24,24))||' Hours ')||
    decode(trunc(mod((max(end_time)-min(start_time))*24*60,60)),0,'',null,'',trunc(mod((max(end_time)-min(start_time))*24*60,60))||' Minutes'),'No End Time') as time
    from xyz
    where page_num between 200 and 207
    and id = :APP_USER;
    The above code works fine in DB 11.1 version, when I migrated the project to DB 11.2, the above code doesn't give me the exact values.
    Suppose if the actual time taken was 4 minutes, it is displayed as 2 hours 16 mins in DB 11.2 version.
    I think you must be missing something. Is the data exactly the same? Are the database/host configured exactly the same (clock settings; timezones etc)?
    Create a reproducible test case of the form:with xyz as (
    select &lt;data that reproduces the problem&gt; start_time, &lt;data that reproduces the problem&gt; end_time from dual
    union all
    select &lt;data that reproduces the problem&gt; start_time, &lt;data that reproduces the problem&gt; end_time from dual
    union all
    select nvl(decode(trunc(max(end_time)-min(start_time)),0,'',null,'',trunc(max(end_time)-min(start_time))||' Days ') ||
    decode(trunc(mod((max(end_time)-min(start_time))*24,24)),0,'',null,'',trunc(mod((max(end_time)-min(start_time))*24,24))||' Hours ')||
    decode(trunc(mod((max(end_time)-min(start_time))*24*60,60)),0,'',null,'',trunc(mod((max(end_time)-min(start_time))*24*60,60))||' Minutes'),'No End Time') as time
    from xyz

  • Time Difference Calculation Using Shared Variables

    I have a subreport that is passing times(HH:MM:SS AM) through shared TIMEVAR variables to a main report.  I am trying to use these shared variables to calculate a time difference between the shared variable and one in the main report.  The shared variable passes without problems and I end up with a numeric value when trying to subract the two time fields.  What am I doing wrong?

    Here is an example for converting seconds to hh:mm:ss  ( Hopefully the message will not lose the (Parens))
    WhilePrintingRecords;
    StringVar Hours1;
    StringVar Minutes1;
    StringVar Seconds1;
    NumberVar MY_SECONDS_1:=0;
    MY_SECONDS_1:= ;
    If MY_SECONDS_1 < 0 Then
      "Cannot have a time less than zero"
    Else
      (Hours1:=ToText(Truncate(MY_SECONDS_1/3600),0);
      Minutes1:=ToText(Truncate(Remainder(MY_SECONDS_1,3600)/60),0);
      Seconds1:=ToText(Remainder(Remainder(MY_SECONDS_1,3600),60),0));
    Display the time formated.
      (if length(Hours1) < 2 then '0') + Hours1 + ":" +
      ["0",""][length(Minutes1)] + Minutes1 + ":" +
      ["0",""][length(Seconds1)] + Seconds1;

  • Time difference in inlclueding millisenconds

    I am trying to get the time difference in millisends.
    currently i am using following logic and found it is not giving accurate result.
    java.util.Date d1 = new java.util.Date();
    java.text.SimpleDateFormat f1 = new java.text.SimpleDateFormat("HH:mm:ss SSSSSSSSSSSSS");
    Date today1;
    String dateOut1;
    DateFormat dateFormatter1;
    // DateFormat formatter;
    Locale currentLocale1 = new Locale("en", "US");
    dateFormatter1 = DateFormat.getDateInstance(DateFormat.DEFAULT, currentLocale1);
    today1 = new Date();
    double sec = today1.getSeconds();
    System.out.println("nano secnonds : "+today1.getTime()+"<==="+today.getTime());
    System.out.println("milli sec : "+today1.getTime()+"<==="+today1.getTime()/1000000);
    System.out.println("date : "+today1.getDate()+"<==="+today.getDate());
    System.out.println("hours : "+today1.getHours()+"<==="+today.getHours());
    int min1 = today1.getMinutes() - today.getMinutes();
    System.out.println("difference min : "+min1);
    int sec1 = today1.getSeconds() - today.getSeconds();
    System.out.println("difference seconds : "+sec1);
    long time1 = today1.getTime()- today.getTime();
    System.out.println("difference time: "+time1);
    System.out.println("date difference : "+today1.compareTo(today)+"<====");
    dateOut1 = dateFormatter1.format(today1);
    long leftVal =0;
    int seconds = sec1 - 1;
    long timeval = 1000 - time1;
    System.out.println("timeval : "+timeval+"<===");
    if (time1 > 1000)
    leftVal = 1000 - time1;
    seconds = sec1;
    else
    leftVal = time1;
    seconds = sec1;
    Can anyone help in getting the time difference in hours, minutes, senconds and milliseconds
    Sumanth

    Could you please tell me is there any function which can simply returns me the time diffrence,That is the time difference.
    If you want to display the difference in a different format then do so....
    long time1 = ....
    long timesecs = time1/1000;
    long hours = timesecs/3600;
    long minutes = (timesecs - hours * 3600)/60;
    long secs = (timesecs - hours * 3600 - minutes * 60);
    long millis = time1 % 1000;
    Please keep in mind that the above is for display purposes the real difference is in time1.

  • Time difference issue - need a better way

    Hi
    I need to display the difference in time - every day for different time ranges,
    Example 1-2 pm, 4-5 pm, 7-8 pm. And I need the time difference in 2 dates in the past week for each of these ranges everyday.
    example
    Date Diff Range
    01/01/2007 00:01 1-2pm
    01/02/2007 00:03
    01/03/2007 00:10
    01/04/2007 00:05
    01/05/2007 00:23
    01/01/2007 00:10 4-5pm
    01/02/2007 00:13
    01/03/2007 00:11
    01/04/2007 00:15
    01/05/2007 00:23
    01/01/2007 01:10 7-8pm
    01/02/2007 00:13
    01/03/2007 00:10
    01/04/2007 00:11
    01/05/2007 00:21
    One way to achieve this is to have multiple unions for each day and each time range.
    Example:
    select
    from
    where dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 13:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 14:00','mm/dd/yyyy hh24:mi:ss')
    union
    select
    from
    where dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 16:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 17:00','mm/dd/yyyy hh24:mi:ss')
    union
    select
    from
    where dt_tm between
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 19:00','mm/dd/yyyy hh24:mi:ss')and
    to_date(to_char((sysdate-5),'mm/dd/yyyy')||' 20:00','mm/dd/yyyy hh24:mi:ss')
    This will give me the required information for only one day - and that is for sysdate-5.
    I will have same nyumber of unions for each day.
    Is there a better way to accomplish the same?
    Any help appreciated.
    Thx!

    Time difference by date by time range - a better way?

  • SAP BI Date and Time Difference calculations in DSO Transformation

    Hello Guys,
    Could you please tell me how to calculate the date and Time difference between 2 fields.
    I have 2 date fields :
    Arrival Date : 6/16/2007
    Departure date : 6/19/2007
    Also i have 2 time fields for the above
    Arrival Time : 13:00:00
    Departure Time : 11:50:00
    I want to display all the four fields and 2 fields for the difference in Date and Time.
    Is it better to calcuate the differences in DSO Transformation or can you do it in the report itself.Could you please let me know the solution.
    Thanks,
    BI Consultant

    Hello Consulant BI,
    Computing the difference of two dates is easy (assuming you really just want the number of days). You can simply subtract the two dates using ABAP:
    data: w_arrival_date type sy-datum,
            w_dep_date type sy-datum,
            w_diff type i.
    w_arrival_date = <your arrival date field here>.
    w_arrival_date = <your departure field here>.
    w_diff  = w_arrival_date - w_dep_date.
    Getting the time difference isn't really much logical. I think what you want instead is to compute the totals days (and extra hours) right? If this is the case, then you can convert the date+time for both the arrival and departure  into a timestamp variable first and then t the get difference.
    Hope this helps.

  • Analyzing data for max peak time differences after sampling

    In the VI attached, each channel is measuring a certain moment of
    acceleration, which will be displayed as a global max on the graph.
    Ideally what I would like to happen is for
    both arrays to be searched for their highest peak (global max) and for
    the time difference between these two peaks to be shown on the display
    after the program has ended. However, what I have right now is a
    sort-of real time measurement. Any suggestions on going about doing this?
    Thanks,
    John
    Solved!
    Go to Solution.
    Attachments:
    TimePeakTest-cp-2.vi ‏74 KB

    Thanks for your help Stephen!
    I've made those changes, but after the highest peak from each channel occurs, the time difference indicator shows the time diff. between the two peaks only for a split second, and then the indicator returns back to zero. I would like for this max peak-max peak time difference to somehow remain on the indicator after the program has stopped running, because its value, whether it is below or above a certain constant, will need to indicate a true/false statement.
    Any help is greatly appreciated.
    Thanks,
    John
    Attachments:
    TimePeakTest-cp-2.vi ‏74 KB

  • How to calculate the % of time difference between different state

    Hi there,
    The below query returns the follwoign outptut. I need to calculate the % of time period that a specific state ( state ex: open or closed or all report )exists.
    I have to find the time difference between the 2 states . How could I do that ?
    The first row shows null for the previous state . How could get actual previous state for the first row?
      SELECT si.station_name,
                    vppstation.avi_control_state_code.STATE_SHORT_NAME,
                    ash.state_id ,
                    lag(ash.state_id) over (order by ash.STATE_EFF_DATE desc) previous_state,
                    TO_NUMBER(TO_CHAR(ash.state_eff_date, 'SSSSS')) "periods in sec",
                    TO_CHAR(ash.state_eff_date, 'dd-mon-yyyy hh24:mi:ss am') "Date"
               from vppstation.avi_state_history ash
    left outer join vppstation.avi_control_state_code
                 on ash.state_id = vppstation.avi_control_state_code.state_id
    LEFT OUTER JOIN vpproadside.stations_installed si  
                 ON ash.station_id = si.station_id               
              where ash.state_eff_date >= to_date('28/02/2010', 'dd/mm/yyyy')
                and ash.state_eff_date <= to_date('03/03/2010', 'dd/mm/yyyy') ;
           group by si.station_name
                         ash.state_id
           order by ash.state_eff_date asc ;
    STATION_NAME                   STATE_SHORT_NAME STATE_ID               PREVIOUS_STATE         periods in sec         Date                   
    IRDNCST02                      Open             1                    NULL                  85166                  01-mar-2010 23:39:26 pm
    IRDNCST02                      All Report       3                      1                      85159                  01-mar-2010 23:39:19 pm
    IRDNCMT01                      Closed           2                      3                      81376                  01-mar-2010 22:36:16 pm
    IRDNCST02                      Open             1                      2                      78723                  01-mar-2010 21:52:03 pm
    IRDNCST02                      All Report       3                      1                      76023                  01-mar-2010 21:07:03 pm
    IRDNCMT01                      Open             1                      3                      55922                  01-mar-2010 15:32:02 pm
    IRDNCMT01                      Closed           2                      1                      54931                  01-mar-2010 15:15:31 pm
    IRDNCHA01                      Closed           2                      2                      41291                  01-mar-2010 11:28:11 am
    IRDNCAS01                      Open             1                      2                      38847                  01-mar-2010 10:47:27 am
    IRDNCAS01                      All Report       3                      1                      37947                  01-mar-2010 10:32:27 am
    IRDNCST02                      Open             1                      3                      35332                  01-mar-2010 09:48:52 am
    IRDNCST02                      All Report       3                      1                      32632                  01-mar-2010 09:03:52 am
    IRDNCST02                      Open             1                      3                      31502                  01-mar-2010 08:45:02 am
    IRDNCST02                      All Report       3                      1                      28802                  01-mar-2010 08:00:02 am
    IRDNCHI01                      Open             1                      3                      25368                  01-mar-2010 07:02:48 am
    IRDNCHI02                      Open             1                      1                      23939                  01-mar-2010 06:38:59 am
    IRDNCMT01                      Open             1                      1                      20696                  01-mar-2010 05:44:56 am
    IRDNCCH02                      Open             1                      1                      13452                  01-mar-2010 03:44:12 am
    Edited by: Indhu Ram on Mar 11, 2010 1:34 PM
    Edited by: Indhu Ram on Mar 11, 2010 2:20 PM

    If you look at the table which is output of the given query , there is column called "STATE_ID" It shows the current state ie open or closed or all report.
    The column 'PREVIOUS_STATE' shows the state before the current state. .In the table in 2nd row in previous_state column there is state_id = 1 (open)which is the state before 'all report state'

  • How to measure time difference between zero crossing of a sine wave and rise time of a pulse on a same graph?

    I have a 50Hz sine wave and a pulse signal on a same graph. The phase difference between two is between 0-90 degrees.
    Now I need to calculate the time difference between (when the sine wave crosses zero volts) and (when the pulse rises). The frequency will stay approximately same for both signals.
    The application is for a three phase generator. In simple words, when the time difference between the zero-crossing of sine wave and the pulse rises increases, that means that the load on the generator has increases.
    I am a beginner user of LabView (version 9, 2009), maybe it is a very simple problem but I've been pulling my hair out for the last few days and coudln't figure anything out. Any help would be greatly appreciated. I am using DAQ USB-6008 to measure these voltages and pulse from the generator and a sensor
    I have attached a jpg (a graph that i just made with excel to explain). The time 't' is what I am trying to measure
    Cheers
    Awais 
    Message Edited by awais.h on 03-30-2010 11:20 PM
    Message Edited by awais.h on 03-30-2010 11:21 PM
    Solved!
    Go to Solution.

    Hi
    Thanks for the code but I'm afraid it won't work. Like you said the probability of choosing a value that is on both graphs may not happen. This is something that I would like the code to do automatically.
    But I did use the previous code posted and made some modifications to it and it seems to work perfectly. Now the next thing is to be able to get just that one value that tells you the first time difference.
    Here is what I get using that code.
    As you can see from the t Values. I only need the one that is highlighted. If there is a way to filter out the rest it would be great.
    I was thinking of a while loop and as soon as the value is higher than 3E-5 it would store the number and stop the loop, but I'm not too familiar with arrays in labview.
    Here is the the code modified.
    As you can see, it wasn't that big of a modification and it still is your code.
    I will keep trying.
    Thanks for the help
    Attachments:
    FinalShockSpeed.vi ‏55 KB

  • Lost connection detection time difference

    Having a problem understanding why a broken JDBC connection is detected under Windows much quicker than it is under Linux.
    I have an process that opens a connection to MSSQL using JDBC, a Stored Procedure is then executed and the result set
    processed, this execute step is repeated every 60 seconds or so. If any exception is thrown then resources are closed, sleep
    for 60 seconds, the connection is reopened (if fails then sleeps and repeats), once reopened the process continues. There is logging throughout
    the above steps.
    On Windows Vista 64bit Sun Java platform the process runs fine, if I deliberately break the connection (stop MSSQL service), the process
    logs a problems within 60 seconds and starts handling the error, when the MSSQL comes back then within 60 seonds the connection is remade
    and the process continues as expected.
    Under Ubuntu 10 64bit both Sun and OpenJDK the process runs fine, until the connectionis broken, as it takes about 17 minutes for the exception to be thrown
    for the broken connection (stopped MSSQL) to be detected, as opposed to under Windows taking seconds. Once detected then the process works as expected, retrying
    and reconnecting as it should.
    The libs and code used are the same the only difference between the windows and linux versions are the logging path parameter, have tried with different versions of Java
    and with different MSSQL JDBC drivers.
    What could be the reason for the time difference in the lost connection detection between Windows and Linux? Any help tips would be most welcome.
    Thanks.

    The connection is only made once and used throughout, it is only closed if there is a problem. This runs absolutely fine with logging for weeks, the execute and processing take millisecondsIt is pointless to keep the connection in that situation. Create it every time.
    Doing that might even fix your problem. But regardless you should still not keep it.
    Have jujst checked the timings and if the db connection is broken the on Linux (Ubuntu) the exception generated by step 4. takes up to 15 minutes 35 seconds to move on to step 7. on Windows though it is instant, there is a log message output prior to the execute statement this outputs then the exeception logged.You have an existing connection.
    Then you attempt a request which I am guess takes 17 minutes to timeout. (That happens because you are testing by stopping the server.)
    That is the problem.
    First verify the connection url. It might have timeout values in it.
    If not then the next most likely cause is that someone changed the OS (not java) TCP timeout values. Bad idea if they did. And the only way to fix is to change them back to something reasonable. You can code around this by using two threads. One that sets a timer and the other that runs the request. If the timer fires then attempt to cancel the request (see the jdbc api.)

  • How to find out time difference between 2 consecutive characters coming in

    Hi
    Data is coming on serial port and m taking this data in a input stream.I need to know the time difdference between consecutive characters.Any ideas?

    What do you mean? If you meassure the time between two characters, you want to calculate how accurate it is? First you would need to find out how accurate the System.currentTimeMillis is on the platform you run on. That may be easy
    long start = System.currentTimeMillis();
    long end;
    while ((end = System.currentTimeMills()) == start);
    long delta = end - start;But sometimes (on win98) it reports 50, other times 60. So its not quite accurate. But you could redo that test a couple of times and take the avg or the max.
    Then if you get a time difference of 0ms between two characters, you know it will be somewhere 0 and 60ms. If you get 60ms between two characters, you know it will be somewhere between 0 and 120 ms. It's +/- delta seconds accurate.
    Would this be a way to calculate the percentage accuracy: 100.0-100.0*delta/(time+delta)
    Still better to meassure the time over more than just 2 characters unless it is a very slow stream.

Maybe you are looking for

  • Flash Player Crashes in FF 28

    Repeated messages that Adobe Flash Player 12.0.0r isn't working in Firefox 28 and it doesn't let me use the browser.

  • How do I save my edits in iPhoto and/or Aperture?

    I have edited an image in iPhoto and again in Aperture and can't find either. The original remains. I can find no "Save" option and assumed that it was automatic. If so, where does it go? Is there a "save as" option?

  • Missing points from an on-line purchase

    I placed an order online back on April 4th and was picked-up on 04/23. The transaction shows up under my points and purchases, but shows zero points under the Total Points Earned with this transaction. How do I get this resolved?

  • 802.1x on Cisco 3750 switch: How to stop retrying the authentication for the un-authorized guests

    Hi experts, I'm trying to stop the authentication retry for the guests. They won't have the credential to be authorzied and will be put in the guest VLAN. However the switch seems by default always retries the authentication every 15 seconds or so. I

  • Aggregates for cube

    HI, How can we goahead for creating Aggregates for cube. IF large amount of data in cube or any other cases. Reg, Paiva