Basic Level Trigger Detection

Hi..
I am new to LabVIEW so please bear with me.. I am trying to measure the RPM of my motor which has an optical pick up tachometer attached to it.. The signal is analog and has two states
1. 0 (here the output is in the order of millivolts and is very low)
2. 1 (Here the outout is a steady 10V)
i need to find the time between the two leading edges of the high state so that i can convert it to an RPM. but my basic level trigger detection always outputs a FALSE value even if the signal is above the set LEVEL. hence i am not able to get a time stamp differnce at all..
i dont know if there is a better way to do this. its basically just measring the pulses of my signal. Can anyone suggest a way
Attached is the VI 
Solved!
Go to Solution.
Attachments:
Acq&Graph Voltage-trig Clk.vi ‏33 KB

Hi Shankar,
If you use the timestamp of the trigger location, it should be more accurate.
Jared S.
Applications Engineering
National Instruments
Attachments:
timedifference.png ‏16 KB

Similar Messages

  • Basic level trigger reset

    Hi,
    Can Anyone explain to me about the "Basic Level trigger detection.vi". I tried using that and it works fine but i cant seem to reset the trigger... What does resetting the trigger do? What is hysteresis for?
    Thanks,
    Sebastian

    Hello Sebastian,
    Hyteresis is used to avoid problems due to noise during the electrical interpretation of an input signal level. The following link tells you a bit more about the Schmitt Trigger that uses hysteresis. Regarding the hysteresis input of the "Basic Level trigger detection.vi" this is the way it works:
    hysteresis specifies the amount above and below level through which signal in must pass before a trigger level crossing is detected. Trigger hysteresis is used to prevent noise from causing a false trigger. For a rising edge slope, the signal must pass below level – hysteresis before a trigger level crossing is detected. For a falling edge slope, the signal must pass above level + hysteresis before a trigger level crossing is detected
     The reset signal is used to force the reset of the input signal on the next call of the VI. If such a reset is inactive, the VI stores the last input signal value and will use it as the initial value the next time the VI is called. Please note that this input is defined as FALSE by default
    Hope this helps you.
    Best regards
    Mathieu STEINER
    NI France
    Message Edité par Mathieu Steiner le 08-14-2006 05:02 AM
    Message Edité par Mathieu Steiner le 08-14-2006 05:03 AM
    Mathieu Steiner, Test System Engineer, Safran Engineering
    CLD, ISTQB

  • Basic level trigger

    anyone pls help
    i am using labview 7.1
    with the vi 'basic level trigger', i need to determine the location of signal with the threshold level. for what i know, the vi can only detect once within one sampled block of data. if within one sampled block of data, it consists of many curves?with the same threshold level value, i need to determine many location(time/index), how m i going to do?
    thanks for enlightening me
    Attachments:
    basicleveltrigger.vi ‏93 KB

    Here's an example that uses the modified basic trigger level detection.
    Attachments:
    detect triggers example.llb ‏83 KB

  • Statement level trigger!!!!

    Hi Gurus,
    I have an issue here. I am inserting multiple rows in a table say A. so I wrote an after insert trigger for each row referencing new as new and old as old on table A. This trigger when fired inserts rows in table B.
    These rows are selected from say table C by using the :new.column (one of the coulmns that are about to be inserted in tableA) of table A as parameter and then inserted into table B. But I want that trigger to fire only once though I am inserting multiple rows.
    For this purpose I took out the "for each row and referencing new as new and old as old statements" to make it statement level trigger but in this case I am unable to use the :new.column of table A as parameters. Can anyone please suggest how to read the rows in statement level trigger that are being inserted in table A and pass them as parameters to select the values from table C and again insert them in table B. I know it is kinda confusing. Any suggestions...... Thanks in advance!!!!!

    Hi warren,
    Thnx for ur response. here is the code
    CREATE OR REPLACE TRIGGER ALPHA_AIR
    AFTER INSERT
    ON ALPHA
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    l_source varchar2(10);
    l_amount number;
    l_comments varchar2(50);
    BEGIN
         SELECT      b_source,
              b_amount,
              b_comments
         INTO     l_source,
              l_amount,
              l_comments
         FROM BETA
         WHERE beta_id=:new.alpha_id:
         INSERT INTO GAMMA
    ( g_source,
         g_amount,
         g_comments,
         date )
         VALUES (
              l_source,
              l_amount,
              l_comments,     
              sysdate);
    END;
    The trigger is on table ALPHA and it selects data from BETA using :new.alpha_id as parameter. But for multiple rows inserted in table ALPHA, multiple times rows are inserted in table GAMMA. So I made it statement level trigger but I cannot pass :new.alpha_id as parameter in the select statement. Is there any way to do this. Hope it makes sense.

  • Capturing value in after insert or update row level trigger

    Hi Experts,
    I'm working on EBS 11.5.10 and database 11g. I have trigger-A on wip_discrete_jobs table and trigger-B on wip_requirement_operations table.When ever i create discrete job, it inserts record in both wip_discrete_jobs and wip_requirement_operations.
    Note:2 tables are like master-child relation.
    Trigger-A: After Insert.Row Level trigger on wip_discrete_jobs
    Trigger-B:After Insert,Row Level trigger on wip_requirement_operations
    In Trigger A:
    I'm capturing wip_entity_id and holding in global variable.
    package.variable:=:new.wip_entity_id
    In Trigger B:
    I'm using the above global variable.
    Issue: Let's say i have create discrete job,it's wip_entity_id is 27, but the global variable is holding the previous wip_entity_id(26),not current value.It looks like before trigger A event is complete, trigger B is also in process, i think this could be the reason it's not storing the current wip_entity_id in the global variable.
    I need your help how to have the current value in the global variable so that i can use that in the trigger B.
    Awaiting response at the earliest.
    Thanks

    798616 wrote:
    Hi Experts,
    I'm working on EBS 11.5.10 and database 11g. I have trigger-A on wip_discrete_jobs table and trigger-B on wip_requirement_operations table.When ever i create discrete job, it inserts record in both wip_discrete_jobs and wip_requirement_operations.
    Note:2 tables are like master-child relation.
    Trigger-A: After Insert.Row Level trigger on wip_discrete_jobs
    Trigger-B:After Insert,Row Level trigger on wip_requirement_operations
    In Trigger A:
    I'm capturing wip_entity_id and holding in global variable.
    package.variable:=:new.wip_entity_id
    In Trigger B:
    I'm using the above global variable.
    Issue: Let's say i have create discrete job,it's wip_entity_id is 27, but the global variable is holding the previous wip_entity_id(26),not current value.It looks like before trigger A event is complete, trigger B is also in process, i think this could be the reason it's not storing the current wip_entity_id in the global variable.
    I need your help how to have the current value in the global variable so that i can use that in the trigger B.
    Awaiting response at the earliest.
    ThanksMy head hurts just thinking about how this is being implemented.
    What's stopping you from creating a nice and simple procedure to perform all this magic?
    Continue with the global/trigger magic at your own peril, as you can hopefully already see ... nothing good will come from it.
    Cheers,

  • Confusion in Order of row and statement level trigger

    Hi can anyone tell me, if i create some trigger on table emp as in below order..
    BEFORE INSERT .. ROW LEVEL
    BEFORE INSERT .. STMNT LEVEL
    AFTER INSERT .. ROW LEVEL
    AFTER INSERT .. STMNT LEVEL
    than what will will be order of execution of trigers?
    How oracle will decide order?
    plz provide me some documents related to triggers execution order..thnx in advance..!

    PC wrote:
    Hi.. Got answer about order..but 1 strange point i m feeling that
    in case of, before insert.. stmnt level triger fire 1st then before insert.. row level.
    but in case of after insert.. row level trigger fireing 1st then after insert.. stmnt level ..
    can you explain this also..Why is it strange.
    You've got a statement you are executing.
    The first thing possible is that you are 'before' the statement.
    The next thing possible is that the statement executes for each row.
    Thus for each row, there is a point 'before' each row and a point 'after' each row.
    Once the statement has executed, you are 'after' the statement.
    So, it is only logical that the statement triggers surround the statement and the row triggers are within the statement, and of course 'before' comes before 'after'.

  • Block level trigger vs form level trigger

    Hello.
    I want to know what is better - to use block or form trigger?
    I have many blocks in my form. I need to write custom code in (for example) key-crerec trigger.
    Should i put trigger into each block or should i create one at form level like:
    if :system.current_block = 'BLOCK1' then
    create_record;
    elsif...
    end if;
    Thanks.
    Message was edited by:
    DejanH

    Hello,
    If you have to handle this stuff in more than one block, it seems more generic to put the code in a form-level trigger if you don't want to duplicate it several times.
    Francois

  • Why Module level trigger contains "WHEN-CHECKBOX-CHANGED" trigger in Forms 6i?

    Hi,
    Why Module level trigger contains triggers like "WHEN-CHECKBOX-CHANGED", "WHEN-BUTTON-PRESSED" etc.? "WHEN-CHECKBOX-CHANGED" trigger is present in CheckBox & "WHEN-BUTTON-PRESSED" trigger in Button. Then why these triggers are also presnt in Module?
    Can anyone please clarify my doubt?

    There's a lot of triggers that are present at different "scopes". Like they exist at the item level, the block level,
    the module level...
    The idea is if you have an action that should only occur at that one single item it can do in the item trigger. If
    it's for all of them on the block, in the block level trigger. If for all of them ever, at the module level.
    For example suppose you wanted it to do a next_item after the trigger executed you can put that logic in the module
    level trigger. A key thing to notice here is the trigger hierarchy. That is essential to know about.
    Right click on one of these triggers in the object navigator. The execution hierarchy is override, before and after.
    since each of these levels of the same trigger has this execution hierarchy this is, well, potentially not easy to
    understand what is going to happen. I would typically have a per-item trigger be before and a higher level trigger
    be after.
    And this execution hierarchy thing is something I'd love to see enhanced in the gui. I wish it was a lot easier to see
    what the execution hierarchy is when editing a trigger text. I wish one could see and modify the execution hierarchy on the
    same screen as the trigger text and what would be really great is some way to tell how the trigger hierarchy will sort out
    at run time. For example if one is looking at an item level trigger it would be fabulous to know that as is, that trigger will be
    overridden by a higher level trigger and so on. Or vice versa if one is looking at a block level or form level trigger that it is
    overridden by a lower level trigger, or it will execute before or after some other trigger. I don't know what is defined to happen
    with various levels of triggers that have the same execution hierarchy. Like suppose they are all override,before,after.. then
    what happens? It'd be good to know.

  • How can we disable Block Level Trigge using Form Personalization

    Hi,
    I want to disable block level trigger(WHEN-NEW-RECORD-INSTANCE) using forms personalization at responsibility level.
    Can any one please give me the answer.
    it's urgent
    Thanks and Regards,
    Dhana

    No, Firefox is user choice rules over the "wants" of individual websites as far as disabling contextual menus and the keyboard commands.
    Placing a transparent image over the image will keep the less technical user from saving the main image. If they do try to save it all they'll get is the transparent image overlay.

  • Form level v/s item level trigger in oracle forms

    Hello Experts,
                  I am new in oracle forms.I am using forms 11g with weblogic server 10.3.5 at windows 7.I am very confused between Form level and item level triggers.What is the sense of use of when-button-pressed trigger at item level & form level.If I have this trigger form level then how could I check that is fired.
    Thank  You
    regards
    aaditya

    979801 wrote:
    Hello Experts,
                  I am new in oracle forms.I am using forms 11g with weblogic server 10.3.5 at windows 7.I am very confused between Form level and item level triggers.What is the sense of use of when-button-pressed trigger at item level & form level.If I have this trigger form level then how could I check that is fired.
    Thank  You
    regards
    aaditya
    You need to clear you concept first..
    Form level Trigger: code applied all respective item within the form
    Item level Trigger: code applies for only the item that has the code.
    try in a form and you will see the difference.
    Hamid

  • Form level Trigger Vs Block Level trigger

    I have a form with single Database Block. I need to write a
    transaction Trigger for this Block. I need to know r there any
    advantages of writing the triggers at Form Level rather than at
    Block Level.
    Thanx in advance
    --- Moneesh Walia
    null

    Hello,
    If you have to handle this stuff in more than one block, it seems more generic to put the code in a form-level trigger if you don't want to duplicate it several times.
    Francois

  • Column level trigger

    Hi All -
    I have a table which has 6 columns
    create table main_tbl
    (p_id integer,
    p_lname varchar2(20),
    p_fname varchar2(20),
    p_dept varchar2(15),
    p_office varchar2(15),
    p_ind char(1)
    And I have a corresponding audit/history table
    create table main_tbl_audit
    (p_id integer,
    p_lname varchar2(20),
    p_fname varchar2(20),
    p_dept varchar2(15),
    p_office varchar2(15),
    p_ind char(1)
    As part of the application audit process, I want to move a record from main_tbl to main_tbl_audit only when a column value changes. I can do this using a column level trigger but if I use column level trigger and if for example 3 values are changed in the main_tbl at once then it will create 3 different rows in the main_tbl_audit table.
    Is there a way to always create one row in main_tbl_audit table even if a record in the main_tbl table has one or more column value changes.
    Please share your expertise.
    Thanks,
    Seenu001

    I'm not quite sure what you mean by a "column-level trigger" since there is no such thing in Oracle. You can specify a list of columns in the OF clause of a row-level trigger, so I'm guessing that's what you're talking about. But then I don't understand why you would get three rows in the audit table. Unless you created three different row-level triggers each of which specified a single column?
    Why wouldn't you simply have a single row-level trigger that compared the old and new values, i.e. (ignoring NULLs)
    CREATE OR REPLACE TRIGGER trg_audit_main
      BEFORE UPDATE ON main_tbl
      FOR EACH ROW
    BEGIN
      IF( :new.p_lname != :old.p_lname or
          :new.p_fname != :old.p_fname or
      THEN
        INSERT INTO main_tbl_audit ...
      END IF;
    END;Justin

  • Multi level trigger system

     Hey everyone,i would like to know if it is possible to program a multi level trigger for the M serie or R serie PXI devices. Thanks for the reply

    Hi tecla,
    what do you mean by multi level trigger?
    You can configure one trigger (retriggerable possible) per PXI-card, also you can synchronize your PXI systems. You can get some information here:
    Advanced Data Acquisition Techniques with R Series
    http://www.ni.com/white-paper/2993/en
    How Can I Achieve Multi-Device Synchronization with R Series Devices?
    http://digital.ni.com/public.nsf/allkb/67A6D7F36FB9C4C586257974007BA077
    Analog Triggering Considerations for C Series, E Series, M Series, and S Series Devices
    http://zone.ni.com/reference/en-XX/help/370466V-01/mxdevconsid/anltrigeseries/

  • Form level trigger size limit

    hi all,
    i am using Forms 6i.
    in a form level trigger, there is a code of around 2600 lines.
    while compiling the form it is showing an error 'Program too large'.
    is there any limitation on size?
    please suggest something.
    Regards
    PantherHawk

    Hi,
    I think you are getting PLS error from the database.
    Yes there are limitations.
    Refer :
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/limits.htm
    ORA-06540 ORA-06553 PLS-00123
    and
    Check Note: 62603.1.
    Nilaksha.

  • After update row level trigger help

    Hello,
    I have to update some data on a table. I need to be able to undo the update just in case something goes wrong after update is comitted. I decided to keep track of updated rows by inserting new and old values on a audit table using UPDATE ROW LEVEL trigger. Everything working fine as I wished, but here is what I am having a problem in separating each bulk of update by a unique ID... I am not talking about any primary key or autogenerated sequence key here.
    Audit table inserts values: primary key of table, old value before update, new value after update, and time stamp. Now, I want add one more field on the audit table that indentifies each bulk of UPDATE operation... I tried to use session ID, it works fine, but sometimes I may update two or three times, maybe around same time, on the same day from the same session (timestamp doesn't help me). In that case, each UPDATE operation inserts the same session ID on Audit table. I won't know which update operation populated which row of the audit table.
    Can somebody give me how I can resolve this situation. Again, this has to be inside the trigger. Is there any other IDs that I can use? I would appreciate your help. Thanks,

    Can you add a table level trigger in addition to your row level trigger? If so, you could do what you want in there. In the new trigger, formulate a unique value (such as session id || sysdate) and store it using dbms_application_info.set_module and set the MODULE to that value. Then, in your row level trigger code, execute dbms_application_info.read_module and pull the MODULE value and insert it into your audit table.
    The use of session id || sysdate should be fine (and unique) in this context. You'd just have to know at what time the UPDATE batch occurred that you wanted to undo.
    By the way, you could use LogMiner to do what I think you're trying to create with the use of your trigger code and table entries. Recall the Oracle keeps the undo and redo data for every row that is updated in the redo/archive logs. Using LogMiner, you could find and undo any change from any time. Just like your method, you'd have to know when the "bad" thing occurred in order to find the correct log and "mine" it, but all the functionality is there. There's a kinda old, but very good, article by Arup Nanda at http://www.oracle.com/technology/oramag/oracle/05-jul/o45dba.html that reviews how it all works. You may want to look at it to see if you can avoid re-inventing the wheel to meet your needs. Just a thought....
    Karen

Maybe you are looking for

  • ITunes not working/iPhone iOS7 won't update

    Alright so apparently all of Apple software has decidede to crap out on me that I'm starting to regret spending money on this phone. A software update came out, iOS 7.1 so I very stupidly decided to download. I say stupidly since it seems like that's

  • How to convert a .jar file to a .sda

    Hi, I have a login module which is created in the form of .jar file. I was deploying this login module using the Deploy tool(deploy.bat). Now I am looking for deploying my login module using the SDM, which happens to be the recommended mode with NW04

  • Daylight Savings Time -2007

    In 2007 when the US changes the start/end dates for daylight savings time, will Apple patch 10.4.x, 10.3.x etc?

  • Dump error: Dynpro does not exist while in transaction me41 / me31k

    Hi Experts I am experiencing dump while attempting to create rfq/contract. Error analysis     The system attempted to use dynpro 0301 in program "SAPLXM06".     This dynpro does not exist. Trigger Location of Runtime Error     Program                

  • Problem with updates on live monitor

    hi all im new brazilian user, and my english is so bad, so sorry  my problem is, if i lose my cd of drivers, how can i update those ? because now, i have formated my pc and install live monitor 3.72 but the update (only for drivers to sound and mothe