How would I increment by one each time a sensor's indicator reaches a specific value range?

Hello -
In my Labview vi, I need to count the number of times a range of sensor values are reached. I am using the +1 incriment element but becuase the vi's loop is sampled so frequently, it continues to incriment because the loop starts over - and also because the sensor hasn't had a chance to change state yet. I need to just count when something is fully compressed and after the it is expanded, and again compressed - add one.
Thanks!
Attachments:
Mole.vi ‏1263 KB

Hello,
Setu's answer was great, and I wanted to provide you with a simple VI showing an example of a state machine. This VI simply uses a boolean switch to change between the expansion and compression states (you would replace this with your code that indicates which state the process is in), and it adds one to the shift register value for each time that the compression occurs. (I added a half-second wait so that the effects can be seen slowly).
I hope this helps! Have a great day.
Liz Fausak
Applications Engineer
National Instruments
Attachments:
compressExpand.vi ‏28 KB
compressExpand.vi ‏19 KB
compressExpand.vi ‏16 KB

Similar Messages

  • QuestionJust purchased a USB Super Drive but unsure how to use it - o instructions provided apart from how to eject a cd.  Each time I put in a cd it just ejects it again.

    Just purchased a USB Super Drive but unsure how to use it - o instructions provided apart from how to eject a cd.  Each time I put in a cd it just ejects it again.Can anyone help.

    USB is rarely bootable under Mac OS X and PowerPC Macs.   Get a Firewire Superdrive from http://www.macsales.com/ if your intent is to boot the machine.   PPC, which is PowerPC, indicates the Mac predates 2006.

  • How to stop iPhoto from opening each time I add a photo using Yosemite

    How to stop iPhoto from opening each time I add a photo using Yosemite

    Add image to iPhoto Library
    From where.  I don't think you can keep it mininmized when importing because if it runs into a duplicate it will present a warning window for you to make a decision in. Therefore, it will always be open when importing.
    You can send a feature request to Apple via http://www.apple.com/feedback/iphoto.html.

  • TS3694 my i pad is showing connect to i tunes picture when i connect to i tunes it tells me i need to restore, but when i do it keeps coming up with error code!! which is a different one each time can anyone offer some advise to solve this frustrating pro

    my i pad is showing connect to i tunes picture when i connect to i tunes it tells me i need to restore to factory settings, but when i do it keeps coming up with error code!!   which is a different one each time can anyone offer some advise to solve this frustrating problem.

    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694
     Cheers, Tom

  • How do I tell LabVIEW to send a logic high to a digital port when an ICTR Control Counter reaches a specific value?

    I am using a DAQ-1200 lab card (8253/54) to run a micro-stepping motor for a NASA research project. I need to tell LabVIEW to send a logic high (+5V) to one of the digital ports when my counter (ICTR Control) reaches a specific value. The logic high trips a relay which changes the direction of the motor, but I cannot figure out how to trigger it. Thanks!

    Wire your counter T/F condition to a Case statement, and when T, have the 'Write to Digital Line.VI' output the logic high or low as appropriate. That VI is in the Functions>Data Acquisition>Digital I/O palette. This should work. Good Luck - Doug

  • How to export query results automatically each time to a saved path

    Hello,
    Does anyone know if it's possible to save an "export pathway" in your query, so that whenever you run that query, the data are automatically exported to a specific pathway and filename? This would be great compared to the manual method of having to right-click in the data, selecting export and then drilling to the pathway and filename each time. I have looked thru the menus and help, but cannot seem to find out how to do this, or if this is even a feature of the software. Thanks in advance!

    Not really, but previous used paths should be remembered as shortcuts on the left of the dialog... aren't they?
    Also make sure you have set the Preferences - Database - Select default path to store export in.
    Have fun,
    K.

  • Is it possible to duplicate a button, instead of building a new one each time (navigation)

    In CS5...
    I have created a movieclip button which is animated  for all the states I need (up, over, out, etc.) it's made up of text, which is in a movie clip where I have my animations created (actions layer with AS3 script, my txt movieclip layer, my hit layer) and then that is inside a movie clip in my main scene.
    Is it possible to copy that button, so then change the text, Actionscript, instance name, etc?
    I tried copying the layer (by selecting the frames and copying frames, and pasting to new layer) but when I make any changes, it changes both copies!
    Can someone tell me an easy workflow so I don't have to build each button from the ground up each time?
    Thanks all!

    Ned Murphy wrote:
    Select the textfield that is inside the movieclip and in the properties panel you should see a dropdown for selecting the type of textfield.  If you select Dynamic and then assign an instance name to the textfield you can use that instance name in your code to assign the text when the file runs.  If you were to name the textfield "tField", then the code you would use inside an instance of your movieclip named "mClip1" would be...
    mClip1.tField.text = "your text";
    So, if I have multiple buttons, using your example, would the code read
    mClip1.tField.text = "your text";
    mClip1.tField2.text = "your text2";
    mClip1.tField3.text = "your text3";
    mClip1.tField4.text = "your text4";
    And my buttons are built inside movieclips, ie
    Main Timeline > aboutButton_mc > aboutText_mc > "about"
                        > contactsButton_mc > contactsText_mc > "contacts"
    can the code be put at any level, or does it need to reside on the Main Timeline to access all the movie clips' text fields?
    Just in case this may be too complex to get into via this forum, if you know of any good tutorials, that would be awesome too!
    I tried doing a search, but it's so hard to tell if they might be in AS2, or AS3, and if they would apply to newer versions of Adobe Flash (I have CS5)

  • How to send 1000 records per each time through JDBC adapter

    Hi all,
    In my JDBC to File scenario, SQL Server database having 10,000 records. I want to split these records into 1000 records and process 1000 records each time. How we can do in JDBC adapter. Is there any options in JDBC adapter. Please give me reply very thanks to all of u.

    Hi all,
    Thanks for your repsone. I am very happy.
    If it sender Jdbc we can write the query. If it is Receiver Jdbc adapter and I want to send the record as 1000 at a time. 
    You may give this advise that is you can use RecordsetPerMessage option at sender side. But here I want to read all the records and send 1000 records only.
    please give me valuable answer.
    thanks in advance...

  • How to disable Security Alert popup each time for trusted site in IE on Win XP

    A user is using slow computer running with Windows XP SP3 and Java 7 update 45 version.
    When user open this site www.rocars.gov.hk in Internet Explorer 8, it will wait around 2 minutes to disaply security alert popup windows.  Then user needs to click Y to continue. Actually this website is trusted. How can I disable the security alert popup each time?
    I ever asked the technical support from www.rocars.gov.hk and they replied this issue is related to Java. So I ask here.

    918ee531-e393-4945-a46c-cd83c779af9a wrote:
    A user is using slow computer running with Windows XP SP3 and Java 7 update 45 version.
    When user open this site www.rocars.gov.hk in Internet Explorer 8, it will wait around 2 minutes to disaply security alert popup windows.  Then user needs to click Y to continue. Actually this website is trusted. How can I disable the security alert popup each time?
    I ever asked the technical support from www.rocars.gov.hk and they replied this issue is related to Java. So I ask here.
    what does problem have to do with Oracle DB?

  • Why the emails in ios cannot be select all with one click?? i have to select one each time to can delete all...i need so much one button "mark all emails" in the mail of ios on my iPhone)

    hello, all...
    Please somebody know one way to select all emails in one touch in ios on iphone.
    In brazil, were i live, nobody have this answer.
    Thanks a lot.
    Paula

    This does not answer/solve the OP's question/problem as they would still have to select each email individually before selecting the "delete all" button. In the end this the same as selecting "delete" on each message individiually.
    There is no practical way to do what the OP wants.

  • I need to find out how to have Speakable Items available each time I boot up.

    I use Mavericks Speakable Items every day to open and close applications without using my mouse if function keys.
    The only way I get it to start is to calibrate it AFTER boot up.
    I need to find out how to have it available each time I boot up my Mac Mini with OS 10.9.4,
    Suggestions.

    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")

  • Is there a routine one can use to shift the column of data by one each time the loop index increments? In other words, increment the columns that the data is being saved by using the index?

    The device, an Ocean Optics spectrometer in columns of about 9000 cells.I'm saving this as a lvm file using the "write to measurement file.vi". But it doesn't give me the flexibility as far as I can tell.
    I need to move the column by the index of the for loop, so that when i = n, the data will take up the n+1 column. (the 1st column is used for wavelength). How do I use the "write to spreadsheet file.vi" to do this? Also, if I use the "write to spreadsheet file.vi", is there a way one can increment the file name, so that the data isn't written over. I like what "write to measurement file.vi" does.
    I'd really appreciate any help someone can give me. I'm a novice at this, so the greater the detail, the better. Thanks!!!

    You cannot write one column at a time to a spreadsheet file, because a file is arranged linearly and adding a column would need to move (=read and rewwrite elsewhere) almost all existing elements to interlace the new data. You can only append new rows without having to touch the already written data.
    Fields typically don't have fixed width. An exception would be binary files that are pre-allocated at the final size. In this case you can write columns by setting the file positions for each element. It still will be very inefficient.
    What you could do is append rows until all data is written, the read, transpose, and write back the final file.
    What you also could to is build the final array in a shift register and write the entire things to file at once after all data is present.
    LabVIEW Champion . Do more with less code and in less time .

  • How do i set the home button to refresh open tabs instead of opening new ones each time i click on it

    Everytime i click on the "home" button, FF 3.6 opens my three home pages as three new tabs. If i click twice, it opens three more. In IE, if i click the home button i have a choice to either refresh the three tabs starting with which ever one is open (for example, if my second tab page is where I am, that becomes home page #1 and so forth) OR i can select the specific home page i want to return to via a drop down.
    At a minimum, I'd like to set my home button to just open using currently open tabs and not appending. It must be possible b/c DH's FF browser does not do this. What am I missing?

    The best way to keep your home page in the tab is to open other links in a new tab with a middle-click.<br />
    Clicking the home page always open a new set, so you would have to close the current tabs first to prevent getting multiple home page sets.<br />
    I don't know if there is still an extension that can open the home pages and replace the current set.
    See also:
    *https://addons.mozilla.org/en-US/firefox/addon/multiple-tab-handler/

  • For Numbers...how do I add one each time in a column instead of manually adding plus 1...Column B..

    I just want it to go 44,45,46,47,48...without me having to have to type it in.

    Matt,
    Type the first value in the first cell and the second value in the second cell, Select both cells, grab the Fill handle in the lower right corner (Numbers v2) and pull it down to extend the series as far as you want.
    Jerry

  • If I ever wiped out my hard drive, how would I get everything back using time machine?

    I will probably wipe out my hard drive eventually and I want to be prepared for it.

    Pondini's Time Machine FAQ
    Start reading to learn.
    Time Machine - 101 Tutorial
    Apple  OSX  and  Time  Machine  Tips
    Migrate Time Machine backup to new Mac in Lion
    Basic Backup
    Get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    SuperDuper!
    Synk Pro
    Tri-Backup
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files.
    Although you can buy a complete external drive system, you can also put one together if you are so inclined.  It's relatively easy and only requires a Phillips head screwdriver (typically.)  You can purchase hard drives separately.  This gives you an opportunity to shop for the best prices on a hard drive of your choice.  Reliable brands include Seagate, Hitachi, Western Digital, Toshiba, and Fujitsu.  You can find reviews and benchmarks on many drives at Storage Review.
    Enclosures for FireWire and USB are readily available.  You can find only FireWire enclosures, only USB enclosures, and enclosures that feature multiple ports.  I would stress getting enclosures that use the Oxford chipsets especially for Firewire drives (911, 921, 922, for example.)  You can find enclosures at places such as;
    Cool Drives
    OWC
    WiebeTech
    Firewire Direct
    California Drives
    NewEgg
    All you need do is remove a case cover, mount the hard drive in the enclosure and connect the cables, then re-attach the case cover.  Usually the only tool required is a small or medium Phillips screwdriver.

Maybe you are looking for

  • Does DW recognize default.htm / index.html?

    I'm new to Dreamweaver and am working on an existing web site. Web servers typically load up a "default.htm" or "index.html" page when you give it a URL with just the directory name, e.g. http://foo.bar/about/. Most of the links in my site are set up

  • IPod Mini 4gb driver not recognized

    iPod Mini 4gb give error when connecting to XP/Vista/Windows7 USB DEVICE NOT RECOGNIZED OR MALFUNCTIONED. iPod software is loaded, when I try to upgrade to upgrader 2005-02-07 (which is what was on the iPod software) I get error: Invalid iPOD service

  • Apple TV with Panasonic TX-L32S10B issue

    We are trying to connect the Apple TV box to a Panasonic TX-L32S10B TV and all we get is a blank screen on the HDMI port we have connected it to.  Can anyone help?  Thanks

  • Java Client Proxy Debugging

    Hello Folks,                     I am trying to implement the java client proxies for one of my requirements... i have used the guides provided for the java client proxies in SDN and trying to implemented the same (Mine is asynchronous..) so far I ha

  • In my bid to get google to see my site- ever

    As i see it the problem is that the iWeb navigation bar/menu is Javascript rendering and search engines can't read it. Thus they don't see what pages are part of my website. It it best to use widgets CSS menu or a straight forward text box with a hyp