Timed sequence problem

hello!
I am currently working on a program that instructs a laser to lase and a PMT to read the number of counts of photons received. Attached please find the core sub VI program.
However, I do not really understand how the timed sequence works. The millisecond delay is supposed to be the delay between 2 laser pulses. Read in array is a sub vi that tells the array of PMT to read counts, and Read out array is a sub vi that reads the data from the PMT. Fire laser is a sub vi that instructs the laser to lase.
Could you kindly explain the sequence of events in this sub vi? In the main program, it is put in a big while loop, and there is a delay timer (Wait 20 ms). What would the delay between 2 laser pulse and that between 2 PMT readings?
Thank you so much for your kind help!!! Your generousity is highly appreciated!
Attachments:
FireAndReadCounts.vi ‏137 KB

Millisecond Delay specifies the delta T value from the start of the first frame to the start of the second frame (as long as it's greater than the time  for the ReadCommandPMTArray VI to execute).  Then the second frame (Fire Laser) will execute.  After the sequence completes, ReadOutPMTArray_old will execute.

Similar Messages

  • Timed sequences. Is that hte right choice and how does it works!

    Hi!
    I'm a newbie in LV, and I'm trying to create a VI that is capable of controlling a small filtration unit I have build as a part of my engineering studies.
    I have to control three magnetive valves which are connected to the digital output port Do0, Do1 and Do2 on my MyDAQ 6009 USB device.
    I have to control the sequence by which the valves opens / closes as to avoid damage of som sensitive pressure transmitters. How do I manage to programme a time controlled sequence that opens and closes the valves in the right order and , in reverse order, repeats the sequene after a user defined choice of time?
    I have looked at the "Timed sequence" but cant find a "down to earth" description on how to use it.
    Maybe my problem is a bit to general. In that case I can surely help with a clarification if needed.
    I hope someone can help me with my problem. By now I have spent 6 hours in watching different tutorials without any luck.
    Thanks in advance
    Henrik
    Solved!
    Go to Solution.

    Hi Anders!
    I have looked on the State Machine solution, but couldn't really figure out where to start. As I mentioned, I'm a newbie. All I have done so far is data logging and working with analog signals (temperature logging, controlling a pump and so on). I have build a filtration unit as a part of my studies to become a chemical engineer. In order to clean the ceramic membrane in use, there is a procedure where the fluidstream is pumped back in to membrane to loosen fouled particles etc (called backflush). This is done with high pressure air. I have mounted three magnetic valves to be able to control this process.
    Valve one and two has to close approx 0.5 sec before valve three opens. Valve three is allowing the high pressure air to push fluid in reveres direction and valve one is protecting a pressure transmitter with a max. overload pressure [bar] below the required pressure. After a userdefined number of seconds, the process has to be repeated in reverse order. The three valves are connected to digital I/O channel 0,1 and 2 on the USB 6009. With the Measurement and Automation explorer testpanel I can open and close the valves manually, so the connection is established. I don't have access to a PLC, which probably would be the right choice for my problem.
    If you could help I would appreciate it a lot. My thesis isn't about building a filtration unit. It is more the process using it, and that is not possible right now
    If the above information is insufficient, I will provide any information needed.
    Best regards
    Henrik

  • [iPhone SDK] Playing a timed sequence of sound files

    I need to play a timed sequence of sound files, meaning one file after another (potentialy overlapping) with a predefined amount of time between each file (without blocking the UI). I know I can use a thread pool and timers to accomplish it but is that the best way?

    Hi,
    Im having a similar problem and i was wondering if you were able to get a solution??
    Thanks for your help.

  • Timed Sequence

    Hello,
    Sorry this is kind of a simple question but I have two regarding the code I'm writing for my senior design project.
    1) My first question is how do you conduct a timed sequence in applying a switch. Say I want to "Reset Device", so I will be sending a voltage of [5 0] to my DAQ and after 10 seconds or so, it sends [0 0]. Do I use a while + case + stacked sequence all together? When I try to do it, it just gives me an error.
    2) Also I have two "modes" in my program. One where I control my device manually (so forward, backward and stop) and this other mode where I reset my device so it would overide the manual and reset my device. I don't know how to set my program where it can do that.
    I'll attach my code to give you an idea of where I am  
    Thanks
    -Justin 
    Solved!
    Go to Solution.
    Attachments:
    SARA_mod.vi ‏47 KB

    no need for sorry at this point of time but you will defenitly end up with some trouble later on if you dont change that code you have written.
    I suggest you to go through the "state machine architecture" or "Queued message handler"(with event structure for capturing the user operations) (could be found in the templates provided by LabVIEW) for perfoming this task.
    1) you can perform the timed sequence something like this
    2) The state machine or the Queued message handler"(with event structure for capturing the user operations) will solve this problem easily. Go through the shipped examples or serach ni.com for some example codes
    Guru
    Regards
    Guru (CLA)

  • Timed sequence doesn't work right with external timing source

    I'll describe first what I want to accomplish and
    then maybe someone can read further and suggest why the attached VI
    doesn't work. I have a SMU (PXI 4130) that takes differing amounts of
    time to set a current depending on if the setting spans a range
    boundary. I want to be able to make that SMU setting and then wait a
    specific amount of time (sometimes 1 msec). If the SMU takes a little
    longer to return then I want that extra time to come out of the wait
    time. To do this I figured I would need an external time source to
    control a timed sequence to give better than the normal 1 msec
    resolution. So now onto the problems I'm having.
    I've
    got two problems here that I would really appreciate some insight on.
    The attached VI is the subject of both problems (as is the VI is
    worthless, but it illustrates the problem). Note that you need some
    type of DAQ board with a counter on it to run it.
    I can't
    figure out why this timed sequence doesn't work with an external timing
    source. It works mostly as expected (see next problem) with the
    internal source, but fails miserably with the external source. Run the
    VI as is to get a baseline. Then connect the DAQmx Create Timing Source
    VI to the Source Name input of the timed structure. It seems like it
    should run exactly the same both ways.
    Problem 2 (run with the
    internal timing source). The VI should take the same amount of time to
    execute regardless of the input to the Wait VI (within reason of
    course). That's actually the main impetus for this whole exercise. But
    according to the Actual End indicator it runs faster with a longer wait
    time.
    George
    Attachments:
    test timed sequence.vi ‏144 KB

    Hi George, I have been playing with the code that you have posted and I think I am seeing what your concern is with regards to the first problem that you stated.  Without running the code I would expect both internal and external timing to cause the VI to run in the exact same manner, however obviously that is not the case.  I am currently looking into this behavior and I will post you a response as soon as I have an answer for you. 
    As for the second problem, If you look at the manner in which you have coded this VI, a 1ms wait in the first frame will lead to a calculation of 1999ms wait in the second frame, and thus 5 iterations of 1999ms or about 99,995ms total running time.  If you increase the wait in the first frame to say 50ms, then an overall all wait of 1950ms is calculated in the second frame so not the overall iteration time is now 1950 which, over 5 iteration leads to 99,750ms thus as you increase the wait in the first loop the overall loop duration will be less.  This is expected behavior.
    Again I will post back once I have a clarification on the internal vs external timing.
    Chris_K 
    National Instruments
    Applications Engineer

  • What's wrong with timed sequence?

    I'm setting the first frame duration to 40 ms et the second frame duration to 60 ms. There is not much happening in the frames so I would expect a relatively precise result but what I'm measuring is way out, 47 ms for the first frame and 109 ms for both frames! Am I setting somethings wrong? I want to use something like this with an IO board (PCI-6518) as a custom drive for a stepper motor. Now, with this imprecision on the timing I should probably start to think of an alternate solution. Note: by changing the first frame duration to a lower value the delay jump from 47ms to 31ms (and jump back to 47ms by increasing it back) so htis may very well be related to the OS.
    Using LV2009 with winXP.
    Ben64
    Attachments:
    Timed structure timing.vi ‏55 KB

    Take a look at this thread:
    http://forums.ni.com/t5/LabVIEW/Front-Panel-decora​tions-affect-loop-execution/m-p/2023194#M662952
    The poster was trying to get a 100 iteration per second loop. Putting a recessed frame on the front panel caused the loop to iterate between 60 and 80 times per second. Removing the frame (or just minimizing the front panel) allowed him to get very close to 100 times per second. He was verifying the iteration time using an oscilloscope connected to an IO he was toggling.
    Putting the timed sequence structure in a subVI and changing the execution environment from "same as caller" to something else might help. Also try turning off debugging and changing the execution priority. These are just guesses but they might help.
    Edit: Even if you get it to work you are still at the mercy of Windows. If something horrible will happen if you don't update the motor phases at exact intervals you will want to reconsider Can you set a hardware timing source with your IO card? I don't know anything about those but they might have a timer you can use to drive the loop. But even then I am not sure it will be guaranteed to be deterministic.
    =====================
    LabVIEW 2012

  • ITunes connection timed out problem. Please help

    Hey guys, I've purchased an iPod Touch 4th Gen recently but a problem I've had after installing iTunes is connecting to the internet. I haven't even got the software on the iPod Touch due to an error - "iTunes could not connect to the iTunes store. The network connection timed out. Make sure your internet settings are correct and your network connection is active, then try again"
    Here's a similar error message which comes up -
    http://turbo.inquisitr.com/wp-content/2009/11/itunes-connection-timed-out.jpg
    The frusterating thig is that know one has a clue about the problem or the solution. I've tried everything you name it, from disabling the firewall, disabling the anti-virus, disabling any other programs which may affect iTunes. I've tinkered with the different internet setting, looked out programs allowed in the firewall and iTunes is definitely allowed. And my internet connection is perfect and very very fast. I don't use wireless but an Ethernet cable. There are absolutely NO problems with my internet connection WHATSOEVER.
    So I was thinking whether the time I decided to install is the problem? Maybe it was peak time (I tried it at 17:00pm UK Time) and now its 22:25pm UK time. Maybe it's a time where many users are online? But if that was the case surely I would have been successful atleast once?
    Please help, I'm getting really really desperate. Thanks you ever so much

    You need to place the iPod in recovery mode and then connect it to your new computer and restore it via iTunes. Note that you will lose all content on the iPod. You can redownload apps at no additional cost provided you are signed into the same iTunes account that originally purchased the apps.

  • Order Process Sequence Problem

    Currently I have a FM that does data from an incoming PO IDoc, makes some conversions, changes, etc.  It saves these changes into a new IDoc structure and then uses IDOC_INBOUND_ASYNCHRONOUS FM to post them to create orders.  The problem is if I have 5 IDocs (1, 2, 3, 4, 5) and I bring them in like normal, the results IDocs will sometimes come out out of sequence (5, 2, 3, 4, 1) or some other sequence.  Currently I have the partner profiles for the customer's setup so that it goes directly to my FM.  I'm trying to learn as much as I can about the process flow and how it all works.  If anyone can point me to some good documentation or knows of a better way to do this, please let me know.
    Thanks,
    Curtis

    Dear,
    Go to SNRO t-code.
    In this t-code enter AUFTRAG object.
    This object is for Order type.
    Here you will get option No. of Numbers in buffer check it. This is the field which is responsible for number range buffering
    Regards,
    R.Brahmankar

  • Connection request timed out - problem

    Hi, our errorlog confirms there are regular "Connection request timed out" errors in our web-application (asp.net with odp 9.2.0.4).
    Now we did a standard ODP installation, so i don't know how all the Pooling parameters are set up initially. But i found metalink note 261377.1 which states that the max number of connections also depends on the setting of maxconnections in the machine.config on the server. right now this setting is (windows server 2003):
    <connectionManagement>
    <add address="*" maxconnection="2"/>
    </connectionManagement>
    Apart from having to install patch version 9.2.0.7, could this be part of the problem? Or could this also be caused by wrong programming practice?
    Furthermore: in metalink note 240997.1 i found an example of setting several pooling parameters at connect-time. Is this the only way to do it, or is there something like an odp.config where you can specify these parameters?
    Regards, Paul.

    Hi Paul,
    1) "how the pooling parameters are set up initially": refer to the odp.net documentation, it tells you what all the default parameters are. The key parameter in this case would likely be "max pool size" which defaults to 100.
    2) "maxconnections in machine.config": I looked at that note which doesnt contain very much detail, but couldnt force a problem. maxconnection="2" is apparently the default, it's what mine is set to, and I can open 100 connections without problem. It may be that theres another setting that can affect this (I doubt the guy who wrote the note just made the info up) but I dont know what that is top of my head.
    3) the pooling parameters can only be set in the connect string itself. You could certainly store the settings in a System.Configuration.ConfigurationSettings.AppSettings file however.
    4) "Connection request timed out" is typically not an Oracle software problem, but more frequently an issue with code not cleaning up after itself properly. To confirm whether you've hit "max pool size", check v$session; how many actual connections does that app have? Make sure you're closing and disposing the connection, and additionally the command, reader, etc, under all circumstances (ie, a finally block).
    Hope that helps,
    Greg

  • External LCD flicker (timing standard problem?)

    My external LCD panel flickers when connected via DVI. It basically looks like a CRT refreshing. If I connect it with VGA, it doesn't flicker. It doesn't flicker when connected to a different machine. And it doesn't flicker if I boot the machine into Windows.
    I've tried setting different refreshes on it with SwitchResX to no avail. Again, it works perfect in Windows, but my built-in LCD has whine in Windows when not at full brightness. So, in handy chart form:
    OS X
    Built-In: Perfect
    External: Flicker
    Windows
    Built-In: High pitched whine when not at full brightness
    External: Perfect
    The only conclusion I can draw from this is that it is related to the use of different timing standards or something of the like. Clearly all the hardware is fine.
    So, does anyone have any idea how to go about changing the timing standard used in OS X?

    I'm experiencing almost the same problem as you: When I connect an external LCD projector to my Macbook Pro via DVI/VGA adaptor, I notice a flickering of the LCD projektor. The intensity of the flickering seems to depend on the frequency I adjust in the monitor control panel. Unfortunately there's no frequency that fits the needs of the LCD projector.
    Any idea to solve this problem is most welcome!

  • OC4J: Connection timed out problem

    Hello everyone!
    I am developing a web application in OC4J(1.0.2.2.1), today I found a problem: Client access the server, nothing but only the following content be returned:
    "Description: Connection timed out"
    I used the com.evermind.sql.DriverManagerDataSource and com.evermind.sql.OrionPooledDataSource for database invoke, were they timed out?
    My developing environment:
    AppServer: OC4J(1.0.2.2.1)
    DBServer: Orcale 9i
    ServerOS: MS Windows 2000 Server
    ClientOS: MS Windows 2000 Professional
    JDK: 1.3.1_01
    thank for your any info.
    masstensor.

    Hi,
    Verify your mysqld start script. If you find a --skip-networking parameter, remove or comment and try again.
    In slackware /etc/rc.d/rc.mysql have a line with: SKIP="--skip-networking"
    And in mysqld_start():
    /usr/bin/mysqld_safe datadir=/var/lib/mysql pid-file=/var/run/mysql/mysql.pid $SKIP &
    Comment the #SKIP="--skip-networking" or remove $SKIP (the first is recomended)
    (eu n�o escrevo ingl�s, mas talvez ajude)
    Seja livre! Use linux!

  • Oracle sequence problem in CMP Entity EJB

    I have a problem with Oracle sequence when I am using from the CMP entity EJB in WebLogic
    6.1:
    The problem is when the WebLogic server starts it acquires the correct sequence number
    from Oracle, but during the runtime, when I open a new sqlplus window and increment
    the sequence number, the container is not picking up from the new incremented value
    instead it is still continuining by incrementing the old sequence number it has acquired
    when it fetched from Oracle last time.
    The sequence increment and key-cache-size in weblogic-cmp-rdbms-jar.xml are exactly
    same
    Any help would be greatly appreciated.

    Change the key-cache-size to 1 in weblogic-cmp-rdbms-jar.xml and then try
    your experiment again.
    -- Anand
    "Satya" <[email protected]> wrote in message
    news:3d06274c$[email protected]..
    >
    I have a problem with Oracle sequence when I am using from the CMP entityEJB in WebLogic
    6.1:
    The problem is when the WebLogic server starts it acquires the correctsequence number
    from Oracle, but during the runtime, when I open a new sqlplus window andincrement
    the sequence number, the container is not picking up from the newincremented value
    instead it is still continuining by incrementing the old sequence numberit has acquired
    when it fetched from Oracle last time.
    The sequence increment and key-cache-size in weblogic-cmp-rdbms-jar.xmlare exactly
    same
    Any help would be greatly appreciated.

  • URGENT: Motion JPEG?? Sequence problems

    HI
    I have a sequence that instead of having DV PAL in the settings has Motion JPEG A - will this be ok to go into DVDSP for a DVD video project??. This sequence has a few issues with frame size which I've made posts about and trying to rectify.
    In the edited sequence I changed the Motion JPEG A to DV PAL, is this ok?? I'm about to try and test this out - but wanted to ask the forum for your urgent advice.
    The 1024 x 576 frame size is wrong also - I tried making a new sequence with the 720 x 576 settings and copying and pasting my AV into the new timeline. The template graphic was ok, but the video within it is all stretched!!!
    I'm starting to panic now.. as I need to send this off for sound then to the client tomorrow first thing...
    Hope you can help.
    Cheers, Margie

    Hi Karthik,
    I'm not trying to create an animation for a webpage.  I'm exporting the movie as a JPEG sequence for use in Final Cut Pro (as it's the cleanest way to recreate a flash animation in a movie file format).  Exporting as a GIF Animation however creates the same problems as when I export as a JPEG sequence... the timelines within timelines (movie clips) don't move at all (the movie clips are animations of various carbon molecules moving in a larger animation of a lot of other things going on).  Also, exporting as a GIF Sequence yeilds the same result... foreground elements move while background elements (movie clips) don't move.  Strangely, everything DOES move when it's exported as a SWF file... except I can't use a SWF file.  I've already tried exporting the file as a MOV file and it's too graphic-intensive and causes a lot of freezing in the animation when it renders as a MOV file, and when I try using various 3rd party SWF converters to convert the file to .MOV or .DV format, it also gets bogged down by the heavy graphics and freezes and skips.
    The only way that it works is when I export it as a JPEG sequence because the computer doesn't have to render it in real time, but for some reason, movie clips within the timeline won't play.  I'm hoping someone here knows a way around this, or a setting I can toggle to make it work.  Any info would be appreciated.  Thanks for trying though Karthik!
    Chris

  • Multiple destination tables, oracle sequence problems

    Hello,
    Please look at this sql - there is 2 steps to add data to 2 destination tables:
    - step1:
    INSERT INTO OBIEKTY (ID_OB, TELEFON, FAX, NR_LOKALU, UWAGI, ULICA, GEOM, NR_BUDYNKU, KOD_POCZTOWY, LISTA_OBIEKTOW, EMAIL, GMINA, NAZWA, WOJEWODZTWO, MIEJSCOWOSC, USUNIETY, POWIAT, JEDNOSTKA_WYJAZDOWA, MIEJSCOWOSC_POCZTY)
    VALUES (OB_SEQ.NEXTVAL, null, null, null, null, 'Legionowa', null, '8', '15-099', '0', null, null, 'WSSE w Białymstoku',null , 'Białystok', null, null, '0', null);
    -step2:
    INSERT INTO ZASOBY (ID_ZAS, UZYT_TWORZACY, UWAGI, UZYT_OST_MODYFIKACJI, DATA_OST_MODYFIKACJI, DYSPONOWALNY, DATA_UTWORZENIA, USUNIETY, ID_SPRZETU, ID_PAT, ID_MAT, ID_INST, ID_KATEGORII, ID_OBIEKT, ID_POZ_SL, ID_OSOBA, IMPORT)
    VALUES (ZAS_SEQ.NEXTVAL, 'import', null, null, null, '0', SYSDATE, '0', null, null, null, null, KTZ_SEQ.CURRVAL, OB_SEQ.CURRVAL, (select p.id_poz_sl from pozycje_slownikow p join slowniki s on p.id_slownika=s.id_sl where s.nazwa like 'TYPY_ZASOBOW' and p.kod = 'OB'), null, '1');
    There are problems with sequences. As you can see, there is OB_SEQ.NEXTVAL in first step and OB_SEQ.CURRVAL in second step. It's impossible to define multiple destination tables in one interface. But, if I do this in multiple interfaces, OB_SEQ.CURRVAL will be undefined in second interface.
    Also, all steps should be performed row by row. So: first step for first row, second step for first row, first step for second row, second step for second row etc. This don't happen if I use multiple interfaces - first step will be performed for all source records and then, second step will be performed for the same records - this is not what I want.
    Do you have any tips what is the best way in this case?

    Hello,
    Unfortunately, problem is not solved still. As you can see, there are 2 sequences, from 2 not joined tables: KTZ_SEQ.CURRVAL, OB_SEQ.CURRVAL. KTZ_SEQ.CURRVAL is declared here:
    insert into KATEGORIE_ZASOBU (ID_KTZ, UZYT_TWORZACY, UZYT_OST_MODYFIKACJI, LOKALIZACJA, DZIEDZICZENIE, DATA_OST_MODYFIKACJI, DATA_UTWORZENIA, DYSPONOWALNA, SYSTEMOWA, WYBIERALNA, OPIS, NAZWA, USUNIETA, ID_KATEGORII1, ID_POZ_SL, IMPORT)
    values (KTZ_SEQ.NEXTVAL, 'import', null, '0', '0', null, SYSDATE, '0', '0', '1', null, 'Jednostki WSSE', '0', null, (select p.id_poz_sl from pozycje_slownikow p join slowniki s on p.id_slownika=s.id_sl where s.nazwa like 'TYPY_ZASOBOW' and p.kod = 'OB'), '1');
    So, summary:
    - there are 2 steps (OB_SEQ.CURRVAL. KTZ_SEQ.CURRVAL) are set
    - third step: insert some hardcoded data + OB_SEQ.CURRVAL. KTZ_SEQ.CURRVAL values.
    Since KATEGORIE_ZASOBU and OBIEKTY are not joined, I can't add them as datasources in my interfaces (how to create join?) and set CURVAL?

  • Create Timing Source problem in RT deterministic loop

    I'm updating an old LV 7.1 vi to run with LV10 and DAQmx.  We have a deterministic timed loop driven by an external 10 kHz clock source.  As I understand, it should be possible to set up this functionality using a timed loop and the DAQmx Create Timing Souce vi.  The attached image shows how I wired it up.
    This vi is deployed to a PXI system running LV 2010 with 6608 system timing card (Dev 1).  I'm using counter 1 on the 6608 to create the timing source.  I have an external 10 kHz square wave (5 V p-p)  connected to Src1 (PFI35) on Dev 1.
    The problem:  the loop seems to be using a 1 kHz clock, even though I've specified the counter and input for a 10 kHz source.  If I choose a frequency of 20 Hz (500 edge counts for a 10 kHz clock) the actual loop frequency is only 2 Hz.  But, the loop stops if I disconnect the 10kHz signal, so it is somehow using the specified counter !!??  How can this be?  Is there additional counter configuration needed here??  I've verified the external clock signal is exactly 10kHz with an oscilloscope.
    Thanks for any thoughts.
    Solved!
    Go to Solution.
    Attachments:
    CreateTimingSourceTest.JPG ‏37 KB

    OK.  I solved this one.  You need to wire a "1" constant to the period input node of the timed loop.  The default value of "10" will only execute the loop on every 10th clock pulse, hence the factor of 10 decrease in loop frequency.

Maybe you are looking for