Calculate from graph cursor data

I need to calculate from cursor data in a grpah that has been read from a file and displayed. Specifically, I want to position locked-on-trace cursors and calculate the delta-time or delta-voltage from their positions like one would with a standard scope. Attached is a file of the trace to read, 2 channels, Cursors would be on either ch-1 or 2. Simple read VI attached.
Attachments:
Read_and_chart_data.vi ‏31 KB
s250.txt ‏13 KB

Here's a very simple example. You just have to use the graph's property node to get the cursor position. If you know the sample rate, you can fine tune it to display actual time.
Attachments:
Read_and_chart_data_mod.vi ‏44 KB

Similar Messages

  • Error 1055 on Graph cursors.

    I am using LabView 2010, expanding on one of the example vis for data acquisition.  I want to use graph cursors to allow someone to zoom in on a particular part of a graph.  To do so, I have been trying to use property nodes.  When a graph has more than one cursor, the property nodes seem to access only the highest indexed cursor.  So, I tried to apply a property node to a graph with just one cursor.  In particular, I tried to access the x-value of the cursor.  When I then run the vi, I get error 1055 "Object reference is invalid".  I had hoped to construct the property nodes for one cursor, then add another cursor, and attach property nodes to it.  There does not seem to be a way to use property nodes to specify which cursor I am accessing.  I have tried a property node with two properties: select cursor as an input, and x-value as an output.  The "select cursor" property input seem to have no effect at all.
    Is there an example vi for programmatically extracting information from graph cursors?
    Joe Rudmin
    Solved!
    Go to Solution.

    Joe,
    Please take a look at my screen shot as a reference for getting the x position for a cursor on a graph object. I hope this helps.
    Right clicking on the graph and hover over create then property node, cursor, cursor position then cursor x. This should create a property node that gives the position of the cursor on the graph. I understand you are trying to use multiple cursors but this will get you started.
    Kyle Hartley
    RIO Product Support Engineer
    National Instruments
    Attachments:
    cursor position.JPG ‏42 KB

  • How to calculate a number of calendar days from a start date (e.g. 60 days from 3/10/2012)

    How to calculate a number of calendar days from a start date (e.g. 60 days from 3/10/2012)

    DT,
    If the starting date is in Column A, and you want to calculate what the date would be 60 days later, in Column B, write in Column B:
    =A+60
    Couldn't be much easier.
    Jerry

  • How to populate data into a tabular datablock from a cursor in oracle forms

    Hello experts,
                  I am new in oracle forms.I am using Oracle forms 11g with weblogic server 10.3.5 at windows 7.My issue is that I am trying to populate data from a cursor into a tabular datablock(record number property is set to 5).I am using a button press trigger with code as:
    declare
        cursor c3 is  select empno,ename from emp;
    begin
        go_block('C');
        first_record;
        loop
        open c3;
        Fetch C3 into :c.t1,
    :c.t2;
    Exit when :system.last_record = 'TRUE';
    next_record;
    Close C3;
        End loop;
        end;
    Everything is OK here except,I have 5 record rows in C datablock but only first record is fetched into datablock.I want all records are fetched into data block
    Thank you
    regards
    aaditya

    Yes
    when i m using below query,so binary data display not display actual format
    select UTL_RAW.CAST_TO_VARCHAR2 (DBMS_LOB.SUBSTR(SOAPRTFDESC,10,1)) from soaptxsection

  • How to use BULK INSERT for a data from a cursor?

    Oracle 10G enterprise edition.
    I tried to Bulk insert datas returning from a cursor, its returning error.
    PLS-00302: component 'LAST' must be declared
    I need some help to use the Bulk INSERT here.Can any one help me to specify what error i have made?
    CREATE OR REPLACE PROCEDURE HOT_ADMIN.get_search_keyword_stats_prc
    IS
    CURSOR c_get_scenarios
    IS
    SELECT a.*,ROWNUM rnum
    FROM (
    SELECT TRUNC(r.search_date) sdate,
    r.search_hits hits,
    r.search_type stype,
    r.search_qualification qual,
    r.search_location loc,
    r.search_town stown,
    r.search_postcode pcode,
    r.search_college college,
    r.search_colname colname,
    r.search_text text,
    r.affiliate_id affiliate,
    r.search_study_mode smode,
    r.location_hint hint,
    r.search_posttown ptown,
    COUNT(1) cnt
    FROM w_search_headers r
    WHERE search_text IS NOT NULL
    AND NVL(search_type,' ') <> 'C'
    AND TRUNC(search_date)= TO_DATE(TO_CHAR(SYSDATE-1,'DD-MON-RRRR'))
    GROUP BY TRUNC(r.search_date),
    r.search_hits,
    r.search_type,
    r.search_qualification,
    r.search_location,
    r.search_town,
    r.search_postcode,
    r.search_college,
    r.search_colname,
    r.search_text,
    r.affiliate_id,
    r.search_study_mode,
    r.location_hint,
    r.search_posttown
    ORDER BY cnt desc
    ) a
    WHERE ROWNUM <=1000;
    lc_get_data c_get_scenarios%ROWTYPE;
    BEGIN
    OPEN c_get_scenarios;
    FETCH c_get_scenarios into lc_get_data;
    CLOSE c_get_scenarios;
    FORALL i IN 1..lc_get_data.last
    INSERT INTO W_SEARCH_SCENARIO_STATS VALUES ( i.sdate,
    i.hits,
    i.stype,
    i.qual,
    i.loc,
    i.stown,
    i.pcode,
    i.college,
    i.colname,
    i.text,
    i.affiliate,
    i.smode,
    i.hint,
    i.ptown,
    i.cnt
    COMMIT;
    END;

    This isn't what you asked, but I've generally found it helpful to list the columns in an INSERT statement before the values. It is of course optional, but useful for reference when looking at the statement later

  • How do I calculate days from two different dates?

    Hi all,
    How do I calculate days from two different dates?
    my requirement is to pass the number of days to target field from two dates.
    Current date :  14/04/2010
    Standard date: 01/01/1957 is the standard = day 0
    Is it possible in graphical mapping with out  udf?
    Plz help me on this I have donu2019t have much knowledge on JAVA.
    Thanks

    Hi Yadav,
    Probably this is not the correct forum for XI / PI .
    You can post the same to...
    Process Integration (PI) & SOA Middleware
    Hope this helps.
    Regards
    Raj

  • How do I calculate days from two different dates in XI/PI?

    Hi all,
    How do I calculate days from two different dates in XI/PI?
    my requirement is to pass the number of days to target field from two dates.
    Current date : 14/04/2010
    Standard date: 01/01/1957 is the standard = day 0
    Is it possible in graphical mapping with out udf?
    Plz help me on this I have donu2019t have much knowledge on JAVA.
    Thanks

    Hi Yadav,
    Probably this is not the correct forum for XI / PI .
    You can post the same to...
    Process Integration (PI) & SOA Middleware
    Hope this helps.
    Regards
    Raj

  • Wanted to fetch data from ref cursor to nested pl/sql table getting an erro

    create or replace type "DEPT12" as object(dno number(2),dname varchar2(30),loc varchar2(50));
    create or replace type dept_tab as table of "DEPT12"
    create or replace type "LOC12" as object(locno number,loc_name varchar2(100))
    create or replace type loc_tab as table of "LOC12"
    create or replace type dept_loc_rec1 as object (dept_dt dept_tab,eno number,loc_dt loc_tab);
    create type dept_loc_tb as table of dept_loc_rec1
    create table dept_loc_tb_bk1(dept_dt dept_tab,eno number,loc_dt loc_tab)
    NESTED TABLE dept_dt
    STORE AS dept_tab12,
    NESTED TABLE loc_dt
    STORE AS loc_tab12
    insert into dept_loc_tb_bk1 values(dept_tab(dept12(3,'ABD','LOC')
    ,dept12(4,'ABD','LOC')
    ,dept12(5,'ABD','LOC')),3,loc_tab(loc12(21,'AAB'),
    loc12(22,'AAB'),
    loc12(23,'AAB')));
    when I am trying to fetch data from ref cursor to pl/sql table which i am getting an error ora-06504: pl/sql : Return types of result set variables or query do not match.
    I have created a nested table of same as the nested pl/sql object table dept_loc_tb and i have declared the lv_dept_loc_tb of same dept_loc_tb but getting an above error when trying to fetch into that variable.
    Please any one who can solve my problem.
    declare
    type cr is ref cursor;
    cr_obj cr;
    lv_dept_loc_tb dept_loc_tb;
    begin
    open cr_obj for select dept_dt,eno,loc_dt from dept_loc_tb_bk1;
    fetch cr_obj bulk collect into lv_dept_loc_tb;
    close cr_obj;
    end;

    Your query selects 3 separate columns therefore requires 3 collections of corresponding types. You want to treat those 3 columns as an object of DEPT_LOC_REC1 type:
    SQL> declare
      2  type cr is ref cursor;
      3  cr_obj cr;
      4 
      5  lv_dept_loc_tb dept_loc_tb;
      6 
      7  begin
      8  open cr_obj for select dept_dt,eno,loc_dt from dept_loc_tb_bk1;
      9  fetch cr_obj bulk collect into lv_dept_loc_tb;
    10  close cr_obj;
    11  end;
    12  /
    declare
    ERROR at line 1:
    ORA-06504: PL/SQL: Return types of Result Set variables or query do not match
    ORA-06512: at line 9
    SQL> declare
      2  type cr is ref cursor;
      3  cr_obj cr;
      4 
      5  lv_dept_loc_tb dept_loc_tb;
      6 
      7  begin
      8  open cr_obj for select DEPT_LOC_REC1(dept_dt,eno,loc_dt) from dept_loc_tb_bk1;
      9  fetch cr_obj bulk collect into lv_dept_loc_tb;
    10  close cr_obj;
    11  end;
    12  /
    PL/SQL procedure successfully completed.
    SQL> SY.
    P.S. Discover sys_refcursor.

  • ORA-13773: insufficient privileges to select data from the cursor cache

    We are trying to create STS using the below query:
    exec sys.dbms_sqltune.create_sqlset(sqlset_name => 'TEST_STS', -
    sqlset_owner => 'SCOTT');
    The below procedure will load sql starting with 'select /*MY_CRITICAL_SQL*/%' from cursor cache into STS TEST_STS.
    DECLARE
    stscur dbms_sqltune.sqlset_cursor;
    BEGIN
    OPEN stscur FOR
    SELECT VALUE(P)
    FROM TABLE(dbms_sqltune.select_cursor_cache(
    'sql_text like ''select /*MY_CRITICAL_SQL*/%''',
    null, null, null, null, null, null, 'ALL')) P;
    dbms_sqltune.load_sqlset(sqlset_name => 'TEST_STS',
    populate_cursor => stscur,
    sqlset_owner => 'SCOTT');
    END;
    We were getting the following error: ORA-13761: invalid filter
    After granting the below privileges to the user we are getting the below error:
    Err msg:
    ERROR at line 1:
    ORA-13773: insufficient privileges to select data from the cursor cache
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 2957
    ORA-06512: at line 10
    For SQL Tuning Sets:
    GRANT ADMINISTER ANY SQL TUNING SET TO scott;
    For Managing SQL Profiles:
    GRANT CREATE ANY SQL PROFILE TO scott;
    GRANT ALTER ANY SQL PROFILE TO scott;
    GRANT DROP ANY SQL PROFILE TO scott;
    For SQL Tuning Advisor:
    GRANT ADVISOR TO scott;
    Others:
    GRANT SELECT ON V_$SQL TO SCOTT;
    GRANT SELECT ON V_$SQLAREA TO SCOTT;
    GRANT SELECT ON V$SQLAREA_PLAN_HASH TO SCOTT;
    GRANT SELECT ON V_$SQLSTATS TO SCOTT;
    grant select on sys.DBA_HIST_BASELINE to SCOTT;
    grant select on sys.DBA_HIST_SQLTEXT to SCOTT;
    grant select on sys.DBA_HIST_SQLSTAT to SCOTT;
    grant select on sys.DBA_HIST_SQLBIND to SCOTT;
    grant select on sys.DBA_HIST_OPTIMIZER_ENV to SCOTT;
    grant select on sys.DBA_HIST_SNAPSHOT to SCOTT;
    Any info from your end to resolve the issue will be of great help.
    Thanks

    What is the alert log reporting. Are you seeing any other errors than these in the alert log too?

  • How to calculate AGE from two different date fields

    hi
    I need to calculate AGE from two different date fields.
    Can some help me how to do, when i try to do substraction formula it is showing error.
    Thank You
    Manu

    Manu wrote:
    Hi
    Both fields are in date format only, i need to calculate no . of days between two different dates
    Thanks
    ManuThe reason for the question about the format of the column is because the simplest solution only works on DATE columns. Others have mentioned this here, but if you want the difference between two date fields, you can use this formula:
    TIMESTAMPDIFF(SQL_TSI_DAY, date_column1, date_column2)
    The above being said, you still didn't tell me what you did, or what error message you received. So again, if the above formula didn't work, what did you do? Where did you put the formula? What was the exact syntax you used? What was the error message you got?
    Please don't make us work more than we need to. Answer all the questions in your next post. Thanks.

  • Calculate end date from inputs : start date and number of months

    Hello Experts,
    I have a start date and number of months from which i need to calculate the end date.
    For Eg: start date = 03-12-2008
                no. of months = 48
          Ans: end date = 03-12-2012
    Please help me.

    requirement is no different from what is stated in the previous thread.
    To elaborate further, I'm looking for some Function Module or some relevant alternative to calculate the future date.
    Future date is calculated using a start date input and No. of months.
    As stated in the example in my previous thread.
    For eg:
    Inputs to FM    : Start date        : 03-12-2008
                                    No. Of months : 48  months
    Output from FM: Future Date     : 03-12-2012
    Looking forward for your reply.

  • Error reading data from static cursor cache.

    Hi,
    Does anyone know what causes this error below. It just started happening out of the blue. I'm running Apache Tomcat 4.1 on Win 2000 server with MS SQL Server 2000 database.
    Error:
    java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error reading data from static cursor cache.
    Thanks,
    TR

    hi,
    i had a similar sort of error, something along the lines of "error setting up static cursor cache" using the SQL JDBC drivers on Win2K. i deleted the file entries in the TEMP folder of c:\documents and settings\<user>\Local Settings\TEMP and everything was cool after it. i'm not sure what the exact issue is (probably something like maximum folder size had been reached). i ran the FileMon utility from www.sysinternals.com and it reported a DISK_FULL error on a temporary file being read by the process. to cut a long story short, everything is NOW cool.
    cheer,
    dara

  • Retest Date Calculate from manufacturing Date

    Dear all,
    If we are doing Goods Receipt  for Finished Goods, Semi Finished Goods or Raw Material the  Retest date is calculated from Posting Date (GRN) as per SAP Standard. But our client required it should be the retest date is calculate from Manufacturing Date of Particular Material.
    Please Guide How to Map it , what configuration i want to do in SPRO 
    s. sakthivel

    Hi Shaktivel,
    The same situation we faced in one of my pharma implementation, As per standard,retest date will be calculated from the GR date + retest period in days given in the master.If we want to create from the date of manufacturing date we have to opt for user exits.we done through an user exit during usage decision.
    regards,
    Lenin. A

  • Function Module - Calculate 5 weeks lookup based on -7 increments from the Key Date

    Hi Guys,
    I am looking to create a variable on Fiscal Period/Year, that automatically populates the variable with the previous 5 weeks based on -7 increments from the key date , when the user runs the query .
    For Example: If key date is 03/11/2014 need to get previous 5 weeks 03/04/2014, 02/25/2014, 02/18/2014, 02/11/2014, 02/04/2014. mm/dd/yyyy.
    Is there any Function Module available/ please provide the logic code - can anyone help?
    Thanks,
    Suresh Narayan

    Hi suresh,
    Please once try with this approach,
    Create a variable with variable represents :  multiple input value, Processing type : customer exit ; variable is ready for input.
    and write the below code :
    if i_step = 1.
    data : fdate type d ,
            wa1 like line of e_t_range,
           n1 type i.
    n1 = 1.
    if n1 <= 5.
    wa1-opt = 'EQ'.
    wa1-sign = 'I'.
    wa1-low = fdate.
    append wa1 to e_t_range.
    fdate = fdate - 7.
    endif.
    endif.
    Hope you got it,

  • How do I get an event-based response to a graph cursor change?

    I want to respond to the user moving a cursor on a data (X-Y) graph. (LV 7.0)
    What I really want is an event called "Graph.Cursor.Value Change", which would supply me with the new coordinates, but I see no such event.
    If I use the MOUSE MOVE event to trigger obtaining the cursor values, it does not give me an event, until the cursor has stopped moving, the button is up, and the mouse moves off the cursor line.
    Sure, I could use a TIMEOUT event, and read it every 100 mSec, but I don't like the time lag.
    What I did was to set a flag TRUE on Graph.MouseDown and FALSE on Graph.MouseUp. I then choose an event timeout of 10 mSec or -1, depending on that flag.
    That works, but is there a more direct way that I'm missing?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    No, unfortunately there is not.
    To code around this limitation, I typically use the timeout event in a more complex way as follows:
    The timeout is wired to a shift register that is initialized with "-1" (no timeout). The value from the shift register then crosses the event structure and feeds to the shift register on the right in almost all event cases.
    I add two special event cases:
    (1) "graph-mouse down" puts a small number (e.g. 10ms) in the right timeout shift register
    (2) "graph-mouse up" puts again a -1 in the right timeout shift register
    (x) All other event cases (incl. timeout) wire the current timeout straight across to the right shift register.
    The timeout event contains the logic to read the graph cursors and associated actions.
    This way there is normally infinite timeout. Once the mouse goes down on the graph, the timeout executes at relatively rapid succession until the mouse is raised again. At which point everything quiets down.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for