Event Structure in Timed Loop in real time cannot work

I am a new user for LabVIEW. And I met a problem which really frastre me!!! Hope someone can help me out. Thanks in advance!
I simply want to use event structure under timed loop, which is extrmely important in my design.
However, this works very good in my computer (without connect to FPGA).
Once I connect it to FPGA, then I can run it still but there is no response!
My file is attached. Please somebody helps me!
Looking forward to your answers!
Solved!
Go to Solution.
Attachments:
Test for Timed Loop.vi ‏9 KB

The FPGA runs headless. Event structures are not going to work. What you need to do is have an application on your host where the user presses a button, changes a value, etc. That event should send a message via TCP/IP to the code running in the real time environment. Then the real time environment should set a control on the FPGA to the value you want.
In general, real time programming with FPGA has multiple layers.
1) Host code-> handles user interactions and communicates them to real time code via TCP,UDP, etc. Displays data to user sent from the RT controller.
2) Real time code->runs headlessly. Handles messages from Host code, processes FPGA data, communicates with FPGA much like the host code communicates with the real time code
3) FPGA -> does acquistion and passes it via FIFO to the RT
The first thing you need to do is understand the architecture and how all these pieces of the puzzle work together before throwing things down on a diagram.
CLA, LabVIEW Versions 2010-2013

Similar Messages

  • How to make the exchange of data between 2 while loop in real time

    hello
    I have 2 while loop
    the 1st while loop includes the data acquisition program
    the 2nd while loop includes the control program
    my question is how to make the exchange of data between 2 while loop in real time
    I tried with the local variable and direct wiring between the 2 while loop
    it does not work (there is a delay)
    Solved!
    Go to Solution.

    Bilalus,
    Queues are only good to transfer data if your application isn't deterministic. Since you are using Real Time, I am assuming that your application requires determinism. If you are using Timed Loops and you use queues to transfer data between your loops, you are losing determinism. In this case, you need to use the RT FIFO functions. 
    Warm Regards,
    William Fernandez
    Applications Engineering
    National Instruments

  • How Real Time Apply works while physical standby is open in Read Only mode

    Hi,
    With Active data guard option, we can open physical standby DB in read only mode, while redo log are being applied. (Real Time Query)
    Standby Redo log (SRL) enables Real Time Apply (with "USING CURRENT LOGFILE" clause in recover database command on standby DB)
    I am interested to know, how Real Time Query works ?
    What is the mechanism with allows us to open physical standby DB in read only mode while redo logs are being applied continuously ?
    Regards,
    Sujit

    Dear user7419391,
    That is a new feature in Oracle Database 11g. MRP can use the real time apply in 10g but the concept here is different.
    Taken from the following document;
    http://www.ascent.co.za/documents/oracle/Oracle%20databse%2011g%20Active-Data-Guard%20datasheet.pdf
    *Unique Advantages of Oracle Active Data Guard*
    +Active Data Guard is an evolution of Data Guard technology, providing unique+
    +performance advantages while leveraging all other enhancements included in Oracle+
    +Data Guard 11g. For example, any Data Guard 11g physical standby database can+
    +be easily converted to a Snapshot Standby. A Snapshot Standby is open read-write+
    +and is ideally suited as a test system, able to process transactions independent of the+
    +primary database. A Snapshot Standby maintains protection by continuing to receive+
    +data from the production database, archiving it for later use. When tests are+
    +complete, a single command discards changes made while open read-write and+
    +quickly resynchronizes the standby database with the primary.+
    The other link in the previous post is excellent and you really have to read it to understand the active data guard aspects.
    Regards.
    Ogan

  • Use event structure and while loop in parallel

    Hello, I would like to use an event structure in parallel with a while loop. I have a camera that needs to constantly take pictures and I have that setup in the while loop. I also however need to do other functions in conjunction with the picture taking. I have about 50 or so events that need to have access to while the pictures are taken. Is there any way to do this? If not is there any way to have a global stop variable that is attached to all 50 of the events. I know I can do this the hard way and have each boolean event in the event structure be attached to the while loop stop control. This is however very inefficient. I would also like to know if I can simply use a mouse click as the stop of the while loop. Am I able to have a variable that goes from false to true on mouse click without using the event structure to do this? Thanks.

    Yes, just place the event structure in a second while loop.
    Add a stop button to the other while loop and add an event for the stop button to stop both loops. For a simple example, see my VI posted here:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=176367&jump=true
    Simply add more event cases as needed.
    LabVIEW Champion . Do more with less code and in less time .

  • Event structure in "for loop" and stacked sequence

    I tried to put an event structure into a for loop sequence, then used a pause button to pause the program (one loop with event structure.vi). The pause button functioned normally since the program could be paused whenever the button was pressed. Then, I put this for loop sequence into a stacked sequence (Problem.vi), which has 2 frames and every frame has the for loop sequence in it. After the pause button was pressed once, the pause button and stop button will no longer effective anymore. Where should I modify so that this program will work properly? Thanks a lot.
    Attachments:
    Problem.vi ‏42 KB
    one_loop_with_event_structure.vi ‏27 KB

    Ah, at last something weird !
    The answer is simple : don't do that !
    You should either avoid having 2 event structures handling the same events, or learn how to process dynamic events.
    Why didn't you read the answers to a question posted a few hours ago (still on the overview page of this forum ?). See here.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • PS CS6: stroke color picker preview in real time not working

    re: NEW color picker stroke color not updating in real time (previewing).
    Is it me or has the stroke color preview been removed in CS6 or is there a setting that needs to be changed to enable it?
    The problem: When I create a shape layer, press enter and then chose a stroke color from the color picker, I select a color but it doesnt update the stroke color until I press enter. I'm sure it used to change in real time as you clicked on the color picker panel before accepting it.
    Any sugestions or ideas as to whats going on or am I going mad?
    Further update: This is when creating a shape but using the new stroke feature in the properties bar at the top (the one which gives you the new fancy options like having a dashed, transparent or gradiented stroke) and not the traditional method of adding it as an effect. This still shows a real time update, but the new method doesnt.

    Curt Y wrote:
    zarrdave wrote:
    You're then moving the colour picker dialogue box to one side so you can see he shape created, and you've then tried clicking on different colours and the border color has changed after each click (but before you press OK)?
    If thats working so the color changes in real time for you, then unfortunatley I've got a problem with my version.
    Using Win7 CS6 extended, and following your instructions it works for me.
    Border changes withn I click on color pallet with color picker.
    Odd, same version/ O.S. here, thanks for that though Curt Y. Are you sure you're not clicking on the preset colours and actually using the color picker dialogue box.
    I've been in a bit of a rush here at the office and appologise for not being clearer and posting a screencap earlier.
    To clarify, its the Cyan dialogue box not the orange box I'm talking about  (nice choice of colours I know ). The top right icon in the organge box with the colours in is how you get to it.

  • 11gr2 Dataguard Active Standby - Unable to get Real-Time apply working

    As above, I am unable to get real time apply to work WITHOUT it switching my standby back to MOUNT state. There does not seem to be anyting obvious from the broker, or alert logs.
    On the Standby:
    SQL> alter database recover managed standby database cancel;
    Database altered.
    SQL> alter database open read only;
    Database altered.
    SQL> select open_mode from v$database;
    OPEN_MODE
    READ ONLY
    SQL> alter database recover managed standby database using current logfile disconnect;
    Database altered.
    SQL> select open_mode from v$database;
    OPEN_MODE
    MOUNTED
    Primary:-
    SQL> SELECT status, recovery_mode FROM v$archive_dest_status where dest_name = 'LOG_ARCHIVE_DEST_2';
    STATUS RECOVERY_MODE
    VALID MANAGED REAL TIME APPLY
    Edited by: Imran on Apr 17, 2012 10:56 PM

    Hello;
    This is expected.
    Works the same exact way on my system. How Redo Data is applied is set when the database is MOUNTED.
    See - 6 Redo Apply Services
    Data Guard Concepts and Administration 11g Release 2 (11.2) E10700-0
    The document is vague on this at best, but think about the error you get if you try to start apply twice.
    Data Guard Real-Time Apply FAQ [ID 828274.1]
    Best Regards
    mseberg
    Edited by: mseberg on Apr 17, 2012 10:04 AM
    h1. Test
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> alter database recover managed standby database cancel;
    Database altered.
    SQL> alter database open read only;
    Database altered.
    SQL> alter database recover managed standby database using current logfile disconnect;
    Database altered.
    SQL> select open_mode from v$database;
    OPEN_MODE
    READ ONLY WITH APPLY
    SQL> So I get different results ??
    Edited by: mseberg on Apr 17, 2012 10:40 AM
    h2. Still more
    I would like to change my answer. Based on my test and queries as shown below I believe REAL TIME apply is working. Note the last log says NO because its in progress.
    Checking last sequence in v$archived_log
    STANDBY               SEQUENCE# APPLIED    COMPLETIO                                               
    STANDBY                     343 YES        16-APR-12                                               
    STANDBY                     344 YES        16-APR-12                                               
    STANDBY                     345 YES        16-APR-12                                               
    STANDBY                     346 YES        16-APR-12                                               
    STANDBY                     347 YES        17-APR-12                                               
    STANDBY                     348 NO         17-APR-12                                               
    6 rows selected.
    ----------------Last log on Primary--------------------------------------|
    MAX(SEQUENCE#)                                                                                     
               348                                                                                     
    1 row selected.Yes, I doubled check and it works on mine. I guess I read what I wanted to read.
    All my Standby redo are setup correctly ( size and numbers )
    READ ONLY WITH APPLYYour answer my be the Uwe answer at the end of this thread :
    Enabling the Active Dataguard and Real Time Apply
    Best Regards
    mseberg
    Edited by: mseberg on Apr 17, 2012 10:50 AM

  • ? Will Real-Time effects work on my iMacG5 ?

    Hello,
    Here is my machine specs:
    iMac G5
    PowerMac8,2
    PowerPC G5 (3.1)
    Number of CPUs: 1
    2 GHz
    512 KB :L2 Cache
    512 MB: memory
    667 MHz
    Boot ROM Version: 5.2.5f1
    Serial number: QP5230LUSDZ
    Please let me know if my system is able to utilize the "real-time effects." I'm using Final Cut Pro 3.0.4. I understand the system requirements are: "500-MHz or faster single or dual processor Power Mac G4, for the real-time effects to be utilized." However, I am not able to get the real-time effects to work on my iMac G5.
    Any help would be appreciated. Or refer me to information already posted. Thank you
    Sincerely,
    One

    REal time is a complex function of CPU, OS, user and system settings inside FCP, your project settings and machine's RAM. You did not include your OS nor your project settings, I'll assume conventional DV.
    About all you can do is continue to work through the manual carefully, studying the setups for your format of choice. It ain't easy the first two or three hundred times but after that, piece of cake.
    Welcome to the family.
    bogiesan

  • How would I implement a FOR loop in real time?

    I am using a cRIO and would like to have several processes running in parallel.  A main functin will have a loop in it which will count up and an certain time intervals pass data to a parallel process.  I am not sure how LV will check the current time value and determine if it is time to send the parallel process information (it will send the parallel process a command to start at time X and stop at time Y).  I see the code in C as:
    for (i; i <= 60; i++)
         if (i==30)
            Function(1); //send "1" to function to  start action, equivalent of setting a variable in LV and continuously reading that variable in the parallel function
         if(i==45)
            Function(0); //send "0" to function to stop condition
        delay(1second);
    I am confused about how to create a loop that has a predetermined (changeable) time period that allows me to compare the timer to set times (i.e. 30 and 45) and perform a function if they are equal.  I can handle that compare part but I am not sure how to implement the loop.  Any help would be greatly appreciated.

    Hi,
    Why don't you use "Elapsed time.vi" ? Compare it with the time you require. Also you can use register event function to let the other process know a certain condition has occurred.
    Gaurav k:smileyhappy:
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.

  • How does real time traffic work?

    Just can't seem to figure out this feature of maps!
    Thx

    Check this link for the locations where traffic data are available on Google Maps.
    Hope this helps...

  • Strange:Real media cannot work correctly

    I am now using Director MX 2004(education version).
    Now I am exercising controling Real Media in Director but
    meet a very strange problem that
    if a RM is coming with a black edge(that means,the RM are
    black in the edge itself)
    Director will play it completely black!!(But audio is still
    be played)
    How to solve this problem?thanks.

    It was a dumb mistake! After trying many options I finally realized that I was inadvertently trying to use the plug in as a "real instrument" instead of a "software instrument". It had been several months since I used it and I guess I forgot about those little details.

  • While loop with stop button within event structure locks up front panel.

    I am not sure if this is a bug with my program or a bug within LabVIEW.  If you believe that this is a bug with my program then I will post my program to be looked at.
    The problem I am having is there is a while loop within an event structure that fires when a particular value changes.  Once the "Activate" button is pressed the while loop within the event structure starts going with a polling frequency of 1hz (1000ms wired to the "wait till next ms multiple" vi).  There is a "Deactivate" button that is wired to the stop control of the while loop and an outter while loop that resets the event structure so that the activate button is being listened to again.
    Once inside the while loop, however, none of the button are responsive within the front panel.  The VI continues to run, and only 60% of my CPU is being consumed, but none of the button or scroll bars work.  The only way for me to terminate the program is with the "Abort" button next to the "Run" button.  If I remove the event structure so that the while loop in question runs as soon as the program starts, the front panel remains responsive.  I've inserted probes within the while loop and verified that it is not running prior to the "Activate" button being asserted, and it is running after the assertion of the "Activate" button with the expected polling frequency set by the "wait till next ms multiple" vi.
    Can anyone help?  Do I need to post my code?
    -Nic

    It is typically not a good idea to stall an event structure by placing loops inside event cases. What good is an event structure if it is not free to repond to events?
    Have a look at some alternative solutions, such as in the following link:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=224817#M224817
    LabVIEW Champion . Do more with less code and in less time .

  • Producer/Consumer Design Pattern + DAQmx + Event Structure

    Dear community users,
    at the moment I try to implement the Producer/Consumer Design Pattern into my current project. For this purpose I am trying to make a "minimal-example" in which I use the Producer/Consumer Design Pattern for the data acquisition and analysis (display in GraphXY, calculation etc..) process. In the Producer Loop I perform the data readings via DAQmxRead.VI and in the Consumer Loop, in this example only, I display the data in a GraphXY. At the same time I want to control the data acquisition via an Event Structure, for example Start Measurement/Stop Measurement Buttons. To configure the measurement time, for example if the user only wants to measure 150 sec, I use the Time Out Event of the Event Structure. This is a technique which is often used, when data acquisition and Event Structures are used at the same time (Excuse me if this is wrong!). Due to understand the Producer/Consumer Design Pattern I looked up in the Template\Framework of LabVIEW.
    In the attachment you will find my "minimal-example", which -sadly-, not working. What should I do ? 
    Thank you.
    Best regards,
    tugrul öztürk
    Attachments:
    daqEngine_PCP.vi ‏35 KB

    Your VI will never stop due to the Ok Button that stops the producer loop is read OUTSIDE of the loop.  Add an event case for it.
    Move the Start and the Ok Button inside of their respective event cases.  This will allow the latch to reset when they are read.
    Change the Ok Button to a stop button.
    Use a Greater Or Equal instead of Equal for the measurement time comparison.  What if somebody randomly changes it to 0 on you?  Again, you will never stop.
    Is the DAQ only supposed to read for "Measurement Time".  Right now, it constantly reads.  So if you don't use the DAQmx Read, you will get a buffer overflow error.  You need to put the DAQmx Start Task inside of the Start event case and then the Stop DAQmx Task inside of the Timeout event case when the measurement time is exceeded.  You should also perform the read regardless inside of the Timeout event case.
    I HATE telling the consumer loop to stop by destroying the queue.  You can look data that way.  Instead, send something an empty array.  In the consumer, check for an empty array.  If it is empty, stop.  Destroy the queue only AFTER BOTH LOOPS HAVE COMPLETED.
    You should also report your errors in some way.  Simple Error Handler at the minimum.
    Since you are using Continous Samples, don't limit the buffer.  Leave the Samples per Channel unwired on the DAQmx Timing VI.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Run a for loop for specified time period

    Hello to everyone,
    I am trying to create a data acquisition system for a NI 9162 board. I need to
    acquire a certain quantity of data (for example 10 minutes) each half an hour
    for example and repeat this process a lot of times. I am trying to do this with
    a loop execution but this is not working well. The first data acquired  is
    ok but in the rest there are a lot of problems. The times are not being
    respected and the board is not acquiring anything. Does anyone can help me? I
    am attaching the VI that I am using.
    Thanks,
    Attachments:
    Consulta.vi ‏80 KB

    You can either use an System.Timer event OR a timed loop in the Structures pallete.
    Use the NI Example finder and search for timer to get an example of timed loops.
    Or use a .NET constructor, go to System in the drop down, the select System timer for the timer control, register the event callback.
    Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
    using LV 2010 SP 1, Windows 7
    Attachments:
    Timer.vi ‏11 KB

  • Unable to click on buttons during timed loop .

    Hi !
    I have a timed loop with a cadence set by user . And when the loop is running, I can not push any button of my GUI to stop this....
     I have to wait until error or I stop the run.
    I can't put the diagram it's too big and I think I haven't the right but do you have some ideas ?
    Ask me for more details .
    Thanks
    Solved!
    Go to Solution.

    bejard wrote:  The Timed loop is just in an event structure and I set 10 ms or 100 ms .
    The program is running correctly (with this Timed loop of 10ms/100 ms) as the beginning but I still can't push any button or change tabs during the loop .
    You should not have long processes inside of an event case.  What is supposed to stop your timed loop?
    I think you have the "Lock front panel until event case completes" option turned on.  This will not allow you to press anything until everything in  that event case (including the timed loop) completes.
    In my experience, using a timed loop in a Windows system is a complete waste and often adds more overhead and issues.  Instead, I really think you need to change over to use a State Machine.  When the button is pressed, you just tell your state machine to go into the state the runs some of the code inside of your timed loop.  You can use the state with the event structure to time your loop.  So you can go back and forth from your event structure state to your processing loop.  Just set the timeout on the event structure to whatever loop rate you actually want.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for