Synchronization of two sub-vis!

I am working under LV 7.0 and I have to acquire videos through FireWire. The cameras are included into LV via an ActiveX control. So far so good. Because I have to control 2 cameras I have to start the capturing simultaneously. I have written to sub-vis where I initialize the cameras and start the capturing. Now I am wondering how to synchronize these sub-vis because sometimes the files have different lengths, up to 5 frames or about one second. Is there a way to get this thing to work?
Thanks a lot in advance,
Henning

Hi Henning,
Please take a look at the example included with LV that can be found at
Help >>> Find Examples...
Optimizing Applications >>> Syncronizing Tasks >>> Rendezvous with SubVIs.vi
The help for this VI follows
This VI is a demonstration of using a rendevouz. It creates a rendezvous of size 3 and then calls three parallel subVIs using this rendevouz.
These subVIs use the rendezvous to synchronize the beginning of their loops. Each one displays integers to a graph. Finally, they all use the rendevouz to exit at the same time.
Please note that this will get sub-VI sync'd up at the begining of each cycle. I have to raise the concern that the actual interaction of the sub-VI's with their respective activeX service may end up se
quential if they all execute in the user interface thread.
The technique illustrated in my cited example should get all of your files sizes to match up.
I hope this helps,
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • Running two sub vis in parallel

    I need to run two sub vis of a main vi simultaneously in parallel.
    one sub vi is to run a demo and the other subvi is an application.The demo should run as a small window and the application should run in background

    As i said
    "If you have the demo vi as floating and the other vi as Default (not floating), the demo vi will allways stay on top"
    If you still have problems, just post your vis, (without any unnecessary code), or ask something specific
    Message Edited by Pnt on 04-21-2009 08:18 PM
    Attachments:
    Clipboard-2.jpg ‏44 KB

  • How do I run two sub-VIs in parallel and have the faster VI continue to execute while the slower one completes?

    I have two sub-VI's - one that makes a laser distance measuring device turn on and return a distance, and another that moves a platform upon which a target is mounted that the laser reflects against. The laser VI takes well under 5 seconds to complet. The platform-moving VI, on the other hand, requires about 30 second. I would like to be able to have the laser on AS the platform moves. Of course, I can accomplish this by running the VIs seperately. However, I would like to control them from a master VI. Currently, the laser turns on as the platform begins to move but then turns off, since the master VI waits on the platform-moving VI to
    complete. Any help with this seemingly simple dilemma would be greatly appreciated.

    In order to synchronize the two VI's I would recommend using a global variable. By creating a global boolean, you can make reference to it in both programs, and control when your "laser" subVI terminates.
    Basically, have your "laser" subVI wait until the global boolean goes true to stop execution. Have the boolean initialized false, and then have your "platform" subVI write a true to the global boolean when it has finished running. This will keep you laser running until the platform has completed its move. Good luck!

  • Re: Calling two Sub VIs using Test sequence

    Hii All,
    I created main vi and one sub vi...i wanna to call sub vi from main vi using test sequence and controller is Bollean.
    Means when the test sequence detects true condition it will run main vi and when test sequence detects False condition, it will run sub vi.. But sub vi is nit running...can some one tell me the solution...
    With Regards
    Puneet Kapoor
    CLA 2014
    CCVID 2014
    Solved!
    Go to Solution.
    Attachments:
    main.vi ‏18 KB
    sub vi.vi ‏6 KB

    thans for the suggestion...
    i got the solution for it n the VIs is in the attachment.
    Message Edited by puneet.kapoor on 12-12-2007 10:10 PM
    CLA 2014
    CCVID 2014

  • How to run two sub vi simultaneously??

    i need to run two sub vi simultaneously in one main vi, becasue it is a must the two sub vi run exactly at the same time, but now i find that if i put they in one diagram ,in fact they are not exactly run at the same time. if you see in high light mode Just like the attached simple example code.  any one can help me to handle this to run the two subvi exactly at  the same time ? how to do it ? thanks so much.
    Attachments:
    how to run subvi simultaneously.vi ‏11 KB

    You are correct, they will not run at exactly the same time.  What is it you are actually trying to do?  What platform are you developing on? What version of LabVIEW? What processor does your target system have? This information is vital in order for us to assist you.  In a nutshell, unless you are running a real-time OS, then the OS you are running is not deterministic.  When you say "at the same time", what are you actually referring to? As a note, when executing parrallel operations in LabVIEW, the execution order may or may not be the same with the highlight bubble on as it is when it is running without highlight execution.  It is highly unlikely that you will be able to just run two sub-vis at the exact same nS.  If you are using DAQ boards, you accomplish this through triggering.  Please give a detailed description of what you are doing, and what you see the road blocks being.
    Thanks
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • I try to open two sub vi front panel in third - main vi front panel.

    I have two sub vi, and I`d like to see this two vi front panel in main vi front panel window. Does anybody can answer me , If it`s possible?

    Click here for a recent related discussion.
    Or have you thought about using a tab control? You can organize controls in pages and have those controls call sub-VIs with or without displaying the front panel of the sub-VI. See the Tab Control Properties.vi example that ships with LabVIEW.
    From any LabVIEW window, select Help from the window menubar, then Find Examples >> Search, then enter "tab control" (without the quotes) in the box labeled Type a keyword to find:

  • Will more function globals or sub vis slow down realtime DAQ or display

    I need to do high sampling rate DAQ with varient data process and display.
    Shall I intend to put all the code into one vi to accelarate the speed,  or can I use more function global or sub vis to make the structure looks more reasonable.
    Just worry how the compiler handle the data transfer when call function global or sub vis.
    Will it creat new data copy and slow down the speed. Thanks.

    The other 2 loops in charge of the data processing and display will keep checking the version of the 2 function global. 
    For high performance, you want to avoid this sort of thing. Basically, you're polling the functional global to see if it has new data. Polling will eat the CPU unless you include WAIT periods, but doing that slows your responsiveness.
    Consider using custom events.
    For the sake of discussion, let's say you need to process data in the TIME domain (1) and the FREQUENCY domain (2).
    You create two events: NEW TIME DATA and NEW FREQ DATA, each carrying an array of DBL (the time-domain data from the DAQ).
    The DAQ routine, when it gets a new data block fires both these events, feeding it the new data. 
    Your TIME DOMAIN loop (1) has registered for one event.  When that event is triggered, the code accepts the data, and does whatever it needs to do (filters the time domain, graphs it, writes to file, averages, whatever).
    Another loop (2) has registered for the OTHER event.  When THAT event is triggered, the code accepts the data, performs FFT on it, and  does whatever it needs to do (filters the frequency domain, graphs it, writes to file, averages, whatever).
    Or you could do the same thing with queues.
    When the use changes conditions, you change which event you listen to, or which queue you consume from. 
    The idea is that you want to avoid polling.  Let the system tell YOU when data is available. Don't be asking the system if it's available. 
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Using Open VI Reference to run a VI, on an RT target, with sub-VIs not loaded

    I've been using Open VI Reference and Call By Reference Node to remotely run VIs on my RT controller.  I
    usually wire string data to the vi path input, but this
    requires the VI to be in memory.  I understand (from LabVIEW help) that I can wire a path to this terminal and specify a VI that is
    not in memory, but is on the disk.  NI has an example that
    confirms my understanding.  I get errors when I attempt to do the same
    with VIs that have sub-VIs; I suspect that the problem is that
    the sub-VIs aren't in memory and that the top-level vi doesn't know where to
    look for them (because the paths aren't specified).  All of the sub-VIs are on the RT system (in the same directory), they're just not in memory.
    Is there a way to get LabVIEW to look for sub-VIs on the disk?  I don't want to rely on using a startup application and rebooting to get my VIs into memory.
    Thank you,
    Jim Carmody
    Software Engineer
    G2 Technologies
    www.g2tek.com
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

    Hi Jim,
    It sounds like you are going about calling VIs remotely the correct way.  It would be very helpful if you could post the errors you are receiving.  I also wanted to know if you saw the note at the bottom of the article that says your VI library must contain everything your top level VI calls.
    Eric A.
    National Instruments
    Distributed I/O Product Support Engineer

  • Use two indicators for the same variable in two different VIs

    hello, I want to use two indicators for the same variable in two different VIs running at the same time
    should I use global variables?? I want to avoid because I have lot of variables and it would takes too much memory,I tried with this code but the value of the second indicator is not updated 
    I tried to use the queue and it works but the problem is as i said previously that i have many variables shoud I use a queue for each one??
    what should I do?
    thank you in advance
    cordialy
    Attachments:
    projet.zip ‏13 KB

    CrisSTine01 wrote:
    hello, I want to use two indicators for the same variable in two different VIs running at the same time
    I'm a huge fan of User Events to send updates to GUIs from who knows where.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to configure time synchronization for two NTP servers

    We have IOSXR 4.2.1 on routers CRS3 and ASR9K with all recomended SMUs; we need to configure the time synchronization for two NTP servers with the configuration below, but the routers became unstable; synchronize with one NTP servers for some time, then switch to other NTP server, and keep doing this. Anyone know why this behavior?
    ntp
    authentication-key 1 md5 encrypted 01070F074F0A05
    authenticate
    trusted-key 1
    server 10.192.32.32 prefer
    server 10.192.32.33
    source Loopback50
    update-calendar
    RP/0/RP0/CPU0:DFCRSDTC1#sh log | i ntp
    Wed Jul 10 09:37:04.621 BRSPO
    RP/0/RP0/CPU0:Jul  4 21:29:18 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.32 : Peer unreachable or clock selection failed
    RP/0/RP0/CPU0:Jul  4 21:29:18 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->15.
    RP/0/RP0/CPU0:Jul  4 21:29:18 : ntpd[256]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.
    RP/0/RP0/CPU0:Jul  4 21:29:27 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 15->2.
    RP/0/RP0/CPU0:Jul  4 21:30:21 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.32 : Peer unreachable or clock selection failed
    RP/0/RP0/CPU0:Jul  4 21:30:21 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->15.
    RP/0/RP0/CPU0:Jul  4 21:30:21 : ntpd[256]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.
    RP/0/RP0/CPU0:Jul  4 21:31:36 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 15->2.
    RP/0/RP0/CPU0:Jul  4 21:35:56 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.33 : Peer unreachable or clock selection failed
    RP/0/RP0/CPU0:Jul  4 21:35:56 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->15.
    RP/0/RP0/CPU0:Jul  4 21:35:56 : ntpd[256]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.
    RP/0/RP0/CPU0:Jul  4 21:40:11 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 15->2.
    RP/0/RP0/CPU0:Jul  4 21:50:52 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.33 : System clock selection failed
    RP/0/RP0/CPU0:Jul  4 21:50:52 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->6.
    RP/0/RP0/CPU0:Jul  4 21:59:26 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 6->2.
    RP/0/RP0/CPU0:Jul  4 22:25:07 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.33 : System clock selection failed
    RP/0/RP0/CPU0:Jul  4 22:25:07 : ntpd[256]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 2->6.
    RP/0/RP0/CPU0:Jul  4 22:56:16 : ntpd[256]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 10.192.32.33 : Peer unreachable or clock selection failed
    RP/0/RP0/CPU0:Jul  4 22:56:16 : ntpd[256]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.

    Hi Claudio, that ddts is pretty generic to be honest but yes it is filed to address sync issues in the XR NTP algo.
    The thing is that XR ntp clock selection is a bit different then iOS and follows the specs very closely which results in this erroneous loss behavior.
    For instance, you could also see this issue with a sync loss if the update time is only 500msec off what it was before and that will result in a ntp sync loss rather then adjusting to it.
    Also I wanted to mention that the ntp prefer is a bit of a misnomer in XR (since it follows the specs differently then IOS) and this knob was taken over from IOS really.
    You might get some joy if you set it to one server only and see if that helps?
    regards
    xander

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • Creating sub vis and projects

    Hi, 
    I am currently working on a project which involves a large chunk of Labview programming. I am new to Labview but am relatively experienced with C. I have designed an algorithm for C that I am currently trying to "translate" into Labview. The algorithm I have designed is a very modular piece of code, I have used a lot of smaller functions and called them in main rather than writing the entirety of the code in main. 
    My problem is that I don't really understand the difference between Labview projects and using one main VI to call other subVIs. I am unaware of whether I would be better off using sub VIs held together in one main VI or would I be better to use a Labview project. I am on a very tight schedule as it is a rather large project so I don't have a lot of time to experiment with my code-writing. 
    Does anyone have any advice on which approach is better/easier for an inexperienced user or if they are both pretty much the same?
    Gillian

    Projects and subVIs are completely unrelated concepts.
    The project is a means of organizing all the parts of the system you need to develop a program and build it into an executable.
    A subVI is just any VI which is used as a part of another VI.
    You need both.  When you open LabVIEW to start writing your code, create a new project and then keep your main VI and all subVIs and other parts like customized controls in the project.  Since you are an experienced programmer and have a modular design for the implementation of your algorithm, you can move those concepts directly to LV.
    SubVIs should be logical groupings of code such as the smaller functions in your algorithm.  The entire algorithm could be contained in a subVI which has those functions as subVis in the algorithm VI.
    Lynn

  • Break sap standard role into two sub roles

    hi,
    i have one SAP standard role. now i want to break this role into two  sub roles. how shall do it.
    please suggest me.
    regards
    ramesh
    Edited by: Ramesh Sammiti on Jul 31, 2008 11:00 AM

    Hi Ramesh,
    When you say that you want to split the SAP Standard role into two roles:
    1.Do you mean to say that you want to split the transactions and authorization data of the SAP Standard role into two separate Z* or Y* roles?
    2.Do you want to copy the SAP Standard role into two different Z* or Y* roles and then modify the authorization data according to your company's requirements?
    In the above two scenarios you must copy the SAP Standard role into Z* or Y* roles in PFCG transaction with the appropriate naming convention and make necessary changes in both the transaction data and the authorization data.
    Please be clear which SAP Standard role you are willing to split into roles and i can provide more details.
    Hope this helps.
    Regards,
    Kiran Kandepalli

  • How should I share a cluster across several sub .vis? Best practices? Current problems...

    I'm trying to share a cluster across several sub .vis.  I've written a save / load settings function that basically stores these settings in a static variable (full .vi attached):
    Questions: 
      1. Is this an appropriate practice?  (using a sub vi to share data)
      2. My program settings appear to be lost occasionally and reset to their default values.  This bug is rare, and it's hard to see what's causing it.  Could this be caused by my "save / load settings"?  Would this .vi result in race conditions or something weird if I use it in many places (and sub vis)?  I've disabled reentrant execution.  
    The "save / load settings" vi above uses a sub vi to initially read the settings from a binary file and save them each time they are changed (saved).  I initialize the "save / load settings" by loading the settings from text the first time this function is called.  
    Thanks!
    Attachments:
    Save and Load Settings.vi ‏82 KB
    Save and Load Binary File.vi ‏62 KB

    What you are doing is generally called a LabVIEW 2 Style Global or an Action Engine. It is a valid way to store data for use across subVIs. Rather than use first call why not have a specific action to initialize the data? The code is a bit more readable. Though you can use first call as you have.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Show front panels of sub VIs when running a EXE (build application)

    I've created a exe file and it works fine. However, it only shows the front panel of main VI and I can not open sub VIs (it looks like they are all hidden). I know it can be done by creating a library file along with this exe file, but that's not what I want. I want to create a single exe file that shows several front panels, and that can be run with run time engine. Is there any way to show front panels of sub VIs by running a exe file?

    In the development mode, how are you displaying the front panels? Did you right click on the subVI and select SubVI Node Setup and choose 'Show Font Panel when called/Close afterwards if originallly closed' or did you choose the same options from VI Properties for each subVI. If the second, then the app builder will automatically retain the front panels of the subVI. If you chose the first option or if you are using VI Server to open a front panel, then the default setting in the app builder is to remove the front panels. You would then have to go the VI Setting tab in app builder and edit the settings.

Maybe you are looking for

  • Photoshop elements 4.0 日本語版mac用 ユーザー登録できない件

    現在Photoshop elements 4.0 日本語版mac用 を使っています. 購入後にユーザー登録忘れていたので. 昨日 Adobe ID Webページからユーザー登録しようとしたら. シリアル番号(10570208769231063245****)が存在しないと言われました. 何が原因でしょうか?

  • Safari has no graphics just a black screen

    Safari has no graphics just a black screen, This is from launch, the button and window frame are ok but the text look a bit odd on the bookmark bar and the url field is black and the content of the window are just black. I have reinstalled it with a

  • Connection name not defined

    I recently upgraded JDeveloper to 11.1.2.2.0 and now when I try to run the sample from The Ultimate Human Resource I get the following error: <DCBindingContainer> <cacheException> [74] * * * BindingContainer caching EXCEPTION:oracle.jbo.JboException

  • Attach Word Docs to a Record in Oracle Forms

    Hello All, I am trying to attach an MS Word document to an Oracle Record in Forms 6i (in e-business suite). I found mention of using the OLE feature to do this. Unfortunately there wasn't much detail in the explaination. 1. What kind of field is the

  • Crystal Reports XI via ODBC to Lotus Domino Database - crashes client

    As soon as I attempt to connect a CR XI report via ODBC to a particular Lotus Domino database my Crystal client crashes with the below error message in the event viewer. I regularly connect to other Lotus Notes databases but this one crashes my clien