How to calculate the time between start trigger,first scan and first A/D in DAQ

Environment: Labview 6.1, N6052E DAQ board(max scan rate=333KHz, max channel rate=333KHz, settling time=3.5usec+1LSB)
I am using external scan clock 10K scan/s collecting data on 16 AI channels, and external channel clock 200KHz.
Could show me how to calculate the time betweent he start trigger, the first scan and the first A/D conversion?
Thanks

I read the one you give to me. still cannot work out. I am using Labview 6.1 DAQ vi, including AI config.vi. clock config.vi, AI control.vi, AI read.vi, working on colect data on 16 AI channels. So I belong to SCAN function and external scan and sampling timing, right?
But it says the T1 and T2 are determined by external signals. How can I calculate that?
T1=1/10KHz or T1=1/160Khz?
T2=1/200KHz?
Is the above correct?

Similar Messages

  • How to Calculate the Time Between two days in ABAP

    Hi,
                  I have one scenario like i need to calculate the time between two days please can you suggest me.
    Thanks,
    Harinath

    Hi Peeleti,
                Check this code,
    DATA : DATE1 LIKE SY-DATUM VALUE '19830125',
           DATE2 LIKE SY-DATUM VALUE '20070219',
           DAYS1 TYPE I,
           WEEK1 TYPE I,
           MONTH1 TYPE I,
           YEAR1 TYPE I,
           C_YEARS1 TYPE I.
    CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'
    EXPORTING
      BEGDA           = DATE1
       endda           = DATE2
      TAB_MODE        = ' '
    IMPORTING
      DAYS            = DAYS1
      C_WEEKS         =
      C_MONTHS        = C_YEARS1
      C_YEARS         = C_YEARS1
      WEEKS           = WEEK1
      MONTHS          = MONTH1
      YEARS           = YEAR1.
      D_MONTHS        =
      MONTH_TAB       =
    *WRITE : / 'DAYS   = ', DAYS1,
            / 'WEEKS = ',WEEK1,
          /  'MONTHS = ', MONTH1,
          / 'YEARS   = ', YEAR1.
    Using this code you can calculate the No Of Days Between two dates. Based On days you will easily calculate the Hour. [  No of days * 24 ].
    Thanks.
    Reward If helpful.

  • How to calculate the time between triggering the signal and receiving back

    i want the time elapsed between triggering the signal and receiving it back through a ultrasonic sensor in compactrio labview fpga.

    thank you sir for your reply, but im working on fpga target cRIO-9082 chassis it wont support those palletes , yah if i dont work on fpga target then i can use those palletes ....in attaching the vi for generating a digital pulse and acquiring it back but yrt dint got any idea hot to determine the time...if the vi is wrong please make the neccessary changes. i used this vi to determine the total time between trigger and receving signal of ultrasonic sensor.
    Thank you 
    Attachments:
    pulse generation.vi ‏51 KB

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi Rai,
    You should post this into the LabVIEW forum rather than Real-Time since this isn't a Real-Time application. Your post will see more replies in the LabVIEW forum. 
    As far as your question is concerned, you can write the max and min from the respective loops to a local variable to send the data out of the loops to a third loop or just do the calculation in one of the loops. This would be ideal if you're trying to do this while the loop is running. 
    -Jayk
    Applications Engineering
    National Instruments

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two looping to find the value of SPO2?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi rai,
    I would appreciate it as kind of respect for forum participants if you would clean up your VI before uploading it (or images of its block diagram)…
    That being said:
    - Your inner while loops each run exactly twice. Replace them with FOR loops!
    - Lots of unneeded operations, mainly induced by ExpressVI usage. Is there a reason to convert to DDT and immediately convert back to 1D array?
    - You already calculate some Min/Max values. Ratio is just a division of two values…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Calculate the Difference Between two dates excluding weekends and Holidays

    Hi,
    We need to calculate the difference between the two dates by excluding the Local public holidays (It is global and varies across countries) and weekends should not be included in calculation for a business day in OBIEE.
    We have two dates: Open date and close date when ever close date is null we are calculating age based on taking the current timestamp and need to exclude the weekends and Holidays when ever the close date is null.
    Ex:
    Col1 col2 Total
    11/9/2010 2:46:38 PM Null 13
    11/2/2010 8:06:26 PM 11/3/2010 5:37:03 PM 1
    (In the Total we shouldn't include the weekends,holidays)
    Please let me know how to calculate the difference between two dates by excluding the weekends and holidays.
    Thanks
    Edited by: user10441472 on Nov 22, 2010 3:14 PM

    You already asked this question and I answered it...
    Re: calculation of Business day in OBIEE

  • MDX - how to calculate the sales between a certain period and the currentmember with a max date

    Hi all,
    1)I need to calculate the sales between W1 and the currentmember, but the max date should be W20. How can I solve this in MDX?
    MEMBER [Measures].[Q1 act.period to date sales] AS
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,[Measures].[Sales amount]
    This is the measure I have, I need to add the max date is W20. 
    2)Also, when I calculate the sales between [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[40] and the currentmember, for example being [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[20],
    he calculated the sales between this period. However, in theory this is not possible because W20 < 40. Is there any way I can put a constraint on this that he only calculates the sales if the currentmember is > the start period?
    Thanks in advance!

    Y, you can put a check on to determine if currentmember > start period.
    Firstly, your period keys are composite of year and period (indicated by the two ampersands in the fully qualified date above). If your period keys were non-composite (eg 201501) it would be a simple matter of 
    IIF([Date invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null)
    There are advantages of having two period attributes on the dimension, one with a fully unique
    key and the other with just the period of fy, but that's digressing.
    With your composite keys, you could use a calc like the following for the SUM()
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,IIF([Date
    invoice].[Bonus calendar - Week].Currentmember.parent.properties("key") +[Date
    invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].parent.properties("key")+[Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null))
    Richard

  • How to Calculate the Space between two Characters in GDI + ?

    I am Drawing the set of characters in Graphics, by Calculating the points using GraphicsPath for each Character. I Need to know how to calculate the distance should be given between the two characters?
    I am using this code to generate points
    PointF [] pnts;
    var p=new GraphicsPath();
    path.AddString("A","Arial",(int)FontStyle.Regular,50,new pointF(0f,0f),StringFormat.GenericDefault);
    Matrix m=new Matric(1,0,0,1,0,0);
    path.Flatten(m,1,0f);
    pnts=path.pathpoints;
    i am getting the points for all characters using the above code.
    Now i am combining the two character Using the points generated by the above code.  Eg "AB"
    Help me to calculate the the character space should be given between two characters?
    Thanks in Advance...

    Hi,
    this link can assist you:>
    Professional C# - Graphics with GDI+ 
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • How to calculate the time difference in answers

    Hi,
    I need to calculate the time difference in BI answers and I dont have the access to the repository. I have the data in the following format
    10/12/2005 7:24:19 PM 10/12/2005 7:32:04 PM
    10/12/2005 7:50:47 PM 10/12/2005 8:52:36 PM
    10/12/2005 7:54:23 PM 11/4/2005 10:47:32 PM
    10/12/2005 9:05:51 PM 10/12/2005 9:08:58 PM
    10/12/2005 9:07:42 PM 10/12/2005 9:14:47 PM
    10/12/2005 9:09:02 PM 10/12/2005 9:10:57 PM
    I need to get the elapased hours between these two columns. Please help me
    Thanks

    you can use beans or create a case when statement like:
    case
    when TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) <= 60 then 1 else
    when TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) > 60 and TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) <= 90 then 1.5 else
    when TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) > 90 and TimeStampDiff(SQL_TSI_Min, table.column1, table.column2 ) <= 150 then 2.5 else
    end

  • How to calculate the Time difference between 2 dates

    HI All,
    I am using HR_hk_diff_btw_2_dates to calculate the employee service dates.
    For that i  am inputing his hire date and Term dates and Output format as '05' i am getting output perfectly....
    But problem is  whe i am inputting the employee hire date is Dec 1 2007 and Term date is
    March 31 2009 It is coming as 1 year 3 months  31 days instead of 1 year 4 months directly .......How could we make it make last date also working day and get the O/p as 1 year 4 months ?Please Advice..
    Regard
    sas

    1. FM for difference betwwen two times:SCOV_TIME_DIFF
    Import parameters               Value
    IM_DATE1                        2008-01-01
    IM_DATE2                        2008-01-01
    IM_TIME1                        10:00:00
    IM_TIME2                        11:30:00
    Export parameters               Value
    EX_DAYS                         0
    EX_TIME                         01:30:00
    2. SD_CALC_DURATION_FROM_DATETIME : Finds the difference between two date/time and report the difference in hours
    L_MC_TIME_DIFFERENCE : Finds the time difference between two date/time

  • How to calculate the difference between 2 different times being input.

    import java.io.*;
    import java.util.*;
    public class ClockingInOut
    public static void main(String[] args) throws IOException
    BufferedReader keyboard = new BufferedReader (new InputStreamReader (System.in));
    String input, input1, input2;
    int num1, num2, answer;
    System.out.println ("\t\t\tEMPLOYEE CLOCKING IN AND OUT SYSTEM!");
    do
    System.out.print ("\nWould you like to clock in and out? yes (y), no(n), ?: ");
    input = keyboard.readLine();
    if (input.equals("y"))
    System.out.print ("Please enter the hours you clocked in: ");
    num1 = Integer.parseInt (input1 = keyboard.readLine());
    System.out.print ("Please enter the minutes you clocked in: ");
    num2 = Integer.parseInt (input2 = keyboard.readLine());
    System.out.print ("Now Please enter the hours you clocked out! ");
    num1 = Integer.parseInt (input1 = keyboard.readLine());
    System.out.print ("And please enter the minutes you clocked out!: ");
    num2 = Integer.parseInt (input2 = keyboard.readLine());
    Hi people, i think my coding may be wrong. I would like the user to input the hours and then minutes of the time they clocked in and out of work. and then i want the program to be able to calculate the hours worked and print the mesage in the Command Prompt window.
    It's really confusing and hard, please help and provide me with the correct soure code if you can.
    Also, like in html how the notepad file has to have the opening and closing brackets, does java coding have something like this.
    Please reply. Thank You.

    hi
    check this java class
    import java.sql.Time;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.Date;
    public class util
        public static void main(String[] args)  throws Exception
            long t1 = getTimeOnlyLong();
            Thread.sleeo(2000);
            long t2 = getTimeOnlyLong();
            System.out.println(differenceBetween2Times(t1,t2));
        public static long getTimeOnlyLong()
            Date d = new Date();
            return d.getTime();       
        public static String differenceBetween2Times(long l1 , long l2)
            long diff = l1 - l2;
            System.out.println("differ =  " + diff);
            Date d = new Date();
            d.setTime(diff);
            SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
            return sdf.format(d.getTime());       
    }

  • How to calculate the time duration on a datetime column?

    Hi guys,
    I've done some search on this forum and everywhere else but I can't seem to get this right, at the beggining it sounded like something very simple to accomplish, for the instance with Excel but I'm struggling to get it to work with Crystal Reports on Microsoft Visual Studio 2008.
    I have a datetime column (SQL Server 2000) that I wanted to calculate the the time duration on the report group footer, unfortunatelly the built-in SUM function cannot be applied and I've tried several formulas that I've found on the internet without any luck. I'm using a datetime column to store only the time because I'm stuck with SQL Server 2000 which doesn't have a time data type.
    Would you guys know how to do it by any chance?
    Some sample code I've tried: http://www.minisolve.com/TipsAddUpTime.htm
    Thanks a lot,
    Paul
    Edited by: Paul Doe on Dec 12, 2009 5:41 PM
    Some sample data:
    EMPLOYEE     WORK HOURS
    =========     =================
    JOHN DOE      1900-01-01 01:00:05
    JOHN DOE      1900-01-01 00:20:00
    JOHN DOE      1900-01-01 01:30:15
    =========     =================
    HOURS WORKED: 02:50:20
    Edited by: Paul Doe on Dec 12, 2009 5:42 PM
    Edited by: Paul Doe on Dec 12, 2009 5:45 PM

    Guess what, by further testing the code on the website mentioned above I got it working.
    Pus, I needed to change the grouping on the code, so I had to come up with a way to update the formulas based on the groupping field.
    Considering "call_date" is the field that you are groupping by on the designer use the following code to update the formula:
    CrystalReportObj = new ReportDocument();
    CrystalReportObj.Load("C:\\reportfile.rpt");
    FieldDefinition FieldDef;
    //Get formula
    FormulaFieldDefinition FormulaDef1;
    FormulaDef1 = CrystalReportObj.DataDefinition.FormulaFields["SubHours"];
    //Get formula
    FormulaFieldDefinition FormulaDef2;
    FormulaDef2 = CrystalReportObj.DataDefinition.FormulaFields["subMinSec"];
    //Update the formula to work with the new grouping field,
    //this must be called first else will throw an exception
    FormulaDef1.Text = FormulaDef1.Text.Replace("call_date", "call_extension");
    FormulaDef2.Text = FormulaDef2.Text.Replace("call_date", "call_extension");
    //Get the new field we are grouping by
    FieldDef = CrystalReportObj.Database.Tables[0].Fields["call_extension"];
    //Replace current grouping field with the new one,
    //considering there only one group in the report, index 0
    CrystalReportObj.DataDefinition.Groups[0].ConditionField = FieldDef;
    Have fun.
    Edited by: Paul Doe on Dec 12, 2009 8:43 PM
    Edited by: Paul Doe on Dec 12, 2009 8:53 PM

  • How to calculate the days between last movement of material till today date

    Hello Experts,
    Could someone help me please?
    I have a key figure in the InfoCube 0IC_C03 witch contain the last date of movement of material.
    (it is a key figure created in format date and contain the max value).
    How can I to calculate the number of days between this date (last movement),  till today date (system date).
    I need to show:
    material........last movement.....days without movements.
    xxxxxxxxxxx.....dd/mm/yyyy..........9999
    Im trying to do this calculation in bex using variable formula but it doesn't work becouse current date (customer exit) brings sy-datum in format yyyymmdd and the kf-last-mov is in format number (I dont know what kind of number)
    Thanks in advance,
    Points are assured.
    Regards,
    Silvio Meurer.
    Message was edited by:
            Silvio Meurer

    Hi Parth,
    Here we are using the version 7.0 and SP 10, I'm afraid I could not understand you. I Can't find the function DATE_DIFF (Where is it?)
    I'm using the formula and it doesn't work. Coud you see the result is:
    last movement date     Today date        result
    02.04.2007                  20.070.625       19.337.856
    18.05.2007                  20.070.625       19.337.810
    the "today date" is from customer exit and the result is a strange number to me.
    Could you help me?

  • How to calculate the difference between intdate and getdate

    Hi,
    My requirement is to get the data for all the claims where the difference between transactiondate and getdate() should be less than or equal to 7 which means any claims that happened in the past week.
    So, my query would be something like this
    select * from claims
    where transactiondate-getdate < 8
    But my transactiondate is in int format such as 20150331 and getdate would be in the format of 2015-03-31. Can someone please help me on how can i achieve the difference between these 2 date formats in the where clause.
    Please let me know if you have any questions or if i am unclear.
    Thanks

    Hi SqlDev12,
    Please find the below condition in your query,hope it would help you
    DATEDIFF(DD,CAST(CAST(TransactionDate
    AS
    VARCHAR)
    AS
    DATETIME),GETDATE())
    < 8
    Thanks & Regards,
    Praveena.

  • How to calculate the difference between values in a custom PSObject?

    If I have a PSObject (created from an imported CSV) that has data like the following:
    date,Total size of files uploaded
    03-17-2014 09:08,1293334574547
    03-17-2014 09:10,1293335326912
    03-17-2014 09:13,1293336523562
    03-17-2014 09:14,1293337541156
    03-17-2014 09:16,1321031223511
    03-17-2014 09:16,1321032156844
    This CSV will have lines added to it, so the total number of lines will vary.
    Is there a way that two most recently added values and calculate the difference of the "Total size of files uploaded" values? 
    I have the columns properly cast as datetime and
    int64 already using this:
    $csv = Import-Csv $csvLocation |
    Where-Object { ![string]::IsNullOrWhiteSpace($_.datetime) } |
    Foreach-Object {
    $_.datetime = $_.datetime -as [datetime]
    $_."Total size of files uploaded" = $_."Total size of files uploaded" -as [int64]
    $_ }
     I tried searching thinking surely there must be someone else who has tried to do this" but I cannot find anything. I am just not sure how to approach this problem. Any help would be appreciated!

    Assuming all of your records are sequential with the last two being the most recent you could use this:
    $csv = Import-Csv $csvLocation |
    Where-Object { ![string]::IsNullOrWhiteSpace($_.datetime) } | select -last 2
    Foreach-Object {
    $_.datetime = $_.datetime -as [datetime]
    $_."Total size of files uploaded" = $_."Total size of files uploaded" -as [int64]
    $_ }
    $Difference = $csv[1]."Total size of files uploaded" - $csv[0]."Total size of files uploaded"
    This uses the index of the imported array and just the last two records.  Note that this will give a negative value if the total is less in the later record.  Hope this helps!
    You could also use 
    | sort datetime -ascending | select -last 2
    if they aren't already in order...

Maybe you are looking for