How to start and stop the video capture in a state machine

Hello

I am a student of neuroscience and this is what I try to do: 1) trigger a camera to GigE (200 FPS), 2) start the video capture, 3) triggers a light that stays on for x milliseconds, 4) trigger a valve that will blow an air puff, 5) stop the tone and the valve at the same time and 5) stop the video capture 1 second after 4). For this, my VI is a state machine, with a State for each trigger (ex, 1 State for trigger camera 1 State of light of trigger, ect) and a statement to "stop" and a "time-out State." Everything worked except the video acquisition - the program could trigger the camera but only acquire a frame, because it was not running in a while loop and this is my first question: for an acquisition video is it always necessary to have a while loop?
I guess the answer is Yes, so I built a loop of 'consumer' for the camera. A queue of the pre-trial 'trigger camera' in the loop of producer, I was then able to start the video capture, but now the problem is to stop it at the right time. I have an another queue in the State of 'stop' in the loop of the producer, but is not able to start the State 'stop' in the loop of consumer, I think that maybe it's because the loop of consumer gets "stuck" in the whole loop.

I hope you can help me, the VI is attached. Thank you!

Hello

First of all, in your loop producer: STATE 'Stop', you use the flushing line, then there is no need to use 'item queue at the opposite end. You can use the enqueue function.

Secondly, you said "I moved the command stop inside the while loop as you said, but it did not work. But if you look closely, you moved "Enqueue function" inside the while loop. Instead you should use Dequeue function. Please, look at the picture I posted an orderly manner.

And remove the circled (i.e. function. Enqueue function loop of consumption, where I wrote 'Why stop here').

Try now.

Tags: NI Software

Similar Questions

  • How to start and stop the APEX?

    Hi all! I am new to this forum and APEX too...

    We are runing (Version: Application Express 4.1.1.00.23)

    I need to reboot the server.

    How can I stop APEX graciously and start back after? Thank you!

    Kind regards

    Ghyslain salvation,

    to reinforce what Mike says. Apex is a database and, with the exception of the HTTP server application, runs entirely on the database. (Note with EPG, its all in the database) It contained in the users/schemas database and built items of data such as tables and PL/SQL packages. If the server that is running the Oracle database in which the Apex is installed needs to be restarted, the database must be stopped, which stops indeed Apex. If the HTTP server is also running on this server (ESS or earpiece of the Apex) then this should be stop as well.

    Of course, if your desire is not to stop the database, but to deny the user access to the Apex, perhaps for purposes of maintenance of database, then this can be done by stopping the HTTP server or by stopping the EPG.

    I hope it is clear now.

    André

  • How to start and stop the timer by using the keyboard.

    Hello, I would really like to help please, I have

    here to launch a program whereby I press a key

    which starts the timer and press another button to stop the timer, the

    delay is displayed and used to move an object on the phase on the delay dependant.

    Thank you

    Attach a listener of events on the stage of your film.

    stage... addEventListener (KeyboardEvent.KEY_DOWN, keyDownHandler);

    According to the http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/KeyboardEvent.html# KEY_DOWN

    1 if you want any key, so you don't need a key code.

    var myKeyBoolean = false;

    function keyDownHandler(event:KeyboardEvent) {}

    if(myKeyBoolean == false) {}

    start my Countdown

    } else {}

    Cancel and reset my timer

    }

    }

    2. If you want the same key to both use a Boolean value like this:

    var myKeyBoolean = false;

    function keyDownHandler(event:KeyboardEvent) {}

    if(Event.keycode == MyKey) {}

    if(myKeyBoolean == false) {}

    start my Countdown

    } else {}

    Cancel and reset my timer

    }

    }

    }

    3. If you want two different keys

    function keyDownHandler(event:KeyboardEvent) {}

    if(Event.keycode == myStartKey) {}

    start my Countdown

    } Else if (event.keyCode == myStopKey) {}

    Cancel and reset my timer

    }

    }

    }

  • Can you start and stop the glassfish server in JDeveloper 12 c and how?

    Mr President.

    Can you start and stop the glassfish server in JDeveloper 12 c and how?

    Concerning

    have you looked at

    http://www.Java-n-me.com/2014/02/GlassFish-extension-for-JDeveloper-12C-go-live.html

  • Is it possible to start and stop the servers without using nodemanager?

    Is it possible to start and stop the servers without using nodemanager? If so, how?

    Hello

    Please follow the link below, it will be useful

    http://docs.Oracle.com/CD/E1322201/wls/docs81/ConsoleHelp/startstop.html#1243161_

    Concerning
    Fabian

  • I want cRIO to start and stop the acquisition by push physical button on the cRIO, is this possible?

    When you use my cRIO 9024 on the ground, I prefer to be able to start and stop the acquisition with pressing a physical button on cRIO.

    I want to say I don't want it to be "as a start-up," I don't want cRIO to start the acquisition as soon as the power supply is ensured.

    Is this possible?

    Hi Cashany,

    you will surely find this switch status. But there are easier ways (but more expensive) for a button. Fiddling with a pen or a small screwdriver to switch USER1 is not what I call "user friendly"...

    -You have at least 2 voltage inputs on your module available. Use a switch voltage on the power inputs. Use a 'real' button!

    -You have an available serial port. You can set some pins on GND or voltage and check their status inside the cRIO/RT target...

  • How to unsubscribe and stop the writings of cash on the card?

    How to unsubscribe and stop the writings of cash on the card?


    This is an open forum, not a direct line to Adobe support... you will have to wait for a response

    Cancel see answer #1 in https://forums.adobe.com/thread/2023066 - includes a link to Chat from Monday to Friday

  • How to create services start and stop the script of automation for different servers

    Hi all

    I want to create a file bat for automation object, start and stop services
    I have some services in 1 server and a server in 2nd and some servers in 3rd.
    has you all know that I have to follow the sequence to start and stop services can all help me in creating .bat combining 3 servers fo start and collapses of the services.

    Thanks in advance

    Concerning
    SM

    the location of your batch file should not matter

  • iOS 10 times to start and stop the music messed up

    I'm running a SE 64 GB iPhone with iOS 10. Many songs from my iTunes library has some moments of power, but after update, they are all mixed. Songs don't start or stop when they're supposed to, or they're going to start and stop at a random time, which is annoying. The same problem was in the beta, causing me to backup on iOS 9. I assumed that this bug would be fixed in the final version. All the solutions in addition to remove and re - download my library?

    Hello Carnage1215,

    Thank you for reaching out to the Community Support from Apple. I understand your music has had some problems and I want to help him. By the sounds of things that your songs start may be delayed or in the middle of the piece, is that correct?

    Before you make too much trouble shooting, it's a good idea to make a backup of your iPhone If you don't have it already. If you do not know how to save your phone from this article will guide you in the process: the backup of your iPhone, iPad and iPod touch

    Once you have made a backup, I would recommend to reset all the settings on your iPhone. This will ensure that all old data of a version of iOS parameter are removed and reset default. This removes all data and applications, photos or contacts, but it removes all of your preferences for the Wi - Fi, Bluetooth, do not disturb, Notifications, general, sounds, contact ID, brightness & paper painted and privacy, then you may need to define these things upwards after this reset.

    Do this please go to settings > general > reset > reset all settings.

    If you always use the same behavior after you restart your phone, please inform the community. We are all here to help.
    Best regards.

  • How to start and stop a task with c#?

    Guys,

    I need a help. I'm trying to reproduce a task created using Meansument & Automation Explorer. The task is very simple create a channel of digital output and send the values 0 or 1 to enable and disable a relay in my board DAQmx.

    Kind regards

    Alexander has.

    I found the solution, add a new item in solution using Add new item choose component or and together the configurations such as a task type that you need. The issue will create a class for your task, this class has all the events to start and stop a task, and you can add your new methods if necessary.

    Thank you all.

    Alexandre Albuquerque

  • Re: Start and stop the scene/video button

    I need help to fix my departure and switch to stop.  It will start the video scene, but it will not stop if I click on the Start button. Please correct my code.  Thank you.

    Process.Visible = false;

    Cycles.Visible = false;

    Stop();

    function playMovie(event:MouseEvent):void

    {

    Play();

    }

    startButton.addEventListener (MouseEvent.CLICK, playMovie);

    var paused: Boolean = false;

    function myPauseFunction (): void {}

    {if (Paused)}

    Play();

    paused = false;

    }

    else {}

    Stop();

    paused = true;

    }

    change:

    function pauseMovie (): void {}

    {if (Paused)}

    Play();

    }

    else {}

    Stop();

    }

    pause =! suspended;

    }

    TO:

    function pauseMovie (e:MouseEvent): void {}

    {if (Paused)}

    Play();

    }

    else {}

    Stop();

    }

    pause =! suspended;

    }

  • AS3 video start and stop the question.

    Hello

    I am new to AS3 and I'm trying to figure out how to stop a clip to play on mouse click. For now, I created a movieclip that plays when the user clicks on it, but now I want to be able to stop the movieclip if clicked again.
    At the moment, I have the following code:

    Stop();
    bigTree_mc.addEventListener (MouseEvent.CLICK, onClickplayAnimation);

    function onClickplayAnimation(event:MouseEvent):void
    {
    bigTree_mc.play ();
    }

    The tree animation plays very well, but I want to be able to stop it if the user click on it again.

    Any help would be appreciated!

    Thank you!

    Try...

    Stop();

    var isPlaying:Boolean = false;

    bigTree_mc.addEventListener (MouseEvent.CLICK, onClickplayAnimation);

    function onClickplayAnimation(event:MouseEvent):void
    {
    {if (isPlaying)}

    bigTree_mc.stop ();

    } else {}

    bigTree_mc.play ();
    }

    isPlaying =! isPlaying;

    }

  • How to find and use the video converter total already installed on my windows7 pc toolbar

    I tried to install total video converter that would appear as a bar above the search bar. But I was told that I have told you from. Unfortunately, I'm unable to find it, much less use it. Could you please advice me.

    OLIVIER OLIVIER

    EZEIDI ONICHA

    NWA Omar na-echi eze

    Hi Olivier,.

    How did you know that the application has been installed?

    Check if the program is installed in the Panel.

    was: Start Type programs and features in the search box and press ENTER.

    b: Now, locate the program in the list to see if it is installed or not.

    Good day!

    Please let us know about the State of the question.

  • How to deactivate and reactivate the video in Flash cc

    I have a video file in my flash page so I created my own custom, game put in pause and rewind.   I want to make an option to mute for people can transform the sound market.  I know that I can easily make final using the extract of "stop all sounds" but if I use the method how I may be able to make the sound can be turned back on without resetting the video itself?  Is this possible?

    When you play a sound you receive not given the sound channel it uses. Volume is a property of sound transformation. So to adjust the volume of a sound, follow these steps:

    var s:Sound = MySound() new sound;

    var sc:SoundChannel = s.play ();

    var st:SoundTransform = sc.soundTransform;

    You then to cut:

    St.volume = 0;

    sc.soundTransform = m;

    and reactivate would be:

    St.volume = 1;

    sc.soundTransform = m;

  • Start and stop the ASM in a standalone environment

    Hello

    I installed just 11 GR 2 grid Infrastructure and ASM you have running.

    Q1. How I closed ASM correctly? So far I have

    stop the + ASM instance

    stop the listener

    However I always seem to have a number of processes that are running

    Grid1 6184 1 0 10:53?        19:00:00 /home/app/oracle/product/11.2.0/grid/bin/ohasd.bin restart

    Grid1 6338 1 0 10:54?        00:00:31 /home/app/oracle/product/11.2.0/grid/bin/oraagent.bin

    Grid1 6351 1 0 10:54?        00:00:00 /home/app/oracle/product/11.2.0/grid/bin/evmd.bin

    Grid1 6387 6351 0 10:54?        00:00:00 /home/app/oracle/product/11.2.0/grid/bin/evmlogger.bin o /home/app/oracle/product/11.2.0/grid/evm/log/evmlogger.info-l /home/app/oracle/product/11.2.0/grid/evm/log/evmlogger.log

    Grid1 6883 1 0 10:57?        00:00:05 /home/app/oracle/product/11.2.0/grid/bin/cssdagent

    Grid1 6897 1 0 10:57?        00:00:01 /home/app/oracle/product/11.2.0/grid/bin/ocssd.bin

    When I do = >

    Grid1 [+ ASM] > ASM srvctl status

    ASM is not running.

    Q2. What are the processes above, and how to close properly?

    Q3. What is the procedure for starting a ASM?

    any help appreciated,

    Jim


    Look for the command

    crsctl stop

Maybe you are looking for

  • Automatic shutdown of the Server 2003

    Server 2003 stops automatically without warning. There is no countdown and happens randomly. I was able to capture 3 of memory dump files, but I can't read it to understand what the problem is. And here's one: Microsoft (R) Windows debug 6.3.9600.172

  • Frequency counter measurement crashes when you're away point zero (NI USB 6343, error-200284)

    Members of the Forum, I have problems with a measure of the frequency on a DAQ Mulitfunction of NI USB 6343 X series.  I use the meter 1 (door axis for frequency signal, PIN to DGND 82 77). The couple HBM T10F flange that I use (powered by a power su

  • Resident tv program HP MediaSmart has stopped working

    I have a DV7-1285 and from two days to reboot, I get the following error: HP MediaSmart tv TSR stopped working I updated all drivers and BIOS and continues to be.  I am running Vista Home Premium SP1 (64-bit) and 6 GB of memory, and ESET Smart Securi

  • Collapse of the computer

    I had a major breakdown, a couple of weeks and she really fuck Lightroom. Fortunately, I had everything backed up on external drives but all my files have reverted back to the downloads raw somehow I have to develop EVERYTHING from the start. If you

  • Levels of the different point of view to a PDF form

    Levels of the different point of view to a PDF form: I have a PDF form that requires the intervention of different people. However, I need to hide certain sections of the form to be used only to specific people. How?