Need to record data for 4 hrs at a rate of every 30s

Hello,
I'm fairly new to LabVIEW and need assistance. I have this VI that manually records torque and temperature by hitting a button. I want to alter it so that when I run the program  I can automatically collect data every 30 sec for 4 hrs and then the program stops. Any help would be appreciated. I have attached the VI. 

Bob_Schor wrote:
One of the most difficult things for people new to LabVIEW to avoid is the temptation to "just start coding" -- as often as not, you end up with a bunch of (often Express) VIs wired together that do something, but rarely what you want it to do.
I recommend starting with thinking about the overall design, asking yourself "What do I want to do?".  In your case, it sounds like "Record data (not yet defined) every 30 seconds for 4 hours".  Now break this down -- what does "record data" mean?  How much data?  How many channels?  What data rate?  What do you want to do with the data?
This might be a "unit" of your code, that is, this "Data Recording Block" might, in some ways, stand alone.  One way this could happen would be if you recorded, say, 5 seconds of data, wrote the data to a uniquely-named file, then stopped recording.  "Aha!", I (don't) hear you saying, "this should be written as a sub-VI called "Save Some Data" that I put in my main program and call every 30 seconds until 4 hours have gone by".
What is this isn't your model?  Maybe you want to start data acquisition, keep it running, and every 30 seconds save some aliquot of the data to a file.  Fine, but that's another Design Decision that you should make before starting to code.  This kind of model sounds liek it might be a Producer (continuous data acquisition)/Consumer (periodic saving of the data) design, with the Consumer "worrying" about saving, say, 5 second aliquots of data every 30 seconds for 4 hours.  This last bit (namely getting the Consumer to "do its thing" properly) might be handled by a State Machine design ("Save to File", "Wait for next Sample Time", "Count Elapsed Time").
Here is a piece of Good Advice -- never put an "Abort LabVIEW" command in your program!  Notice you have a Stop button to stop the loop, and can OR wire the output now going to the Abort to the same Stop indicator.  Use Abort in the rare instance where failure to instantly kill the program will result in someone's death or injury -- you're not yet ready to code at this level.
Bob Schor
To expand on this idea, I usually write up at least a "casual" requirements document - even if it's just a few paragraphs - and code each "requirement" as a subVI.

Similar Messages

  • Need to get data for month entered in  user prompt to prior 12months.

    Hi,
    I have a report where i need to display total amount for current month  to prior  12 months data...first column will be current month, second column is (current month-1),3rd col: (current month-2)....( current month-12).
    Is there any way I could use current date to get previous 12 months in  variables?
    For example: if  current date is 02/15/2010, I need get  data for 01/2010, 12/2009, 11/2009,....01/2009.
    For example: if I entered Month: 03  and year:2010 in prompt , then I need to get data for prior 12 months to that in the prompt for month:03?.

    The only way to do this is using restrictions on Universe... here you can have the restrictions for every month or a range using the user prompt and the system date.
    Regards

  • I am an MBA student , doing a research project on e-learning authoring tools, would like to find out no. of licences sold/active to date for adobe captivate. how many get sold every year. any pointers/help is appreciated. cheers.

    I am an MBA student , doing a research project on e-learning authoring tools, would like to find out no. of licences sold/active to date for adobe captivate. how many get sold every year. any pointers/help is appreciated. cheers.

    I doubt you'll get an answer in a user forum, sorry. This forum is meant for users to help other users when they have problems that have to be solved. You should contact Adobe itself.

  • Recording data for power spectral density

    Hello
    I need to record the power spectrum for a duration of 2 weeks for 2 hours per day. I can get the averaged power spectrum for the 2 hour duration per day as it is embedded in the Power Spectrum Function. Is there a possiblity of saving the data to some Excel file and later calculating the averaged power spectrum for the whole 2-week duration..
    Please Help. Thank you.

    I was save the data into a TDMS file.  The API is fairly simple and there is a free add on to view the data in Excel.
    You can later also read the TDMS file and do whatever averaging, etc you want to do with the data.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Need some sample data for obiee practice

    Hi All,
    I installed OBIEE 11.1.1.5 using SQL SERVER 2005.
    Can someone help me out some sample data for practise purpose other than sampleapplite
    Thanks,
    SatyaB

    The full version of BI Sample Application (not the lite) has a pretty good amount of sample data for practice. Have you tried using it?
    http://www.oracle.com/technetwork/middleware/bi-foundation/obiee-samples-167534.html

  • Can I use PA period date for Project Functional currency exchange rate instead of EI Date?

    Hi,
    We are planning to enable project currency for our projects. However while testing we have encountered one challange. We want to use PA date for all our currency conversions. However Oracle uses EI date to convert project functional currency transactions.
    Does anybody know any setup or solution to convert all expenditure item transactions based upon PA date instead of EI date? Help / Solutiion on this regard is highly appriciated.
    Thanks & Regards,

    Hi,
    Do u mean you have already done your Trx in EI Date and now u want to use PA Period Ending Date?
    Please Correct me if i'm wrong, u want to update all the Trx from EI Date to PA Period Ending Date?
    If you update from EI Date to PA Period Ending Date, this will only be applicable to Future Trx's not for the one's already incurred.
    Regards
    Ragahavender K

  • Need to get data for specific user logged in

    Hi All,
    I need some pointers for the sql query. I have a query that extracts approval history information along with current status of person who submitted for changes of his direct reportee.
    what I need is to get the only the approval data of logged in person( top to bottom/bottom to top persons involved) in approval process.
    we built the report, but it gets all of the approvals data from HRSS related tables.
    I need to get the data of person who logged in.
    is this possible? can someone please provide some pointers?
    Thanks in advance..

    @Pablolee, Thanks for the reply
    Pointer number 1.
    Provide a (working)test case so that your requirements are clear.
    -- scenario
    lets say we have   Manager1, Manager2, Manager3
    Here is test case
       Manager1 - Submitted person salary change and went for approval. In this approval process It went upto manager level say Manager3.
    the sql query i have gets all approval process data of all other's manager's involved in whole approval process. as Manager1 when i logged in I wanted to see where this salary change record is pending i.e Manager3.
    but my query show all others data also. can you tell me how to get Manager1(top to bottom OR bottom to top of this person logged in) change record submitted data in approval process.
    I hope you understand this, If possible please let me know how to achieve this.
    Thx..

  • How do I check recorded date for a clip in 08?

    In 06, I had to double click a clip, and a window would pop up with the date it was shot. Before 06, it was even better, I simply had to select a clip, and in a gray bar above the timeline the day, date and time would show. Very nice. So, in 06, they made it even more of a hassle, as mentioned. I did a lot of double clicking, closing, on all my clips (I organize them by date shot).
    So, with much reluctance, I have decided to try 08. Lo and Behold! I now can't find any way to show the simple date of a clip. In the right side, below the audio meters and buttons, I see a single date. January 21 2007. Don't know where that came from, as the first clip is earlier than that.
    Any ideas? I already bought FCExpress 4, but it's way more involved for me to deal with now. I'm way behind on my movie making...I will have to go back to HD6 I guess if no one has an answer.
    Help?

    thanks, that works nicely. However, every single clip has the same date, January 21, 2007. Which is probably the date I dumped my clips onto my mac. The clips range over a few months prior to that.
    I hope to heck this is not supposed to work like this, is it? Every version prior to 08 the clip dates came in just fine.
    I did a quick search for this problem in the forums, and saw a few postings, but nothing about a solution. This will truly make 08 a complete waste of code to me. I need to know when these clips happened for editing.
    AAAGGHH! One step forward, two back. Looks like Final Cut Express is going to have to get learned!

  • UAR-Need additional Employee data for review

    We are just starting work on trying to implement UAR to replace our current manual User Review process.  In our current process, access is reviewed by the Role Owners (BDOs), and they are given a spreadsheet containing the roles and users.  This spreadsheet contains a lot of information about the users (department, job title, location, etc.) that the BDOs need to be able to perform the review. 
    I've seem some sample screen shots of the UAR request and the only user information they seem to contain is the userid and user name.  This is inadequate for our reviewers.  We are a large company, so there is no way a BDO is going to know who everyone is and whether their access is appropriate based on just their id and name.  They are going to have to have additional employee data.
    1.  Can additional fields be added to the UAR request?
    2.  Does the userid maybe work similar to role name (you can click on the role name in a request and see the role information)?
    3.  If neither 1 or 2 are options, how do most companies handle providing additonal employee data to the review?
    4.  Do most companies have the Manager or the Role Owner as the reviewer?
    Thanks.

    Hi Bob,
    I do not think so that u can add additional fields for UAR request. As UAR requests are generated with help of background job.
    Data in the request are pulled from ERM application.
    Also in UAR request first & last name of user is also shown apart from user id.
    kind Regards,
    Srinivasan

  • Need to Display Data for Cummulated to Current Day of Current Fiscal Year

    We use fiscal variant V3 (April-March).  My need is to display data automatically from first of fiscal period (April 1 2006) to today.
    I tried using 0CYTCD on Calendar Day but this works only for the current calendar year that the system is in  i.e 2007.
    Is there a standard variable I can use on 0CALDAY so I always get data from day one of current fiscal year/period to today? e.g. April 1, 2006 to January 3, 2007
    If not, can someone please help with the exact customer exit code that I would need to write in CMOD in BW?
    Thanks a ton!

    I thought of using 0FYTCD variable, but I cannot find it in the business content.
    Has anyone used 0FYTCD (Fiscal year to current day) in BW 3.1 SP25?
    Again, I am looking for a variable that would get me the beginning of fiscal year to today.
    Thanks.

  • Can DVD be used to record data for backup

    I just bought a MacBook and am on vacation. I've downloaded a lot of pictures into iPhoto. Approx 2 GB. I want to do a backup to ensure I won't lose them. Can a DVD be used rather than a CD? If so, what is the best method. Disk image? or what do you recommend.
    In anticipation, thanks.

    Insert the DVD into the computer, click on the item in the Finder's sidebar named Pictures, drag the iPhoto Library inside to the DVD, and burn it.
    (32971)

  • I need a sample excel data for practicing Dashboards

    Hi Experts ,
                        I am new to SAP  BO  Dashboards. i need sample excel data for practicing and designing a dash boards . kindly help me to get sample excel files from any where .Please suggest me where i can get sample excel files.
    Regards
    Abhi

    Hi,
    open the samples in the dashboard which come with source data as excel.or search on google you will get the dashboard files with sample excel data.or try to create own sample data and use in dashboard for learning.
    Amit

  • Getting the record data.

    Hi All,
    Good Morning.
    I had same question before, but there I was not getting the record data.
    This is my internal table structure.
    KUNNR, VKORG, VTWEG, SPART, CRDATE, EFDATE, SPRICE, EPRICE, SQTY, EQTY.
    This internal table is the user selected records using a report display with check box to select the records.
    From the internal table with the user selected records if the KUNNR, VKORG, VTWEG, SPART values are same it has to go to if condition and I need to catch the data of the records to use in the Function other wise go to else condition.
    lOOP AT ITAB.
    IF ---
    CALL FUNCTION
    ELSE
    EXIT.
    ENDIF.
    ENDLOOP.
    1) 1001 300 20 01 12/01/2006 01/01/2007 10.00 9.00 10 09
    2) 1001 300 10 01 -
    3) 1001 300 20 01 -
    If the user selects records 1 and 3 it has to go in to IF condition. Here I need the records data of 1 and 3.
    If the user selects records 1 and 2 it has to go in to ELSE condition.
    Please help me. Sorry for the confusion.
    Thanks,
    Neelu.

    HI,
    Loop at itab.
    *--Write logic to get the selected records and store it in jtab. (Hope this logic is already in place with you)
    put them into jtab.
    endloop.
    ktab[] = jtab[]. " Ktab to get the seleted records
    sort table jtab by KUNNR, VKORG, VTWEG, SPART .
    delete adjacent duplicates from jtab comparing VKORG, VTWEG, SPART .
    describe table jtab lines v_lines.
    and now your condition.
    with your requirment.
    if lv_lines is 1 then it indicates that you have selected lines 1 and 3 and in delete command it got deleted only one left as they have same values.
    else
    here you have selected lines 1 and 2 and the delete statment will not delete any records...
    endif.
    Hope this helps .. let me know if its not clear
    Thanks
    Mahesh

  • How to get data for current week and previous week using customer exit in Bex.

    Hi everyone,
    I have a scenario in which I need to display data for current week and previous week (based on "sy_datum" the program has to calculate current week and previous week) in Bex using  Customer exit. I have created one variable in Bex Query Designer and I have written code for the variable in CMOD. But it is not working fine, (I know that we can do the same by using offset value in Bex). Can some one guide me how to achieve my requirement using customer exit.
    Thanks in Advance,
    G S Ramanjaneyulu.

    Hi krishna,
    Thanks for your quick reply, can you have a look at my code,
    case i_vnam.
    WHEN 'ZPWK_CWK'.
    ranges : pre_week for sy-datum.
    data : start_date type DATS,
           end_date TYPE dats .
    ************FM TO GET FIRST DATE OF CURRENT WEEK ************************
    CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
      EXPORTING
        DATE_IN  = sy-datum
      IMPORTING
        DATE_OUT = start_date.   " WEEK FIRST DATE
    end_date = START_DATE + 6.   " WEEK LAST DATE
    END_DATE   = START_DATE - 1.   " PREVIOUS WEEK END DATE
    START_DATE = START_DATE - 7.   " PREVIOUS WEEK START  DATE
    **********PREVIOUS WEEK DATES IN PRE_WEEK******************
    pre_week-SIGN   = 'I'.
    pre_week-option = 'BT'.
    pre_week-LOW    = START_DATE.
    pre_week-HIGH   = END_DATE.
    APPEND  pre_week.
    CLEAR : START_DATE,END_DATE.
    endcase.
    Regards,
    G S Ramanjaneyulu.

  • How to extract data for particular two members of same dimension.

    As per the requirement i need to export data for certain members of a dimension. Lets say we need data for two account members A and B which is in in Account dimension only but is not a direct children. I need the data for all the available years too. Please suggest me how my DATAEXPORT command should look like.
    When i am using an AND statement it is not working accordingly. Say i am fixing for years 2007 and 2009 but the output file is coming for 2009 and 2010.
    Something other is happening when i am fixing OPEX_31 and OPEX_32. The values are coming not only for OPEX_31 and OPEX_32 but for many more accounts too.
    Here is my dataexport statement for your reference
    SET DATAEXPORTOPTIONS
    DataExportLevel "ALL";
    DataExportColFormat ON;
    DataExportDimHeader ON;
    DataExportOverwriteFile ON;
    FIX("LC","Total_Year","ESB1","2009","SIERRA","COSTCENTER_NA","CELLULAR_NA","OPEX_31",
    "January","February","March","April","May","June","July","August","September","October","November","December");
    DATAEXPORT "File" "     " "D:\exports\feb.txt";
    ENDFIX;
    I need data for OPEX_31 and OPEX_32 for all the available years starting from 2001 to 2025.
    Please suggest what are the modification needed to get the desired result.
    Thanks in advance

    Hi,
    There a few different options you can use for fixing on the months, years..
    e.g. FIX(January:December)
    or FIX(@CHILDREN(YearTotal)) < depends what the parent of the months is
    sames goes for years
    FIX(2009:2025)
    or
    FIX(@CHILDREN(Year)
    If your period dimension is dense you can always use that as the column header e.g. DataExportColHeader "Period" and then fix on the accounts you require.
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • IPHONE 3G. How do i UPDATE my software to a newer version?

    It starts fine on ITUNES. Manage to delete all files. But during the update it stops with an error # 1015. It says it can not downgrade. I need to upgrade to a newer version. Can someone Please help me with a link on how to update my IPHONE 3G to the

  • Including HTML pages

    Hi there. I'm new to Flash but I've been working on a website that came from a Flash template. Half of the pages are in Flash, the other half are HTML (done in Dreamweaver). Is there some way I can call out to the HTML pages and include them into the

  • Facing problem in sync

    i am facing problem in sync of my contact from outlook ids and, showing error when i click in invite button on outlook contact

  • Print Woes...can't believe no one can help???

    I am at wit's end. I installed Leopard month's ago and have had problems printing ever since. I can print to a 8-1/2 x 11 through Quark, but cannot print 4x6 borderless prints in Imagebrowser any longer. I also recently downloaded the new 6.0.7.38 Im

  • How to make lines I draw as an objects??

    Hi friends: I met a problem here, I find a similiar code below, but cannot solve it. How to make lines I draw as objects in this application?? ie the lines I draw will be selectable as other JLabels, can be highlighted, can be deleted etc, just like