How to use a timer together with an event.

Dear All,
Today I tried all day to accomplish someting with labview, but I didn't succeed. Perhaps you can help me.
The problem is as follows. 
I have an event structure inside a while loop. The events are all triggered by booleans. Those booleans initiate
for instance some pumps or  other apparatus. The time-out is put at 200ms and inside the time-out structure 
are some GET function (for instance to obtain the values of some balances and to do some calculations with those obtained values.
Now I would like to be able to start an experiment. This means by pressing a boolean initiate the experiment. This experiment involves 
the starting of a timer and after every 10 minutes, the obtained/calculated data (from the time-out) structure should be written to a .xls file.
I'm not able to programm this part of the program. My first problem is that I need an event (triggered by a boolean) that start a timer. This timer should run always (independant of other events) until stopped by another boolean. After every 10 minutes this timer should initiate (with a boolean?) the data writing to a .xls file.  Can this be done by resetting the timer after every writing event?
So I have multiple questions, but my main question is how to build an event which is trigger by a boolean and then initiates an overall timer.
Thanks! 
Bio

OK.  That worked.
You have made all the mistakes self-taught beginners with LabVIEW make, except that you apparently have a pretty good idea of what you want your program to do.
1.  LV is a dataflow language.  This means that any node which has all its inputs satisfied can run and once started any node runs to completion before another starts.  In your event case the timeout case will execute 200 ms after the loop starts (assuming the user did not push a button before that).  The Waits in the sequence frames mean it will be at least 555 ms before the timeout case completes.  200 ms later is will run again, if not other event has occurred.  Furthermore, you do not know whether the Waits will run before or after the other code in each od the sequence frames because there is no data dependency between the Waits and that other code.
2. A matter of style: It is recommended that front panels and block diagrams do not exceed one screen size.
3. Local variables violate the dataflow paradigm and are almost always unnecessary.  The WIRE is the variable.  Connect things via wires not local or global variables.  You will also need some shift registers.
4. Sequence structures are almost never required.  One exception: Single frame structures around something like the Wait function which does not have error clusters for dataflow.
5. Look at the Producer/Consumer Design Patterns which come with LV.  File >> New.. >> VI >>  From Template >> Frameworks >> Design Patterns..  The events version will be useful.  Also learn about state machines.  That architecture is versatile, powerful, adaptable, and much more likely to get you to where you need to be with your program.
6. The events will all be queued up in the internal event queue.  It just takes a long time for your program to get to them.  I like to keep the code in every event case simple enough that it executes before the user could get to the next button. The queued message handling in the Producer/Consumer takes care of this.
7.  You probably should have an event for Stop experiment.  It would send a command to the consumer loop to shut down all pumps, close files, and any other "cleaning up" which needs to be done before stopping the program.
This may seem like a lot, but you have most of the pieces.  Some re-arrangement and re-organization will help a lot.
Lynn 

Similar Messages

  • How to use airport time capsule with multiple computers?

    I'm sure there are some thread about this but i couldn't find it... so sorry for that but hear me out! =)
    I bought the AirPort Time Capsule to back up my MBP
    And so i did.
    then i thought "let give this one a fresh start" so i erased all of it with the disk utility and re-installed the MBP from the recovery disk.
    I dont want all of the stuff i backed up just a few files and some pictures so i brought that back.. so far so good.
    Now i want to do a new back up of my MBP so i open time machine settings, pick the drive on the time capsule and then "Choose" i wait for the beck up to begin, and then it fails.  It says (sorry for my bad english, im swedish haha) "the mount /Volume/Data-1/StiflersMBP.sparsebundle is already in use for back up.
    this is what i want:
    i want the "StiflersMBP.sparsebundle" to just be so i can get some stuf when i need them. it's never to be erased.
    i want to make a new back up of my MBP as if it's a second computer...
    so guys and girls, what is the easiest and best solution?
    Best regards!

    TM does not work like that.
    If you want files to use later.. do not use TM.
    Or do not use TM to the same location. Plug a USB drive into the computer and use that as the target for the permanent backup.
    Read some details of how TM works so you understand what it will do.
    http://pondini.org/TM/Works.html
    Use a clone or different software for a permanent backup.
    http://pondini.org/TM/Clones.html
    How to use TC
    http://pondini.org/TM/Time_Capsule.html
    This is helpful.. particularly Q3.
    Why you don't want to use TM.
    Q20 here. http://pondini.org/TM/FAQ.html

  • How to use my Time Capsule with my Router?

    My Time Warner Cable HS connection uses a specific modem, the Motorola Surfband SBG6580.
    I was currently using my Tiem Capsule as my router and just a Cable Modem from Time warner, but this particular service uses this wireless router. I need to get my Apple Time Capsule back into my netowrk.
    I would either like to understand how to use the Motorola as a switch or just as a modem so I can use the Time Capsule as my router or vica versa, use my Time Capsule as just a back up drive and leave the Motorola as my rwireless router. The onyly thing about this second configuration is that I need to connect to the Time Capsule wirelessly with one of my computers for back up, the other two are both on an ethernet port hard wired.
    So this is what I have to put in place:
    Motorola Wireless Cable Modem
    Time Capsule
    5 Port EasyNet Switch
    iMac Desktop (Ethernet hardwired)
    Macbook (Ethernet hardwired)
    MacBook (wirelessly connected to the network)
    Any thoughts great appreciated.
    Henry

    It's likely that your ISP will require that the Cable Modem is the first device in the chain. You do need to set the Time Capsule to Bridge mode, disabling the DHCP. Now, the Cable Modem is providing DHCP to devices that connect to it, and devices that connect to the Time Capsule.
    You will be able to wirelessly connect to the Time Capsule and network.
    Here is a simple article explaining:
    http://www.ehow.com/how5309467bridge-time-capsule-mac-pc.html

  • How to use function module together with tables in Crystal Report?

    Dear all expert,
    I have the following situation where I need to use a function module in my crystal report, But how can I link the FM with the tables so that I can pass out some value from the FM to the report?
    Thank You.

    Hi,
    Hope the following helps..
    1)
    LOOP AT IT_OUTPUT.
    Call the function module to get the tracking number and store the output in the
    variable V_TRACKINGNO.
      IT_OUTPUT-TRACKING_NO = V_TRACKINGNO.
      MODIFY IT_OUTPUT TRANSPORTING TRACKING_NO.
    ENDLOOP.
    2) Date conversion
    DATA: V_CHAR(10) VALUE '2006.11.17'.
    DATA: V_DATE       TYPE SYDATUM.
    CONCATENATE V_CHAR(4) V_CHAR5(2) V_CHAR8(2) INTO V_DATE.
    WRITE: V_DATE TO V_CHAR MM/DD/YYYY.
    WRITE: / 'MM/DD/YYY Format - ',  V_CHAR.
    Please make sure to reward points for helpful answers..
    Thanks,
    Naren

  • How to use elapsed time function with state machine in Lab VIEW

    Hello
    I've been trying to use state machine with elapsed time function in order to sequentially start and stop my code. The arrangement is to start the code for 1 minute then stop for 5 minutes. I've attached the code, the problem is when I place the elapsed time function out of the while loop it doesn't work, on the other hand when I place it inside the loop it does work but it doesn't give the true  signal to move to the next state. 
    Could you please have a look to my code and help me to solve this issue.
    Regards 
    Rajab
    Solved!
    Go to Solution.
    Attachments:
    daq assistance thermocouple(sate machine raj).vi ‏436 KB

    Rajab84 wrote:
    Thanks apok for your help
    even with pressing start it keeps running on wait case 
    could you please explain the code for me, the use of Boolean crossing, increment , and equal functions 
    Best Regards 
    Rajab 
    OK..I modded the example to stop after 2 cycles. Also recommend taking the free online LabVIEW tutorials.
    run vi. case statement goes to "initialize", shift registers are initialized to their constants. goto "wait"
    "start"= false, stay in current state. If true, transition to "1 min" case
    reset elapsed timer with True from shift register(counter starts at zero)."time has elapsed"=false, stay in current state(1 min). If true, goto "5min" case
    reset elapsed timer with True from shift register of previous case(counter starts at zero)."time has elapsed"=false, stay in current state(5 min). If true, goto "1min" case. Also, bool crossing is looking for "true-false" from "5 min" compare function to add cycle count.
    Once cycle count reaches 2, stop while loop.... 
    Attachments:
    Untitled%202[1].vi ‏42 KB

  • How to use my time capsule with windows vista

    i have a 2tb time capsule iphone 3gs appple tv and a ipad 2 the wife and kids have iphone 3gs and 4 and id like to set up a home network for us all to use and share music and photos is this possible

    Sorry the title never gets into detail at any point.. no vista computer is listed.
    Access the vista computer to TC turn on the guest network and allow full read write access. Make sure you have the workgroup set correctly. There are issues sometimes on the windows side but try that.
    As for using the TC as a file store.. well it isn't a good idea. It is a backup device.. which has no ability to back up itself. There is no mirrored disks and one day it will die and you can say bye bye to your precious photos and music. You can work your way around the issue.. sure.. in the end you will need an alternative backup on a computer.. that alternative backup will then be backed up to where??
    If you must run your itunes and iphoto library on the TC just read about how to set up the libraries in network location. Google will find the posts.
    http://gigaom.com/apple/using-time-capsule-as-a-media-drive/
    You perhaps should read all the other posts about why not.. as well as how to.

  • How to use the time capsule with my existing router?

    Here is my situation. I have Alltel PCD UM185 USB modem for their mobile broadband internet. I have a Cradlepoint MBR1000 router which I plug the usb modem into to share the internet through a wireless network which has WPA security on it. I want to use my 1TB time capsule to backup the computers in my house wirelessly and not as a router. What connection do I need to make and how to do I setup the time capsule this way? I can't figure it out. Thanks for any help in advance. If you need more information just ask.
    Thanks,
    John

    Steven's solution will work just fine if you want to connect the Time Capsule using ethernet.
    You might also consider configuring the the Time Capsule to "Join" the wireless network. In this type of configuration, backups would occur only over wireless and you could locate the Time Capsule virtually anywhere it can receive a good, strong wireless connection. Important Note...the ethernet ports on the Time Capsule are not enabled in this type of configuration, so you will not be able to connect using ethernet.
    Open AirPort Utility and click Continue
    Then select the option to "Join a wireless network" and follow the prompts

  • How to use a time capsule with dsl

    How do you hook up a time capsule if you have dsl Internet connection?

    Connect an Ethernet cable from the DSL modem to the WAN "O" port on the Time Capsule, just as the Setup Guide illustrates.
    Time Capsule 802.11n (4th Generation) - Setup Guide

  • How can I use my time capsule with Ethernet cable? How is it also possible to use time capsule as a normal external hard drive?

    My problem is that I don't know how to use my Time Capsule with Ethernet Cable, as when I use wireless it is really slow.

    Make sure that there is an Ethernet cable from one of the LAN <-> ports on your modem/wireless router to the WAN port on the Time Capsule
    Click on the Wireless tab at the top of the page
    Change the setting for Wireless Mode to Off (I assume that you do not want the Time Capsule to provide a wireless network since you already have a wireless network)
    Next, click the Internet icon at the top of the screen, then click the Internet Connection tab
    Connect Using = Ethernet
    Connection Sharing = Off (Bridge Mode)
    Click the Update button at the bottom and wait 30 seconds for the Time Capsule to restart and display a green light
    Then, you must power off your entire network...all devices....in any order that you want
    Wait a minute
    Start your modem/router first and let it run a minute
    Start the Time Capsule and let it run a minute
    Keep starting devices one at a time until everything is powered up
    If you are using Time Machine for backups, you will need to reset the connection because you have changed the way in which the Time Capsule connects to your network
    Open System Preferences (gear icon) on the dock
    Open Time Machine
    Click Select Disk
    Click the Time Capsule to highlight it
    Click Use for Backup or, it might be Use Disk
    Now you can connect your Mac using an Ethernet cable to one of the LAN <-> ports on the Time Capsule to back up using Ethernet. Be sure to turn off the wireless on your Mac before you start the backup.
    If you want to backup using wireless, disconnect the Ethernet cable from the Mac to the Time Capsule and turn on the wireless and connect to your wireless network. Your computer will now backup using wireless.

  • How can I use my time capsule with windows7

    How can I use my time capsule with windows7?

    This is asked regularly.
    https://discussions.apple.com/message/10978060#10978060
    Look at the more like this. On the right column next to the post.
    Load airport utility for windows.. which will also load bonjour for windows.
    In windows explorer type \\TCname or \\TCipaddress (replacing with the actual values.. names with spaces will give you trouble so change all names in the TC to SMB compatible or actual ip address).

  • How to use airport time capsule on a dell portable pc with windows 7 taking in consideration that Time machine doesn't run with Windows ?

    how to use airport time capsule on a dell portable pc with windows 7 taking in consideration that time machine doesn't run with Windows ?

    TM does not work like that.
    If you want files to use later.. do not use TM.
    Or do not use TM to the same location. Plug a USB drive into the computer and use that as the target for the permanent backup.
    Read some details of how TM works so you understand what it will do.
    http://pondini.org/TM/Works.html
    Use a clone or different software for a permanent backup.
    http://pondini.org/TM/Clones.html
    How to use TC
    http://pondini.org/TM/Time_Capsule.html
    This is helpful.. particularly Q3.
    Why you don't want to use TM.
    Q20 here. http://pondini.org/TM/FAQ.html

  • I have used Airport Time Capsule with my iMac for several years. I recently purchased a MacBook Air and when it tried to backup to Time Capsule it couldn't because Time Capsule is full. How can I now use the 3TB Airport Time Capsule to back up both?

    I have used Airport Time Capsule with my iMac for a couple years. I recently purchased a MacBook Air and when it tried to backup to Time Capsule it couldn't because Time Capsule is full. How can I now use the 3TB Airport Time Capsule to back up both the iMac and MacBook Air? I don't mind losing earlier backups. I have excluded some items from backing up, but since the Airport Time Capsule is full, I can't even begin to back up the MacBook Air.

    On your Mac.......
    Open Finder > Applications > Utilities > AirPort Utility
    Click on the Time Capsule icon, then click Edit in the smaller window that appears
    Click on the Disks tab at the top of the window
    Click Erase Disk
    On the next window that appears, select the Quick Erase option, then click Erase
    The operation will only take a few minutes.
    Now you are ready to start new backups of both Macs.  Back up one Mac first, then back up the other.  Do not try to back up both Macs as the same time.

  • How to use Real time execution trace toolkit with Dual-core processor??

    hi there
    the situation as follows:
    i have a computer (PC and Laptop) types with Dual-core processors, and am trying to do simulation using Multi-core technology and based on different simulation scenarios...starting from sequantial processing,.......Piple lining processing strategy. so that i can differentiate the time delay between those types of processing based on (Using 1 processor then dual-core processor Computers)
    my question is: As i read through Ni's white papers i saw many notes refer to Real-time execution trace toolkit to investigate the (processing-time , etc) of multi-core processors in processing diffenent algorithms. My algorithms are to be run on 1 computer with dual-core processor BUT, not in real time environments, that is ( No hardware to be connected to my pc) only algorithms running on my pc....
    So, is it possible to use Real time execution trace toolkit  or anyother tools in LabVIEW to show processing-delays and/or anyother timing critical issues without using my application for  real- time hardware.???
    in other words: how to use Real time execution trace toolkit  in non-hardware and/or real-time scenarios???
    please help me in this.
    Any suggestion, comments, feedback.....is absolutely highly appreciated
    thanks a lot in advance
    Labview Lover

    Hey,
    The Realtime Execution Trace Toolkit only works for NI RT Targets.
    But you can use the Desktop Execution Trace Toolkit, just search for it under ni.com.
    Christian

  • How to set up time capsule with BT Infinity

    how to set up time capsule with BT Infinity

    The easiest and sure way is to use bridge on the TC as the method of connection. The TC then becomes a device in your network and gets its IP from the main router that I presume BT supply.
    Method is,
    1. Plug the TC WAN port into the BT supplied modem by ethernet.
    2. Plug the computer you are using for the setup into the TC by ethernet.
    3. Run the airport utility .. go to internet tab on the top menu..
    In the bottom option, Connection Sharing choose off (bridged mode)
    4. Go to the wireless page and setup wireless connection as you like it.. using whichever band you want. And make sure security is set to the highest setting, wpa2 personal. Put in a decent wireless passkey.
    5. Press the update and fix whatever else the TC will show as needing fixing.. usually security stuff.
    6. You can then disconnect the ethernet and connect by wireless if you want. Any port on the TC will now be a LAN port, including WAN.
    This is assuming BT supply a wireless router with built in vdsl/other type of modem. If so you normally will not be able to bridge the modem, unless BT are using pppoe authentication which they haven't in the past.
    If you really need to use the TC as a router then you will need to work out an alternative method. You can double NAT by placing the TC in the DMZ of the BT router if that is an option. It is not without issues in general.

  • I use floating time zone with all of my iCal entries.  But then the times of the entries do not print when printing month view.  Is there a fix for this?

    I use floating time zone with all of my iCal entries.  But then the times of the entries do not print when printing month view.  Is there a fix for this?

    Sorry to have repeated this question as if I were answering it.  Just a mistake.  I'm just now learning how to use this site.

Maybe you are looking for