How to reject pulses

Hi,
This is one project that I am doing for some time using sinar sensor which generates pulse with to measure the distance to object. This sensor is being controlle dby basic stamp2.
My problem is that I am getting signal from the signal out put of the sensor. the same output is used by the basic stamp to switch on the sensor and that time is like 2usec so it acts like pulse the sensor generate long pulse depending upon the distance from the object. SO one short pulse and one long pulse
but I dont want my labview to read this short pulse which is like constant 2Usec,
because I am trying to calculate the velocity out of that range sensor so I onle need pulses which tells me the distance so two consecutive distance pulses in my code will tell me change in distance and the I can convert it into velocity.
But if small pulse I call it triggering pulse is read by the code then it will not be two consecutive distance but will be alternate small large small large
Now I have tried to used the case structure telling it that if time measures is greaterthan this than it is true and process but what happens now is that when it recieves small pulse the case structure repeats the variable like repeat the distance again
see my attachment
How to get rid of this small pulse that it does not go into my while loop
Attachments:
combine1b.vi ‏158 KB

The cause of the problem is that you were using the case structure to control the data update of the local variable, but you were not using it to control whether the data is processed for a given iteration of the loop. What this meant is that you would process old data during iterations in which you didn't want to process any data. The simple fix is to include all of your processing inside of your case structure. This also allows you to eliminate the use of local variables, which should always be avoided at all costs. The use of that local variable actually created a race condition in your code which could have also contributed to the problem you were having.
I have attached a modified version of your code that implements what I described above. I hope this helps and remember the lesson to learn: use local variables as a last result only!
Kind Regards,
E. Sulzer
Applications Engineer
National Instruments
Attachments:
combine1b_mod.vi ‏160 KB

Similar Messages

  • How to reject a Call when i phone's screen is off ??

    How to reject a Call when i phone's screen is off ??

    notyou wrote:
    The 7.1 update now includes this functionality on the lock screen.
    Never mind. I am incorrect. Sorry.

  • In lock screen how to reject the call??

    in lock screen how to reject the call??

    iPhone, iOS 7.02
    What's the reason why the screen can't show the same touch screen buttons in locked as in unlocked mode?
    When I lock the phone I expect the phone to be locked with chance only to answer or reject an incoming call.
    Often when not beeing able to accept a call is when one is in a situation where you can't answer and the rejection, as well as answering of course, shall be very easy to do.
    OK for the dubbelclick on the lock button but how to find that little button when stressed and can't answer?
    This was better in IOS6!

  • How to reject external table rows with some blank columns

    How to reject external table rows with some blank columns
    I have an external table and I would like to reject rows when a number of fields are empty. Here are the details.
    CREATE TABLE EXTTAB (
    ID NUMBER(10),
    TSTAMP DATE,
    C1 NUMBER(5,0),
    C2 DATE,
    C3 FLOAT(126)
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EXT_DAT_DIR
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE
    LOAD WHEN (NOT (c1 = BLANKS AND c2 = BLANKS AND c3 = BLANKS))
    LOGFILE EXT_LOG_DIR:'exttab.log'
    BADFILE EXT_BAD_DIR:'exttab.bad'
    DISCARDFILE EXT_BAD_DIR:'exttab.dsc'
    FIELDS TERMINATED BY "|"
    LRTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL
    FIELDS (
    ID,
    TSTAMP DATE 'YYYYMMDDHH24MISS',
    C1,
    C2 DATE 'YYYYMMDDHH24MISS',
    C3
    ) LOCATION ('dummy.dat')
    REJECT LIMIT UNLIMITED
    So, as you can see from the LOAD WHEN clause, I'd like to reject rows when C1, C2 and C3 are empty.
    The above statement works fine and creates the table. However when I am trying to load data using it, the following error is produced:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "not": expecting one of: "double-quoted-string, identifier, (, number, single-quoted-string"
    KUP-01007: at line 1 column 41
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    It seems that external tables driver does not understand the "NOT (...)" condition. Could anyone suggest how I can achieve what I want in a different way?
    Thank you.
    Denis

    Another method would be to simply remove the "LOAD WHEN condition" and create a view on the external table which filters the data.
    CREATE EXTTAB_VIEW AS
    SELECT * FROM EXTTAB
    WHERE not (c1 is null and c2 is null and c3 is null);

  • How to reject a MM contract during approval ?

    Hi,
    I have setup approval strategy for MM contracts (outline agreements).
    Via trx ME35K I can approve the contract, but I don't find a way to reject the contract ?
    Is there a way to reject a contract like it is possible for PR and PO approval ?
    Please don't answer that the solution is not to approve the contract :o)
    Thanks for feedback.

    Hi,
    thanks for your answer, indeed you can cancel a contract approval but my question was about how to reject a contract without first approving it ?
    Like in the PR/PO approval, you have two buttons: one to approve and one to reject a PO.
    our users want to have the possibility to reject the contract in case the contract contains wrong information.

  • How to Reject RFQ (Release Strategy)

    Hi,
    In ME29N , we have facility to Reject / Approve a Purchase order in Release staretgy tab .... but how to reject a RFQ .
    There is no option available in ME45 to Reject a RFQ, only we can release it.
    Need your help
    REGARDS
    SHREY

    hi
    rejection of rfq is not possible
    ru talking of calcelling or reversing the release
    if yes
    then in me45 select therel code then belowt that tick on cancel release
    execute ,select ur po and click on cancel release
    regards
    kunal

  • How to REJECT non-released activated Activities?

    Hi All,
    Could any one pls let me know on how to REJECT activities which are activated and are waiting for RELEASE.
    When SAP asks to RELEASE then there should be a way to REJECT.
    Thanks,
    Raghavendra Pothula

    Hi Raghavendra
    The file must belong to an Activity hence the lock can be removed by reverting the Activity . This is how it is done
    Go to
    http://<server>:<port>/dtr/system-tools/reports
    ->Select Activity Search
    ->Search for the activity
    ->drill down to the Activity
    ->Choose Revert Activity from the drop down list at right top corner.
    Hope it will help.
    Regards
    Shobhan

  • How to reject the calls to iphone?

    How to reject the calls to iphone?

    Whel you can tap the On/OFF button to decline and if you press twice it goes to the voice mail.
    Other option is only available if you have the phone unlocked it says reject

  • How to forward alert from one user to another user and how to reject?

    Hi everybody.
    How to forward alert from one user to another user and how to reject and how to complete alert?
    Regards,
    Vinay.

    What alert are you talking about? Which version of BOE / Edge do you use?

  • How to reject chnages in XI

    Hi all,
    I have a problem. In the ID instead of deleting a communication channel, the Business service got deleted. But it is not activated becasue it is used in Receiver agreements.
    So, i created the service again with the same name and added the receivers in it. but still teh channels are not appearing.
    Can anyone tell me how to get back the service and the communication channels?
    How to reject the changes that i made

    Hi Lavanya,
    If you have deleted the business system and not yet activated. then for sure it will be in the change list.
    Now go to Change list ---> right click on the objects which you have deleted and click on Reject Change...
    Now your objects which you have deleted will again appear in your scenario.
    Cheers!!!
    Naveeb.

  • How to measure pulse/amplitude droop?

    I am trying to figure out how to measure pulse/amplitude droop in the labview.
    Is there any built in VI that perform this measurement?
    Thanks
    DB

    Do you want to measure the 10% to 90% height of the pulse itself or the 10% to 90% change in the pulse level? The suspect the latter, or we would not be having this conversation. If you want to do the former, use Amplitude and Levels.vi or Pulse Parameters.vi and scale by 0.8 to get the 10% to 90%. If you want to get the latter, you may be in for more work. First, try to use the overshoot output of Timing and Transition Measurements or Transition Measurements.vi. Read the documentation, as there is a fair amount of flexibility you can put to your advantage. If that doesn't give you good results, use Pulse Measurements.vi to find your pulse, then extract that section of your waveform. Trim the ends to get rid of the rising and falling edges (this should be a constant number of points if your pulses are consistent). Analyze the result for 10% to 90% values. The easiest way to do this is probably to use the array max and min primitive to give you the maximum and minimum points, then scale by 0.8. Alternately, and more robustly, you can duplicate the waveform a couple of times, concatenate the results, and use Amplitude and Levels.vi to find the amplitude. As a final alternative, you could fit the resulting curve to an appropriate line/polynomial/exponential and extract the info from the curve coefficients. This will only work if the data is a well defined curve. Be careful with general polynomial fits.
    Good luck. Let us know how you make out.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • How to check pulse on new ipad please info?

    how to check pulse in new ipad?
    I have sign unlimitied package, but still can not connet to safari? why?

    Check here:
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • How to reject Line Items in a Service Contract?

    Hello friends,
    Can anyone help me understand how do we reject items in a Service Contract? I don't see any Reject field. Is it one of the Status I need to configure for Item Level Status Profile? Even if I add a 'Reject' status, how do I link it to Rejection Reason codes? (I know how to add Reason codes in customizing, but how they are linked to a Transaction type is something I am not finding...).
    Please provide any inputs.
    Thanks.

    HI Navaneethan,
    please try following code.
    make  PEKKO should be internal table with appropraite structure..
    Loop at ZBTXT.
          MOVE ZBTXT-LINE TO PEKKO-ZBTXT.
          append  PEKKO.
         clear  PEKKO.
    ENDLOOP.
    loop at pekko.
    write : / PEKKO-zbtxt.
    endloop.
    if above code is helpful, REWARD POINTS.
    Regards,
    Ranjith

  • How to Reject Quotation line item and update New line item

    Hi all,
    I have a doubt in Quotation Rejection,Here it goes....
    For VC implementation,We are Creating a quotation with Dummy Material,and after Creating Material Masters we have to update the Newly created material back in Quotation for same quotation number and after this the dummy material i.e the previous line item should be rejected with reason as a duplicate(reason code 23)..
    So Pls help me in Rejecting the line item of quotation.how this is done.
    Reply soon.
    Thanks in Advance,
    Balaji Meda

    Hi,
    The requirement is also to Update the Quotation with the newly created material.
    So we need a Bapi or a function module which does 2 things:
    1. Reject the previous Line item with a reason code.
    2. Update the Quoation with the new material and insert a a new line item.
    Thanks,
    Balaji.

  • How to reject a call in ios 7

    How i can reject a call in ios 7

    If the screen is locked, click one on the power/lock button to silence the call; twice to send the call directly to voicemail.
    If the screen is not locked use the DECLINE button.

Maybe you are looking for

  • Preview color problem in Bridge CS 5.5

    I'm having the following problem with the thumbnails and previews in Bridge CS 5.5. After I've scanned an image, the preview matches the colors I expect, with nice saturated colors. After opening the image in Raw and making a few changes such as crop

  • Consolidation group change: Balance sheet/income statement balance 14,560

    Dear All, While performing the consolidation group change task, system throws the error message : Balance sheet/income statement balance 14,560,497.62- INR Message no. UCD1011 Diagnosis The document to be posted is not completely in balance. Entries

  • McAfee Antivirus automatic remediation

    Hello All, I'm having an issue with McAfee Antivirus remediation. I'm using Cisco NAC 4.8.2 and it seems that automatic remediation is not working. Could someone help? Is there a webpage where we can check which AV can do automatic remediation?

  • 'All Photos' Album Sorting Order

    I have 16.683 photos appearing under 'photos'. 16.853 under the Album 'All photos' and the order is not chronological (i.e.: sometimes a pic from 2009 is among those taken in 2013). Any ideas? Thanks in advance.

  • OBIEE Ad-Hoc Reporting .

    Hi, Can any body tell me more details about adhoc reporting in Obiee.How do we set put users authentication.and how are reports saved.and anything else more,,, Would really appreciate it