Timed condition (comparison timed)

Hello, just wanted to ask a simple way to make a timed condition.  To be brief, I have a value which I want it to be greater than zero for 'x' seconds.  If this value is greater than zero for the seconds 'x', a 'real' Boolean value would turn an led on.  However, if during these 'x' seconds, the value is equal to or less than zero, even for one second, then the light should stay off or its value "false".

Is there a simple way to make a timed comparison?  Thanks a lot for reading and post your suggestions.

Best,

Nestor

Nestor,

Set all the values acquired during the seconds 'x' in a table. Use the Array Min Max function.  If min< 0,="" then="">

Lynn

Tags: NI Software

Similar Questions

  • Machine condition with timed loop?

    Hello world

    Is it possible to have a state machine with timed loop? i.e. on the last State, wait us here until the end of the period to return to the initial state again.

    Thank you

    crazycompgeek wrote:

    Hello world

    Is it possible to have a state machine with timed loop? i.e. on the last State, wait us here until the end of the period to return to the initial state again.

    Thank you

    Yes.  However, when the loop is running, there is no way to stop the program or do any other action.  But if this is what you want, yes it is possible.

  • How can I activate under certain conditions a timed pulse?

    Hello

    I need to repeatedly pass a system to test.  To do this, I need to take six switches entry.  When they are all active, I need to generate a digital high about 1 second in time to restart the cycle.  I have to do this 1000 times.

    I have a loop that displays a True value when the six input switches are closed.  The problem is to get that signal to generate a second pulse on my DAQ and increment a counter of some sort.

    Once more, a task that you could train a chimpanzee to do in five minutes takes me hours to understand in LabView.

    Running LabView 8.6 with one NOR cDAQ-9172.  Digital NI 9423, output digital input module is a NI 9472.

    Since you have already a Boolean output, simple solution like just this wiring up an instruction box with the DAQmx written inside. Because the module is timed, you write a logic, a software, wait and then write a logic 0.

    If the simple solution below is not what you need, please provide details. Join your code would help.

  • Programming of a conditional FOR the timing of the STOP button on the loops

    I have a conditional FOR loop with a STOP button, however, the nature of LabVIEW data flow, the stop button is now being questioned at some point before the end of the loop. A control not having no entry, I can't connect to the last operation of a single iteration of the loop to trigger the vote on the STOP command, and I prefer not to use a flat sequence just for the power button if I can avoid it. I've considered using a structure of the event, but I don't want to force the loop to wait that the stop button to be pressed, I want just the loop to EXIT, * IF * the stop button is pressed... but I want the stop button to be questioned at the end of the loop, so if the user presses the button stop at any time in the loop , at the end of the iteration, the loop will end... that makes sense? At present, given that the stop button is called once at some arbitrary during the iteration of the loop time, if the user presses the stop button after he is questioned, the loop must run an extra iteration, and I don't want that to happen.

    ... in any case, I guess I'm looking for a more elegant way to implement that having to use a flat sequence just for the stop button.

    Sorry, but you'll have to use a sequence structure.  This is why they are there.  Sometimes they have their purposes.  Here is how I would handle it.

  • FPGA IO node and loop Question of Timing

    I'm having a lot of trouble to compile a very simple FPGA VI for a system for the acquisition of data on my cRIO (9075, using a single module 9205 cRIO, labview 2012 dev suite, xlinx13).

    At the end of compilation, the error occurs if and only if I use a block of i/o node FPGA.  This picture shows my very simple VI which fails to a compilation:

    When I compile, I get this error at the end:

    And here are the details of the error:

    It is also interesting to note that the 'Timing' summary says I need a clock of 80 MHz, when the on-board clock of 40 MHz.

    For comparison, when I remove the FPGA of e/s node and replace it with a constant, the compilation succeeds:

    The need of a clock of 80 MHz disappears also, according to the report of timing.

    Is this a problem with how loops work in FPGA?  I've been reading about "single-cycle timed loops" that guarantee a performance per clock cycle.  I don't have that kind of acquisition rate, and I guess the structure of loop, I created is not related to a single cycle because of the block of metronome, that I inserted.  I guess correctly?  Are there structures of loop for FPGA which is not related to a single clock cycle?

    I also wonder if this error is not to do with my code, but is rather an internal error of the software compilation NOR, in particular the 'niFpgaTimingViolation.py' script mentioned in the summary of the detailed errors.  I got labview 2011 and xlinx 12 installed on this computer before, but they uninstalled before the upgrade.  This is my first project in 2012.

    I appreciate the comments of the community NOR.  Let me know if my question needs further clarification.

    -Andrew

    I solved the problem.

    In case that someone looking for it later (error 61499 niFpgaTimingViolationMain.py that constraintdict is not defined).

    I did a complete uninstall and reinstall my entire LV 2012 dev suite.  Then the same VI used to compile failure began to pass compilation.  Apparently, I had a corrupt file somewhere.

  • Why the STOP button stops not timed loop.

    Hello world

    I had a rather complicated code launched against me. I had to change program action unique (and many other things) when ACQUIRING a button has been clicked making timed measurements. I was able to add the time... but I want the loop to stop once you click on the STOP button.

    I have attached a very simplified version of my code.

    So if you start and press the ACQUIRE the program generates random numbers (to simulate the measure) and records them with a device ID. The program stops once the total is for instance in the default settings after 20 sec.

    But it does not stop when you press the STOP button. MY QUESTION: why not?

    FOR INFO:

    In my actual code, there are 10 events instead of only 1.

    It doesn't have to stop immediately, inbetween iterations (because I already tried to include the timed stop Structure VI and it did not work either).

    I also used the execution to highlight, but it did not help me.

    Thank you for any help or suggestion!

    Lisa

    Lisa,

    First of all, thank you for explaining clearly what your problem and to present a simplified program.

    The problem with your program is very simple. The loop inside the structure of the event begins when the acquisition: Mouse Down event occurs, which seems to be what you wanted. The default condition for the case of the event is "front Lock (defer the treatment of the actions of the user) until the end of the occurrence of the event." This is controlled by a checkbox at the bottom of the evetn installation dialog box. What this means is that the stop button is not recognized until AFTER the event is complete.  BUT the case of the event cannot complete until the while loop stops.

    The Solution: Move the loop outside the case of the event.  Generally speaking, event must not contain any code that could take more than a few milliseconds to run and certainly should not depend on the user's other actions to complete.

    Look at the design of producer/consumer models (events) for advice.  Also learn how to use queues to pass data between loops rather than local variables.

    Lynn

  • How to stop a flat sequence (or timed sequence) which is inside a loop for

    The problem is this, I have a loop that repeats 10 times and inside this loop, I have a flat sequence (or timed sequence) with four images, each of this chassis to evaluate a different condition of a vector that I introduce.

    What I woud like for example is:

    I'm a fifth County of the loop for and in the case that part 2 does not meet the condition, the sequence of dish (or timed sequence) stops and starts the loop again but this time for the number of number 6.

    I would appreciate your response.

    You can't stop a sequence structure.  This is how they are made.

    What you should consider to get rid fo structures sequence and to change a state machine architecture.  There are many examples in LabVIEW, as well as on the Forums.  The big advantage of the state machine is that at the end of each State, it examines the conditions and determines which State then run. And that is exactly the description of the problem you are experiencing.

    Lynn

  • While why broken arrow will not appear for a timed loop

    Hi all

    I need a little clarification relative to normal while loop and timed looping in labview.

    In labview, if I keep a while loop on a block diagram, broken arrow will appear in the upper left corner of the window indicating the error. It displays error because I have not wired conditional terminal of the while loop.

    But same is not the case for a timed loop. Can someone tell me what is the reason behind this...

    If I release the conditional terminal of the timed while loop, it runs in infinfite time like a normal while loop. Then y labview behaves differently for these two types of loops in the scenario above.

    FYI... I'm using labview 2009.

    Waiting for response.

    Thank you

    Herald

    Ruben,

    the reason is quite simple: call loops are mostly real-time and FPGA targets. Since most of the applications on these targets work continuously (at least this is more often the task), it is possible to create a loop that does not end. So the timed loop by default assumes that there is no need of a stop button.

    The 'normal' while loop needs code for termination (conditional terminal) because normal applications on Windows/Linux/Mac are used to be fair...

    hope this helps,

    Norbert

  • Timed loop versus While loop

    Most of the machine control software I design have the following structure:

    1. There's a HAND that takes place inside a TIMED LOOP with synchronization of 50ms and priority of 100. His only job is to read / write data from / to DAQMx IO cards.

    2. the MAJOR can call several SUBs based on the choice of the user, and once a submarine is called FP MAIN is closed and the FP SUB opens. All submarines have a States Queued Machine running within a TIMED LOOP with 50ms timing but with priority to 50.

    3. data transfer between HAND / SUB is through function globals - there are many of them based on past data.

    4. all woks fine so far. No need to any RTOS. and platform of WIN7 is alomost standard. I even ran with a timing of 20ms without anything crashing...

    Problem: When there are a lot of file i/o operations in a SUB partciluar, then I have the chance to see several missed iterations. Perhaps the TIMED LOOP is hogging resources.

    What I want to do: convert both TIMED in asnd SUB HAND loops simple while loops.  But I am concerned by the priority - since the MAIN interacts with HW there priority. But with LOOP WHILE how can I ensure this?

    Or is there any replacement / effective way of doing what I do now?

    Rama wrote:

    .... FGV should be thrown out the window...

    Well used for a while, based on many articles in the KB. One of them is locked... and it does not represent the engine of the Action or of the FGV as a villain to avoid.

    The driving force is one of the largest buildings in LabVIEW.  The FGV who does nothing but Get and Set (or writing and reading) is useless and a waste of resources.  Why?  It does nothing to fix possible race conditions (does not protect critical sections) and it is much slower than just using a global variable.  See this example I put in place to see what I mean: an overview of the race Conditions.

    Rama wrote:

    So in the sample that I had attached, what do you think would happen if I just replaced the two loops with the SAME timed in MAIN and SUB wait value ms. is there a work order then?

    When things are at the same time, there is no such thing as the order of execution.  But as I said, it seems that your loop is quite slow, so it's something I would not worry.  Just make sure that you do not have a loop that uses all the CPU.

  • Convert single while loop with variable Timing literal to the producer consumer

    I have a controller for a biological system that updates every n minutes or every minute 2n, under certain conditions. My app has a synchronization controller calculates if the current iteration is n or 2n and feeds the output of this calculation in a loop of "Timing" VI in my all. If I understand correctly, this is similar to the issuance of an order of sleep() in a language similar to C and should be avoided. I'm refactoring my code and I heard that they are well suited for this kind of things. Here's how it should work:

    1. Loop begins at the time T, T is saved.
    2. Schedule controller runs and calculates if loop will get minutes 2n or n minutes. This controller will take a number of milliseconds to complete, so we are is more to time T.
    3. Now that the update interval (n or 2n, let's call it u) is known, the loop must until T +u fill.
    4. The PDC is executed, but a number of milliseconds to execute.
    5. The rest of the time until the next iteration of loop should produce the CPU for other processes.

    It sounds to me like it's the kind of a real-time system, although as long as we are in the minute of the original deadline, there will be nothing wrong.

    What the producer-consumer loop would look like? Assumed that the synchronization and the main order controller are separate from the VI.


  • Leak memory in real time caused by VISA Read and timed loop of data nodes? Is not supposed.

    In collaboration with LV 8.2.1 in real time to develop applications that monitor or emulate computers on bus RS-422.   The following screenshots have been taken an application that monitors a transmission of 200 Hz.  After a few hours, the PXI station would break a range impressive messages angry... most involving something about memory loss.  After much hair pulling and passing money, my partner has discovered while looking at the available memory on the controller of loss of memory occurred at each loop containing a VISA read and propagation of error using the data nodes (see Leak.jpg of memory).  He concluded that if he went to the propagation of the error to the regular old shift registers, then the available memory was rock-solid.  (has the Leak.jpg of No memory)

    Any ideas of what could be the cause?  Do you see not any problem with the way that we code these kinds of loops?  We always strive to optimize the way in which we use the memory on our urgent requests and VISA readings and DAQmx bed give us the heartache more than ever, we are able to allocate memory for these screws some tips?

    Dan Marlow

    GDLS

    Hi thisisnotadream,

    This problem has been reported, and you seem to be exactly reproduce the conditions required to see this problem. This was reported to R & D (# 134314) for further investigations. There are several possible solutions, of which one is the one you have already found the wiring error directly in the loop. Other situations which give rise to no memory leak are:

    1 if the bytes of the property node port is not there and has read lies in each iteration and time-outs resulting are ignored.

    2. If the structure of the deal is gone and just blindly check the bytes to the port and read each iteration.

    3. If the timed loop is transformed into a while loop.

    Thanks for the comments!

    Kind regards

    Stephen S.

  • I get Connection Timed Out

    Recently, I've been doing the Connection Timed Out on some sites. I have cleared my cache and cookies, and it still happens. I tried in safe mode and it still happens. I don't know what else to do besides just uninstall and reinstall firefox, and I don't know if this will even help.

    Now, here's the real kicker. The warning is not always to her for the same sites, and sometimes almost randomly. For a long time that it didn't happen and now it seems to start up again.

    So I have really no idea what to do. Can someone help me please. Also, I'm a bit of a novice when it comes to the computer speak, so if you have a question that may be a bit overwhelming, could you dumb it down a little for me.

    To be honest, I think I understood the connection problem. However, the connection was reset problem seems to happen after I visit Deviantart. No other site does seem to cause the problem. Is that what I can do to avoid this problem, when I visit this site?

  • Why the timing information not disappear when I switch off sync in my office?

    I'm at the office, in my work and I disconnect from my account synchronization to work and I want to connect to my personal account, but I can't because the timing with the first account information have not gone and wil be merged with personal information.

    Sync is not intended to be used in this way. Data that is synchronized is not a temporary view, the data is copied in Firefox on the device: the data do not disappear when you disconnect fron one account synchronization or close Firefox.

    You have to work and personal accounts of Sync thru having two distinct profiles.
    https://support.Mozilla.org/en-us/KB/profiles-where-Firefox-stores-user-data
    https://support.Mozilla.org/en-us/KB/Profile-Manager-create-and-remove-Firefox-profiles

    If you are interested in two distinct profiles, let know us and we can guide you when you set up desktop shortcuts for each profile opening.

  • Can not verify the account to download the free app Always get "Session Timed Out" message.

    Can not verify the account to download for free enter or just about always "Session Timed Out" message.

    Please describe in more detail what you are doing, and when it fails.

    Do you use any type of VPN or RAM to access resources outside of your region?

    Are you connected to WiFi when you do?

  • Connection timed out on the Web site. Tried to delete the cache/cookies. No proxy. Internet Explorer. Unable to access. Help, please. Site Web works.

    I get Connection Timed Out on these Web sites: energy-medicine - software.com and energy - medicine.info. I tried to clear cookies and cache. I put no Proxy. I tried Internet Explorer and are still unable to access. I restarted my computer. I know that this site is active, because I contacted the webmaster and he says that it is active to an end. What else can I do to access this site? Thank you!

    Make a check of malware with several malware scanning of programs on the Windows computer.
    Please scan with all programs, because each program detects a different malicious program.
    All of these programs have free versions.

    Make sure that you update each program to get the latest version of their databases before scanning.

    Alternatively, you can write a check for an infection rootkit TDSSKiller.

    See also:

Maybe you are looking for

  • How to upgrade my Firefox?

    I was told that I use an older version of Firefox which can cause problems on some sites. I can't find out how to upgrade.

  • Skype 3.0 is landscape only

    I just got the upgrade to 3.0, and now I can only use Skype in landscape mode. I'm talking not only about the video, I mean that the entire application only works in the landscape. I use my tablet in portrait mode a large part of the time, so this is

  • Look at how Motorola to solve customers problems

    Good eveningInitially apologized for misspellings, used Google translateI would like to tell the tragedies with the Motorola customer service and dealing with the problems of clientsI bought a Nexus one phone is the first day and found a problem in t

  • Install the KB 2160841___ update

    Cannot install the KB 2160841 update, get the error code 2. Could anyone help pse THX in advance. Frinx

  • Pavilion Elite won't stop

    This computer works fine EXCEPT that I can't turn off and stay off. It came with Vista, now Win 7 x 64. When I click on stop, he died. Five seconds later it turns! Even holding down the power button it will do not stay off. Just for grins, I swapped