Trying to perfect pendulum measurement

I'm fairly new to Labview, so please be gentle.
I'm a work-study in the EET program here at Oklahoma State University, and nobody here really knows much about Labview.  I've been tasked with figuring the thing out for everyone else here, and I've made a lot of progress on my own.  In the furthering of figuring this software out, I've also been tasked with trying to modernize some of the lab experiments for our Physics classes.
The experiment I'm working on right now is simply to measure the average cycle period of 30 swings of a pendulum.  I've managed to put together something I'm fairly happy with, but I thought I might try to get some help to smooth out some of the rough edges a bit, and hopefully learn a little more about the program in the process.
The ultimate idea is to use a photo-sensor that sends +5V when shorted by the swinging pendulum.  Right now, I'm simulating this using a pushbutton.
Here's what I would like to change about the code:
 - I'd like the X-scale on the graph to reflect the elapsed time, rather than just counting measurements
 - I'd like the graph to clear its data every time the program is run (instead of having to close the VI and re-open it).  Alternatively, it might be nice to have a reset button for the graph instead
 - I like giving the end-user control over the number of swings to measure, but I would like if the DEFAULT was 30 instead of 0 whenever you open the VI.
 - Finally, I'm convinced that there is an easier way to do the same things I've got the code doing, and I would like to find ways to simplify the code so that the teacher can possibly explain to "normal people" (i.e. - people who take Gen. Physics I at a tech school) what's going in the code.  We've BEEN doing this lab just using a stopwatch, so of course part of the point of all this is to be able to measure more accurately.  However, the Physics department head tells me that, if possible, he'd also like to start integrating Labview programming into the Physics classes as well, so I've also been tasked with trying to make this simpler.
Any help is greatly appreciated.  About 3 weeks ago, I had never even heard of Labview before.  This code represents everything I was able to learn on my own in those three weeks.  I use Labview 8.2.
Attachments:
pendulum31.vi ‏205 KB

If you want to recreate it, the problem I was having was when I was going to Arrays--->Array Constant and trying to wire that into the clear history node.
But your advice worked right as rain!  That's really cool!  I have to admit that I feel I'm cheating somewhat though, since this allows me to put off legitimately learning how arrays and such operate in Labview.  But this is great for right now.  Thanks!
I went ahead and got it to clear all the data values, not just the chart.  I then put all of that in a case structure, and wired a button to all that called "Clear values at start".  I think that's probably the best way to do that.
I WAS trying to use a momentary switch as was suggested (I figured that out.  That's cool!), but the way it's coded, I could only get that switch to trigger either before the first voltage event occurs, or during the triggering, but not both.  I tried to get it to work from a single button in both situations using a reference to the button, but for some reason, it returned an error when I tried that.  Honestly, in my mind's eye, the absolutely ideal situation would be a momentary button that clears all the values and charts, and works no matter what part of the code is executing AND even while it's not executing (while the VI is stopped).  I don't know if that's possible.
I also went ahead and added a pulse chart that will give a nice visual cue with a scrollbar for the action of the pendulum.  I thought it was a nice touch and will give students something visual to look at.  My only complaint with it is that the way it's coded right now, the chart quits updating when it hits the part of the code that makes it wait after the pendulum shorts the light sensor but before the light is unshorted.  Again, I tried a reference to keep it going, but that didn't seem to work.  There must be something I don't get about references...

Similar Messages

  • Trying to Automate distance measuring within an image.

    Ok, The problem I am trying to solve is measuring the size of an object within an image over time. So far I have found enough information to understand how to implement edge detection to isolate the object from the rest of the image, but one thing I can't figure out is how I can measure the number of pixels from one edge to another edge. Does anyone know of any topic or api that addresses this issue? Sorry if I'm not clear I can clarify if you need me to.

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.

  • Hello, i am trying to take the measure of a temperatura but i couldn´t do it.

    can u tell me how can i make a continuas thermistor measured? i need to take a real time temperature on a motor.
    thanks 

    I agree with the above comments.
    We would need to know more about:
    1. which DAQ card you are using
    2. what type of signal conditioning (if any) is implemented
    3. the interconnection  / circuit relation between the motor and the thermistor
    4. are you providing proper excitation current (if thermistor)
    To learn more about LabVIEW, I suggest you try looking at some of these tutorials.

  • DOH! Poor quality output after 4 days trying to perfect the DVD

    Hi guys
    I have been trying to burn a 1hr 27min .avi file (700MB) for 4 days now. Ive tried a few ways but each time the DVD has poorer quality video than the original file.
    I tried:
    - opening .avi file in ImovieHD and then sharing it with iDVD (it refused to burn it, after going thru the whole rendering encoding process mind you)
    - going straight to iDVD (definitely it would not burn)
    - opening in QT Pro and then 'stream as DV'. which i opened in iDVD and saved as disc image with menus etc. burnt using toast titanium - probably the best result so far i think)
    however the dv file was worse than an mp4 file i created using iSquint from the .avi.
    - have also tried just opening the avi in toast and burning from there. worse product than the previous one.
    So, any suggestions? The main problem is things look quite jagged and a bit pixelated if you know what i mean. Where as the mp4 file, which ive played using iTunes and VLC, is quite smooth (but you can see there's still a bit of quality loss when sharp movements are made by the actors.(expected).
    So I've lost lots of time on this stupid thing, but I just really want to sort out how to do it well once and for all.
    Any help would be most appreciated.
    Thanks

    G'day Looneysbin
    Sounds like a hardware problem. Is your drive under warranty?
    For a start, try rendering your iDVD project to a disk image, instead of burning straight to disk.
    Then, create a new Burn Folder on your desktop, and drag the VIDEO.TS file from the opened disk image to the burn folder (note that only an alias actually gets put in the folder).
    Next, use Control-click on the Burn Folder to get the contextual menu, and select 'Burn Disc'. Follow the prompts, but burn at the minimum speed available.
    This way, your apparent hardware problem won't mean re-rendering the iDVD file each time you try and burn a disc.
    You can also keep the .img file on your hard drive as a backup of the disc.
    You might also be having a problem with quality of the actual discs themselves. What brand are you using?
    Regards
    Santa

  • Text measurement in Fireworks CS3

    Hi all,
    I'm designing a phone app, and a styleguide for the design,
    which require all the elements to be pixel perfect and add up to
    the screen dimension. There are 2 problems I run into is how to
    measure text in Fireworks CS3:
    1) Fireworks CS3 measure text in point, not pixel. I use an
    online converter but it doesn't quite work. (For example, 17point =
    22.666 pixel. Should I just round it up to 23?)
    2) Web text is measured based on the em square, not the size
    of the character itself. Is there a way to find out the em square
    size in Fireworks? (I thought the blue bounding box when the text
    is selected is the em square, but I tried taking screenshot and
    measure it, and it turned out that it's not the case).
    So, to sum it up, what procedure should I follow to measure
    text in a pixel perfect design in Fireworks CS3? Thanks.

    But what about the tutorial you did for Lynda.com where you inserted the google map within an i-frame? I am in a similar situation where I am trying to just insert a scrolling text box within my layout done within FWCS4 using similar layout. Just simple scrolling text box that's it.
    I see what you are saying though. DW is the true HTML dev tool but I'm just having too much damn fun in FW and don't want to leave. :]
    Kevin

  • Can't get radio measurements on WLC 2500 to work

    Hi all,
    I have 2 lightweight APs (AIR-CAP1602I-E-K9) connected to a wireless lan controller 2500. I am trying to enable radio measurements, however after configuring the WLC, RM status is still reported as disabled. I used this document http://www.cisco.com/c/en/us/td/docs/wireless/controller/7-4/configuration/guides/consolidated/b_cg74_CONSOLIDATED/b_cg74_CONSOLIDATED_chapter_010000111.html#ID2037  to configure the WLC.
    Here is my current config:
    1. CCX-Lite is enabled
    > show run-config
    CCX-lite status ............................ Enabled 
    2. AeronetIESupport for the wlan of interest is enabled
    > show wlan 14
    CCX - AironetIe Support.......................... Enabled 
    3. RM is enabled globally
    > show advanced 802.11a ccx global
      802.11a Client Beacon Measurements: 
        enabled with (interval=60) seconds
    4. RM is enabled for the AP
    > show advanced 802.11a ccx ap AP_1 
      802.11a Client Beacon Measurements for Cisco AP: 
        enabled with (interval=60) seconds
    However, when requesting the RM status on the controller, every type of measurement is shown as disabled:
    > show ap ccx rm AP_1 status
    B Radio
      Beacon Request................................. Disabled
      Channel Load Request........................... Disabled
      Frame Request.................................. Disabled
      Noise Histogram Request........................ Disabled
      Path Loss Request.............................. Disabled
      Interval....................................... 60
      Iteration...................................... 0
    A Radio
      Beacon Request................................. Disabled
      Channel Load Request........................... Disabled
      Frame Request.................................. Disabled
      Noise Histogram Request........................ Disabled
      Path Loss Request.............................. Disabled
      Interval....................................... 60
      Iteration...................................... 0
    When checking the client RM status, I get the following results:
    > show client ccx rm Client_MAC status
    Client not in the unicast rm list  
    > show client ccx rm Client_MAC report beacon 
    Client not configured for ccx rm 
    > show client detail Client_MAC
    Client CCX version............................... 6 
    CCX Foundation Service version................... 1
    CCX Management Service version................... Not Available
    CCX Voice Service version........................ Not Available
    CCX Location Service version..................... Not Available
    My questions are:
    1. Is there an extra config on the WLC to enable Radio Measurements?
    2.  Why is the client reported as having RM disabled?
    3. Are there any additional client configurations that must be done?
    Thank you.

    Welcome to Discussions, heather2910
    heather2910 wrote:
    when i click on a contact and then click on facetime it says that the contact is unavalible how do i get it to work?
    (1) Consider the FaceTime troubleshooting suggestions in this article:
      http://support.apple.com/kb/HT4319
    (2) If your FaceTime works to some of your FaceTime friends but not to others, those who show "unavailable" may merely not have their FaceTime turned on so they can receive calls.
    EZ Jim
    Mac Pro Quad Core (Early 2009) 2.93Ghz Mac OS X (10.6.7); MacBook Pro (13 inch, Mid 2009) 2.26GHz (10.6.7)
    LED Cinema Display; G4 PowerBook 1.67GHz (10.4.11); iBookSE 366MHz (10.3.9); External iSight; iPod4touch4.3.1

  • Can't sign in using any 3rd party email client with my iCloud account on any Mac. Tried every settings, My iCloud only works with Mail.app

    Can't sign in using any 3rd party email client with my iCloud account on any Mac or any other Mac. My iCloud will only work with Mail.app. All the clients I tried work perfectly well as long as I sign in with somebody else's iCloud account. But mine won't work no matter the client (Postbox, Unibox, Airmail...) and no matter the computer.
    I can access my account on iCloud.com, but I can't use email clients without getting error messages prompting me to check my password or login.
    I was able to use those clients in the past but a couple of months ago I got logged out of Airmail and the issue started just like that!
    I tried every possible mail server settings including the following:
    IMAP information for the incoming mail server
    Server name: imap.mail.me.com
    SSL Required: Yes
    If you receive errors when using SSL, try using TLS instead.
    Port: 993
    Username: The name part of your iCloud email address (for example, emilyparker, not [email protected])
    Password: Your iCloud password
    SMTP information for the outgoing mail server
    Server name: smtp.mail.me.com
    SSL Required: Yes
    If you receive errors when using SSL, try using TLS instead.
    Port: 587
    SMTP Authentication Required: Yes
    Username: Your full iCloud email address (for example, [email protected], not emilyparker)
    Password: Your iCloud password

    Those are the correct settings, and they work with any email client that supports Imap.
    Try again.

  • Problems in the creation of a measure folder

    I tried to create a measure folder with CWM2_OLAP_CATALOG package, but I got some errors when I tried to add a measure to a measure folder. The procedures that I executed to do this are:
    SQL> execute CWM2_OLAP_CATALOG.CREATE_CATALOG('test','this is a test');
    AMD-00001 created Catalog "TEST"
    PL/SQL procedure successfully completed.
    SQL> execute CWM2_OLAP_CATALOG.ADD_CATALOG_ENTITY('test','DWH_OLAP','F_REVENTS_10MINUTE_2','events');
    AMD-00100 not found: Cube "DWH_OLAP.F_REVENTS_10MINUTE_2"
    BEGIN CWM2_OLAP_CATALOG.ADD_CATALOG_ENTITY('test','DWH_OLAP','F_REVENTS_10MINUTE_2','events'); END;
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.CWM2_OLAP_UTILITY", line 1809
    ORA-01403: no data found
    ORA-06512: at "OLAPSYS.CWM2_OLAP_CATALOG", line 337
    ORA-06512: at "OLAPSYS.CWM2_OLAP_CATALOG", line 364
    ORA-06512: at line 1
    The database tells that the cube F_REVENTS_10MINUTE_2 doesn’t exist, but in the reality it exists.
    To be sure that the cube exists, I executed the following select that shows the database’s cubes:
    SQL> select owner,cube_name from all_olap2_cubes;
    OWNER
    CUBE_NAME
    DWH_OLAP
    F_REVENTS_10MINUTE_2
    The version of the database is 10.2.0.1.0.
    How can I resolve this problem? It is very important!!!
    Regards,
    Rui Torres

    you must check also that the cube is valid, and it has complete metadata for OLAP - try using OEM.
    Flavio

  • Capital inv. program position not allowed for measure

    Hi Gurus,
    When I am going to assign top level wbs to investment program position i am getting the error message
    How I can overcome this.
    Quick response will be rewarded and appreciated.
    Cap. investment program position not allowed for measure
    Message no. AP039
    Diagnosis
    You want to assign a measure or appropriation request to an investment program position.  However, the program position does not allow this type of assignment.
    System Response
    The assignment is not allowed.
    Procedure
    Use the detail display in the position to find out what assignments are allowed to it.
    rgds

    HI Sree
    In  im12 I have one general Tab and one Organisational tab.Here I am not getting allowed measures button.
    even though I am unable to create AR when i am assigning WBSE there then I am getting the error message.
    Program type not allowed according to budget profile of measure
    Message no. AP177
    Diagnosis
    You tried to assign a measure to an appropriation request.
    The appropriation request type for the appropriation request specifies that assignment from measures is only possible, if the measures specify that they have to be assigned later to an investment program with program type ZM01.
    However, the budget profile of the measure specifies that it has to be assigned later to an investment program with program type ZC01.
    System Response
    The function cannot be carried out.
    Regards

  • How to set a new MEASURE NUMBER in Logic

    Hi guys,
    I can't find this in the manual so hopefully you can help.
    I am trying to SET a measure number 1 in the MIDDLE of my project.
    What I have going on is this: I am trying to score to a video.. The Video quicktime that I was given is LONGER than it needs to be at the head. Like there's an extra minute or so of material before the part of the video at which the director needs music.
    How can I set measure 1 to begin where I want to? I don't want to use the beat map function. I have the beat set at 116.
    I want to make BAR POSITION 11 4 2 1 to be: 1 1 1 1
    Is this possible? Just FYI — when I set the SMPTE for the video to start bar 1 1 1 1, the video doesn't seem to comply. It still butts the front end of the video to 1 1 1 1 no matter what I do (such that the timecode burn-in does not match Logic's SMPTE.)

    Thanks for the quick reply - that's what I've been doing - but that still doesn't solve my problem. I basically want "X" number of "negative numbered" measures and BAR 1 1 1 1 will start like 11 measures into my project for example.
    I found a workaround, which was to snip the video in Final Cut Pro before bringing it into Logic but I can't believe there isn't a better solution.
    Literally every forum out there and every manual - if you type in "measures" or "measure numbering" there is no info.

  • Continuous frequency measurement~

    Dear sir,
        How are you today?
        I tried to program the "Measure Frequency.vi" in LabView 5.1 .  I've the simplified version
    from "LabView Measurements Manual" in page 10-26. Basically, we want to measure the
    frequency change within 20 ms (chirp). So I just naively added the "for loop" enclosing everything,
    as the attached VI. But the testing result (please see the attached document) showed that
    sometimes the counter/timer (AM9513) lost count. Could you please troubleshoot my VI and
    tell me how I should improve?
        In addition, I tried to use the oscilloscope to see the gate signal from counter-1 (counter 5)
    OUT pin, but it showed 0.14V. The signal from GATE pin of counter (counter 1) showed 5V.
    I was expecting what I would see is something like TTL signals with different pulse widths and
    delay widths. Can you tell me what I was doing wrong?
        Thank you for your previous answers!
    Best regards,
    Margaret
    Attachments:
    Continuous Measure Frequency1.1.vi ‏122 KB
    continuous frequency measurement.doc ‏168 KB

    Hi Margaret,
    I think that there is one way to obtain a count every 20ms. What you will need to do is:
    1. Generate a 50 Hz pulse train
    2. Connect your signal to the a counter source
    3. Connect the 50 Hz pulse train to the counter gate
    4. You will obtain a series of counts over a 20ms period and you will be able to determine the frequency of the signal using post processing by dividing the count # by 0.02.
    I noticed that you are using LabVIEW 5.1. This version of LabVIEW is no longer supported. I highly recommend upgrading to a newer version of LabVIEW. This will allow you to program with the DAQmx driver and creating your application with this driver would be significantly simpler and take a lot less time.
    If you do not want to try this method, then I am attaching the screenshot for measuring the time the while loop takes to execute. I want you to know that the overall time will not have an effect measuring the signal's frequency. There really isn't anything you can do to decrease the execution time for the counter. I hope that you find this information helpful.
    Regards,
    Hal L.
    Attachments:
    While Loop Timing.gif ‏12 KB

  • Group by function in a measure object

    Hi All,
        I am trying to create a measure in universe which is the sum of ticket amount group by country. like,
    sum(Payments.Ticket_Amount) group by country name. When i place this measure in a report group footer it should display the sum to that particular group. But it is not working.
    Could anybody help me how to write a group by function to create a measure.
    Thanks,
    swati.

    Hi swati.
    You don't need to write the GROUP BY statement at the universe level.
    The universe knows that aggregate functions require group by statements and will group the aggregate measure objects by whatever dimension objects are included in the query. If you have a measure object that is not based on an aggregate but has a projection of Sum, it will only be aggregated at the report level once the data has been returned by the query.
    Measure: sum(sales_fact.value)
    Measure: sales_fact.price
    Dimension: country_dim.country
    This would generate SQL along the lines of:
    SELECT sales_fact.price, country_dim.country, sum(sales_fact.value)
    FROM sales_fact, country_dim
    WHERE sales_fact.country_key = country_dim.country_key
    GROUP BY sales_fact.price, country_dim.country
    Hope that clears it up for you.
    Regards,
    Mark

  • Creating measure using set operators in BO Xi 3.0

    Hi All,
    I am trying to create a measure like this in BO XI 3.0 Designer.
    Select count(*) from
    select id from table1 where Name=<Prompt Value>
    INTERSECT
    select id from table1 where Name=<Prompt Value>
    But I don't know how to use set operators in Designer.
    Can someone please help or any pointer would help.
    Thanks,
    Kuldeep
    Edited by: Kuldeep Chitrakar on Apr 2, 2009 4:06 PM

    Create a derived table with same SQL and drag the table into universe pane to create object.

  • SCPI command to set the frequency for power measurement on Agilent 53147A?

    Hello,
    I am trying to automate some measurements which require me to use an Agilent 53147A Freq Counter/Power Meter/Digital Voltmeter. The instrument has an option of setting the frequency of the signal we intend to measure. This is done by clicking the "FREQ" button on the instrument and entering the frequency value of the signal whose power we intend to measure. This way the power meter uses the appropriate calibration factor for that frequency for providing accurate signal power level.
    I have been trying to set the frequency of the signal whose power I intend to measure through remote control but have not met success as I have not been able to find the SCPI command associated with this task in the operating manual. Does anyone know what SCPI command is to be used for this purpose? Any comment in this regard is highly appreciated.
    Thank You,
    Vivek

    Hi vivek.madhavan.13,
    Try using the drivers for this device found here:
    http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=834204A36619504AE04400144FB7D2...
    Then, by going to the lowest level that the VIs permit, you may be able to find the SCPI commands your application needs.
    Regards,
    Joel I.
    Applications Engineer
    National Instruments

  • Measuring point based PM

    Team,
    I am trying to create a measuring point based PM. The requierment is i am checking the wear of an equipment and if it goes below 50 mm, i want a notication to be created. I am sure the IMRC001 is activated in my client. I did the following process
    1. Create IK01 measuring point.
    2. Create IK11 measuring document
    3. Create Tasklist
    4. Create PM
    But when i create the Plan in IP41, i still see the counter which exists for the equipment , but dont see the measuring point in the plan.
    Am i missing something? Please guide me.
    Thanks,
    Nureya

    Maheswaran
    Thanks for the reply. Why should this wear measuring point should be a counter? I want this as measuring point and set the interval in extras...EX: If the wear is 48 -52 , the system should trigger a notication.
    Are you saying, if I use user exit IMRC0001..I don't have to create a maintenance plan in IP41/IP42? Please confirm
    Nureya

Maybe you are looking for