Zero crossing and syncronizing

I use 2 programs.I have atachetted them below.
 In "Line zero cross sync" I detect the crossings through zero of a sine and then for every crossing I try to write on a analog output an impulse.
 The second program "sincronizare cu reteaua subvi" measures the frequency of the signal and calculates a delay time.
 How can I delay the moment between detecting a zero crossing and writing the impuls, with the value calculated with the second program.
 The second problem: If I use a loop to delay the time how can I make sure that the two operations will be syncronized (if I modify the frequncy of the signal during the measurement I want the second program to modify the delay time simultaneously,not with a delay).
I am using LabVIEW 8.0. 
Thank you
Attachments:
Line zero cross sync.vi ‏85 KB
sincronizare cu reteaua subvi.vi ‏32 KB

I solved the problem.Thank you anyway

Similar Messages

  • How to measure time difference between zero crossing of a sine wave and rise time of a pulse on a same graph?

    I have a 50Hz sine wave and a pulse signal on a same graph. The phase difference between two is between 0-90 degrees.
    Now I need to calculate the time difference between (when the sine wave crosses zero volts) and (when the pulse rises). The frequency will stay approximately same for both signals.
    The application is for a three phase generator. In simple words, when the time difference between the zero-crossing of sine wave and the pulse rises increases, that means that the load on the generator has increases.
    I am a beginner user of LabView (version 9, 2009), maybe it is a very simple problem but I've been pulling my hair out for the last few days and coudln't figure anything out. Any help would be greatly appreciated. I am using DAQ USB-6008 to measure these voltages and pulse from the generator and a sensor
    I have attached a jpg (a graph that i just made with excel to explain). The time 't' is what I am trying to measure
    Cheers
    Awais 
    Message Edited by awais.h on 03-30-2010 11:20 PM
    Message Edited by awais.h on 03-30-2010 11:21 PM
    Solved!
    Go to Solution.

    Hi
    Thanks for the code but I'm afraid it won't work. Like you said the probability of choosing a value that is on both graphs may not happen. This is something that I would like the code to do automatically.
    But I did use the previous code posted and made some modifications to it and it seems to work perfectly. Now the next thing is to be able to get just that one value that tells you the first time difference.
    Here is what I get using that code.
    As you can see from the t Values. I only need the one that is highlighted. If there is a way to filter out the rest it would be great.
    I was thinking of a while loop and as soon as the value is higher than 3E-5 it would store the number and stop the loop, but I'm not too familiar with arrays in labview.
    Here is the the code modified.
    As you can see, it wasn't that big of a modification and it still is your code.
    I will keep trying.
    Thanks for the help
    Attachments:
    FinalShockSpeed.vi ‏55 KB

  • Zero crossing, "Triggering" and XY-Graphs

    I'm trying to measure the electrical hysteresis of a sample.  The way in which I do this is by measuring two voltages within a circuit, sending them to my DAQ, and then plotting them in an XY-Graph to view the shape of the curve.  I can somewhat see the hysteresis, but II need to measure the "zero-crossings"; that is to say, the value of one function, when the other is 0, and vice versa.  So when V1 = 0, I want to know what V2 is, and when V2 = 0, I want to know what V1 is.  Seems simple enough, and I have included my VI.
    First I tried the ZeroCrossingPtbyPt, along witha Relay, which never seemed to trigger properly.
    Second, I tried using Trigger and Gate, but that seems to give inflated values.
    This VI can be tested by removing the DAQ assitant and replacing it with two "Generate Signal"(s),  with the same frequency, different amplitudes, and a small phase difference, and this will produce a similar effect without the real signals.
    Next, I am sending the raw voltage signals into a Waveform Graph.  However, it is impossible to get the traces to stay "still" on the graph.  In other words, if this were a real oscilloscope, there would be a "triggering" problem, and if the trigger were set to the proper value, the oscilloscope would be able to track the waveform without it jittering left to right in time.  Any ideas on this?  I've tried to change just about everything in the Waveform Graph with no difference.  Do I need to send in some other signal to get the graph to follow the waveform properly?  This is really important because it will tell me if my sample rate is good enough to capture the signal (a sine wave at 1 kHz).
     Finally, the hysteresis curve on the XY Graph seems to cover many cycles (periods) of the waveform, but I want it to cover only 1 cycle at a time, so it isn't so sketchy-looking.  It's very boxy as well.  So in short, the number of points it is plotting is fine, but it is not plotting them quickly enough, since I'd like all of the points it plots to be over a single period of the waveform.
    Please help!  Thanks in advance.
    Attachments:
    hysteresis.vi ‏176 KB

    As it turns out, the issue was that I was not collecting enough samples at a high enough sample rate from the DAQ.  This is why it worked with "Generate Signals" and did not work with the DAQ Assistant.  Because there were not enough samples, the apparent zero crossing was occuring either too early or too late, leading to an incorrect value.  Therefore, the best solution when it comes to finding zero crossings is make sure your # of samples, and sample rate are high enough to get an accurate measurement.
    As a result, this is why my XY Graph was showing blocky hysteresis loops, rather than nice smooth curve hysteresis loops.  The data being sent to it was not quick enough, and therefore the XY- Graph connected the dots between the points that it was sent, yielding a truncated loop, which appeared blocky or sketchy.
    On the issue of triggering, this can apparently be set within the DAQ Assistant in the "Triggering" tab; the key is chosing the correct channel to trigger from, and a reasonable trigger level.  This was my problem, and this is why my Graph appeared to jitter.  It was not the graph itself, but the DAQ Assistant that did not tell it the proper triggering timing.
    So, in short, I solved my own problems, but I leave this as a record for those who encounter similar problems in the future.
    Thanks.

  • Record time of zero crossing

    I am trying to record the time for zero crossing in order to get the phase angle and inevitably get the power facto . soi was trying out a few ideas to  see if this is achievable and i came up with this . can someone tell me where i am wrong . or what to do  get the right values .. 
    Solved!
    Go to Solution.
    Attachments:
    zero crossing in waveform.vi ‏17 KB
    Zero Crossing.PNG ‏21 KB

    1. You need to pass the waveform into the Get Waveform Time Array.
    2. No need to wire up the N on the FOR loop since you are using Autoindexing tunnels.
    3. The Conditional Indexing tunnel is your friend here.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    zero crossing in waveform_BD.png ‏20 KB

  • Looking for zero crossing point

    Hello,
    I have Amplitude vs. time data (wave).    
    I need to find the zero crossing time. Now I am using "For loop"  to search the Amplitude array for the index of the neighbor to zero through point by point, and then by linear inerpolating to get the zero crossing time.  When the point number is large, say 60kpts, it gets slow because the for loop "point by point" searching method, I think.
    I am wondering if there is any quick way to do that.
    Thanks,
    Wei Tong

    Try something like this, maybe? See if it makes sense.
    (It currently fails if a value is exactly zero and the function does not switch sign afterward. It just needs a bit more code to fix that. Modify as needed.)
    Message Edited by altenbach on 04-13-2008 12:52 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ZeroCrossings.png ‏33 KB
    ZeroCrossings.vi ‏57 KB

  • I wanted a zero crossing detector for a a acquired wave form.

    it shoul detect the zero crossing of a wave

    The technique for finding a zero crossing is basically to detect a change in sign between two consecutive numbers. You need to evaluate the previous number sign with the current number.
    A common way to do so is by multiplying the previous number and the current number. If the product is positive, both has the same sign and thus there was no zero crossing. If the product is negative, there was a zero crossing.
    Make sure you are sampling you signal fast enough to accurately detect when the zero crossing occur. If you know your signal, you may easily calculate the exact moment based on your aqcuired information.
    Best regards;
    Enrique Vargas
    www.vartortech.com

  • Duration of a zero crossing

    Hi all,
    I m a newbie to LabVIEW and I really need some help with some zero
    crossing issues.
    I have a wave generated from the values output by a pressure sensor. I
    differentiated this wave to obtain a wave with peaks, valleys and zero-
    crossings. Then I used the sign generating vi to generate another
    square wave depending on if the value is positive negative or zero.
    What I need to do now is to find the time duration between each zero
    crossing.i.e. How much time elapses before the next zero crossing
    occurs. Any ideas how to do this ?
    Thanks and regards.

    Here's a small VI which does part of that
    Have a nice day!!!
    LabVIEW | LabWindows/CVI | TestStand
    Certified LabVIEW Architect
    Attachments:
    Duration between peaks.vi ‏18 KB

  • Phase angle measurement using zero crossing

    I am using  zero crossing to measure the phase angle between (voltage and current) which is represented as  two input in my vi  to  eventually get the power factor. But however the reading i got for the power factor remain at 1 all through no changes. I am using an SCT- 013 -000 current transformer for the current and a power transformer for the voltage 240 - 6V . below is my vi . Can anyone help me troubleshoot why my result is showing 1 for different loads  including resistive , capacitive and inductive loads . 
    Attachments:
    Phase Angle Measurement.vi ‏39 KB

    Are you working with Nigel91 who posted a similar question in the Electrical Power Suite board?
    You have the same problem that he has. For dt = 0.02 (equivalent to a 50 Hz sampling rate) you cannot measure anything about a signal with a frequency higher than 25 Hz. And you could not get meaningful phase information at frequencies above a few hertz.
    To get good phase information at typical power line frequencies sampling rates of 1000-1200 Hz or higher should be used.
    Lynn

  • Zero-cross​ing function

    Hi,
    I found this zero-crossing function in one of the old forums and I'm trying to understand how it works. In my case I have two sine waves, instead of one square pulse but I can't really figure out how this function works. I know that first, the waves are generated then you get their attributes, the data values go into the zero-crossing detector that controls the case statement but I don't know how the trigger time and time interaval are used to build the array, I think the timestamp outside the 'for' loop is for storing the previous itteration of the zero-crossings but I'm not really sure.I have no clue what happens in the final step before the zero-crossing times are subtarcted, as in the threshold array and so on. I've read how each function individually but I can't add the blocks together.
    So I was wondering if someone could please explain how this works?
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Zerocros.png ‏131 KB

    Adding to what crossrulz said, it helps to understand what the code you're looking at is.
    It would appear you don't quite understand what t0 and dt are.  t0 is the time at the initial point in the waveform.  This can be a wide variety of times rather than simply 0.  dt is the amount of time between samples.  If we multiply the iteration by dt, we know how much time has passed since the first sample.  After 0, 0dt is the same as 0s.  From there, 1dt, 2dt, 3dt, etc can all be calculated to a value measuring time.  But, it's only measuring "time since the first sample."  If it's only measuring that, the timestamp could be meaningless.  If you want to convert the time since first sample to an actual time, you need to add the initial time to it.  As an example, if dt is 1s and t0 is 4:00:00pm, after 3 samples we are at 2dt so 2 seconds.  Do we care about 2 seconds or 4:00:02?
    The "big timestamp array" is being fed into what is called a shift-register.  You can use this register to pass values between iterations of a loop.  Before the loop, we feed an uninitialized array into the shift register.  The first time the build array is used, it's fed an empty array and the first timestamp to save.  This is then output to the shift register on the right side of the loop.  This value is passed to the next iteration.  It will persist until we reach the build array for the second time.  Now, the 1 element array is fed into the top input of the build array and a new timestamp is added to the end of the array.  This will continue with the n-sized array being fed to the top input and the newest timestamp being added to the end to make an array of size n+1.  If we want to maintain all of the timestamps, we need logic similar to this.  You could plug it into the bottom and the new timestamp to the top.  This would put the newest timestamps in the first element of the array.  You just want to include the old array so you keep all of the timestamps instead of just the most recent.

  • Dunning letters printing with zero balance and no invoice listing

    How to trouble shoot 'Dunning letters printing with zero balance and no invoice listing' problem

    As per my understanding it could be due to OB22 settings.
    refer following SAP notes
    335608,191927,
    373296

  • I tried down loading mozilla firefox to use as a web browser. It was downloaded 100% then when prompted to "run" the error message comes up with a red cross and the message'This file is corrupted" and won't let me proceed. What do I do now?

    I tried down loading mozilla firefox to use as a web browser. It was downloaded 100% then when prompted to "run" An error message comes up with a red cross and the message'This file is corrupted" and won't let me proceed. What do I do now?

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.<br />
    You can try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See http://kb.mozillazine.org/Unable_to_save_or_download_files

  • Zero Fill and Upper Case in Visual Composer not working

    Hello,
    I am building my first VC application and hit a small wall from get go. When I create input fields and set text formats for one to have "Zero Fill" and for the other one "Upper Case" they do not seem to work properly.
    “Zero Fill” does not work at all. I set this format and also set max length as 10 to be used as input for customer account #. But it does not perform conversion. When I call a BAPI to get customer list, if I enter 0000000100 it works. When I enter 100 it does not work. Thus "Zero Fill" does not take effect.
    "Upper case" works but only after refresh. If I enter ac10 as company code and then click submit it does not work. However if after entering ac10 I press enter and then submit, it work.
    Does anyone have any info on how to deal with this? We are using VC 7.0
    Thanks,
    Alex

    Hi ALex,
    Now I got your problem. I suggest a solution for it.
    Go to the design board of VC.
    I think you have an Input Form that contains the input fields and the Submit button. There will be a link named "submit"between the Input Form & the Data Service(say BAPI). Click on the  submit link, you will get the Input Fields & Assigned values of the Input Form at the bottom right side. Go to the Assigned Value of the particular field & apply a formula like UPPER(@inputfield). So now whatever case you give in the inputfield, it is converted to UPPER case before Submiting the values.Keep the Upper Case option checked at the formatting tab of the Input field properties, this will help to display the value in Upper case.
    For eg, BAPI_BANK_GETLIST, the input fields are BANK_CTRY & MAX_ROWS.
    Make the assigned value of bank_ctry as UPPER(@BANK_CTRY), you can get this with the help of formula. 
    This will solve your problem.
    Regards,
    Shemim

  • Zero fill and max length VC7 Compile to WebDynpro not working

    Hi,
    i try to call Customer get list and set the attributes zero fill and max length to the input table form.
    But the user has to put in the exact length and zero filled.
    Any idea what to do
    Thanks
    Uwe

    Hi Uwe,
    if I understand your question you need something like an alpha conversion.
    You can use a formula, therefore is an textfunction called LPAD(text,len,pad).
    You can use it like this:
    LPAD(@yourtext, 18, "0")
    @yourtext contains the input, the length is 18 and filling values is 0 like a alpha conversion.
    Best Regards,
    Marcel

  • Extract First Zero Crossing After Peak

    I have a signal that approximates a noisy sine wave which I want to broadly break down into segments of negative and positive slope. As peak detection on the original trace is messy and the section of positive slope is complex, I plan to extract these features by working with the differential (the maximum velocity of the principle waveform is largely invariant and can be easily thresholded from the lower amplitude waveforms). I can easily detect the MIN peaks in the differential and now want to walk forward in the dataset to the first transition across the zero line and extract this timepoint to a new dataset. Does anyone have a script that I can modify for this purpose? Essentially, I want to trigger with an existing timepoint, iterate to the first timepoint where ti times ti+1 is negative and then write ti+1 to a new waveform.  I also want to walk backwards to the the first transition across the zero line and extract this timepoint to a new dataset but this is secondary.
    Thanks!
    Matt
    Solved!
    Go to Solution.

    Sorry for not responding earlier about my progess.
    I was able to extract the timepoints using your advice but now want to go back to the original data and extract the y-values. For some reason, my for loop below completes but only writes no-values? Extracting the x and y values in parallel won't work because I generated by x-value subset using the differential of the original dataset.
    The general question is as follows:
    Given a common timepoint, find the y-value associated with that timepoint in another channel.
    FOR i=1 TO InitContrLength
       ChDx(i, InitContrY) = ChDx(ChDx(i,InitContr)/Interval, Filtered)
       Next
    InitContr is an array of discontinuous time values which represent a subset of the original time series. My for loop is designed to iterate through the InitContr, converting them to an integer representing the appropriate row in my original dataset (Filtered) by dividing the time value by the step interval, and then writing the value from Filtered (which is an array of y-values) that corresponds to that row to InitContrY.
    Definitions in case the above is confusing
    InitContr = Channel containing a subset of time values
    Filtered = Channel containing all y-values from the original waveform
    Interval = step width of the original waveform
    InitContrY = New Channel that I want to write y-values to that correspond to InitContr x-Values
    Any ideas or links to a debugging primer would be greatly appreciated. If I could iterate through my for loop and visualize the variables in real time, I think I could figure this out myself.
    Matt

  • I somehow changed a video in my imovie to zero fps, so it just plays black.  The video still exists on my desktop but even when I delete the files from imovie and reimport them the file is still in zero fps and play black.

    somehow changed a video in my imovie to zero fps, so it just plays black.  The video still exists on my desktop but even when I delete the files from imovie and reimport them the file is still in zero fps and play black.

    I'm not sure of your question.
    Are you asking how to use Photoshop?
    Or are you asking for the dimensions of video iMovie uses?
    It edits in 720P HD, which is 1280x720.
    You can make it a bit bigger so you can zoom in.
    Much bigger then this is a waste of time.

Maybe you are looking for

  • How does PerspectiveMatrix3D works?

    Yeah, I know that it's not in API yet, but it comes with AGALMiniAssembler so I think its release candiate. So, I have some problems with transforming vectors. For example, I have vector Vector3D(200, 0, 100). After some perspective transformations I

  • Missing chapters / Tracks in audibooks

    Hi, I am wondering: have I been unlucky with my pruchases, or is it iTune standard not to divide audibooks into useable parts? First I bought a novel. Came in 5 chunks of 2 hours plus. No chapters. Fall asleep, and next time you'll have to rewind and

  • PDF Form with a reset button

    I designed an interactive pdf form for a company with a reset button. If someone fills it out then sends it to someone, what's stopping the receipient from hitting the reset button and erasing the info the person sent them.

  • MI 7.1 data objects push data to backend in some sequence

    Hi all, Let's say we have 2 data objects with no dependency between these. If we add instances of these data objects on the client in some sequence, can we be sure that these instances will arrive on DOE in the same order and will be processed in tha

  • GPS testing application?

    How can I test the GPS seperatey from mobile phone mast positioning??? Im pretty sure that GPS does not work at all on the 3GS. Maybe everyone has this problem as they wouldnt know if it was working while that have mobile reception. I get fine locati