How can i execute in the same block diagram two separate labview codes each one with diferent execution timings?

Hello guys. I have been trying to solve this by a long time now...but i cant solve it....
I have my main code in labview beying executed in one timed loop of 1second.....but now i need to pulse a lazer very fast than one second...
my ideia was like executing the lazer pulse code in paralel with the main code but with a mutch faster timed loop....but when i put the second timed loop outside of the main one....it hapens that the aplication keeps runing only the faster loop and the main loop doesnt run....
I really dont know how to solve this....
many thanks
JOSE

JOSE,
your code is really difficult to read. Please do some cleanup work, your diagram should be only little larger than an average computer screen. What I have glanced so far is that your code has a lot of beginner mistakes (overuse of local variables).
For multi-loop applications, you shoul have a look at the tutorials concerning Producer-Consumer design pattern. The quick and dirty approach is to use locals (a bit contradictonary to suggest using locals here after I stated an overuse of them). The drawback will be, that you lose the latch mechanism of the button and must code it on your own (and make a big set of mistakes, using locals always attracts race conditions). Most important is that you write to your button only once, after all loops have finished spinning.
Felix
www.aescusoft.de
My latest community nugget on producer/consumer design
My current blog: A journey through uml

Similar Messages

  • Urgent Help! How can i execute in the same block diagram two separate labview codes each one with diferent execution timings?

    Dear All.
    I have 2 application progrlams in the same block diagram. the intention is to use  the 2 programs at different excuting time for different application, and each have stop and start button ofcourse i will have master stop. But when i run the program, it only works one program at time , that is the 1st block which i make it active only , when i tried to make active the second block it will not work, only works when i stoped the1st one. So, this it to request ur hlep how can i solve my problem. here i have attached some of  my program.
    Regards!
    Solved!
    Go to Solution.
    Attachments:
    2_block application.vi ‏14 KB

    Usually you set up a task that has all the channels from all the modules configured. When a loop starts it reserves that task and the cDAQ can't be used by other loops unless you start and stop tasks.
    You can have one loop acquire all the data and if you want certain channels to go to other loops you can use the producer/consumer design pattern. If you wanted a third loop you would add another queue and the third loop would dequeue that data. See attached.
    Eric
    Attachments:
    prod-cons.vi ‏69 KB

  • How can I return to the same position in the calling order details form

    I am Calling a form for creating a new item from order details form, so after creating The new item I want to returned the item code to the calling form to same position in The order details form , how can I return to the same position in the order details form
    Waiting for your valuable answer .
    Best regards
    Jamil Alshaibani

    Dear Friends
    My actual problem description as the following
    I have a form for production order screen , and this form contain header and details blocks , so the user in the details will select Type Code , and he will go the next field that is Item Code Field search for specific Item Code if it is not exist he has to call the Item Definition Form by using this script
    CALL_FORM(ITEM_DEFINITION);
    Then when he finished defining the Item , and I assign the item code as the following in the :
    WHEN-BUTTON-PRESSED TRIGGER
    :GLOBAL.ITEM_CODE_VAR := :ITEM_CODE;
    DO_KEY('exit_form');
    But I don't know where to keep this assignment
    :ITEM_CODE := :GLOBAL.ITEM_CODE_VAR;
    inside the caller form in which trigger do I have to use when it return from the caller form it should assign the :GLOBAL.ITEM_CODE_VAR to the :ITEM_CODE and the cursor it should show inside the ITEM_CODE , and as I mention it does not return to the same location of The ITEM_CODE when it return from the calling form
    Waiting for your valuable answer .
    With example please .
    Best Regards
    Jamil Alshaibani

  • How can I save to the same map every time when printing pdfs?

    How can I save to the same map every time when printing pdfs?
    Finder points to the document map even when I chose a different map recently.
    I often print series of pdfs from the print dialog box, I'd like to choose the map to save to and then have all subsequent pdf prints automatically directed to the same map until I decide otherwise.

    that link seems to be broken right now:
    403 Error - Forbidden  - No cred, dude.

  • I have itunes on a mac with 2 users but the library only shows on the main user how can both users have the same library?

    i have itunes on a mac with 2 users but the library only shows on the main user how can both users have the same library?

    Hi,
    Have a Look at these Links on Home Sharing:
    http://support.apple.com/kb/HT4620
    http://support.apple.com/kb/HT3819
    Could be what you need...
    Cheers,

  • HT1338 i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created.

    i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created. As i dont have the access to the earlier id anymore.

    You cannot. The apps are assigned to that Apple ID and there is nothing you can do to change that. You could choose to download them again with the new Apple ID, any paid apps will need to be purchased again.
    Hope that helps.

  • Hi. I purchased a new ipad mini and my brother already has iphone 4,so how can i avoid sharing the same contents that are on his phone? Will creating an other apple id help us in seperating our facetime and icloud accounts as we share our laptop to sync ?

    Hi. I purchased a new ipad mini and my brother already has iphone 4,so how can i avoid sharing the same contents that are on his phone? Will creating an other apple id help us in seperating our facetime and icloud accounts as we share our laptop to sync ?

    Have a read here...
    https://discussions.apple.com/message/18409815?ac_cid=ha
    And See Here...
    How to Use Multiple iDevices with One Computer

  • I can not join my Apple extreme with the Apple express. I shows a conflict in the network! I've tried everything. How can they join on the same network?

    I can not join my Apple extreme with the Apple express. I shows a conflict in the network! I've tried everything. How can they join on the same network?

    It says that my DHCP has to be changed! How? to what?
    It is 802.11g.express. but is set to default by the computer (Macbook Air).
    The other is 802.11n. (express)
    Extreme is 802.11.g. Is the Main Airport.
    It is on ethernet & wep 128 security.

  • How can i use in the same time input line and mic to recorder in several track whit SONAR

    I have beem recording only input line because SONAR 4 not recognized the mic in, Help me!!!.
    Thank you. Sorry for my english

    LIMACAR wrote:
    How can i use in the same time input line and mic to recorder in several track whit SONAR 4. I have beem recording only input line because SONAR 4 not recognized the mic in, Help me!!!.
    Thank you. Sorry for my english
    Depending on which soundcard you have there, but if your card is capable for
    ASIO -> activate I/O drivers on Sonar/Options/Audio/Drivers -tab (mic/line sources should be listed there --> activate) and select the mic or/and Line sources on tracks "I" - dialog
    WDM/KS -> use the Surround Mixer or windows recording controls for recording source selection (mic should be listed there)
    MME32 - > same w/ WDM/KS
    If you use Asio4All --> same w/ WDM/KS & MME32
    No mic and line source simultaenously w/ WDM/KS and MME32.
    You perhaps be able to do this w/ kX drivers.
    jutapa
    ADDED:
    You can also install modded version of Audigy 2 drivers/software but I have never done this w/ Li've! 5. so I can't be sure if you get ASIO support for your card.
    Here are the instruction --> http://www.tech-pc.co.uk/audigy-2.php
    jutapaMessage Edited by jutapa on 05-25-2006 02:48 PM

  • TS1424 I downloaded a song that I purchased from the ITunes store, but the song does not play properly.  How can I re-download the same song without having to purchase it a second time?

    I downloaded a song that I purchased from the ITunes store, but the song does not play properly.  How can I re-download the same song without having to purchase it a second time?

    I could not find an option to "report a problem".
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not playing properly. If you can't see "Report a Problem" next to the entry, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.
    (Not entirely sure what happens after you click that link, but fingers crossed it should be relatively straightforward.)

  • How can i buy again the same software from the same mac? (where it is installed and runs ok: it is for licences issues)

    How can i buy again the same software from the same mac? (where it is installed and runs ok: it is for licences issues)
    Thanks for your help.

    Hi ..
    You can redownload previously purchased apps from the App Store using the same Apple ID on all your authorized Macs for free.
    How to re download apps from the Mac App Store:
    Open the App Store. From the menu bar click Store > Sign In
    Click Purchases from the top of the App Store window.
    Select which apps you want to re download. Then right or control click where you see Installed  then click Install.
    Make sure and use the same Apple ID used for the original purchase.

  • How can I buy again the same song ?

    How can I buy again the same song ?

    Hi ..
    You can redownload previously purchased apps from the App Store using the same Apple ID on all your authorized Macs for free.
    How to re download apps from the Mac App Store:
    Open the App Store. From the menu bar click Store > Sign In
    Click Purchases from the top of the App Store window.
    Select which apps you want to re download. Then right or control click where you see Installed  then click Install.
    Make sure and use the same Apple ID used for the original purchase.

  • Multiple sub vi's in the same block diagram

    Hello,
    I'm brand new to LabVIEW and have been going through examples and trying to get to know the program, but I can't seem to find the right one to show me how to have multiple sub vi's on the same block diagram, but with separate front panels.
    What I'm trying to do is have a sub vi that can be toggled on and off from the front panel and have a second sub vi run and open a new front panel/gui when a second button is pressed on the main front panel. I would also like it if the second button required the first button to be in the off position in order for it to be turned on.
    The goal is to have a continuously updating scale system(First sub vi), but be able to recalibrate when needed(Second sub vi).
    If you could help or just point me in the direction of some relevant examples I would greatly appreciate it.
    Thanks in advance,
    dnorman

    All of the features you're asking for are very easy to add and control in LabVIEW once you know what you're looking for. To show the Front Panel of a SubVI, open the VI and navigate to its "Customize Window Appearance" window (this is in File>VI Properties, select Category: Window Appearance, then click "Customize"). Check the "Show Front Panel when called" checkbox.
    However, there are quite a few other properties you'll likely want to edit as well, so it would be best to review the LabVIEW Topic: "Customize Window Appearance Dialog Box".
    In your main VI, put the SubVI in the True case of a Case Structure, then connect your button to the selector terminal. The more complex behavior your asking for can be achieved using multiple case structures.
    Matt Kirk
    Inventor of ImageJVI

  • My husband  and I share the same apple Id for our iphones, now each one has different contacts, email, pictures, information, etc how coul I change the id of my iphone without delete any information?

    My husband  and I share the same apple Id for our iphones, now each one has different contacts, email, pictures, information, etc how coul I change the id of my iphone without delete any information?

    Welcome to the Apple Community.
    Deleting an account from a device will not delete the information from the account, if that is what you are asking.

  • How can I transfer photos from my iphone to my computer without emailing each one to myself

    how can I transfer photos from my iphone to my computer without emailing each one to myself, and I thought they would be in icloud but I can't find them

    Pics taken with the iphone are imported to your computer as with any other digital camera ( as explained in the manual).
    Pics synced to your iphone from your computer should still be on the computer.
    iOS: Importing personal photos and videos from iOS devices to your computer

Maybe you are looking for

  • IOS SSL VPN WITH RADIUS Authorization

    Hi I'm trying to authenitcate and authorize  the users loggining into SSLVPN via ACS and although the ACS loggs and "TEST" command on the router shw succeeful authentication i receive the flollowing debug *Jun  6 22:39:50.157: %SSLVPN-5-SSL_TLS_CONNE

  • I am unable to install iTunes on Windows 7 (Strange issue)

    The issue:  I previously had iTunes on a windows install, I migrated to a new computer and a new hard drive for the OS.  Now when I try to install iTunes it gets half way through the opening bar where its calculating space then it tells me "The folde

  • Oracle Timestamp and java.util.date

    Greetings, [Enviroment] oracle 10g Express jdbc 10.2.0.1.0 thin driver windows Xp professinal [problem] I fetched a value of timestamp. And I faced An Error that "java.sql.SQLException: Cannot set lastup_dt: incompatible types." We define data type o

  • Best compression for broadcast video

    Hi I need to compress a very short piece for broadcast (5 sec, no audio). What is the best compression to keep it around 25Mb?

  • Flash Builder 4.0 and Flex 4.5 SDK Errors

    I'm having issues using 4.5 in FB 4.0 Every time I create a new project and target 4.5 I get the following errors: Description Resource Path Location Type 1084: Syntax error: expecting rightbrace before css testing Line 24 Flex Problem 1084: Syntax e