Relaxation and door, timing of the trigger.


Hi Companyqwe,

After reviewing your code a little more in detail, I suggest that in which you may be able to measure the time between your start trigger and your trigger to stop is to get the timestamp at the point at which your starting threshold is exceeded, and then back to the place where the stop trigger level is exceeded. These values of time stamps could then be subtracted to determine the total duration of the trigger.

I built a very rough example to illustrate how this could be done. You can apply a principal similar to your request.

I hope this helps.

Best regards

Christian Hartshorne

NIUK

Tags: NI Software

Similar Questions

  • Strain gauge: calibrate, relaxation and to write to the file

    Hello

    I'm new to labVIEW please bare with me.  My title says I'm trying to do.  I want to capture data from strain gauge using a trigger and write data to a file.  However, I also want to be able to calibrate the strain gauges.

    My attached program reads the data correctly with relaxation and stores it in a file, but it does not calibrate properly.  If I run the program several times and press the button "calibrate" each time, finally get gauges calibrated after two or three iterations.

    Is it possible to change the program so that the gauges are calibrated and then data can be triggered and written to the file?

    I'm using LabVIEW 8.6 and NI-DAQmx 8.8.

    A screenshot of the front panel is also attached.

    So I thought about it, but I'm not completely sure why it works.  I didn't remove the loop condition around the calibration block and the program works beautifully.  All I have to do is wait about 20 seconds before I hit the trigger for the calibration to be completed, and my gauges will be calibrated when I pull the trigger.

    This program works very well for this application.  However, it is difficult to change because all parameters are constant in the block diagram.

  • How to identify the name of the procedure that inserts into a table in the TRIGGER

    Hello
    There are several procedures in my DB that perform the INSERT operation on a main table - MYTAB say.

    I created a trigger on the table MYTAB, to follow closely, what procedure is insert data in there. Is there a function that captures the name of this object?

    For example: PROC_A, PROC_B, PROC_C insert into the table MYTAB. And my query is - the trigger on table MYTAB should document these object names where the lines fit.
    Please let me know your suggestions...

    SQL> create table t (no integer, dt timestamp, who_inserted varchar2(4000));
    
    Table created.
    
    SQL> create or replace procedure p
      2  as
      3  begin
      4    insert into t (no, dt) values (1, systimestamp);
      5  end;
      6  /
    
    Procedure created.
    
    SQL> show err
    No errors.
    
    SQL> create or replace trigger t_trig before insert on t for each row
      2  begin
      3     :new.who_inserted := dbms_utility.format_call_stack;
      4  end;
      5  /
    
    Trigger created.
    
    SQL> show err
    No errors.
    
    SQL> begin
      2    p;
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from t;
    
            NO DT                             WHO_INSERTED
    ---------- ------------------------------ ----------------------------------------
             1 31-OCT-14 04.58.53.668465 AM   ----- PL/SQL Call Stack -----
                                                object      line  object
                                                handle    number  name
                                              3a7ddbea0         2  KARTHICK.T_TRIG
                                              3ac979f30         4  procedure KARTHICK.P
                                              3a822deb8         2  anonymous block
    
  • Open a PDF document from local drive the trigger button of Oracle 6i form

    Hi all.
    I have an oracle forms 6i application. The system from where the forms are run... has a local folder with pdf documents. the requirement is that when the user clicks a button in the form of oracle... the respective pdf in the local folder should open (in the browser or in adobe pdf format or in any other way).
    I really desperately need this help. a google. has not used the host and client_host commands in the trigger button but I am presented with error message 'host, client_host' undeclared.

    bundles of thanks in advance to get out.

    client_host is not available in forms 6i as part of webutil. However you don't need client_host. Simply use the host :

    question

    host('rundll32.exe url.dll,FileProtocolHandler '||path_to_your_file);
    

    to open the pdf file with the associated reader pdf (Adobe Reader, or what you have installed).

    see you soon

  • ORA-04091 and composed the trigger

    Hi all, I have the following table:

    ID_PARTITION VARCHAR2 (20)

    ROLE_NOW VARCHAR2 (CHAR)

    DATE OF THE REMOVAL

    EDITION OF VARCHAR2 (3)

    DATE OF UPDATE_DATE

    If MOUNTING column is updated 'worthless', a trigger should update the UPDATE_DATE column with the value 'sysdate.

    I get the error ORA-04091 on the execution of the trigger. So I try to use the TRIGGER COMPOUND modifing the trigger existing as follow:

    CREATE OR REPLACE

    Tri_hot_active RELAXATION

    FOR the UPDATE OF the edition ON tab_informations

    COMPOUND OF TRIGGER

    v_partition VARCHAR2 (20);

    v_get VARCHAR2 (100);

    v_update_sql VARCHAR2 (1000);


    AFTER EACH ROW IS

    BEGIN

    dbms_output.put_line ('top');

    If: new.editing = 'no' THEN

    v_partition: =: old.partition_id;

    dbms_output.put_line ('v_partition =' | v_partition); -debug purpose

    dbms_output.put_line (' old v_update = ' |: old.update_date); -debug purpose

    v_update_sql: = "update tab_informations set = sysdate update_date where id_partition =" ' |: new.partition_id | "" ' ;

    dbms_output.put_line ('v_update_sql =' | v_update_sql); -debug purpose

    immediately run v_update_sql;

    end if;

    END AFTER EACH LINE;

    END tri_hot_active;

    /

    But I still get ORA-04091. Can you suggest me a solution?

    I'm working on 11 GR 2.

    Thank you

    Ste

    Now...

    you would do that in a BEFORE trigger rather than in AFTER

    and you just change the ': NEW ' values of the content that you want to use for the update

    HTH

  • How not to set default PFI as inputs to the and door to the counter 0?

    Hi, community of NOR.

    I have problems on a DAQ 6212 trying to serve in the PFI12 and PFI13 and door of the input for the meter to 0 signals.

    My application must simply measure the time difference between the two edges of awareness of two signals attached to PFI12 and PFI13.

    Data acquisition sends me the following error message when I run my program.

    ***************************************************************************

    DAQmx error: specified route can not be satisfied, because it requires resources
    that are currently in use by another way.
    Property: DAQmx_CI_TwoEdgeSep_FirstTerm
    Property: DAQmx_CI_TwoEdgeSep_FirstEdge
    Source device: Dev1
    Terminal of source: PFI10

    Resources in use by
    Source device: Dev1
    Terminal of source: PFI12
    Target unit: Dev1
    Destination terminal: Ctr0Aux

    Task name: T3

    State code:-89137

    ***************************************************************************

    My code looks like this. (Please note: the world of NI DAQ, being totally new to me, my code comments could be the problem):

    ************************************************************************

    #define DAQmxErrChkTest (functionCall) if (DAQmxFailed (gErrorTest = (functionCall))) goto error; on the other

    gErrorTest of Int32;
    float64 f64readDelay;
    TaskHandle taskHandleT3;

    Create a task

    DAQmxErrChkTest (DAQmxCreateTask ("T3", & taskHandleT3));

    Connect PFI12 to the boot entry storytelling 0 (correct?)

    DAQmxErrChkTest (DAQmxConnectTerms ("/ dev1/PFI12 ', ' / Ctr0Aux/dev1", DAQmx_Val_DoNotInvertPolarity));

    Connect PFI13 to the entrance to stop tell 0 (correct?)

    DAQmxErrChkTest (DAQmxConnectTerms ("/ dev1/PFI13 ', ' / Ctr0Gate/dev1", DAQmx_Val_DoNotInvertPolarity));

    A measure of separation of two edge channels join task3. Configure the advanced metrics.

    DAQmxErrChkTest (DAQmxCreateCITwoEdgeSepChan (taskHandleT3,

    "/ dev1/ctr0."

    "",

    0.001,

    5.0,

    DAQmx_Val_Seconds,

    DAQmx_Val_Rising,

    DAQmx_Val_Rising,

    Community salvation OR,.

    I myself had the answer for the problems described.

    Maybe this code may be useful for you

    The code fixed (in blue) is as follows:

    #define DAQmxErrChkTest (functionCall) if (DAQmxFailed (gErrorTest = (functionCall))) goto error; on the other

    gErrorTest of Int32;
    float64 f64readDelay;
    TaskHandle taskHandleT3;

    Create a task

    DAQmxErrChkTest (DAQmxCreateTask ("T3", & taskHandleT3));

    This is not necessary

    DAQmxErrChkTest (DAQmxConnectTerms ("/ dev1/PFI12 ', ' / Ctr0Aux/dev1", DAQmx_Val_DoNotInvertPolarity));

    This is not necessary

    DAQmxErrChkTest (DAQmxConnectTerms ("/ dev1/PFI13 ', ' / Ctr0Gate/dev1", DAQmx_Val_DoNotInvertPolarity));

    A measure of separation of two edge channels join task3. Configure the advanced metrics.

    DAQmxErrChkTest (DAQmxCreateCITwoEdgeSepChan (taskHandleT3,

    "/ dev1/ctr0."

    "",

    0.001,

    5.0,

    DAQmx_Val_Seconds,

    DAQmx_Val_Rising,

    DAQmx_Val_Rising,

  • delay between the trigger and data acquisition

    Hi, I use NI SMU-6368 as a tool for data acquisition. In my experience, I use an external digital trigger to start taking measures of a thermistor.

    However, before the experience, I want to know the time that elapses between the detection of the trigger signal and data acquisition start time.

    Is there a way to do this?

    Here's the kind of thing I configure to get an accurate measure of time of t = 0 trigger signal to the

    the actual first A/D conversion.   It may be too much for a measurement of the temperature, but you should get

    the right track.

    -Kevin P

  • passing the value and to timed loop

    Hello everyone,

    I'm working on a VI that consists of a timed loop which takes values in a file every 6 ms and writes it to an output file. Inside this timed loop, there is also a MATLAB block that calculates a parameter based on the value. based on this parameter, that a marker is set to 0 or 1 (planned) to operate as a Boolean marker.

    The problem arises when the marker is set to 1. I need an additional structure any that waits five seconds (without stopping the timed loop iterations) and a 'stop' button is not pressed an additional string is placed in the output file. I wish for the marker to get back to 0 if you press the 'stop' button and not string to put in the file.

    The main problem seems to be the use of a structure outside the timed loop. I can't have a while loop or any structure that waits 5 seconds inside the timed loop. And if I let him out he does not have the value of the marker second structure during execution of the timed loop.

    + Any ideas on what the structure to be used during the 5 seconds Timeout? (I tried a while loop)
    + Use a local or global variable for the marker? (I tried briefly, but as a local variable, I couldn't choose a variable defined in the MATLAB block, and I don't understand global variables in LabVIEW)

    I enclose a simplified version of the VI as well as a sample input file in case it can help visualize.

    Thank you
    DAVA

    So far, there are a few problems with your solution, but first of all, I will try to help answer your original question.

    You are right that you can't have a structure inside the timed loop which waits five seconds without blocking execution of the timed for the same period. You are also right that you cannot simply communicate through cables to an external structure. If you exit a loop of wire in the other, which creates a dependency of data flow, which means that the data loop cannot run at all until another loop ends its execution entirely and send data.

    You have two options:

    • Don't actually use a wait function to determine if the 5 seconds elapsed. Use the Express VI of time elapsed (search the palette). He just guard track of how much time has passed since the last reset. It does not wait. If you are safe to use inside your loop timed in a case that is triggered when the marker value becomes 1. Also check the Boolean command in this case Structure to decide if you should output the data in the file.
    • Use an outer loop as in the example you posted, but use screws of the range of synchronization to send data between the parallel loop. Consider a queue.

    But overall, I don't think there is much chance of this work very well. No way, the Matlab Script node running fast enough to run at a time of 6ms. Also no way it works in a deterministic way at all. He needs to communicate with an external program, so its execution time is really unlimited.

  • What is the trigger in the profile of the AAU and how to create it?

    Hello

    I created metadata for the vacation request (employee name - type holiday...) and I created a rule containing these metadata. But when I create a profile for this rule I can not select the appropriate trigger, it seems that she in the next photo. And I do not know what is the trigger element and how to create one for my rule, and my profile.

    Thank youtrigger.PNG

    1. in ConfigMgr - InformationFields find which option list is used for xIdcProfile. Change the option list (either directly, or in ConfigMgr - view (s), if they come from a table) to add a new trigger to profile value.

    2. in ConfigMgr - profile add a new profile with the new value of the trigger

    This will create a new profile without rules. Assign no global rules for profiles of school boards - it might work, but it is somewhat confusing and very probably will have side effects. A global rule is a rule that is applied to all elements regardless their profiles (even for items without profile create via the standard checkin).

  • I, how to place text on top a trigger and still have the trigger work normally?

    Hello

    I'm trying to place a box over a trigger, as I want the text to change (on rotation) while my zone target show. Only problem is that when I place the text on top, the trigger stops working.

    Is it possible to have my cake and eat it?

    See you soon,.

    Stephen

    The text block must be placed in the container of trigger (not behind it). All elements in the container to trigger will cause a transition between States when the mouse is over the area of the trigger container or the container is associated with the current item in the collection. If you are mixing elements hyperlink and containers of trigger, you must put the hyperlink on the container to trigger, and not on the items in the container of the trigger.

  • table update without firing and the deactivation of the trigger

    Hi team,

    I have a task like updating a table which consists of a trigger. But the thing is that the table should be amended without the trigger to fire. And even we can't disable the trigger also due to some ongoing cases. Is there a solution for this? I use Oracle 10 g.

    Thanks in advance.

    If the trigger is only on the update, then try to remove and insert the lines instead.

  • I'm doing a blank publication widget, but he keeps ignoring my changes of State for relaxation. How can I have my state changes still work for the things placed in the trigger?

    So here's what I have so far. The menu works perfectly, thanks to some Youtube tutorials. And everything is connected properly. But the only thing is that the "WORK" button does not change of State which is set up for this. I tried to apply the change of State before I placed it in the trigger area and after. Doesn't seem to do the job.

    Objective status change is essentially the 'WORK' text will turn white and white space in the run will teal'c also turn teal'c. Thus, the colors will be reversed. I have a link next to it, "ABOUT", which is currently successfully. I suppose that if it is not possible then I'll have to find another design... but I would like to know if there is a way to do it!

    Screen Shot 2015-01-02 at 4.00.17 PM.png

    I believe you are trying to get a color for the composition status when its assets? Please publish the site and provide the url to a glance.

    Thank you

    Sanjit

  • trigger with: new and: old to compare the values

    Jin
    I want to use the trigger with: new: old to compare the old values with new ones.
    I have an employee of the table

    Name Null? Type
    ENO NOT NULL NUMBER 4
    ENAME VARCHAR2 (20)
    SALARY NUMBER (10.2)

    now I want to set up a trigger so that it checks everything by inserting the values as part of if
    the insertion of salary value is greater than the last salary (line) table. If it fails, then it will be
    raises an application error.
    I can't write this code as is return errors.
    Thank you

    Published by: user13371438 on Sep 6, 2010 03:00

    Please share the code you have written to achieve so far.

  • I'm trying to get my vi to trigger, do not know where to add the trigger

    I need a vi that can trigger using an analog front (1V), then produced a square wave (all square wave will do for now) and then show the extent of the wave.  Attached is the code that I've done so far.  Not sure how to get a trigger attached, or where to put the trigger on what I've done so far.  Another question is where it is triggered since then, I have to add another generating the waveform to produce the trigger signal?

    Any help is appreciated!

    Hello

    You can place a start trigger VI DAQmx in the code above, between the Timing DAQmx and DAQmx write screws and then set the trigger to "Analog Edge" type and specify the channel to trigger of (in this case, I think that you should use the APFI line on your map).  Discover the 'voltage - output continuous' example ' If you need help implementation of this code, this example includes outputs analog with different trigger types in a similar setup to yours.

  • PCI-5114 clicks when the trigger is changed - is that bad?

    Hello world

    I work with a PCI-5114, using several triggers in a LabVIEW program that loops each second.  At the program, I first trigger off channel 0, then reset the trigger to collect different information, this time this release out of the channel of relaxation and reading of channel 1.  It works, and I get the data I want (hooray!), but whenever the trigger changes (once per second), I hear a loud click of the PCI-5114.  Is this bad?  Switching like that ends up hurting my scanner?

    If this is not evil, I am happy to endure the clicks.  If it is bad, so I need to figure out a new way to read my card.

    Thanks in advance!

    Hello Karl,.

    Some maps of range, such as the PCI-5114, have active switches in them.  The noise you hear is the switching whenever you change your analog trigger from one channel to the other.  These switches go bad eventually after prolonged use, so I highly recommend that you stop the analog trigger behind switching, each iteration of the loop.  Once the switch has to be bad, your card will be sent repair.  Instead, you can look into using one of the PFI lines as trigger instead.

    Kind regards

Maybe you are looking for

  • drive hard keeps disconnecting

    not long ago, I bought a seagate 2 TB backup more hard drive (I think his name?) and not long after that I got it he began to act up, the hard drive itself works absolutely well but every now and then it will automatically disconnects neatly from my

  • Satellite Pro A200 - 1 MI: how to re-enable the touchpad

    Hello I recently bought a new Satellite Pro A200 - 1 MI (psae7e). Thing is that while I was using it at the start there was this allocation at the beginning which allowed us to use the shortcut keyboard (fn + keys) on the screen.It was at the top of

  • ideal op amp

    Above is a circuit which has given me, and the only instructions given is the following: Multisim allows to solve following problems. Use of multimeters for results required for given circuit. IL find (in microamperes)  in the circuit in the figure b

  • HP 4630: availability of ink screen

    With my old HP all-in-one, whenever I printed, it show me how much ink I had left in each cartridge.  The 4630 disobeys.  Anyone know how I can get this feature on the 4630?

  • WUSB600N disconnect when open cd/dvd drives

    Hi, whenever I open or eject my cd/dvd drives it disconnects my computer from the network.  She re-establishes a connection automatically thereafter, but the problem becomes very annoying. All the patches?