Phase calculation in conditional loop

I collect data from 2 channels on an Agilest oscilloscope (DSO-X-2004A) using the IVI Scope Acquire block. After acquiring those signals, I want to know the phase difference, which I calculate in the following manner: Tone Extraction CH1, Tone Extraction CH2, Formula (detect phase1 - detect phase 2). 
I want to run this in a loop, and store the phase difference each loop. For that I have a conditional loop (set to 10 iterations for now), and after each phase difference calculation I save the new data point to a txt file. Is there another way of storing/saving the phase difference calculation from each loop, besides saving it to file?
The next problem I have is that after all the loops are finished, I want to look at the phase difference data and plot it vs iteration number. This is a problem because I get the error: "The selected file does not contains any Signals that could be imported" when trying to load the data at the end. I have the load ascii block outside the conditional loop that generates the data file, so I don't know why the load ascii is trying to excecute before the loop is done. I tried splitting everything into Sequence conditions with execution delays, but that hasn't worked either.
Is there a better way to save the calculation from each loop, or how do I appropriately load by text file after creating it in the same signal express project?
Thanks,
John Oxaal

Thanks for sending the the project.  For now if you would like to easily integrate the setup that you have in SignalExpress into LabVIEW you can actually convert the project into LabVIEW code.  As long as the LabVIEW version is as late or later than your SignalExpress version, you can do this.  Please refer to document below on how to convert signal express project into a LabVIEW VI.
How Can I Generate a LabVIEW VI From My SignalExpress Project?:
http://digital.ni.com/public.nsf/allkb/96C01D2680084AAA86256F33007D98FA
 Once you figure out how to take in your data in LabVIEW, you can start placing your data in the array that I mentioned from which you can process the data.
Cameron T
Applications Engineer
National Instruments

Similar Messages

  • Delay/Timer only in a conditional loop.

    Hello,
    I want to use a delay(or some kind of timer) within my
    program. I intend to use to it within a conditional loop. Specifically,
    if a particular condition is true, then I want to wait for 50ms and
    then check another condition, which if true, I want to stop my program.
    I have used wait vi in the timing section. But this vi pauses my
    whole program. Specifically, when the above mentioned condition is met,
    I want the delay vi to execute along with my data acquistion vi. At
    present, when the delay vi executes, everything (data acquisition, peak
    detetction, plotting etc) in the program pauses. I guess its correct
    functionality of wait vi but it does not suit my need.
    Does someone have any alternate for pausing (delay/timer) a
    particular condition loop without affecting the other parts of my
    program? Specifically, only the conditional loop delays for a certain time while other features like data acquisition, peak
    detetction, plotting etc excute normally.
    Message Edited by Neuropotential on 02-22-2010 12:47 PM
    Message Edited by Neuropotential on 02-22-2010 12:48 PM
    Solved!
    Go to Solution.

    Yes. This is exactly what I was looking for. But, there is a issue. In practise, i will not be looking at 10 sec delay but a very small number like 50 ms. With this approach, when I set a value of 50ms, my program stops after close to 90-93ms (After 50ms, there is a AND gate, when true stops the program; Refer to the attachement).
    There are multiple reasons which I see. First is obvious I am using a windows xp with lot of other stuff going on simutaneously. Also. elapsed time vi is an "express vi". Do you think this can be one of the primary reason for such a delay? Finally, I intend to use this program on RT based machine.
    Do  you see it working exactly as expected on those machines or do I have to modify my code? Please guide me. 
    Also, how to I mark your post as answer and other good things. 
    Thanks 
    Attachments:
    Image.JPG ‏60 KB

  • GP - post condition loop block

    Hi there,
    I developed two web dynpro applications that implement the Callable object interface. Let's say they are called wdpA and wdpB.
    wdpA has  output parameter id with multiplicity (0..1)
    wdpB has input parameter id with multiplicty (0...n = list)
    Is it possible to do wdpA in a post condition loop block (execute it at least once) and after that block go to the next block that contains wdpB. In going from wdpA (possibly executed multiple times) to wdpB, i want to consolidate wdpA-output_id to and wdpB-input_id so that the id's that were generated in the loop can be processed in wdpB.
    Kind regards,
    J.

    Hi Joren,
    I don't think it's too difficult. You can find a description and an example here:
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/82/0e6f4132f15b58e10000000a1550b0/frameset.htm">Implementing Callable Objects for Background Execution</a>
    In any case you need some references/public parts to determined GP DCs, if you have a NWDI, than it should no problem to reference to them. If not, perhaps the following blog describes a good workaround:
    <a href="/people/andre.truong/blog/2006/06/26/working-with-the-apis-of-caf-guided-procedures-nwdi-or-local-development">Working with the APIs of CAF Guided Procedures: NWDI or Local Development?</a>
    Regards,
      Jan

  • Conditional Loop doesnt work correctly.

    Hi There,
    If you analyze my code, its all about parsing a dictionary.
    Im checking the dictionary for the "aardvark" word. It gives me
    false all the time. When "aardvark" is the first word in the array,
    i.e my_dictionary[0] is "aardvark". I wonder why the conditional
    loop isnt working fine. Im checking if the user string aardvark is
    == my_dictionary
    ; it should be giving me the true value.
    Is there any error in the code? Can anyone explain me where
    im going wrong?
    P.S -> The traces put everywhere gives me the right
    output. Except for the result of the if().
    Regards and thanks a lot in advance.
    Roshan Kolar

    Hi Raymond,
    Thanks for the reply. I got the problem, actually the
    conditional loop was perfect, the parsing was not. The reason
    being, some words in the dictionary had a Space/NewLine/Carriage
    Return at the last index after the word. It was all random, so some
    words were taken, but some were not like "vicious" == "vicious " -
    gave INVALID WORD.
    So I redesigned the parser, where I removed the unwanted last
    char - now the condition worked fine. Thank god I was working even
    after posting the query.
    Thanks a lot Raymond.
    Regards,
    Roshan

  • Differance betwwen alternative calculation type & condition base value.

    dear expert
    wats the differance betwwen alternative calculation type & condition base value in pricing.
    vicky

    Hi,
    AltCty - Condition formula for alternative calculation type:
    It is an alternative formula for the condition type that can be used instead of standard formulas.
    For example, let us take the Profit Margin which can be both + / - , so here this routine will help us in generating the value which can be either + or -. Profit margin is not a condition type so it cannot be classified as +ve or -ve in the V/06.Ex.: 950 0 Profit Margin 11. So we assign 11 - Profit Margin.
    AltCBV - Alternative formula for condition base value:
    Formula for determining the condition basis as an alternative to the standard.
    It is used as a basis to calculate value of the condition type instead of using it from the "FROM" column.
    Ex.: Freight - KF00. Freight is calculated based on weight, volume etc. and not on the base price. In pricing there is no entry of weight from which the value can be referred like we do for discounts using base price. We have to get the value from the Material master. In this column we can mention the value as 12 - Gross Weight or 13 - Net Weight.
    During pricing, the system will consider the value that is mentioned in this column and determine the freight based on this value.
    Suppose we have Net weight: 100 kgs and Gross Weight: 150 kgs. And if we mention 13 in this column then the Freight condition KF00 will be calculated using the weight as 100 kgs.
    And both of them are routines written by APABers in VOFM.
    Reg,
    JJ

  • Overwrite the system calculated VAT - Condition Value with Inbound VAT Amou

    Hello experts:
    We have a following requirement in my customer for Inbound VAT Processing.
    We want to overwrite the system calculated VAT - Condition Value with Inbound VAT Amount
    Details :
    Aggregated sales Idoc ( WPUUMS01) is used here for posting the daily sale.
    Inbound pricing procedure is ZPOS00 ( copy of POS000)
    VAT is maintained with condition Type ZMWS. Using Tax Codes
    When idoc get posted system calculates the ZMWS and working fine.
    However we would like to overwrite this condition value with inbound condition value (from segment 5 of WPUUMS)
    Example :
    For Article A : inbound aggregated sales Amount= 100 INR and ZMWS is 10%( VAT code B1)
    Then system will calculate 90 INR revenue and 10 INR as VAT
    However due to rounding in POS system we may get from POS the VAT Amount =9.99 for example.
    Tisak wants to overwrite the condition value 10 INR with 9.99 INR.
    I will appreciate if anybody can suggest some approach or share experience if came across the same scenario (Tax condition type).
    Thanks and regards,

    Hi,
    Either you can use rounding in POS such that it round up for 9.99 to 10.
    And then in SAP pricing procedure you can use alternate calculation type as 16 or 17 (17 should be used with decimal point assigned to currency for rounding like 2 decimal for INR).
    doing this will also round the figure from 9.99 to 10 is SAP.
    Hope this solves your query.
    Regards,
    Ashutosh

  • Service Tax Calculation for Condition Types

    Dear Experts,
    In an Import Purchase Order for Coal, along with the Basic Price of the Coal, the following Conditions are also entered, in the Condition Types maintained in the Import Pricing Schema
    -        Water front royalty
    -          Port Dues
    -          Berth Hire Charges
    -          Port terminal charges
    -          Surveyor charges
    Each of these conditions may have a separate Vendor, hence the Purchase Order creator will select each condition and assign the required vendor.
    Each of these conditions is subject to Service Tax, Educational Cess and Higher Secondary Educational Cess, the User want that separate service tax calculation be made available in the pricing schema for these individual conditions and the relevant vendor be assigned to these condition.  the service tax on individual conditions be paid to the relevant vendor along with the basic value for the condition.
    Separate Condition Types (15 nos.) for each of the above conditions for Service Tax, Educational Cess and Higher Secondary Educational Cess can be prepared and added in the pricing schema, the user will have to enter the percentages in the relevant conditions.
    The user wants that the Service Tax be automatically calculated for these conditions, instead of manually entering the same. Please guide how can this be achieved.
    Thanks in advance.
    AJ

    Hi,
    For this you have to maintain the all your charges in your pricing procedure along with each charge you have to maintain 3 condition types for service and chesses.
    Ex:
    step counter cond.type des.                   from                 to
    1 1 P000 Gross Price        
    1 2 P001 Gross Price        
    25 0 JM00 Water front royalty                 1    
    26 0 ser1 service                                  25    
    27 0 edu1 educationcess                      26
    28 0 edu2 se.edu.cess ;                        26
    29 0 jm01 Port Dues                                1
    30 0 ser1 service                                   29
    31 0 edu1 educationcess                       30
    32 0 edu2 se.edu.cess                           30
    like this you have to built your pricing procedure in a m/08. after that for you want the service tax automatically so for that you have to put the accesses sequence in you service condition types (ser, edu1,edu2).in m/06.
    After that you have to maintain info record for that material and import vendor. in me11 in that in condition tab you have to maintain percentage for ser, edu1, edu2 . the system will  calculate the service charges automatically.
    Thanking you,

  • Restrict calculation for condition type in Subtotal

    Hi Experts,
    In my organisaion i have a requirement to retrict the calculation of Subtotal value in the pricing calculation.
    I have two Internal price condition type VPRS & ZCST.
    VPRS is calculated in Step20
    ZCST is calculated in Step30
    The subtotal is calculated in Step40 (The subtotal is calculation From 20 to 30)
    Now my requirement is to restrict the calculation of sub-total. Eventhough the subtotal is calculated from 20 to 30. I need to have the subtotal value only for 20. I need to exclude fro step 30.
    Example:
    VPRS  - 100
    ZCST  -  100
    Subtotal - 200
    My requirement is the subtotal value should be only 100 not 200.
    Regards,
    Jagadish

    Hi Jagdish,
    Please try the follwing.
    1: Enter 20 in the From column and leave To column blank
    or
    2: Enter 20 in both the From and To columns in the pricing procesdure.

  • Wrong calculation for condition type for misc. provision in service PO

    Hi Gurus,
    In service PO line item, we have maintained customised condition type for misc provision. this is % based on net price. It has been assigned account key and accrual key. It's manual. Logically, it should calculate the value based on the total of the net values of all service lines and post a single entry for all concerned service lines. What system is actually doing, it calculates the value correctly for total of net values of service lines in that PO line item but post it to the account as many number of times as the number of service lines in that line item.
    This is when service based IV is active for the PO line item. If I deactivate this, then it post the account once only which is ok.
    Please explain this behaviour. Also, I want to activate service based IV, what should I do to this condition type. Is there any condtion base formula or condtion value formual to be assigned in the pricing procedure?
    Thanks in advance,
    Sudhir Dahake

    Hi,
    Check if some user exit/ routine is written for the condition type.
    Check user exit RV60AFZZ, RV60AFZA, RV60AFZB,RV60AFZC for some code.
    If it is a manual condition check COPY CONTROLS or if it is automatic check condition records from which it is calculated based on qty, price, material type, etc.
    Regards,
    Amit

  • Calculating tax condition amount

    Hi all,
    I am  confused on how the system calculates tax conditon amount (let' say MWST) in sales order. In my system the tax condition type mwst has a condition record maintained of 4%  thru VK11 and a tax code V0 assoicated with it.
    The base value for calculating the tax amount for mwst is taken from the SD pricing procedure and so the tax amount is calculated in sales order.... However I need to know that in FTXP for the tax code V0, there is a tax rate of 4% maintained against it and an account key mws and a GL account. Is MWST also maintained in FTXP for the relevant tax procedure for 4% ???. I need to know whether for posting to tax GL account for condition type mwst, does the system calculates the tax amount thru tax procedure  and if yes then how the system takes the value of BASB (base amount )in tax procedure in FTXP  for calculating the tax amount.
    regards
    sachin

    Hi Sachin
    Is MWST also maintained in FTXP for the relevant tax procedure for 4% ???. I need to know whether for posting to tax GL account for condition type mwst, does the system calculates the tax amount thru tax procedure and if yes then how the system takes the value of BASB (base amount )in tax procedure in FTXP for calculating the tax amount.
    The values maintained in FTXP are just for record purpose. For every Tax we should have a particular GL account, so that we can find the total tax in a period of time whenever required.
    But the actual calculation of tax is happening at pricing procedure level only. Tax is calculated based on base price in pricing procedure. Also assigning that amount to GLs assigned against them in VKOA.
    Hope this clarify your doubt.

  • Conditional Loop Terminal and Autogrow

    When changing a for loop terminal from indexing to conditional, the for loop and any containing structures expand even when they are not set to Auto Grow.
    When selecting multiple conditional tunnels and and choosing Vertical Compress from the Distribute Objects menu, the tunnels are compressed as if they don't have condititonal terminals.
    Are either of these bugs known or corrected in LabVIEW 2013?  I could not find anything on NI.com when searching for "conditional tunnel autogrow".
    Thanks,
    Matt
    Attachments:
    Conditional Terminal Auto Grow bug.vi ‏6 KB

    Matt,
    A Very nice example of unexpected behaviour!
    Steps to reproduce:
    Open Matt's attachment in LabVIEW 2012  (12.0f3 Windows 32 on Win 7 64)
    Right-click the loop and verify Autogrow is not checked
    Right-click the top output tunnel and select Tunnel mode>>Conditional.   Loop does not respect the autogrow setting! 
    Lasso both output tunnels and Ctrl+D (or optionally, click Distribute items>>Vertical Compress)  Conditional glyphs are not respected in allignment
    Select the "Top" tunnel and Ctrl+Shift+J (Move to back)  What kind of tunnel is that now? I'd really hate to debug that one.
    Really Really hate to debug that one! Run VI Analizer! No overlapping objects!
    Sounds like a small oversight-- but a deadly potential for breaking code that is impossible to find without a divining rod!
    BOLO (Be on the lookout) for this type of bug.
    Jeff

  • Results for % calculation with Condition

    I have a condition on my query in BEx Query Designer that limits the customers shown to ones who have a dollar value in a particular column.  I am now trying to get the results rows to take the condition into account.
    For the dollar key figures, I can just set the results calculations to "Total", and that gives me the total dollars for the customers displayed (that fit the condition), as opposed to the total dollars for ALL customers (if I didn't have the condition).  This is correct.
    However, I have another key figure that represents what percentage of one dollar key figure that another dollar key figure is.  I cannot get the result rows for this key figure to correctly show me the results of the calculation for only the values that match the condition, it keeps showing the percentages based on the full dollar quantities outside of the condition.
    Is there a way for me to get the calculation that I want?
    Query without Condition:
    Customer_____Dollars1_____Dollars2_____%
    A_____________5___________20________25
    B____________10___________20________50
    C____________10___________10_______100
    Result________25___________50________50
    Query with Condition (Dollars1 > 5) Current behavior (wrong):
    Customer_____Dollars1_____Dollars2_____%
    B____________10___________20________50
    C____________10___________10_______100
    Result________20___________30________50
    Query with Condition (Dollars1 > 5) Desired behavior (correct):
    Customer_____Dollars1_____Dollars2_____%
    B____________10___________20________50
    C____________10___________10_______100
    Result________20___________30________66
    Please Help!

    Hi,
    As i cannot see invoice document number in output so would suggest to go for nested exception aggregation.
    Create a new formula and put your aggregated keyfigure inside it and repeat the steps which i told in my last post.
    Make sure to apply it on both the keyfigures.
    If this also not works then last approach would be---
    Make a formula variable with replacement path for customer in replacement path tab choose replace variable with infoobject-replace with attribute value-attribute constant 1..in currency/unit ttab choose number..
    Now multiply your both keyfigure with this formula variable.
    Hope it helps.

  • ICloud Photos - Terms & Conditions Loop

    Apple TV Model MD199BZ/A
    Hi guys,
    I updated the firmware of my Apple TV yesterday to 6.0 (6646.65) and now I cannot connect to the new "iCloud Photos" which replaced the old "Photos". It just keep showing the new iCloud Terms and Conditions, and if select Agree it just loops back to Terms and Conditions again. I tried scrolling down all the way to the bottom before hitting Agree, but it just keep showing iCloud T&C and never connects... What should I do?

    I am using ATV2, problem with iCloud ID/Password when accepting Conditions there is a loop to accept them again, and again and again
    Password is correct as in other devices, iTunes password/ID is the same and this one has no problem
    No problem reported with Macbook Air 2012, nor with iPad,2 nor with iPhone 5, only with ATV2 after the newsest update
    Thanks

  • Conditional Looping to check for equal results???  Anyone tried it?

    Does anyone know if there is a way to loop though X amount of lines and IF a specific element is always the same... then DO "something"
    I need to run though this type of condition in the header section of the a template. Basically on a lot of PO's, we have the same Requester for all the lines, so we just want to see it once in the header... but if lines have different requesters for the same PO we need to show them on the line.
    So say i have this XML output below, (i trimmed it down a bit from the actual PO output) how can I loop though each G_DISTRIBUTIONS node to check the value of POD_REQUESTOR_NAME, then if all the values are the same(equal)... just print it out once.
    I need to then do a similar condition in the lines... but show the name when they are NOT the same.
    <G_HEADERS>
    <G_LINES>
    <LIST_G_DISTRIBUTIONS>
    <G_DISTRIBUTIONS>
    <POD_REQUESTOR_NAME>LOMBARDO, TIANA</POD_REQUESTOR_NAME>
    </G_DISTRIBUTIONS>
    </LIST_G_DISTRIBUTIONS>
    </G_LINES>
    <G_LINES>
    <LIST_G_DISTRIBUTIONS>
    <G_DISTRIBUTIONS>
    <POD_REQUESTOR_NAME>LOMBARDO, TIANA</POD_REQUESTOR_NAME>
    </G_DISTRIBUTIONS>
    </LIST_G_DISTRIBUTIONS>
    </G_LINES>
    <G_LINES>
    <LIST_G_DISTRIBUTIONS>
    <G_DISTRIBUTIONS>
    <POD_REQUESTOR_NAME>LOMBARDO, TIANA</POD_REQUESTOR_NAME>
    </G_DISTRIBUTIONS>
    </LIST_G_DISTRIBUTIONS>
    </G_LINES>
    </G_HEADERS>
    Thanks in advance, hope to get a response,
    Jeremy

    Thanks... but i'm not sure this is working the way i expect it.
    This appears to pull the unique one correctly... but i'm trying ONLY show the element when all the elements in the for loop are equal.
    Can i put a IF statment into it? Something like... but i'm pretty sure that's not going to happen...
    <?if: for-each:xdoxslt:distinct_values(G_DISTRIBUTIONS) = for-each:xdoxslt:distinct_values(G_DISTRIBUTIONS)?><?POD_REQUESTOR_NAME?><?end for-each?><?end if?>

  • Zero phase filtering initial condition effect

    Hi
    I was wondering if any body knows how I can handle the problem of edge effect caused by zero phase filtering? The problem is that by using zero phase filtering if the intial condition of forward filter does not equal to that of reverse filter, a kind of spike will occur at the begining and the end of filtered signal. In MATLAB spacial care has been taken to minimize this effect but it seems it is not the case in LabView?
    I noticed that some body mentioned the same problem here long time ago and one of replies pointed out that it is the transient effect of convolution and we need to remove the first and last samples of filtered signal but I don't think that it is a wise solution because the problem is not because of convolution.
     Best regards
    Afshin

    The math is correct, but you can not compare directly to the math used then dealing with continuous math functions like sin(x). Use scaling functions to if you want to "correct" the amplitude. Do not change the dt value
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    Derivative[1].vi ‏19 KB

Maybe you are looking for

  • IPod classic 160gb recognized in itunes but not Windows

    Bought this week and I have spent the last 3 hours trying to get this to work. Windows says that the "hardware is installed and ready to use", but the iPod is not found in "My Computer". Device Manager -> Apple mobile device usb driver says it is wor

  • Queue JNDI lookup in a clustered environment

    Hey all,           I know in a 6.1 cluster, the queues/JMS servers can only reside on one           server.           How can i lookup a queue from internal code from one of the off servers? The           JNDI lookup doesn't grab it, throws an object

  • Receiving SMS using GSM module in LabVIEW

    Hi ... I am Communicating the GSM module in VI. I can found the solution for sending the SMS. But i am having the trouble in read the SMS in VI. I tried more type of models. When I am running the VI,  in the read buffer content is displaying as "AT+C

  • SFTP using JAva

    Hi, I want to use SFTP(FTP over SSH) to transfer files to a remote server and I am currently using Jsch from Jcraft. But apparently this does not support transferring files in ASCII mode, it uses binary mode by default. I need to transfer the files i

  • Upgrade Mac OS 10.4.11 to Snow Leopard

    I'm an editor. I have a MacBookPro 17" with 10.4.11 looking to upgrade to Snow Leopard. Must I go to Leopard first? If not, what adventures can I expect from third party software, especially FCP Academic 5.1.1 - Adobe CS4, etc.