Trigger loop indicator

Hello

I have a VI that has two loops. I have a LED indicator in a loop, and when this LED is true I want to trigger the second loop. How should I do for this? I tried to use a local variable, but the second loop would be not just trigger.

Thanks in advance,

Ivener

Why not use a loop of producer-consumer...

Small attached example...

Shane.

Tags: NI Software

Similar Questions

  • Trigger loops and update field based on sysdate


    Hi people:

    I have a trigger that can update an inactive ('STATUS') field when a vaccine is after expiry date ("matching").

    This is the current structure of the table:

    CREATE TABLE WAREHOUSE. () VACCINE_INVENTORY

    VACCINE VARCHAR2 (200 BYTE) NOT NULL,

    RECEIPT_DATE DATE NOT NULL,

    CONTAINER_SIZE VARCHAR2 (200 BYTE),

    QUANTITY NUMBER (6, 0),

    NUMBER OF REQUISITION (6, 0),

    NUMBER OF FISCAL_YEAR (4, 0),

    RECEIVED_BY VARCHAR2 (50 BYTE),

    DATE OF CORRESPONDENTS,

    LOT_NUMBER VARCHAR2 (30 BYTE) NOT NULL,

    VARCHAR2 (200 BYTE) OF THE SELLER,

    STATUS VARCHAR2 (10 BYTE),

    NUMBER OF CATALOG_NUMBER (5, 0),

    CONSTRAINT PK_VACC PRIMARY KEY (VACCINE, RECEIPT_DATE, LOT_NUMBER) USING INDEX TABLESPACE STORAGE WAREHOUSE

    So the idea is that if SYSDATE > correspondents the expiration date should be changed from active to inactive.

    I guess I would need to create a loop so that when the trigger is executed, it will make a loop on all records in the table and set each vaccine expired to Inactive.

    I'd appreciate some help...

    Thank you

    Matthew

    Another alternative is to simply have a SQL statement that runs once a day:

    UPDATE warehouse.vaccine_inventory

    SET status = 'inactive '.

    WHERE the correspondents<>

    AND status = 'Active';

  • meet specific loop indices for

    Hi guys,.

    I have a loop with N = 60, I'm doing something when the specific index (i) reachs number, the index I'm interested in are

    1, 5, 9,13, 17, 22, 26, 30,34,38,43,47,51,55,59

    the difference is 4 in some of them, but it turns into 5 @ 22 and 43 and go back to 4 between the two.

    can someone help me to pick up these indexes?

    Hello

    Try this...

    Kind regards
    Nitz

    (Bravo to give good answers, mark it as a Solution If your problem is resolved)

  • stop/play a for loop

    Hallo,

    I have a few buttons three radio (play / stop / pause) and a loop for that (to make it simple) displays an increasing number in a number of the indicator.

    I would like my buttons would be like this:

    -play button: starts the loop (indicator starts display a growing number)
    -pause button: freeze/pause the loop (the indicator stops the multiplication and displays a number)

    -stop button: restores 0 loop (the indicator displays 0, the starting number).

    The situation I have is in this picture:

    Does anyone have a suggestion?

    Thank you

    Hi davico,.

    I think you're almost there. Just remove the loop for, rather use registry to shift and + 1 to increase the number as an example attached.

    See you soon,.

    w15nu

  • Loops in CS5.5 - is not a loop :-(

    Hello

    Am new on loops and having a bit of trouble getting to work.

    Just downloaded the contents of Looplogy.

    I'm done with a load of wav files in different directories (after extraction of the downloads compressed).

    Start a new multitrack session, samplerate 44100, 32 bit, stereo depth.

    Import a file of MusicLoops... Country_Bass_e_121BPM-> string V - B-> CountryBassE-010-and-012 (Jason Levin)

    When I place (either) the clip on a track, he plays very well, but there is no loop indicator.  When I go to the waveform display, I see the beaten marks.

    In the metadata-> XMP-> Dynamic Media I can see the following: loop: tick (greyed), number of beats: 4, Audio Stretch Mode: "Beat Splice", Audio Stretch Mode Beat Splice: use file bat... which would seem to indicate that hearing recognizes it as a 'loop' audio clip.

    Any suggestions on how to enable the stretch mode for loops?

    Any help appreciated.

    Oliver

    Hello

    Just found the place to allow looping :-)

    Spend maximum multi-display and found a Properties tab - inside was that a box set called "loop" - Happy Days

    Oliver

  • Touble with update channel in time real and unique switching changes of Agilent 34790 channel has example

    I'm trying to control via LabVIEW 34790 has Agilent. I made two sets of adjustments to the example of Advanced Scan I killed the driver but I can't make them work together.

    The first adjustment is to update channels selected in real time as opposed to having to stop the operation of VI to the entry of new. The second change that I've done is to make sure that the instrument is not switch when only one channel is selected. The unit will switch the channel to initialize once at the beginning, but because it is not cycling between different channels does not need to initialize.

    The two changes work fine on their own (each was built off the coast of the Advanced Scan example with some indicators for readings added identically both) but putting them together is a challenge. I know it was stupid to do separately; It started as a mistake, with that I ran. I thought I could just make a change in the VI on the other, but this is not the case.

    I have attached two independent changes would appreciate some advice.

    Thank you

    Yusif

    Kira,

    In the original VI that I posted, the string inside the loop indicator which contained all the subVIs provided in the example (not counting the first track set up) would not display the list of the channels updated. In fact, I solved the problem yesterday and would be happy to share with anyone who is interested:

    The problem is that I was initially put in the conditional of the change of a single channel, based on the number of iterations of the while loop. If there was only one channel, that the structure of the case returned to the son through all right, it was possible to circumvent the two subVIs in the case of 0 and therefore no change. The key was to spend the conditional of the structure of matter to be a true/false, that contains the same objects as the original. The real deal would be dependent on the input being 3 characters long, not empty string and the same as it was in the previous iteration thus implemented the exact state where one lane has not changed. The VI works exactly as I wanted at least some messy shows I will be clean today.

    If my solution is not clear or someone would see the VI me message please.

    Thank you for the help,

    Yusif

  • How to upgrade a table after each iteration?

    Hello

    I have a vi which works fine but the problem is that it updates all the data once the vi stops running. I want something as soon as (for outside for loop) 1 iteration it performs updates the table in front of the Panel, then 2nd iteration, it updates again and so on. Can anyone help me please with this.

    Thank you

    In fact, in your case, there are a simpler way to do it... If we talk about the pink channel on the first loop indicator.

    Just move the table from outside the loop inside the loop indicator.

  • Update of the indicators of the façade is trolling in the test of the functions in the provider DLL

    I'm looking to see if someone can explain a behavior to display weird LabVIEW I see when to test some timeout works in a third party DLL. I have a work around in place but I would still like to know why, without the workaround, the information displayed by the indicators on the front panel are not synchronized with what is happening in the execution of the VI, even though I tried all sorts of things to impose the synchronization. Note that to run the VI in a useful way, you need to be able to communicate with a Galil axes via an Ethernet controller, and which, for the most part, limited this discussion to what the experts among you know happen under the hood of LabVIEW in situations like this.

    This is what looks like the VI when my work around (false wait added) is active. It's a small state machine that uses the elements of the array "Test Sequence" to tell him what to do in each step of its implementation. Here he plays a first time-out value, sets a new value of timeout, reading again, the timeout by asking a READING of the controller (without having first asked to say anything), followed by restoring the initial time-out and then tests to stop.  The two indicators in the red rectangle are there to show the current status of the execution, and it is this pair of indicators which are not synchronized with the State of the actual program.

    When execution completes, it is what we see.

    If the false timeout is too short, then the indicators are not synchronized with the State of the program, or in this case, with the other.  Note that the only time wherever the VI display is static enough for me to take a screenshot as it is during the period of "Test Timeout. When the time-out occurs Finally, things be synchronized and the same results are displayed.

    Here's the code.  I am also attaching a folder zipped with the code, just because I don't know if the extracts are smart enough to include all the dll referenced by library call nodes.

    Here on the left of the loop indicator 'State' and 'Index' terminals can be seen. The 'fake Wait' needed to make the indicators work synchronously appears below in the same area. Before coming with this 'fix' things I've tried, what has not worked, were:

    • addition of the structure of flat sequence seen here with the indicators in the first panel
    • Entrance to the 'value' property nodes using linked to two indicators with their outputs error Garland at the entrance of the error on the function 'G Read' (test timeout).
    • defining indicators for "synchronous display" (apparently this parameter actually only works with the multi-threaded code, which I don't believe it is)
    • setting false property to "postpone updates on the front panel.

    Another thing that worked linked a "probe" to any data path entrance side of the conditional structure. I thought that it causes also a few milliseconds of delay as the expectation.

    My best guess at what happens is that display updates are "launch and forget" actions that occur on parallel execution paths in the single execution thread and function on obtaining some of the main process to complete time slices. But when the main process is the name of an external library, which, outside the library can't share time with all other processes that can run in the same thread.  All this makes sense?

    This is because all these CFLN calls to the dll are set to run in the UI thread (to view the color orange on the top of the node).

    If they eat the cycles in the UI thread, they may not leave enough cycles to LabVIEW to make updates to the user interface of the front panel.

    What make these 3 part of the dll?  They need to run in the UI thread?  Is there a problem with the standby so that the DLLs are not pounding the UI thread?

  • 2D table are displayed in a table, 1 row at the same time

    I use a loop to read a serial port 40 times and display the values in a table of 40 lines and 5 columns.  I have auto index out of the loop For to build the string 2D array. The problem is that the serial port takes too long to respond and the VI takes about two minutes to display the values in the table because it do not do until that loop to complete its 40 iterations. Is it possible to display every iteration it runs? I mean, pass the value of the iteration 1-the 1st line of the table and then make the 2nd iteration, pass its value to the 2nd line of the table and so on? Thank you very much! (Happy Christmas to those who celebrate the it)

    Yes.  Put your picture inside the loop indicator.  Use the Array function to build to build your table.  Insert the table into a shift register.

  • Changing the values of control over a key

    Hi, I have a situation where I have several digital controls where you can change to different values. I have also several subVIs with references to control (as described in this article: http://labviewwiki.org/Control_References) that takes in the references to these digital commands on the mainVI. These subVIs permanently read values into their own net.

    So whenever I change a value on any of the controls, the values change of course in the subVIs, since they refer to the value of the control.  How I would do the actual value change that once I clicked the ok button?

    To illustrate this, I've done a VI with a structure of the event and another while that continoulsy reads a reference to the control and updats loop indicator. I see some heavy solutions, while I have two controls for each value. The second control would then be hidden and written only in the case of the Ok button, press. But having two controls to do something simple, like this seems superfluous.


  • Jitter of RT! Can multiple readings to a variable / cluster cause a deadlock condition?

    Howdy do.

    While gradually develop and test an application on a crio9068 (RT linux) I started to see 'finished later?' in my main timed loop indicator flicker. Start pulling my hair out trying to figure out how to prevent this. I did a 'max hold' vi and can see the longest execution time for each image.

    The application runs fine at about 75% of CPU with the Panel open load, and the majority of the iterations run at the time. Sometimes I'll have a 'pic' at run time, all four managers in the timed loop take significantly longer than normal to run and the indicator 'late' says.

    A few questions I've had accumulate while chasing this:

    -If I use local varables to pass data between the loops, but only write to the variable in one place, can I still cause a condition of blocking/jitter by competing readings of this memory space?

    -If I use a node FPGA read/write to pass data between the FPGA and the timed loop, I should expect this causes a problem? I selectively disabled a lot of my code, and it seems that is where some of the delay occurs. What me stem, it's that these parts of the code have not changed in the recent development and the thing never used to run to the end.

    -On the theme of the node FPGA read/write, I assumed before that I should not write to the same FPGA FP element in different subvis. However, the code is set up so that there are several parallel calls to the read/write node, just with different selected items. Is that BAD?

    -Similarly, if I ungroup and read the same item in a cluster in a "parallel" mode control, can this cause a deadlock situation, or is it the same as unbundling and wiring away in several places?

    -I am thanks to the recently renamed "software calibration and management toolkit NI (SCM)," formerly Drivven CalView, to manage the communication between the RT and a windows host. He is also careful fault management stuff. Anyone else using it, and is it possible that I am getting jitter by having too many calpoints in my deterministic loop?

    No indication on any of the above would be greatly appreciated. If I don't make sense on any of the above points I do excerpts from example to describe.

    Hi Matt,

    What about under the name of multithreading - the same thread can run on multiple cores, but everything in a timed loop will always hold in a single thread.  For reference (see 'Set the execution order for screws of real-time synchronization'):

    LabVIEW Help: Synchronization of deterministic Applications (real time Module)

    http://zone.NI.com/reference/en-XX/help/370622L-01/lvrtconcepts/timing_control_loops/

    To cache the runtime data, I didn't have a specific method for mind, rather I generally try to catch at least one instance of the hiccups by capturing variables of interest in the shift registers or a FGV, just to see if there is any kind of difference.  This may not be useful in your case, as I suspect it's interactive execution, what causes the problem.

    Regarding the interactive performance and determinism, there is really no way of knowing what will happen, but it will often cause the kind of behavior that you see now. Because you are more or less continuous between the target and the host data, everything hangs in the network or on the computer host can set the RT system, especially if you read or write data on the front panel. Given that all of your curls are delayed at the same time, it seems the most likely scenario, unless you have a VI reentrant or similar shared between all the loops - I have seen that a few times with managers error or stop sharing.  Given that these spots are quite often (it resembles something like 1/100 iterations, I would recommend put in some shared variable RT FIFO benchmarking and the deployment of the application as a stand-alone RTEXE.)  It should be fairly easy at that time see if instability persists.

    Best regards

  • That means disabled Rulettes average

    Before I go and open a support ticket. Nobody knows what it means when, in the journal of the FMS, it said rulettes disabled no trigger? This means that the rules are not fired?

    Can seem to find any doc on rulettes. Thanks advance.

    A rulette is a rule applied to a specific object from the scope of the rule.

    If the scope of the rule is 'Host', the scope of the rulette could be "Server1."

    The key is the 'No Trigger' words, indicating that no circumstances, sufficient to cause the State assessment, occurred on a portion of the scope objects.

    Other objects of significance in the context of the rule were the rule normally applied.

  • Regd:-immediate execution

    Hello

    WHEN I EXECUTE THE QUERY I get PLSQL /Numeric or the error value. Suggestions are welcome.


    DECLARE
    CURSOR c1
    IS
    SELECT object_name, object_type, owner
    Of object
    WHERE object_type IN ('PACKAGE')
    AND object_name = 'PKG_UPLOAD. '
    AND owner = 'TEST ';

    lv_v_header VARCHAR2 (2000): = ' SELECT DBMS_METADATA. GET_DDL (';)
    lv_v_footer VARCHAR2 (200): = ') FROM DUAL';
    lv_v_object_type all_objects.object_type%TYPE;
    lv_v_object_name all_objects.object_name%TYPE;
    lv_v_owner all_objects.owner%TYPE;
    lv_v_stmt VARCHAR2 (4000);
    lv_v_quotes VARCHAR2 (100): = "';
    lv_v_comma VARCHAR2 (100): = ', ';
    lv_v_value VARCHAR2 (32767).
    fileHandler UTL_FILE.file_type;
    lv_v_file_name VARCHAR2 (3000);
    BEGIN
    I'm IN c1
    LOOP
    BEGIN
    lv_v_file_name: =.
    i.Owner
    || '_'
    || i.object_name
    || CASE
    WHEN i.object_type = "PACKAGE".
    THEN '. PKB'
    WHEN i.object_type = 'TRIGGER '.
    THEN '. TRG'
    END;
    lv_v_object_type: = i.object_type;
    lv_v_object_name: = i.object_name;
    lv_v_owner: = i.owner;
    lv_v_stmt: =.
    lv_v_header
    || lv_v_quotes
    || lv_v_object_type
    || lv_v_quotes
    || lv_v_comma
    || lv_v_quotes
    || lv_v_object_name
    || lv_v_quotes
    || lv_v_comma
    || lv_v_quotes
    || lv_v_owner
    || lv_v_quotes
    || lv_v_footer;

    Lv_v_stmt EXECUTE IMMEDIATE
    IN lv_v_value;

    fileHandler: = UTL_FILE.fopen ("TEST_DIR', lv_v_file_name, 'w');
    UTL_FILE.PUTF (filehandler, lv_v_value |) » \n');
    UTL_FILE.fclose (filehandler);
    END;
    END LOOP;
    END;
    /

    In case you need help to use UTL_FILE, then this is.

    SQL> DECLARE
      2    myddl clob;
      3    fname VARCHAR2(200);
      4    extn VARCHAR2(200);
      5
      6  /* Main function to get the DDls with DBMS_METADATA */
      7    FUNCTION get_metadata(pi_obj_name  dba_objects.object_name%TYPE,
      8                          pi_obj_type  IN dba_objects.object_type%TYPE,
      9                          pi_obj_owner IN dba_objects.owner%TYPE) RETURN clob IS
     10      h   number;
     11      th  number;
     12      doc clob;
     13    BEGIN
     14      h := DBMS_METADATA.open(pi_obj_type);
     15      DBMS_METADATA.set_filter(h, 'SCHEMA', pi_obj_owner);
     16      DBMS_METADATA.set_filter(h, 'NAME', pi_obj_name);
     17      th := DBMS_METADATA.add_transform(h, 'MODIFY');
     18      th := DBMS_METADATA.add_transform(h, 'DDL');
     19      --DBMS_METADATA.set_transform_param(th,'SEGMENT_ATTRIBUTES',false);
     20      doc := DBMS_METADATA.fetch_clob(h);
     21      DBMS_METADATA.CLOSE(h);
     22      RETURN doc;
     23    END get_metadata;
     24
     25  ---Writing the CLOB using UTL_FILE
     26  PROCEDURE write_clob(p_clob in clob, pi_fname VARCHAR2) as
     27      l_offset number default 1;
     28      fhandle UTL_FILE.file_type;
     29      buffer VARCHAR2(4000);
     30    BEGIN
     31      fhandle:=UTL_FILE.fopen('SAUBHIK',pi_fname,'A');
     32      loop
     33        exit when l_offset > dbms_lob.getlength(p_clob);
     34        buffer:=dbms_lob.substr(p_clob, 255, l_offset);
     35        UTL_FILE.put_line(fhandle,buffer);
     36        l_offset := l_offset + 255;
     37        buffer:=NULL;
     38      end loop;
     39      UTL_FILE.fclose(fhandle);
     40    END write_clob;
     41
     42  ---Main execution begins.
     43  BEGIN
     44    FOR i in (SELECT object_name, object_type, owner
     45                FROM dba_objects
     46               WHERE owner IN ('SCOTT', 'HR')
     47                 AND object_type IN ('PACKAGE', 'TRIGGER')) LOOP
     48      --Calling the function.
     49      myddl := get_metadata(i.object_name,i.object_type,i.owner);
     50      --Preparing the filename.
     51      fname := i.owner||i.object_name || '.' ||
     52               CASE WHEN i.object_type='PACKAGE' THEN 'pkb'
     53               ELSE 'trg'
     54               END;
     55     --Writing the file using UTL_FILE.
     56      write_clob(myddl,fname);
     57    END LOOP;
     58  END;
     59  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    also, about your mistake, "EXECUTE IMMEDIATE lv_v_stmt INTO lv_v_value; DBMS_METADATA.get_dll returns a CLOB.

  • How can I trigger a Boolean control from a Boolean indicator?

    Hello

    I want to trigger a Boolean control (like a button) to a true value as soon as my indicator (LED) Boolean Gets a value of true.

    Can someone tell me how to do this?

    You can use either a local variable or a value of property node to define a control value.

    Right-click on the control and create/Local Variable or Create/property/value of the node. Change the property node or a variable to write mode by right clicking on it and selecting "modify to write." Local variables can default to write (do not remember) but I know that failure of nodes of property for the playback mode.

    I prefer the nodes property simply because they have a mistake in and out, so I can control the flow.

    [Edit:] Remember that you must pass instead of locking for the mechanical action. If you need a locking Boolean control and need programmatically set its value, then you need to reset the State after reading using either a local node or property.

  • USB-6009 trigger reference by loops

    Hello

    I am a student studying for a Beng. As my final project, I want to create a default for electric motors recorder. The basic principle is that he sits and waits for a signal to trigger, how she recorded the analog waves of voltage and current for a pre-defined term before the trip.

    I chose the USB-6009 case like the acquisition of data, mainly based on prices. At the time I did not realize the importance of relaxation before (reference trigger) who works the 6009 did not support.

    I'm sure there must be a way to use the memory of the computer to create a buffer using a continuous loop that maintains a drop-off PDM rewriting, however I am really struggling to implement this code.

    I know that the ideal solution would be to use a device better suited, but having already bought the device and he said in my project specifications is not possible.

    If someone is able to offer all the tips of a possible implementation of this solution and a possible example of a similar program, I would be eternally grateful!

    1. make acquisition continues. Keep the data in a circular buffer large enough to store the amount of data pre triggers you want and all the data after release, which can be acquired before treatment is completed.

    2. when the trigger signal occurs, pull data from before release for stroage or store a marker that follows where the trigger before data starts.

    3. once the data post-triggers are acquired, write all relevant data in the file.  Unless you have blocks of data very long before or after triggering, PDM won't be necessary.  The USB-6009 case is slow enough so that you can keep a few minutes of in-memory data before running in memory management problems.  This should be much more that what you need for a motor fault recorder.

    Consider using a motor of Action (search for the nugget of Ben on the subject) for the buffer.

    Lynn

Maybe you are looking for

  • 2 TB Canvio shows only 30GB after format NTFS

    I bought the new 2 TB Canvio external hard drive.After the attempt to reformat exFAT on NTFS system drive shows only 30 GB file size, no matter if it's Windows or Linux. How I can solve this problem, made the firmware has been corrupted? Jake2701

  • S20-30 game help

    Can I run the following games in my laptop and how many fps I can play with it? -left for dead 2 -Garry s mod -COD: world at war to the -field of battlefield: 1943 -StarCraft 2 -2 Team Fortress -Enter the gungeon -do not die of hunger Stormers - roug

  • HP registration service

    Hello! Exactly, what is and doesn't help check HP on my CQ58 of Compaq Windows 8? Looks like a bit of software with its 29.5 MB.

  • DV6-6135dx: Beats Audio

    the HP laptop is doing well... I had to reduce some of the settings in the game in the need for speed in 2012... and its relly good after that... my Question is, is it Bass speakers?... because I can see the parameters of beats, but even if I put the

  • History of work

    Hello, I have problems opening files from the history tab for Works 7.0.  The files are there, but when I click to open it, they do not. In particular the database files, can someone out there in cyber land help me in suggesting how to fix this probl